mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 04:56:06 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
50b25a59ec
|
@ -30,7 +30,7 @@ class Controller {
|
||||||
* @return object an object of a class implementing the view
|
* @return object an object of a class implementing the view
|
||||||
*/
|
*/
|
||||||
static function factory($class, $params=array()) { /* {{{ */
|
static function factory($class, $params=array()) { /* {{{ */
|
||||||
global $settings, $session, $extMgr, $request;
|
global $settings, $session, $extMgr, $request, $logger;
|
||||||
if(!$class) {
|
if(!$class) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -59,6 +59,7 @@ class Controller {
|
||||||
$controller->setParam('session', $session);
|
$controller->setParam('session', $session);
|
||||||
$controller->setParam('request', $request);
|
$controller->setParam('request', $request);
|
||||||
$controller->setParam('settings', $settings);
|
$controller->setParam('settings', $settings);
|
||||||
|
$controller->setParam('logger', $logger);
|
||||||
return $controller;
|
return $controller;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -46,7 +46,7 @@ class UI extends UI_Default {
|
||||||
* @return object an object of a class implementing the view
|
* @return object an object of a class implementing the view
|
||||||
*/
|
*/
|
||||||
static function factory($theme, $class='', $params=array()) { /* {{{ */
|
static function factory($theme, $class='', $params=array()) { /* {{{ */
|
||||||
global $settings, $dms, $user, $session, $extMgr, $request;
|
global $settings, $dms, $user, $session, $extMgr, $request, $logger;
|
||||||
if(!$class) {
|
if(!$class) {
|
||||||
$class = 'Bootstrap';
|
$class = 'Bootstrap';
|
||||||
$class = 'Style';
|
$class = 'Style';
|
||||||
|
@ -135,6 +135,7 @@ class UI extends UI_Default {
|
||||||
$view->setParam('class', $class);
|
$view->setParam('class', $class);
|
||||||
$view->setParam('session', $session);
|
$view->setParam('session', $session);
|
||||||
$view->setParam('request', $request);
|
$view->setParam('request', $request);
|
||||||
|
$view->setParam('logger', $logger);
|
||||||
// $view->setParam('settings', $settings);
|
// $view->setParam('settings', $settings);
|
||||||
$view->setParam('sitename', $settings->_siteName);
|
$view->setParam('sitename', $settings->_siteName);
|
||||||
$view->setParam('rootfolderid', $settings->_rootFolderID);
|
$view->setParam('rootfolderid', $settings->_rootFolderID);
|
||||||
|
|
|
@ -1754,11 +1754,11 @@ $(document).ready(function() {
|
||||||
function getSequenceChooser($parent, $type, $keepID = -1) { /* {{{ */
|
function getSequenceChooser($parent, $type, $keepID = -1) { /* {{{ */
|
||||||
$objArr = [];
|
$objArr = [];
|
||||||
if($type == 'd') {
|
if($type == 'd') {
|
||||||
if(($c = $parent->hasDocuments()) < 50)
|
if(($c = $parent->hasDocuments()) < 200)
|
||||||
$objArr = $parent->getDocuments('s');
|
$objArr = $parent->getDocuments('s');
|
||||||
$minmax = $parent->getDocumentsMinMax();
|
$minmax = $parent->getDocumentsMinMax();
|
||||||
} elseif($type = 'f') {
|
} elseif($type = 'f') {
|
||||||
if(($c = $parent->hasSubFolders()) < 50)
|
if(($c = $parent->hasSubFolders()) < 200)
|
||||||
$objArr = $parent->getSubFolders('s');
|
$objArr = $parent->getSubFolders('s');
|
||||||
$minmax = $parent->getFoldersMinMax();
|
$minmax = $parent->getFoldersMinMax();
|
||||||
} else
|
} else
|
||||||
|
@ -1772,7 +1772,7 @@ $(document).ready(function() {
|
||||||
$min = (float) $minmax['min'];
|
$min = (float) $minmax['min'];
|
||||||
$max = $minmax['max']+1.0;
|
$max = $minmax['max']+1.0;
|
||||||
}
|
}
|
||||||
$content = "<select name=\"sequence\">\n";
|
$content = "<select class=\"chzn-select\" name=\"sequence\">\n";
|
||||||
if ($keepID != -1) {
|
if ($keepID != -1) {
|
||||||
$content .= " <option value=\"keep\">" . getMLText("seq_keep");
|
$content .= " <option value=\"keep\">" . getMLText("seq_keep");
|
||||||
}
|
}
|
||||||
|
|
|
@ -668,9 +668,10 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
||||||
<?php
|
<?php
|
||||||
break;
|
break;
|
||||||
case 'select':
|
case 'select':
|
||||||
|
$allowempty = empty($conf['allow_empty']) ? false : $conf['allow_empty'];
|
||||||
if(!empty($conf['options'])) {
|
if(!empty($conf['options'])) {
|
||||||
$selections = empty($settings->_extensions[$extname][$confkey]) ? array() : explode(",", $settings->_extensions[$extname][$confkey]);
|
$selections = empty($settings->_extensions[$extname][$confkey]) ? array() : explode(",", $settings->_extensions[$extname][$confkey]);
|
||||||
echo "<select class=\"chzn-select\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." style=\"width: 100%;\">";
|
echo "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")." name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." style=\"width: 100%;\">";
|
||||||
if(is_array($conf['options'])) {
|
if(is_array($conf['options'])) {
|
||||||
$options = $conf['options'];
|
$options = $conf['options'];
|
||||||
} elseif(is_string($conf['options']) && $conf['options'] == 'hook') {
|
} elseif(is_string($conf['options']) && $conf['options'] == 'hook') {
|
||||||
|
@ -678,6 +679,8 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
||||||
} else {
|
} else {
|
||||||
$options = [];
|
$options = [];
|
||||||
}
|
}
|
||||||
|
if($allowempty)
|
||||||
|
echo "<option value=\"\"></option>";
|
||||||
foreach($options as $key=>$opt) {
|
foreach($options as $key=>$opt) {
|
||||||
echo "<option value=\"".$key."\"";
|
echo "<option value=\"".$key."\"";
|
||||||
if(in_array($key, $selections))
|
if(in_array($key, $selections))
|
||||||
|
@ -687,7 +690,6 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
||||||
echo "</select>";
|
echo "</select>";
|
||||||
} elseif(!empty($conf['internal'])) {
|
} elseif(!empty($conf['internal'])) {
|
||||||
$selections = empty($settings->_extensions[$extname][$confkey]) ? array() : explode(",", $settings->_extensions[$extname][$confkey]);
|
$selections = empty($settings->_extensions[$extname][$confkey]) ? array() : explode(",", $settings->_extensions[$extname][$confkey]);
|
||||||
$allowempty = empty($conf['allow_empty']) ? false : $conf['allow_empty'];
|
|
||||||
switch($conf['internal']) {
|
switch($conf['internal']) {
|
||||||
case "categories":
|
case "categories":
|
||||||
$categories = $dms->getDocumentCategories();
|
$categories = $dms->getDocumentCategories();
|
||||||
|
|
|
@ -1692,11 +1692,11 @@ $(document).ready(function() {
|
||||||
function getSequenceChooser($parent, $type, $keepID = -1) { /* {{{ */
|
function getSequenceChooser($parent, $type, $keepID = -1) { /* {{{ */
|
||||||
$objArr = [];
|
$objArr = [];
|
||||||
if($type == 'd') {
|
if($type == 'd') {
|
||||||
if(($c = $parent->hasDocuments()) < 50)
|
if(($c = $parent->hasDocuments()) < 200)
|
||||||
$objArr = $parent->getDocuments('s');
|
$objArr = $parent->getDocuments('s');
|
||||||
$minmax = $parent->getDocumentsMinMax();
|
$minmax = $parent->getDocumentsMinMax();
|
||||||
} elseif($type = 'f') {
|
} elseif($type = 'f') {
|
||||||
if(($c = $parent->hasSubFolders()) < 50)
|
if(($c = $parent->hasSubFolders()) < 200)
|
||||||
$objArr = $parent->getSubFolders('s');
|
$objArr = $parent->getSubFolders('s');
|
||||||
$minmax = $parent->getFoldersMinMax();
|
$minmax = $parent->getFoldersMinMax();
|
||||||
} else
|
} else
|
||||||
|
@ -1710,7 +1710,7 @@ $(document).ready(function() {
|
||||||
$min = (float) $minmax['min'];
|
$min = (float) $minmax['min'];
|
||||||
$max = $minmax['max']+1.0;
|
$max = $minmax['max']+1.0;
|
||||||
}
|
}
|
||||||
$content = "<select class=\"form-control\" name=\"sequence\">\n";
|
$content = "<select class=\"form-control chzn-select\" data-allow-clear=\"false\" name=\"sequence\">\n";
|
||||||
if ($keepID != -1) {
|
if ($keepID != -1) {
|
||||||
$content .= " <option value=\"keep\">" . getMLText("seq_keep");
|
$content .= " <option value=\"keep\">" . getMLText("seq_keep");
|
||||||
}
|
}
|
||||||
|
|
|
@ -737,9 +737,9 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
||||||
$workflow = null;
|
$workflow = null;
|
||||||
if($this->settings->_workflowMode == 'traditional' || $this->settings->_workflowMode == 'traditional_only_approval') {
|
if($this->settings->_workflowMode == 'traditional' || $this->settings->_workflowMode == 'traditional_only_approval') {
|
||||||
if($this->settings->_workflowMode == 'traditional') {
|
if($this->settings->_workflowMode == 'traditional') {
|
||||||
$reviewers = getMandatoryReviewers($document->getFolder(), $this->user);
|
$reviewers = getMandatoryReviewers($document->getFolder(), $document, $this->user);
|
||||||
}
|
}
|
||||||
$approvers = getMandatoryApprovers($document->getFolder(), $this->user);
|
$approvers = getMandatoryApprovers($document->getFolder(), $document, $this->user);
|
||||||
} elseif($this->settings->_workflowMode == 'advanced') {
|
} elseif($this->settings->_workflowMode == 'advanced') {
|
||||||
if($workflows = $this->user->getMandatoryWorkflows()) {
|
if($workflows = $this->user->getMandatoryWorkflows()) {
|
||||||
$workflow = array_shift($workflows);
|
$workflow = array_shift($workflows);
|
||||||
|
@ -809,9 +809,9 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
||||||
$workflow = null;
|
$workflow = null;
|
||||||
if($this->settings->_workflowMode == 'traditional' || $this->settings->_workflowMode == 'traditional_only_approval') {
|
if($this->settings->_workflowMode == 'traditional' || $this->settings->_workflowMode == 'traditional_only_approval') {
|
||||||
if($this->settings->_workflowMode == 'traditional') {
|
if($this->settings->_workflowMode == 'traditional') {
|
||||||
$reviewers = getMandatoryReviewers($folder, $this->user);
|
$reviewers = getMandatoryReviewers($folder, null, $this->user);
|
||||||
}
|
}
|
||||||
$approvers = getMandatoryApprovers($folder, $this->user);
|
$approvers = getMandatoryApprovers($folder, null, $this->user);
|
||||||
} elseif($this->settings->_workflowMode == 'advanced') {
|
} elseif($this->settings->_workflowMode == 'advanced') {
|
||||||
if($workflows = $this->user->getMandatoryWorkflows()) {
|
if($workflows = $this->user->getMandatoryWorkflows()) {
|
||||||
$workflow = array_shift($workflows);
|
$workflow = array_shift($workflows);
|
||||||
|
@ -1286,9 +1286,9 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
||||||
$workflow = null;
|
$workflow = null;
|
||||||
if($this->settings->_workflowMode == 'traditional' || $this->settings->_workflowMode == 'traditional_only_approval') {
|
if($this->settings->_workflowMode == 'traditional' || $this->settings->_workflowMode == 'traditional_only_approval') {
|
||||||
if($this->settings->_workflowMode == 'traditional') {
|
if($this->settings->_workflowMode == 'traditional') {
|
||||||
$reviewers = getMandatoryReviewers($objdest, $this->user);
|
$reviewers = getMandatoryReviewers($objdest, null, $this->user);
|
||||||
}
|
}
|
||||||
$approvers = getMandatoryApprovers($objdest, $this->user);
|
$approvers = getMandatoryApprovers($objdest, null, $this->user);
|
||||||
} elseif($this->settings->_workflowMode == 'advanced') {
|
} elseif($this->settings->_workflowMode == 'advanced') {
|
||||||
if($workflows = $this->user->getMandatoryWorkflows()) {
|
if($workflows = $this->user->getMandatoryWorkflows()) {
|
||||||
$workflow = array_shift($workflows);
|
$workflow = array_shift($workflows);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user