Merge branch 'seeddms-6.0.x' into seeddms-6.1.x

This commit is contained in:
Uwe Steinmann 2022-09-05 11:49:48 +02:00
commit 7a2d252e7a
92 changed files with 3504 additions and 624 deletions

View File

@ -7,6 +7,12 @@
- do not use md5 password hashing anymore, hashes will be updated automatically
when passwords are reset
--------------------------------------------------------------------------------
Changes in version 6.0.20
--------------------------------------------------------------------------------
- merge changes up to 5.1.27
- fix triggering workflow (Closes: #542)
--------------------------------------------------------------------------------
Changes in version 6.0.19
--------------------------------------------------------------------------------
@ -233,6 +239,24 @@
- add document list which can be exported as an archive
- search results can be exported
--------------------------------------------------------------------------------
Changes in version 5.1.27
--------------------------------------------------------------------------------
- fix adding new attribute definition if object type is 'all'
- EmptyFolder runs callbacks to remove objects from index and remove preview images
- skip internal conversion service for images if imagick extension is missing
- running the controller will always call the hooks preRun and postRun
- add tabs on ViewFolder page
- link behind logo in header can be set in extension
- move attributes for documents and folders on search page into own accordion
- search page uses conversion mgr for preview images
- backport export of search result from seeddms 6.0.x
- ldap authentication used 'uid' instead 'cn' in distinguished name if
the initial bind failed and a second bind with the user's credentials
is done
- fix sorting in search result
- import of users can handle hidden and disabled flag
--------------------------------------------------------------------------------
Changes in version 5.1.26
--------------------------------------------------------------------------------

View File

@ -2132,8 +2132,8 @@ class SeedDMS_Core_DMS {
if(is_string($attribute))
$attribute = array($attribute);
$searchAttributes[] = "EXISTS (SELECT NULL FROM `tblFolderAttributes` WHERE `tblFolderAttributes`.`attrdef`=".$attrdefid." AND (`tblFolderAttributes`.`value` like '%".$valueset[0].implode("%' OR `tblFolderAttributes`.`value` like '%".$valueset[0], $attribute)."%') AND `tblFolderAttributes`.`folder`=`tblFolders`.`id`)";
} elseif(is_string($attribute)) {
$searchAttributes[] = "EXISTS (SELECT NULL FROM `tblFolderAttributes` WHERE `tblFolderAttributes`.`attrdef`=".$attrdefid." AND `tblFolderAttributes`.`value`='".$attribute."' AND `tblFolderAttributes`.`folder`=`tblFolders`.`id`)";
} else {
$searchAttributes[] = "EXISTS (SELECT NULL FROM `tblFolderAttributes` WHERE `tblFolderAttributes`.`attrdef`=".$attrdefid." AND (`tblFolderAttributes`.`value`='".(is_array($attribute) ? implode("' OR `tblFolderAttributes`.`value` = '", $attribute) : $attribute)."') AND `tblFolderAttributes`.`folder`=`tblFolders`.`id`)";
}
} else {
if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date && is_array($attribute)) {
@ -2220,12 +2220,14 @@ class SeedDMS_Core_DMS {
$searchQuery .= " ORDER BY `tblFolders`.`name` DESC";
break;
case 'na':
case 'n':
$searchQuery .= " ORDER BY `tblFolders`.`name`";
break;
case 'id':
$searchQuery .= " ORDER BY `tblFolders`.`id` DESC";
break;
case 'ia':
case 'i':
$searchQuery .= " ORDER BY `tblFolders`.`id`";
break;
default:
@ -2329,7 +2331,7 @@ class SeedDMS_Core_DMS {
$attribute = array($attribute);
$lsearchAttributes[] = "EXISTS (SELECT NULL FROM `tblDocumentAttributes` WHERE `tblDocumentAttributes`.`attrdef`=".$attrdefid." AND (`tblDocumentAttributes`.`value` like '%".$valueset[0].implode("%' OR `tblDocumentAttributes`.`value` like '%".$valueset[0], $attribute)."%') AND `tblDocumentAttributes`.`document` = `tblDocuments`.`id`)";
} else
$lsearchAttributes[] = "EXISTS (SELECT NULL FROM `tblDocumentAttributes` WHERE `tblDocumentAttributes`.`attrdef`=".$attrdefid." AND `tblDocumentAttributes`.`value`='".$attribute."' AND `tblDocumentAttributes`.`document` = `tblDocuments`.`id`)";
$lsearchAttributes[] = "EXISTS (SELECT NULL FROM `tblDocumentAttributes` WHERE `tblDocumentAttributes`.`attrdef`=".$attrdefid." AND (`tblDocumentAttributes`.`value`='".(is_array($attribute) ? implode("' OR `tblDocumentAttributes`.`value` = '", $attribute) : $attribute)."') AND `tblDocumentAttributes`.`document` = `tblDocuments`.`id`)";
} else {
if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date && is_array($attribute)) {
$kkll = [];
@ -2352,7 +2354,7 @@ class SeedDMS_Core_DMS {
$attribute = array($attribute);
$lsearchAttributes[] = "EXISTS (SELECT NULL FROM `tblDocumentContentAttributes` WHERE `tblDocumentContentAttributes`.`attrdef`=".$attrdefid." AND (`tblDocumentContentAttributes`.`value` like '%".$valueset[0].implode("%' OR `tblDocumentContentAttributes`.`value` like '%".$valueset[0], $attribute)."%') AND `tblDocumentContentAttributes`.`content` = `tblDocumentContent`.`id`)";
} else {
$lsearchAttributes[] = "EXISTS (SELECT NULL FROM `tblDocumentContentAttributes` WHERE `tblDocumentContentAttributes`.`attrdef`=".$attrdefid." AND `tblDocumentContentAttributes`.`value`='".$attribute."' AND `tblDocumentContentAttributes`.content = `tblDocumentContent`.id)";
$lsearchAttributes[] = "EXISTS (SELECT NULL FROM `tblDocumentContentAttributes` WHERE `tblDocumentContentAttributes`.`attrdef`=".$attrdefid." AND (`tblDocumentContentAttributes`.`value`='".(is_array($attribute) ? implode("' OR `tblDocumentContentAttributes`.`value` = '", $attribute) : $attribute)."') AND `tblDocumentContentAttributes`.content = `tblDocumentContent`.id)";
}
} else {
if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date && is_array($attribute)) {
@ -2574,12 +2576,14 @@ class SeedDMS_Core_DMS {
$orderbyQuery = " ORDER BY `tblDocuments`.`name` DESC";
break;
case 'na':
case 'n':
$orderbyQuery = " ORDER BY `tblDocuments`.`name`";
break;
case 'id':
$orderbyQuery = " ORDER BY `tblDocuments`.`id` DESC";
break;
case 'ia':
case 'i':
$orderbyQuery = " ORDER BY `tblDocuments`.`id`";
break;
default:
@ -3496,7 +3500,7 @@ class SeedDMS_Core_DMS {
if (is_object($this->getAttributeDefinitionByName($name))) {
return false;
}
if(!$objtype)
if($objtype < SeedDMS_Core_AttributeDefinition::objtype_all || $objtype > SeedDMS_Core_AttributeDefinition::objtype_documentcontent)
return false;
if(!$type)
return false;

View File

@ -12,7 +12,7 @@
<email>uwe@steinmann.cx</email>
<active>yes</active>
</lead>
<date>2022-05-20</date>
<date>2022-08-31</date>
<time>13:44:55</time>
<version>
<release>6.1.0</release>
@ -1994,6 +1994,24 @@ add method SeedDMS_Core_DatabaseAccess::setLogFp()
- SeedDMS_Core_DMS::getAllAttributeDefinitions() has second parameter to filter attributes by type
</notes>
</release>
<release>
<date>2022-08-31</date>
<time>13:44:55</time>
<version>
<release>5.1.27</release>
<api>5.1.27</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes>
- fix SeedDMS_Core_DMS::addAttributeDefinition() when objtype is 0
- sort search result even if sortorder is 'i' or 'n'
- pass an array as an attribute to search() will OR each element
</notes>
</release>
<release>
<date>2017-02-28</date>
<time>06:34:50</time>
@ -2377,7 +2395,7 @@ better error checking in SeedDMS_Core_Document::cancelCheckOut()
</notes>
</release>
<release>
<date>2022-04-22</date>
<date>2022-05-20</date>
<time>13:44:55</time>
<version>
<release>6.0.19</release>
@ -2393,5 +2411,21 @@ better error checking in SeedDMS_Core_Document::cancelCheckOut()
- removeFromProcesses() will not touch documents for which the new user does not have at least read access
</notes>
</release>
<release>
<date>2022-05-20</date>
<time>13:44:55</time>
<version>
<release>6.0.20</release>
<api>6.0.20</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes>
- all changes from 5.1.27 merged
</notes>
</release>
</changelog>
</package>

View File

@ -17,6 +17,7 @@
"pear/db": "*",
"alecrabbit/php-console-colour": "*",
"dragonmantank/cron-expression": "^2.2",
"zf1/zend-search-lucene": "*"
"zf1/zend-search-lucene": "*",
"symfony/http-foundation": "^5.4"
}
}

View File

@ -65,7 +65,7 @@ class SeedDMS_Controller_AddDocument extends SeedDMS_Controller_Common {
$attribute = date('Y-m-d', makeTsFromDate($attribute));
break;
}
if(!$attrdef->validate($attribute)) {
if(!$attrdef->validate($attribute, null, true)) {
$this->errormsg = getAttributeValidationError($attrdef->getValidationError(), $attrdef->getName(), $attribute);
return false;
}
@ -89,7 +89,7 @@ class SeedDMS_Controller_AddDocument extends SeedDMS_Controller_Common {
$attribute = date('Y-m-d', makeTsFromDate($attribute));
break;
}
if(!$attrdef->validate($attribute)) {
if(!$attrdef->validate($attribute, null, true)) {
$this->errormsg = getAttributeValidationError($attrdef->getValidationError(), $attrdef->getName(), $attribute);
return false;
}

View File

@ -45,7 +45,7 @@ class SeedDMS_Controller_AddSubFolder extends SeedDMS_Controller_Common {
if($attrdef = $dms->getAttributeDefinition($attrdefid)) {
if(null === ($ret = $this->callHook('validateAttribute', $attrdef, $attribute))) {
if($attribute) {
if(!$attrdef->validate($attribute)) {
if(!$attrdef->validate($attribute, null, true)) {
$this->errormsg = getAttributeValidationError($attrdef->getValidationError(), $attrdef->getName(), $attribute);
return false;
}

View File

@ -30,119 +30,180 @@ class SeedDMS_Controller_DocumentAccess extends SeedDMS_Controller_Common {
$settings = $this->params['settings'];
$action = $this->params['action'];
// Change owner -----------------------------------------------------------
if ($action == "setowner") {
if(false === $this->callHook('preSetOwner', $document)) {
if(empty($this->errormsg))
$this->errormsg = 'hook_preSetOwner_failed';
return null;
}
$newowner = $this->params['newowner'];
$oldowner = $document->getOwner();
if($document->setOwner($newowner)) {
if(false === $this->callHook('postSetOwner', $document, $oldowner)) {
if(empty($this->errormsg))
$this->errormsg = 'hook_postSetOwner_failed';
return null;
}
}
} elseif ($action == "notinherit") {
if(false === $this->callHook('preSetNotInherit', $document)) {
if(empty($this->errormsg))
$this->errormsg = 'hook_preSetNotInherit_failed';
return null;
}
return null;
}
/* Get default access before access is not longer inherited. This
* will return the default access from the parent folder.
*/
$defAccess = $document->getDefaultAccess();
if(!$document->setInheritAccess(false)) {
return false;
}
// Change owner -----------------------------------------------------------
public function setowner() {
$dms = $this->params['dms'];
$user = $this->params['user'];
$folder = $this->params['folder'];
$document = $this->params['document'];
$settings = $this->params['settings'];
if(!$document->setDefaultAccess($defAccess)) {
return false;
}
//copy ACL of parent folder
$mode = $this->params['mode'];
if ($mode == "copy") {
$accessList = $folder->getAccessList();
foreach ($accessList["users"] as $userAccess)
$document->addAccess($userAccess->getMode(), $userAccess->getUserID(), true);
foreach ($accessList["groups"] as $groupAccess)
$document->addAccess($groupAccess->getMode(), $groupAccess->getGroupID(), false);
}
if(false === $this->callHook('postSetNotInherit', $document)) {
if(false === $this->callHook('preSetOwner', $document)) {
if(empty($this->errormsg))
$this->errormsg = 'hook_preSetOwner_failed';
return null;
}
$newowner = $this->params['newowner'];
$oldowner = $document->getOwner();
if($document->setOwner($newowner)) {
if(false === $this->callHook('postSetOwner', $document, $oldowner)) {
if(empty($this->errormsg))
$this->errormsg = 'hook_postSetNotInherit_failed';
$this->errormsg = 'hook_postSetOwner_failed';
return null;
}
} elseif ($action == "inherit") {
if(false === $this->callHook('preSetInherit', $document)) {
if(empty($this->errormsg))
$this->errormsg = 'hook_preSetInherit_failed';
return null;
}
if(!$document->clearAccessList() || !$document->setInheritAccess(true)) {
return false;
}
if(false === $this->callHook('postSetInherit', $document)) {
if(empty($this->errormsg))
$this->errormsg = 'hook_postSetInherit_failed';
return null;
}
} elseif ($action == "setdefault") {
if(false === $this->callHook('preSetDefault', $document)) {
if(empty($this->errormsg))
$this->errormsg = 'hook_preSetDefault_failed';
return null;
}
$mode = $this->params['mode'];
if(!$document->setDefaultAccess($mode)) {
return false;
}
if(false === $this->callHook('postSetDefault', $document)) {
if(empty($this->errormsg))
$this->errormsg = 'hook_postSetDefault_failed';
return null;
}
} elseif ($action == "editaccess") {
$mode = $this->params['mode'];
$userid = $this->params['userid'];
$groupid = $this->params['groupid'];
if ($userid) {
$document->changeAccess($mode, $userid, true);
}
elseif ($groupid) {
$document->changeAccess($mode, $groupid, false);
}
} elseif ($action == "delaccess") {
$userid = $this->params['userid'];
$groupid = $this->params['groupid'];
if ($userid) {
$document->removeAccess($userid, true);
}
elseif ($groupid) {
$document->removeAccess($groupid, false);
}
} elseif ($action == "addaccess") {
$mode = $this->params['mode'];
$userid = $this->params['userid'];
$groupid = $this->params['groupid'];
if ($userid && $userid != -1) {
$document->addAccess($mode, $userid, true);
}
elseif ($groupid && $groupid != -1) {
$document->addAccess($mode, $groupid, false);
}
}
return true;
}
public function notinherit() {
$dms = $this->params['dms'];
$user = $this->params['user'];
$folder = $this->params['folder'];
$document = $this->params['document'];
$settings = $this->params['settings'];
if(false === $this->callHook('preSetNotInherit', $document)) {
if(empty($this->errormsg))
$this->errormsg = 'hook_preSetNotInherit_failed';
return null;
}
/* Get default access before access is not longer inherited. This
* will return the default access from the parent folder.
*/
$defAccess = $document->getDefaultAccess();
if(!$document->setInheritAccess(false)) {
return false;
}
if(!$document->setDefaultAccess($defAccess)) {
return false;
}
//copy ACL of parent folder
$mode = $this->params['mode'];
if ($mode == "copy") {
$accessList = $folder->getAccessList();
foreach ($accessList["users"] as $userAccess)
$document->addAccess($userAccess->getMode(), $userAccess->getUserID(), true);
foreach ($accessList["groups"] as $groupAccess)
$document->addAccess($groupAccess->getMode(), $groupAccess->getGroupID(), false);
}
if(false === $this->callHook('postSetNotInherit', $document)) {
if(empty($this->errormsg))
$this->errormsg = 'hook_postSetNotInherit_failed';
return null;
}
return true;
}
public function inherit() {
$dms = $this->params['dms'];
$user = $this->params['user'];
$folder = $this->params['folder'];
$document = $this->params['document'];
$settings = $this->params['settings'];
if(false === $this->callHook('preSetInherit', $document)) {
if(empty($this->errormsg))
$this->errormsg = 'hook_preSetInherit_failed';
return null;
}
if(!$document->clearAccessList() || !$document->setInheritAccess(true)) {
return false;
}
if(false === $this->callHook('postSetInherit', $document)) {
if(empty($this->errormsg))
$this->errormsg = 'hook_postSetInherit_failed';
return null;
}
return true;
}
public function setdefault() {
$dms = $this->params['dms'];
$user = $this->params['user'];
$folder = $this->params['folder'];
$document = $this->params['document'];
$settings = $this->params['settings'];
if(false === $this->callHook('preSetDefault', $document)) {
if(empty($this->errormsg))
$this->errormsg = 'hook_preSetDefault_failed';
return null;
}
$mode = $this->params['mode'];
if(!$document->setDefaultAccess($mode)) {
return false;
}
if(false === $this->callHook('postSetDefault', $document)) {
if(empty($this->errormsg))
$this->errormsg = 'hook_postSetDefault_failed';
return null;
}
return true;
}
public function editaccess() {
$dms = $this->params['dms'];
$user = $this->params['user'];
$folder = $this->params['folder'];
$document = $this->params['document'];
$settings = $this->params['settings'];
$mode = $this->params['mode'];
$userid = $this->params['userid'];
$groupid = $this->params['groupid'];
if ($userid) {
$document->changeAccess($mode, $userid, true);
}
elseif ($groupid) {
$document->changeAccess($mode, $groupid, false);
}
return true;
}
public function delaccess() {
$dms = $this->params['dms'];
$user = $this->params['user'];
$folder = $this->params['folder'];
$document = $this->params['document'];
$settings = $this->params['settings'];
$userid = $this->params['userid'];
$groupid = $this->params['groupid'];
if ($userid) {
$document->removeAccess($userid, true);
}
elseif ($groupid) {
$document->removeAccess($groupid, false);
}
return true;
}
public function addaccess() {
$dms = $this->params['dms'];
$user = $this->params['user'];
$folder = $this->params['folder'];
$document = $this->params['document'];
$settings = $this->params['settings'];
$mode = $this->params['mode'];
$userid = $this->params['userid'];
$groupid = $this->params['groupid'];
if ($userid && $userid != -1) {
$document->addAccess($mode, $userid, true);
}
elseif ($groupid && $groupid != -1) {
$document->addAccess($mode, $groupid, false);
}
return true;
}
}

View File

@ -125,7 +125,7 @@ class SeedDMS_Controller_EditDocument extends SeedDMS_Controller_Common {
$attribute = date('Y-m-d', makeTsFromDate($attribute));
break;
}
if(!$attrdef->validate($attribute, $document, true)) {
if(!$attrdef->validate($attribute, $document, false)) {
$this->errormsg = getAttributeValidationError($attrdef->getValidationError(), $attrdef->getName(), $attribute);
return false;
}

View File

@ -59,7 +59,7 @@ class SeedDMS_Controller_EditFolder extends SeedDMS_Controller_Common {
$attribute = date('Y-m-d', makeTsFromDate($attribute));
break;
}
if(!$attrdef->validate($attribute, $folder, true)) {
if(!$attrdef->validate($attribute, $folder, false)) {
$this->errormsg = getAttributeValidationText($attrdef->getValidationError(), $attrdef->getName(), $attribute);
return false;
}

View File

@ -22,41 +22,64 @@
*/
class SeedDMS_Controller_EmptyFolder extends SeedDMS_Controller_Common {
public function run() {
/* Register a callback which removes each document/folder from the fulltext index
* The callback must return null otherwise the removal will be canceled.
*/
static function removeFromIndex($arr, $object) { /* {{{ */
$fulltextservice = $arr[0];
$lucenesearch = $fulltextservice->Search();
$hit = null;
if($object->isType('document'))
$hit = $lucenesearch->getDocument($object->getID());
elseif($object->isType('folder'))
$hit = $lucenesearch->getFolder($object->getID());
if($hit) {
$index = $fulltextservice->Indexer();
$index->delete($hit->id);
$index->commit();
}
return null;
} /* }}} */
static function removePreviews($arr, $document) { /* {{{ */
$previewer = $arr[0];
$previewer->deleteDocumentPreviews($document);
return null;
} /* }}} */
public function run() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
$settings = $this->params['settings'];
$folder = $this->params['folder'];
$index = $this->params['index'];
$indexconf = $this->params['indexconf'];
$fulltextservice = $this->params['fulltextservice'];
/* Get the document id and name before removing the document */
/* Get the folder id and name before removing the folder */
$foldername = $folder->getName();
$folderid = $folder->getID();
if(false === $this->callHook('preEmptyFolder')) {
if(empty($this->errormsg))
$this->errormsg = 'hook_preEmptyFolder_failed';
return null;
return false;
}
$result = $this->callHook('emptyFolder', $folder);
if($result === null) {
/* Register a callback which removes each document from the fulltext index
* The callback must return null other the removal will be canceled.
*/
function removeFromIndex($arr, $document) {
$index = $arr[0];
$indexconf = $arr[1];
$lucenesearch = new $indexconf['Search']($index);
if($hit = $lucenesearch->getDocument($document->getID())) {
$index->delete($hit->id);
$index->commit();
}
return null;
if($fulltextservice && ($index = $fulltextservice->Indexer())) {
/* Register a callback which is called by SeedDMS_Core when a folder
* or document is removed. The second parameter passed to this callback
* is the document or folder to be removed.
*/
$dms->addCallback('onPreRemoveDocument', 'SeedDMS_Controller_EmptyFolder::removeFromIndex', array($fulltextservice));
$dms->addCallback('onPreRemoveFolder', 'SeedDMS_Controller_EmptyFolder::removeFromIndex', array($fulltextservice));
}
if($index)
$dms->setCallback('onPreEmptyDocument', 'removeFromIndex', array($index, $indexconf));
/* Register another callback which removes the preview images of the document */
require_once("SeedDMS/Preview.php");
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir);
$dms->addCallback('onPreRemoveDocument', 'SeedDMS_Controller_EmptyFolder::removePreviews', array($previewer));
if (!$folder->emptyFolder()) {
$this->errormsg = 'error_occured';
@ -72,5 +95,5 @@ class SeedDMS_Controller_EmptyFolder extends SeedDMS_Controller_Common {
}
return true;
}
} /* }}} */
}

View File

@ -22,96 +22,93 @@
*/
class SeedDMS_Controller_Preview extends SeedDMS_Controller_Common {
public function run() {
global $theme;
public function version() {
$dms = $this->params['dms'];
$type = $this->params['type'];
$settings = $this->params['settings'];
$conversionmgr = $this->params['conversionmgr'];
switch($type) {
case "version":
$version = $this->params['version'];
$document = $this->params['document'];
$width = $this->params['width'];
if($version < 1) {
$content = $this->callHook('documentLatestContent', $document);
if($content === null)
$content = $document->getLatestContent();
} else {
$content = $this->callHook('documentContent', $document, $version);
if($content === null)
$content = $document->getContentByVersion($version);
}
if (!is_object($content)) {
$this->errormsg = 'invalid_version';
return false;
}
/* set params['content'] for compatiblity with older extensions which
* expect the content in the controller
*/
$this->params['content'] = $content;
if(null === $this->callHook('version')) {
if($width)
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir, $width, $settings->_cmdTimeout);
else
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir);
if($conversionmgr)
$previewer->setConversionMgr($conversionmgr);
else
$previewer->setConverters($settings->_converters['preview']);
$previewer->setXsendfile($settings->_enableXsendfile);
if(!$previewer->hasPreview($content)) {
add_log_line("");
if(!$previewer->createPreview($content)) {
add_log_line("", PEAR_LOG_ERR);
}
}
if(!$previewer->hasPreview($content)) {
header('Content-Type: image/svg+xml');
readfile('../views/'.$theme.'/images/empty.svg');
exit;
}
header('Content-Type: image/png');
$previewer->getPreview($content);
}
break;
case "file":
$object = $this->params['object'];
$document = $this->params['document'];
$width = $this->params['width'];
if (!is_object($object)) {
$this->errormsg = 'invalid_version';
return false;
}
if(null === $this->callHook('file')) {
if($width)
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir, $width, $settings->_cmdTimeout);
else
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir);
if($conversionmgr)
$previewer->setConversionMgr($conversionmgr);
else
$previewer->setConverters($settings->_converters['preview']);
$previewer->setXsendfile($settings->_enableXsendfile);
if(!$previewer->hasPreview($object)) {
add_log_line("");
if(!$previewer->createPreview($object)) {
add_log_line("", PEAR_LOG_ERR);
}
}
if(!$previewer->hasPreview($object)) {
header('Content-Type: image/svg+xml');
readfile('../views/'.$theme.'/images/empty.svg');
exit;
}
header('Content-Type: image/png');
$previewer->getPreview($object);
}
break;
$version = $this->params['version'];
$document = $this->params['document'];
$width = $this->params['width'];
if($version < 1) {
$content = $this->callHook('documentLatestContent', $document);
if($content === null)
$content = $document->getLatestContent();
} else {
$content = $this->callHook('documentContent', $document, $version);
if($content === null)
$content = $document->getContentByVersion($version);
}
return true;
}
if (!is_object($content)) {
$this->errormsg = 'invalid_version';
return false;
}
/* set params['content'] for compatiblity with older extensions which
* expect the content in the controller
*/
$this->params['content'] = $content;
if(null === $this->callHook('version')) {
if($width)
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir, $width, $settings->_cmdTimeout);
else
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir);
if($conversionmgr)
$previewer->setConversionMgr($conversionmgr);
else
$previewer->setConverters($settings->_converters['preview']);
$previewer->setXsendfile($settings->_enableXsendfile);
if(!$previewer->hasPreview($content)) {
add_log_line("");
if(!$previewer->createPreview($content)) {
add_log_line("", PEAR_LOG_ERR);
}
}
if(!$previewer->hasPreview($content)) {
return false;
}
header('Content-Type: image/png');
$previewer->getPreview($content);
return true;
}
} /* }}} */
public function file() {
$dms = $this->params['dms'];
$settings = $this->params['settings'];
$conversionmgr = $this->params['conversionmgr'];
$object = $this->params['object'];
$document = $this->params['document'];
$width = $this->params['width'];
if (!is_object($object)) {
$this->errormsg = 'invalid_version';
return false;
}
if(null === $this->callHook('file')) {
if($width)
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir, $width, $settings->_cmdTimeout);
else
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir);
if($conversionmgr)
$previewer->setConversionMgr($conversionmgr);
else
$previewer->setConverters($settings->_converters['preview']);
$previewer->setXsendfile($settings->_enableXsendfile);
if(!$previewer->hasPreview($object)) {
add_log_line("");
if(!$previewer->createPreview($object)) {
add_log_line("", PEAR_LOG_ERR);
}
}
if(!$previewer->hasPreview($object)) {
return false;
}
header('Content-Type: image/png');
$previewer->getPreview($object);
return true;
}
} /* }}} */
}

View File

@ -22,17 +22,17 @@
*/
class SeedDMS_Controller_RemoveFolder extends SeedDMS_Controller_Common {
/* Register a callback which removes each document from the fulltext index
/* Register a callback which removes each document/folder from the fulltext index
* The callback must return null otherwise the removal will be canceled.
*/
static function removeFromIndex($arr, $document) { /* {{{ */
static function removeFromIndex($arr, $object) { /* {{{ */
$fulltextservice = $arr[0];
$lucenesearch = $fulltextservice->Search();
$hit = null;
if($document->isType('document'))
$hit = $lucenesearch->getDocument($document->getID());
elseif($document->isType('folder'))
$hit = $lucenesearch->getFolder($document->getID());
if($object->isType('document'))
$hit = $lucenesearch->getDocument($object->getID());
elseif($object->isType('folder'))
$hit = $lucenesearch->getFolder($object->getID());
if($hit) {
$index = $fulltextservice->Indexer();
$index->delete($hit->id);
@ -55,7 +55,7 @@ class SeedDMS_Controller_RemoveFolder extends SeedDMS_Controller_Common {
$folder = $this->params['folder'];
$fulltextservice = $this->params['fulltextservice'];
/* Get the document id and name before removing the document */
/* Get the folder id and name before removing the folder */
$foldername = $folder->getName();
$folderid = $folder->getID();

View File

@ -30,7 +30,7 @@ class Controller {
* @return object an object of a class implementing the view
*/
static function factory($class, $params=array()) { /* {{{ */
global $settings, $session, $extMgr;
global $settings, $session, $extMgr, $request;
if(!$class) {
return null;
}
@ -57,6 +57,7 @@ class Controller {
$controller->setParam('getVars', $_GET);
$controller->setParam('requestVars', $_REQUEST);
$controller->setParam('session', $session);
$controller->setParam('request', $request);
$controller->setParam('settings', $settings);
return $controller;
}

View File

@ -41,37 +41,56 @@ class SeedDMS_Controller_Common {
*/
protected $lasthookresult;
function __construct($params) {
public function __construct($params) {
$this->params = $params;
$this->error = 0;
$this->errormsg = '';
}
/**
* Call methods with name in $get['action']
* Call method with name in $get['action']
*
* @params array $get $_GET or $_POST variables
* Until 5.1.26 (6.0.19) this method took the name of the
* controller method to run from the element 'action' passed
* in the array $get. Since 5.1.27 (6.0.20) a PSR7 Request
* object is available in the controller and used to get the
* action.
*
* @params array $get $_GET or $_POST variables (since 5.1.27 this is no longer used)
* @return mixed return value of called method
*/
function __invoke($get=array()) {
$this->callHook('preRun', isset($get['action']) ? $get['action'] : 'run');
if(isset($get['action']) && $get['action']) {
if(method_exists($this, $get['action'])) {
return $this->{$get['action']}();
} else {
echo "Missing action '".$get['action']."'";
return false;
public function __invoke($get=array()) {
$action = null;
if(!$action = $this->getParam('action')) {
$request = $this->getParam('request');
if($request) {
if($request->isMethod('get'))
$action = $request->query->get('action');
elseif($request->isMethod('post'))
$action = $request->request->get('action');
}
} else
return $this->run();
$this->callHook('postRun', isset($get['action']) ? $get['action'] : 'run');
}
if(!$this->callHook('preRun', get_class($this), $action ? $action : 'run')) {
if($action) {
if(method_exists($this, $action)) {
return $this->{$action}();
} else {
echo "Missing action '".$action."'";
return false;
}
} else
return $this->run();
} else {
return false;
}
$this->callHook('postRun', get_class($this), $action ? $action : 'run');
}
function setParams($params) {
public function setParams($params) {
$this->params = $params;
}
function setParam($name, $value) {
public function setParam($name, $value) {
$this->params[$name] = $value;
}
@ -85,7 +104,7 @@ class SeedDMS_Controller_Common {
* @param string $name name of parameter
* @return mixed value of parameter or null if parameter does not exist
*/
function getParam($name) {
public function getParam($name) {
return isset($this->params[$name]) ? $this->params[$name] : null;
}
@ -95,7 +114,7 @@ class SeedDMS_Controller_Common {
* @param string $name name of parameter
* @return boolean true if parameter exists otherwise false
*/
function hasParam($name) {
public function hasParam($name) {
return isset($this->params[$name]) ? true : false;
}
@ -104,12 +123,12 @@ class SeedDMS_Controller_Common {
*
* @param string $name name of parameter
*/
function unsetParam($name) {
public function unsetParam($name) {
if(isset($this->params[$name]))
unset($this->params[$name]);
}
function run() {
public function run() {
}
/**

View File

@ -170,7 +170,7 @@ class SeedDMS_Download_Mgr {
$col += 4;
if(isset($this->extracols[$item->getID()]) && $this->extracols[$item->getID()]) {
foreach($this->extracols[$item->getID()] as $column)
$sheet->setCellValueByColumnAndRow($col++, $i, $column);
$sheet->setCellValueByColumnAndRow($col++, $i, is_array($column) ? implode("\n", $column) : $column );
}
$i = max($l, $k);
$i++;

View File

@ -55,7 +55,7 @@ class SeedDMS_LdapAuthentication extends SeedDMS_Authentication {
/* Check if ldap base dn is set, and use ldap server if it is */
if (isset($settings->_ldapBaseDN)) {
$ldapSearchAttribut = "uid=";
$tmpDN = "cn=".$username.",".$settings->_ldapBaseDN;
$tmpDN = "uid=".$username.",".$settings->_ldapBaseDN;
}
/* Active directory has a different base dn */
@ -127,6 +127,7 @@ class SeedDMS_LdapAuthentication extends SeedDMS_Authentication {
if (!is_bool($search)) {
$info = ldap_get_entries($ds, $search);
if (!is_bool($info) && $info["count"]==1 && $info[0]["count"]>0) {
$user = $dms->addUser($username, null, $info[0]['cn'][0], $info[0]['mail'][0], $settings->_language, $settings->_theme, "", 3);
}

View File

@ -46,7 +46,7 @@ class UI extends UI_Default {
* @return object an object of a class implementing the view
*/
static function factory($theme, $class='', $params=array()) { /* {{{ */
global $settings, $dms, $user, $session, $extMgr;
global $settings, $dms, $user, $session, $extMgr, $request;
if(!$class) {
$class = 'Bootstrap';
$class = 'Style';
@ -128,6 +128,7 @@ class UI extends UI_Default {
$view->setParam('theme', $theme);
$view->setParam('class', $class);
$view->setParam('session', $session);
$view->setParam('request', $request);
// $view->setParam('settings', $settings);
$view->setParam('sitename', $settings->_siteName);
$view->setParam('rootfolderid', $settings->_rootFolderID);

View File

@ -45,17 +45,40 @@ class SeedDMS_View_Common {
$this->imgpath = '../views/'.$theme.'/images/';
}
/**
* Call method with name in $get['action']
*
* Until 5.1.26 (6.0.19) this method took the name of the
* controller method to run from the element 'action' passed
* in the array $get. Since 5.1.27 (6.0.20) a PSR7 Request
* object is available in the controller and used to get the
* action.
*
* @params array $get $_GET or $_POST variables (since 5.1.27 this is no longer used)
* @return mixed return value of called method
*/
public function __invoke($get=array()) {
$this->callHook('preRun', isset($get['action']) ? $get['action'] : 'show');
if(isset($get['action']) && $get['action']) {
if(method_exists($this, $get['action'])) {
$this->{$get['action']}();
} else {
echo "Missing action '".htmlspecialchars($get['action'])."'";
}
} else
$this->show();
$this->callHook('postRun', isset($get['action']) ? $get['action'] : 'show');
$action = null;
$request = $this->getParam('request');
if($request) {
if($request->isMethod('get'))
$action = $request->query->get('action');
elseif($request->isMethod('post'))
$action = $request->request->get('action');
}
if(!$this->callHook('preRun', get_class($this), $action ? $action : 'show')) {
if($action) {
if(method_exists($this, $action)) {
$this->{$action}();
} else {
echo "Missing action '".htmlspecialchars($action)."'";
}
} else
$this->show();
} else {
return false;
}
$this->callHook('postRun', $action ? $action : 'show');
}
public function setParams($params) {
@ -78,7 +101,7 @@ class SeedDMS_View_Common {
* @param string $name name of parameter
* @return boolean true if parameter exists otherwise false
*/
function hasParam($name) {
public function hasParam($name) {
return isset($this->params[$name]) ? true : false;
}

View File

@ -21,14 +21,16 @@ if(!empty($settings->_converters['fulltext'])) {
}
}
$conversionmgr->addService(new SeedDMS_ConversionServicePdfToImage('application/pdf', 'image/png'))->setLogger($logger);
if(extension_loaded('imagick')) {
$conversionmgr->addService(new SeedDMS_ConversionServicePdfToImage('application/pdf', 'image/png'))->setLogger($logger);
$conversionmgr->addService(new SeedDMS_ConversionServiceImageToImage('image/jpeg', 'image/png'))->setLogger($logger);
$conversionmgr->addService(new SeedDMS_ConversionServiceImageToImage('image/png', 'image/png'))->setLogger($logger);
$conversionmgr->addService(new SeedDMS_ConversionServiceImageToImage('image/jpg', 'image/png'))->setLogger($logger);
$conversionmgr->addService(new SeedDMS_ConversionServiceImageToImage('image/gif', 'image/png'))->setLogger($logger);
$conversionmgr->addService(new SeedDMS_ConversionServiceImageToImage('image/tiff', 'image/png'))->setLogger($logger);
$conversionmgr->addService(new SeedDMS_ConversionServiceImageToImage('image/svg+xml', 'image/png'))->setLogger($logger);
$conversionmgr->addService(new SeedDMS_ConversionServiceImageToImage('image/jpeg', 'image/png'))->setLogger($logger);
$conversionmgr->addService(new SeedDMS_ConversionServiceImageToImage('image/png', 'image/png'))->setLogger($logger);
$conversionmgr->addService(new SeedDMS_ConversionServiceImageToImage('image/jpg', 'image/png'))->setLogger($logger);
$conversionmgr->addService(new SeedDMS_ConversionServiceImageToImage('image/gif', 'image/png'))->setLogger($logger);
$conversionmgr->addService(new SeedDMS_ConversionServiceImageToImage('image/tiff', 'image/png'))->setLogger($logger);
$conversionmgr->addService(new SeedDMS_ConversionServiceImageToImage('image/svg+xml', 'image/png'))->setLogger($logger);
}
$conversionmgr->addService(new SeedDMS_ConversionServiceTextToText('text/plain', 'text/plain'))->setLogger($logger);

View File

@ -18,8 +18,11 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
use Symfony\Component\HttpFoundation\Request;
if(!empty($settings->_coreDir))
require_once($settings->_coreDir.'/Core.php');
else
require_once('SeedDMS/Core.php');
$request = Request::createFromGlobals();

View File

@ -64,9 +64,6 @@ ini_set('include_path', $settings->_rootDir.'pear'. PATH_SEPARATOR .ini_get('inc
if(!empty($settings->_extraPath)) {
ini_set('include_path', $settings->_extraPath. PATH_SEPARATOR .ini_get('include_path'));
}
/* composer is installed in pear directory, but install tool does not need it */
if(!defined("SEEDDMS_INSTALL"))
require_once $settings->_rootDir.'../pear/vendor/autoload.php';
if(isset($settings->_maxExecutionTime)) {
if (php_sapi_name() !== "cli") {
@ -74,22 +71,6 @@ if(isset($settings->_maxExecutionTime)) {
}
}
if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
$process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
while (list($key, $val) = each($process)) {
foreach ($val as $k => $v) {
unset($process[$key][$k]);
if (is_array($v)) {
$process[$key][stripslashes($k)] = $v;
$process[] = &$process[$key][stripslashes($k)];
} else {
$process[$key][stripslashes($k)] = stripslashes($v);
}
}
}
unset($process);
}
/* Add root Dir. Needed because the view classes are included
* relative to it.
*/
@ -98,3 +79,7 @@ ini_set('include_path', $settings->_rootDir. PATH_SEPARATOR .ini_get('include_pa
* relative to it.
*/
ini_set('include_path', $settings->_rootDir.'../pear'. PATH_SEPARATOR .ini_get('include_path'));
/* composer is installed in pear directory, but install tool does not need it */
if(!defined("SEEDDMS_INSTALL"))
require_once 'vendor/autoload.php';

View File

@ -166,53 +166,6 @@ function getReadableDurationArray($secs) { /* {{{ */
return $units;
} /* }}} */
//
// The original string sanitizer, kept for reference.
//function sanitizeString($string) {
// $string = str_replace("'", "&#0039;", $string);
// $string = str_replace("--", "", $string);
// $string = str_replace("<", "&lt;", $string);
// $string = str_replace(">", "&gt;", $string);
// $string = str_replace("/*", "", $string);
// $string = str_replace("*/", "", $string);
// $string = str_replace("\"", "&quot;", $string);
//
// return $string;
//}
/* Deprecated, do not use anymore */
function sanitizeString($string) { /* {{{ */
$string = (string) $string;
if (get_magic_quotes_gpc()) {
$string = stripslashes($string);
}
// The following three are against sql injection. They are not
// needed anymore because strings are quoted propperly when saved into
// the database.
// $string = str_replace("\\", "\\\\", $string);
// $string = str_replace("--", "\-\-", $string);
// $string = str_replace(";", "\;", $string);
// Use HTML entities to represent the other characters that have special
// meaning in SQL. These can be easily converted back to ASCII / UTF-8
// with a decode function if need be.
$string = str_replace("&", "&amp;", $string);
$string = str_replace("%", "&#0037;", $string); // percent
$string = str_replace("\"", "&quot;", $string); // double quote
$string = str_replace("/*", "&#0047;&#0042;", $string); // start of comment
$string = str_replace("*/", "&#0042;&#0047;", $string); // end of comment
$string = str_replace("<", "&lt;", $string);
$string = str_replace(">", "&gt;", $string);
$string = str_replace("=", "&#0061;", $string);
$string = str_replace(")", "&#0041;", $string);
$string = str_replace("(", "&#0040;", $string);
$string = str_replace("'", "&#0039;", $string);
$string = str_replace("+", "&#0043;", $string);
return trim($string);
} /* }}} */
/* Deprecated, do not use anymore, but keep it for upgrading
* older versions
*/

View File

@ -220,6 +220,9 @@ URL: [url]',
'backup_log_management' => 'نسخ احتياطي/سجلات',
'backup_remove' => 'ازالة ملف النسخ الاحتياطي',
'backup_tools' => 'أدوات النسخ الاحتياطية',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'بين',
'bg_BG' => 'بلغارية',
'browse' => 'تصفح',
@ -621,6 +624,7 @@ URL: [url]',
'filetype' => '',
'file_size' => 'حجم الملف',
'filter_for_documents' => 'فلتر للمستندات',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => 'فلتر للملفات',
'folder' => 'مجلد',
'folders' => 'مجلدات',
@ -1303,6 +1307,7 @@ URL: [url]',
'select_attrdefgrp_show' => 'حدد معرف سمة المجموعة',
'select_attribute_value' => 'اختيار سمة الرقم',
'select_category' => 'اضغط لاختيار قسم',
'select_documents_for_process' => '',
'select_group' => 'اختيار مجموعة',
'select_groups' => 'اضغط لاختيار مجموعة',
'select_grp_approvers' => 'اضغط لاختيار مجموعة الموافقون',
@ -1967,6 +1972,7 @@ URL: [url]',
'transfer_no_write_access' => 'تحويل بلا دخول للكتابة',
'transfer_objects' => 'تحويل أشياء',
'transfer_objects_to_user' => 'تحويل شيء إلى مستخدم',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '',
'transfer_to_user' => 'تحويل إلى مستخدم',
'transition_triggered_email' => 'تم تحريك انتقال مسار العمل',

View File

@ -203,6 +203,9 @@ $text = array(
'backup_log_management' => 'Backup/Logging',
'backup_remove' => 'Изтрий бекъп',
'backup_tools' => 'Иструменти за бекъп',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'между',
'bg_BG' => 'Български',
'browse' => 'Преглеждане',
@ -570,6 +573,7 @@ $text = array(
'filetype' => '',
'file_size' => 'Размер',
'filter_for_documents' => '',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => '',
'folder' => 'Папка',
'folders' => 'Папки',
@ -1166,6 +1170,7 @@ $text = array(
'select_attrdefgrp_show' => '',
'select_attribute_value' => '',
'select_category' => 'Изберете категория',
'select_documents_for_process' => '',
'select_group' => '',
'select_groups' => 'Кликни да избереш групи',
'select_grp_approvers' => 'Кликни да избереш група утвърждаващи',
@ -1830,6 +1835,7 @@ $text = array(
'transfer_no_write_access' => '',
'transfer_objects' => '',
'transfer_objects_to_user' => '',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '',
'transfer_to_user' => '',
'transition_triggered_email' => 'Забелязана промяна на процес',

View File

@ -208,6 +208,9 @@ URL: [url]',
'backup_log_management' => 'Còpia / Accés',
'backup_remove' => 'Eliminar fitxer de còpia de seguretat',
'backup_tools' => 'Eines de còpia de seguretat',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'entre',
'bg_BG' => 'Búlgar',
'browse' => 'Navega',
@ -575,6 +578,7 @@ URL: [url]',
'filetype' => '',
'file_size' => 'Mida',
'filter_for_documents' => '',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => 'Filtre adicional per les carpetes',
'folder' => 'Carpeta',
'folders' => 'Carpetes',
@ -1171,6 +1175,7 @@ URL: [url]',
'select_attrdefgrp_show' => '',
'select_attribute_value' => '',
'select_category' => 'Prem per seleccionar la categoria',
'select_documents_for_process' => '',
'select_group' => 'Seleccionar grup',
'select_groups' => '',
'select_grp_approvers' => '',
@ -1835,6 +1840,7 @@ URL: [url]',
'transfer_no_write_access' => 'transferir sense poder escriure',
'transfer_objects' => '',
'transfer_objects_to_user' => '',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '',
'transfer_to_user' => '',
'transition_triggered_email' => '',

View File

@ -232,6 +232,9 @@ URL: [url]',
'backup_log_management' => 'Záloha/Logování',
'backup_remove' => 'Odstranit soubor zálohy',
'backup_tools' => 'Nástroje pro zálohování',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'mezi',
'bg_BG' => 'Bulharština',
'browse' => 'Prohlížet',
@ -645,6 +648,7 @@ URL: [url]',
'filetype' => '',
'file_size' => 'Velikost souboru',
'filter_for_documents' => 'Další filtr pro dokumenty',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => 'Další filtr pro složky',
'folder' => 'Složka',
'folders' => 'Složky',
@ -1370,6 +1374,7 @@ URL: [url]',
'select_attrdefgrp_show' => 'Vybrat, kdy chcete zobrazit',
'select_attribute_value' => 'Vybrat hodnotu atributu',
'select_category' => 'Kliknutím vybrat kategorii',
'select_documents_for_process' => '',
'select_group' => 'Vybrat skupinu',
'select_groups' => 'Kliknutím vybrat skupiny',
'select_grp_approvers' => 'Kliknutím vybrat skupinu schvalovatele',
@ -2039,6 +2044,7 @@ Jméno: [username]
'transfer_no_write_access' => 'Uživatel nemá přístup k zápisu do složky',
'transfer_objects' => 'Přenos objektů',
'transfer_objects_to_user' => 'Nový vlastník',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '',
'transfer_to_user' => 'Přenos k uživateli',
'transition_triggered_email' => 'Spuštěn přechod workflow',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// Translators: Admin (3113), dgrutsch (22)
// Translators: Admin (3119), dgrutsch (22)
$text = array(
'2_factor_auth' => '2-Faktor Authentifizierung',
@ -271,6 +271,9 @@ URL: [url]</p>',
'backup_log_management' => 'Backup/Logging',
'backup_remove' => 'Backup löschen',
'backup_tools' => 'Backup tools',
'batch_change_owner' => 'Besitzer ändern',
'batch_new_owner_msg' => 'Der Besitzer von [count] Dokuments wurde geändert.',
'batch_operation_result' => 'Ergebnis der Massenoperation',
'between' => 'zwischen',
'bg_BG' => 'Bulgarisch',
'browse' => 'Durchsuchen',
@ -752,6 +755,7 @@ URL: [url]</p>',
'filetype' => 'Dateityp',
'file_size' => 'Dateigröße',
'filter_for_documents' => 'Zusätzliche Filter für Dokumente',
'filter_for_documents_and_folders' => 'Zusätzliche Filter für Ordner und Dokumente',
'filter_for_folders' => 'Zusätzliche Filter für Ordner',
'folder' => 'Ordner',
'folders' => 'Verzeichnisse',
@ -1700,6 +1704,7 @@ URL: [url]</p>',
'select_attrdefgrp_show' => 'Anzeigeort auswählen',
'select_attribute_value' => 'Attributwert auswählen',
'select_category' => 'Klicken zur Auswahl einer Kategorie',
'select_documents_for_process' => 'Dokumente auswählen',
'select_group' => 'Gruppe auswählen',
'select_groups' => 'Klicken zur Auswahl einer Gruppe',
'select_grp_approvers' => 'Klicken zur Auswahl einer Freigabegruppe',
@ -2371,6 +2376,7 @@ Sollten Sie kein Passwort bekommen haben, dann nutzen Sie bitte die Passwort-Ver
'transfer_no_write_access' => 'Der Benutzer hat in dem Ordner keine Schreibrechte',
'transfer_objects' => 'Objekte übertragen',
'transfer_objects_to_user' => 'Neuer Eigentümer',
'transfer_processes_to_user' => 'Prozesse auf Benutzer übertragen',
'transfer_process_to_user' => 'Prozess auf Benutzer übertragen',
'transfer_to_user' => 'Auf Benutzer übertragen',
'transition_triggered_email' => 'Workflow transition triggered',

View File

@ -203,6 +203,9 @@ $text = array(
'backup_log_management' => 'Αρχεία Εφεδρικά/Καταγραφής',
'backup_remove' => '',
'backup_tools' => 'Εργαλεία εφεδρικής καταγραφής',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'μεταξύ',
'bg_BG' => 'Βουλγάρικα',
'browse' => '',
@ -570,6 +573,7 @@ $text = array(
'filetype' => '',
'file_size' => 'Μέγεθος αρχείου',
'filter_for_documents' => '',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => '',
'folder' => 'Φάκελος',
'folders' => 'Φάκελοι',
@ -1177,6 +1181,7 @@ URL: [url]',
'select_attrdefgrp_show' => '',
'select_attribute_value' => '',
'select_category' => 'Επιλογή κατηγορίας',
'select_documents_for_process' => '',
'select_group' => 'Επιλογή ομάδας',
'select_groups' => '',
'select_grp_approvers' => '',
@ -1841,6 +1846,7 @@ URL: [url]',
'transfer_no_write_access' => '',
'transfer_objects' => '',
'transfer_objects_to_user' => '',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '',
'transfer_to_user' => '',
'transition_triggered_email' => '',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// Translators: Admin (2207), archonwang (3), dgrutsch (9), netixw (14)
// Translators: Admin (2213), archonwang (3), dgrutsch (9), netixw (14)
$text = array(
'2_factor_auth' => '2-factor authentication',
@ -271,6 +271,9 @@ URL: [url]</p>',
'backup_log_management' => 'Backup/Logging',
'backup_remove' => 'Remove backup file',
'backup_tools' => 'Backup tools',
'batch_change_owner' => 'Change owner',
'batch_new_owner_msg' => 'The owner of [count] documents has been changed.',
'batch_operation_result' => 'Result of batch operation',
'between' => 'between',
'bg_BG' => 'Bulgarian',
'browse' => 'Browse',
@ -752,6 +755,7 @@ URL: [url]</p>',
'filetype' => 'File type',
'file_size' => 'Filesize',
'filter_for_documents' => 'Additional filter for documents',
'filter_for_documents_and_folders' => 'Additional filter for folder and documents',
'filter_for_folders' => 'Additional filter for folders',
'folder' => 'Folder',
'folders' => 'Folders',
@ -1703,6 +1707,7 @@ URL: [url]</p>',
'select_attrdefgrp_show' => 'Choose when to show',
'select_attribute_value' => 'Select attribute value',
'select_category' => 'Click to select category',
'select_documents_for_process' => 'Select documents',
'select_group' => 'Select group',
'select_groups' => 'Click to select groups',
'select_grp_approvers' => 'Click to select group approver',
@ -2374,6 +2379,7 @@ If you did not receive a password, please use the password forgotten function on
'transfer_no_write_access' => 'The user does not have write access in the folder',
'transfer_objects' => 'Transfer objects',
'transfer_objects_to_user' => 'New owner',
'transfer_processes_to_user' => 'Transfer processes to user',
'transfer_process_to_user' => 'Transfer process to user',
'transfer_to_user' => 'Transfer to user',
'transition_triggered_email' => 'Workflow transition triggered',

View File

@ -227,6 +227,9 @@ URL: [url]',
'backup_log_management' => 'Gestión log Backup',
'backup_remove' => 'Eliminar fichero de copia de seguridad',
'backup_tools' => 'Herramientas de copia de seguridad',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'entre',
'bg_BG' => 'Búlgaro',
'browse' => 'Listar',
@ -634,6 +637,7 @@ URL: [url]',
'filetype' => '',
'file_size' => 'Tamaño',
'filter_for_documents' => 'Filtro adicional para documentos',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => 'Filtro adicional para carpetas',
'folder' => 'Carpeta',
'folders' => 'Carpetas',
@ -1330,6 +1334,7 @@ URL: [url]',
'select_attrdefgrp_show' => '',
'select_attribute_value' => 'Seleccionar valores de atributos',
'select_category' => 'Haga Click para seleccionar categoría',
'select_documents_for_process' => '',
'select_group' => 'Seleccionar Grupo',
'select_groups' => 'Haga Click para seleccionar grupos',
'select_grp_approvers' => 'Haga Click para seleccionar grupo de aprobadores',
@ -1994,6 +1999,7 @@ URL: [url]',
'transfer_no_write_access' => 'El usuario no tiene acceso de escritura en la carpeta',
'transfer_objects' => '',
'transfer_objects_to_user' => '',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '',
'transfer_to_user' => 'Transferir al usuario',
'transition_triggered_email' => 'Workflow transition triggered',

View File

@ -261,6 +261,9 @@ URL : [url]</p>',
'backup_log_management' => 'Sauvegarde/Log',
'backup_remove' => 'Supprimer le fichier de sauvegarde',
'backup_tools' => 'Outils de sauvegarde',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'entre',
'bg_BG' => 'Bulgare',
'browse' => 'Parcourir',
@ -738,6 +741,7 @@ URL : [url]</p>',
'filetype' => 'Type de fichier',
'file_size' => 'Taille',
'filter_for_documents' => 'Filtre additionnel pour les documents',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => 'Filtre additionnel pour les dossiers',
'folder' => 'Dossier',
'folders' => 'Dossiers',
@ -1688,6 +1692,7 @@ URL : [url]</p>',
'select_attrdefgrp_show' => 'Sélectionner quand afficher',
'select_attribute_value' => 'Sélectionner la valeur de lattribut',
'select_category' => 'Cliquer pour choisir une catégorie',
'select_documents_for_process' => '',
'select_group' => 'Sélectionner un groupe',
'select_groups' => 'Cliquer pour choisir un groupe',
'select_grp_approvers' => 'Cliquer pour choisir un groupe d\'approbateur',
@ -2357,6 +2362,7 @@ Nom : [username]
'transfer_no_write_access' => 'Lutilisateur na pas le droit décriture dans ce dossier',
'transfer_objects' => 'Transférer les objets',
'transfer_objects_to_user' => 'Nouveau propriétaire',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => 'Transférer le processus à lutilisateur',
'transfer_to_user' => 'Transférer à lutilisateur',
'transition_triggered_email' => 'Transition de workflow activé',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// Translators: Admin (1247), marbanas (16)
// Translators: Admin (1248), marbanas (16)
$text = array(
'2_factor_auth' => '',
@ -232,6 +232,9 @@ Internet poveznica: [url]',
'backup_log_management' => 'Sigurnosna kopija / Bilježenje',
'backup_remove' => 'Ukloni datoteku sigurnosne kopije',
'backup_tools' => 'Alat za sigurnosnu kopiju',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'između',
'bg_BG' => 'Bugarski',
'browse' => 'Pretraži',
@ -633,6 +636,7 @@ Internet poveznica: [url]',
'filetype' => '',
'file_size' => 'Veličina datoteke',
'filter_for_documents' => 'Dodatni filter za dokumente',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => 'Dodatni filter za dokumente',
'folder' => 'Mapa',
'folders' => 'Mape',
@ -1339,6 +1343,7 @@ Internet poveznica: [url]',
'select_attrdefgrp_show' => '',
'select_attribute_value' => 'Izbari vrednost atributa',
'select_category' => 'Kliknite za odabir kategorije',
'select_documents_for_process' => '',
'select_group' => 'Izaberi grupu',
'select_groups' => 'Kliknite za odabir grupa',
'select_grp_approvers' => 'Kliknite za odabir validatora grupe',
@ -2003,6 +2008,7 @@ Internet poveznica: [url]',
'transfer_no_write_access' => 'Korisnik nema pravo pisanja u ovom folderu',
'transfer_objects' => '',
'transfer_objects_to_user' => '',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '',
'transfer_to_user' => 'Prijenos korisniku',
'transition_triggered_email' => 'Zatražena promjena toka rada',
@ -2085,7 +2091,7 @@ Internet poveznica: [url]',
'use_comment_of_document' => 'Koristi komentar dokumenta',
'use_default_categories' => 'Koristi predefinirane kategorije',
'use_default_keywords' => 'Koristi predefinirane ključne riječi',
'valid_till' => '',
'valid_till' => 'Validan do',
'version' => 'Verzija',
'versioning_file_creation' => 'Stvaranje nove verzije datoteke',
'versioning_file_creation_warning' => 'Ovo radnjom možete izraditi datoteku koja sadrži informacije o verzijama cijele DMS mape. Nakon izrade, svaka datoteka će biti pohranjena unutar podatkovne mape.',

View File

@ -227,6 +227,9 @@ URL: [url]',
'backup_log_management' => 'Mentés/Naplózás',
'backup_remove' => 'Mentési állomány eltávolítása',
'backup_tools' => 'Mentő eszközök',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'között',
'bg_BG' => 'Bulgár',
'browse' => 'Tallózás',
@ -628,6 +631,7 @@ URL: [url]',
'filetype' => '',
'file_size' => 'Állomány méret',
'filter_for_documents' => 'További dokumentum szűrők',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => 'További mappa szűrők',
'folder' => 'Mappa',
'folders' => 'Mappák',
@ -1317,6 +1321,7 @@ URL: [url]',
'select_attrdefgrp_show' => '',
'select_attribute_value' => '',
'select_category' => 'Kattintson a kategória kiválasztásához',
'select_documents_for_process' => '',
'select_group' => 'Csoport kiválasztása',
'select_groups' => 'Kattintson a csoportok kijelöléséhez',
'select_grp_approvers' => 'Kattintson a csoport jóváhagyó kijelöléséhez',
@ -1981,6 +1986,7 @@ URL: [url]',
'transfer_no_write_access' => '',
'transfer_objects' => 'Adatok átadása',
'transfer_objects_to_user' => 'Új tulajdonos',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '',
'transfer_to_user' => '',
'transition_triggered_email' => 'Munkamenet átmenet kiváltva',

2203
languages/id_ID/lang.inc Normal file

File diff suppressed because it is too large Load Diff

View File

@ -232,6 +232,9 @@ URL: [url]',
'backup_log_management' => 'Backup/Logging',
'backup_remove' => 'Elimina file di backup',
'backup_tools' => 'Strumenti di backup',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'tra',
'bg_BG' => 'Bulgaro',
'browse' => 'Scegli file',
@ -638,6 +641,7 @@ URL: [url]',
'filetype' => '',
'file_size' => 'Grandezza del file',
'filter_for_documents' => 'Filtro aggiuntivo per i documenti',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => 'Filtro aggiuntivo per le cartelle',
'folder' => 'Cartella',
'folders' => 'Cartelle',
@ -1361,6 +1365,7 @@ URL: [url]',
'select_attrdefgrp_show' => 'Scegli quando mostrare',
'select_attribute_value' => 'Seleziona il valore dell\'attributo',
'select_category' => 'Clicca per selezionare la categoria',
'select_documents_for_process' => '',
'select_group' => 'Seleziona gruppo',
'select_groups' => 'Clicca per selezionare i gruppi',
'select_grp_approvers' => 'Seleziona gruppo approvatore',
@ -2030,6 +2035,7 @@ Name: [username]
'transfer_no_write_access' => 'L\'utente non ha i permessi in scrittura per la cartella',
'transfer_objects' => 'Trasferisci oggetti',
'transfer_objects_to_user' => 'Trasferisci all\'utente',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '',
'transfer_to_user' => 'Trasferisci all\'utente',
'transition_triggered_email' => 'Inizio transizione del flusso di lavoro',

View File

@ -234,6 +234,9 @@ URL: [url]',
'backup_log_management' => '백업/로깅',
'backup_remove' => '백업 파일 제거',
'backup_tools' => '백업 도구',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => '사이',
'bg_BG' => '불가리아',
'browse' => '검색',
@ -634,6 +637,7 @@ URL: [url]',
'filetype' => '',
'file_size' => '파일 크기',
'filter_for_documents' => '문서에 대한 추가 필터',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => '폴더에 대한 추가 필터',
'folder' => '폴더',
'folders' => '폴더',
@ -1333,6 +1337,7 @@ URL : [url]',
'select_attrdefgrp_show' => '',
'select_attribute_value' => '',
'select_category' => '범주를 선택합니다',
'select_documents_for_process' => '',
'select_group' => '',
'select_groups' => '그룹을 선택합니다',
'select_grp_approvers' => '그룹 승인을 선택합니다',
@ -1997,6 +2002,7 @@ URL : [url]',
'transfer_no_write_access' => '',
'transfer_objects' => '',
'transfer_objects_to_user' => '새 소유자',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '',
'transfer_to_user' => '',
'transition_triggered_email' => '워크플로우 전환 트리거',

View File

@ -230,6 +230,9 @@ URL: [url]',
'backup_log_management' => 'ສຳຮອງ/ເຂົ້າສຸ່ລະບົບ',
'backup_remove' => 'ລົບຟາຍສຳຮອງ',
'backup_tools' => 'ເຄື່ອງມືສຳຮອງຂໍມູນ',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'ລະຫວ່າງ',
'bg_BG' => 'ບັດແກເຣີຍ',
'browse' => 'ໝວດ',
@ -631,6 +634,7 @@ URL: [url]',
'filetype' => '',
'file_size' => 'ຂະໜາດ',
'filter_for_documents' => 'ຕົວກອງເພີ່ມເຕົມສຳລັບເອກະສານ',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => 'ຕົວກອງເພີ່ມເຕີມສຳລັບໂຟລເດີ',
'folder' => 'ໂຟລເດີ',
'folders' => 'ໂຟລເດີ',
@ -1354,6 +1358,7 @@ URL: [url]',
'select_attrdefgrp_show' => 'ເລືອກເວລາທີ່ຈະສະແດງ',
'select_attribute_value' => '',
'select_category' => 'ຄິກເພື່ອເລືອກປະເພດ',
'select_documents_for_process' => '',
'select_group' => '',
'select_groups' => 'ຄິກເລືອກກຸ່ມ',
'select_grp_approvers' => 'ຄິກເພືອເລືອກຜູ້ອະນຸມັດກຸ່ມ',
@ -2023,6 +2028,7 @@ URL: [url]',
'transfer_no_write_access' => '',
'transfer_objects' => 'ຖ່າຍໂອນວັດຖຸ',
'transfer_objects_to_user' => 'ເຈົ້າຂອງໄຫມ່',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '',
'transfer_to_user' => '',
'transition_triggered_email' => 'ປ່ຽນຮູບແບບການເຮັດວຽກຮຽບຮ້ອຍແລ້ວ',

View File

@ -232,6 +232,9 @@ URL: [url]',
'backup_log_management' => 'Sikkerhetskopi logg',
'backup_remove' => 'Slette sikkerhetskopi',
'backup_tools' => 'Sikkerhetskopi-verktøy',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'mellom',
'bg_BG' => 'Bulgaria',
'browse' => 'Bla',
@ -645,6 +648,7 @@ URL: [url]',
'filetype' => 'Filtype',
'file_size' => 'Filstørrelse',
'filter_for_documents' => 'Tilleggsfilter for dokumentet',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => 'Tilleggsfilter for mapper',
'folder' => 'Mappe',
'folders' => 'Mapper',
@ -1369,6 +1373,7 @@ URL: [url]',
'select_attrdefgrp_show' => 'Velg visings alternativ',
'select_attribute_value' => 'Velg egenskapsverdi',
'select_category' => 'Klikk for å velge kategori',
'select_documents_for_process' => '',
'select_group' => 'Klikk for å velge gruppe',
'select_groups' => 'Klikk for å velge grupper',
'select_grp_approvers' => 'Klikk for å velge gruppe godkjennere',
@ -2036,6 +2041,7 @@ Bruker: [username]
'transfer_no_write_access' => 'Brukeren har ikke skrivetilgang i mappen',
'transfer_objects' => 'Overfør objekter',
'transfer_objects_to_user' => 'Ny eier',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => 'Overfør prosess til bruker',
'transfer_to_user' => 'Overfør til bruker',
'transition_triggered_email' => 'Arbeidsflytovergang utløst',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// Translators: Admin (1176), gijsbertush (673), pepijn (45), reinoutdijkstra@hotmail.com (270)
// Translators: Admin (1177), gijsbertush (673), pepijn (45), reinoutdijkstra@hotmail.com (270)
$text = array(
'2_factor_auth' => '2-factor-authenticatie',
@ -225,6 +225,9 @@ URL: [url]',
'backup_log_management' => 'Backup/loggen',
'backup_remove' => 'Verwijder backupbestand',
'backup_tools' => 'Backup-gereedschap',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'tussen',
'bg_BG' => 'Bulgaars',
'browse' => 'Browse',
@ -638,6 +641,7 @@ URL: [url]',
'filetype' => 'Type file',
'file_size' => 'Bestandsomvang',
'filter_for_documents' => 'Extra filter voor documenten',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => 'Extra filter voor mappen',
'folder' => 'Map',
'folders' => 'Mappen',
@ -1366,6 +1370,7 @@ URL: [url]',
'select_attrdefgrp_show' => 'Toon attribuut-definities-groep',
'select_attribute_value' => 'Kies een waarde voor het attribuut',
'select_category' => 'klik om categorie te selecteren',
'select_documents_for_process' => '',
'select_group' => 'Selecteer groep',
'select_groups' => 'Klik om groep te selecteren',
'select_grp_approvers' => 'Klik om beoordelaars te selecteren',
@ -1467,7 +1472,7 @@ Name: [username]
'settings_currentvalue' => 'Huidige waarde',
'settings_Database' => 'Database instellingen',
'settings_dateformat' => 'Datum formaat',
'settings_dateformat_desc' => '',
'settings_dateformat_desc' => 'Dit datum formaat gebruikt de syntax van de php\'s date() functie',
'settings_datetimeformat' => 'Datum/Tijd formaat',
'settings_datetimeformat_desc' => 'Dit datum formaat gebruikt de syntax van de php\'s date() functie',
'settings_dbDatabase' => 'Database',
@ -2035,6 +2040,7 @@ Name: [username]
'transfer_no_write_access' => 'De gebruiker heeft geen schrijfrechten in deze map',
'transfer_objects' => 'Objecten overdragen',
'transfer_objects_to_user' => 'Objecten verzenden aan gebruiker',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => 'Verzenden naar gebruiker',
'transfer_to_user' => 'Overdragen aan gebruiker',
'transition_triggered_email' => 'Workflow-overgang geactiveerd',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// Translators: Admin (1684), netixw (84), romi (93), uGn (112)
// Translators: Admin (1693), netixw (84), romi (93), uGn (112)
$text = array(
'2_factor_auth' => 'Uwierzytelnianie dwuetapowe',
@ -220,6 +220,9 @@ URL: [url]',
'backup_log_management' => 'Backup/Logi',
'backup_remove' => 'Usuń plik backupu',
'backup_tools' => 'Narzędzia kopii zapasowej',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'między',
'bg_BG' => 'Bułgarski',
'browse' => 'Przeglądaj',
@ -621,6 +624,7 @@ URL: [url]',
'filetype' => 'Typ pliku',
'file_size' => 'Rozmiar pliku',
'filter_for_documents' => 'Dodatkowe filtrowanie dla dokumentów',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => 'Dodatkowe filtrowanie dla folderów',
'folder' => 'Folder',
'folders' => 'Foldery',
@ -1002,14 +1006,14 @@ URL: [url]',
'old' => 'Stary',
'only_jpg_user_images' => 'Wyłącznie pliki typu .jpg mogą być użyte jako obrazy użytkowników',
'operation_disallowed' => '',
'orderby' => '',
'orderby_date_asc' => '',
'orderby_date_desc' => '',
'orderby_id_asc' => '',
'orderby_id_desc' => '',
'orderby_name_asc' => '',
'orderby_name_desc' => '',
'orderby_unsorted' => '',
'orderby' => 'sortuj po',
'orderby_date_asc' => 'po dacie (rosnąco)',
'orderby_date_desc' => 'po dacie (malejaco)',
'orderby_id_asc' => 'po id (rosnąco)',
'orderby_id_desc' => 'po id (malejąco)',
'orderby_name_asc' => 'po nazwie (rosnąco)',
'orderby_name_desc' => 'po nazwie (malejaco)',
'orderby_unsorted' => 'niesortowane',
'order_by_sequence_off' => 'Porządkowanie według sekwencji jest wyłączone w ustawieniach. Jeśli chcesz, aby ten parametr zadziałał, musisz go ponownie włączyć.',
'original_filename' => 'Oryginalna nazwa pliku',
'overall_indexing_progress' => 'Całkowity postęp indeksowania',
@ -1297,6 +1301,7 @@ URL: [url]',
'select_attrdefgrp_show' => 'Wybierz, kiedy pokazać',
'select_attribute_value' => 'Wybierz wartość atrybutu',
'select_category' => 'Kliknij by wybrać kategorię',
'select_documents_for_process' => '',
'select_group' => 'Wybierz grupę',
'select_groups' => 'Kliknij by wybrać grupy',
'select_grp_approvers' => 'Kliknij by wybrać grupę zatwierdzającą',
@ -1966,6 +1971,7 @@ Name: [username]
'transfer_no_write_access' => 'Użytkownik nie ma prawa do zapisu w tym folderze',
'transfer_objects' => 'Przenieś obiekty',
'transfer_objects_to_user' => 'Nowy właściciel',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => 'Prześlij proces do użytkownika',
'transfer_to_user' => 'Przekaż użytkownikowi',
'transition_triggered_email' => 'Uruchomiono proces przepływu',

View File

@ -232,6 +232,9 @@ URL: [url]',
'backup_log_management' => 'Backup/Logs',
'backup_remove' => 'Remove backup file',
'backup_tools' => 'Ferramentas de backup',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'entre',
'bg_BG' => 'Bulgaro',
'browse' => 'Procurar',
@ -645,6 +648,7 @@ URL: [url]',
'filetype' => '',
'file_size' => 'Tamanho',
'filter_for_documents' => 'Filtro adicional para documentos',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => 'Filtro adicional para pasta',
'folder' => 'Pasta',
'folders' => 'Pastas',
@ -1373,6 +1377,7 @@ URL: [url]',
'select_attrdefgrp_show' => 'Escolha quando mostrar',
'select_attribute_value' => 'Selecione o valor do atributo',
'select_category' => 'Clique para selecionar a categoria',
'select_documents_for_process' => '',
'select_group' => 'Selecione o grupo',
'select_groups' => 'Clique para selecionar os grupos',
'select_grp_approvers' => 'Clique para selecionar o grupo aprovador',
@ -2042,6 +2047,7 @@ Nome: [username]
'transfer_no_write_access' => 'O usuário não possui acesso de escrita na pasta',
'transfer_objects' => 'Transferir objetos',
'transfer_objects_to_user' => 'Novo proprietário',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '',
'transfer_to_user' => 'Transferir para o usuário',
'transition_triggered_email' => 'Transição de fluxo de trabalho desencadeado',

View File

@ -232,6 +232,9 @@ URL: [url]',
'backup_log_management' => 'Backup/Logging',
'backup_remove' => 'Sterge fișier backup',
'backup_tools' => 'Backup tools',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'între',
'bg_BG' => 'Bulgară',
'browse' => 'Browse',
@ -633,6 +636,7 @@ URL: [url]',
'filetype' => '',
'file_size' => 'Mărimea fișierului',
'filter_for_documents' => 'Filtru suplimentar pentru documente',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => 'Filtru suplimentar pentru foldere',
'folder' => 'Folder',
'folders' => 'Foldere',
@ -1340,6 +1344,7 @@ URL: [url]',
'select_attrdefgrp_show' => '',
'select_attribute_value' => '',
'select_category' => 'Click pentru a selecta categoria',
'select_documents_for_process' => '',
'select_group' => 'Selecteaza grupul',
'select_groups' => 'Click pentru a selecta grupuri',
'select_grp_approvers' => 'Click pentru a selecta grupul de aprobatori',
@ -2004,6 +2009,7 @@ URL: [url]',
'transfer_no_write_access' => 'Utilizatorul nu are drepturi de scriere pe acest dosar',
'transfer_objects' => '',
'transfer_objects_to_user' => '',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '',
'transfer_to_user' => 'Trabsferare catre alt utilizator',
'transition_triggered_email' => 'Tranziție Workflow declanșată',

View File

@ -232,6 +232,9 @@ URL: [url]',
'backup_log_management' => 'Резервные копии и журналы',
'backup_remove' => 'Удалить резервную копию',
'backup_tools' => 'Резервные копии',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'между',
'bg_BG' => 'Болгарский',
'browse' => 'Выбрать',
@ -633,6 +636,7 @@ URL: [url]',
'filetype' => '',
'file_size' => 'Размер',
'filter_for_documents' => 'Дополнительный фильтр по документам',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => 'Дополнительный фильтр по папкам',
'folder' => 'Каталог',
'folders' => 'кат.',
@ -1347,6 +1351,7 @@ URL: [url]',
'select_attrdefgrp_show' => '',
'select_attribute_value' => '',
'select_category' => 'Выберите категорию',
'select_documents_for_process' => '',
'select_group' => 'Выберите группу',
'select_groups' => 'Выберите группы',
'select_grp_approvers' => 'Выберите утверждающую группу',
@ -2011,6 +2016,7 @@ URL: [url]',
'transfer_no_write_access' => 'Пользователь не имеет доступа на запись в этой папке',
'transfer_objects' => '',
'transfer_objects_to_user' => '',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '',
'transfer_to_user' => 'Передать пользователю',
'transition_triggered_email' => 'Изменено состояние процесса',

View File

@ -232,6 +232,9 @@ URL: [url]',
'backup_log_management' => 'Zálohovanie/Log-y',
'backup_remove' => 'Odstrániť zálohu',
'backup_tools' => 'Zálohovacie nástroje',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'medzi',
'bg_BG' => 'Bulharsky',
'browse' => 'Prehľadávať',
@ -645,6 +648,7 @@ URL: [url]',
'filetype' => '',
'file_size' => 'Veľkosť súboru',
'filter_for_documents' => 'Ďalší filter pre dokumenty',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => 'Ďalší filter pre zložky',
'folder' => 'Zložka',
'folders' => 'Zložky',
@ -1375,6 +1379,7 @@ URL: [url]',
'select_attrdefgrp_show' => 'Choose when to show',
'select_attribute_value' => 'Vyberte hodnotu atribútu',
'select_category' => 'Vyber kategóriu',
'select_documents_for_process' => '',
'select_group' => 'Vybrať skupinu',
'select_groups' => 'Kliknutím vyberte skupiny',
'select_grp_approvers' => 'Kliknutím vyberte schvaľovateľa skupiny',
@ -2044,6 +2049,7 @@ Meno: [username]
'transfer_no_write_access' => 'Používateľ nemá práva na zapisovanie v adresári',
'transfer_objects' => 'Prenesené objekty',
'transfer_objects_to_user' => 'Nový vlastník',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '',
'transfer_to_user' => 'Transfer používateľovi',
'transition_triggered_email' => 'Workflow transition triggered',

View File

@ -233,6 +233,9 @@ URL: [url]',
'backup_log_management' => 'Backup/Loggning',
'backup_remove' => 'Ta bort backup-fil',
'backup_tools' => 'Backup-verktyg',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'mellan',
'bg_BG' => 'Bulgariska',
'browse' => 'Bläddra',
@ -639,6 +642,7 @@ URL: [url]',
'filetype' => '',
'file_size' => 'Filstorlek',
'filter_for_documents' => 'Tilläggsfilter för dokument',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => 'Tilläggsfilter för kataloger',
'folder' => 'Katalog',
'folders' => 'Kataloger',
@ -1348,6 +1352,7 @@ URL: [url]',
'select_attrdefgrp_show' => 'Välj visingsalternativ',
'select_attribute_value' => '',
'select_category' => 'Klicka för att välja en kategori',
'select_documents_for_process' => '',
'select_group' => 'Välj grupp',
'select_groups' => 'Välj grupper',
'select_grp_approvers' => 'Välj en grupp som ska godkänna',
@ -2017,6 +2022,7 @@ Kommentar: [comment]',
'transfer_no_write_access' => 'Användaren har inte skrivrättigheter i katalogen',
'transfer_objects' => 'Överför objekt',
'transfer_objects_to_user' => 'Ny ägare',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '',
'transfer_to_user' => 'Överför till användare',
'transition_triggered_email' => 'Arbetsflödesövergång utlöstes',

View File

@ -226,6 +226,9 @@ URL: [url]',
'backup_log_management' => 'Yedekleme/Loglama',
'backup_remove' => 'Yedek dosyasını sil',
'backup_tools' => 'Yedekleme araçları',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'arasında',
'bg_BG' => 'Bulgarca',
'browse' => 'Tara',
@ -627,6 +630,7 @@ URL: [url]',
'filetype' => '',
'file_size' => 'Dosya boyutu',
'filter_for_documents' => 'Dokümanlar için ek filtreler',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => 'Klasörler için ek filtreler',
'folder' => 'Klasör',
'folders' => 'Klasör',
@ -1319,6 +1323,7 @@ URL: [url]',
'select_attrdefgrp_show' => '',
'select_attribute_value' => '',
'select_category' => 'Kategori seçmek için tıklayın',
'select_documents_for_process' => '',
'select_group' => 'Grup Seç',
'select_groups' => 'Grup seçmek için tıklayın',
'select_grp_approvers' => 'Grup onaylayıcı seçmek için tıklayın',
@ -1983,6 +1988,7 @@ URL: [url]',
'transfer_no_write_access' => 'Kullanıcının klasör üzerinde yazma hakkı yok',
'transfer_objects' => '',
'transfer_objects_to_user' => '',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '',
'transfer_to_user' => 'Kullanıcıya transfer et',
'transition_triggered_email' => 'İş Akış Geçişi Tetiklendi',

View File

@ -232,6 +232,9 @@ URL: [url]',
'backup_log_management' => 'Резервні копії і журнали',
'backup_remove' => 'Видалити резервну копію',
'backup_tools' => 'Резервні копії',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => 'між',
'bg_BG' => 'Bulgarian',
'browse' => 'Вибрати',
@ -633,6 +636,7 @@ URL: [url]',
'filetype' => '',
'file_size' => 'Розмір',
'filter_for_documents' => 'Додатковий фільтр по документах',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => 'Додатковий фільтр по каталогах',
'folder' => 'Каталог',
'folders' => 'кат.',
@ -1340,6 +1344,7 @@ URL: [url]',
'select_attrdefgrp_show' => '',
'select_attribute_value' => '',
'select_category' => 'Оберіть категорію',
'select_documents_for_process' => '',
'select_group' => '',
'select_groups' => 'Оберіть групи',
'select_grp_approvers' => 'Оберіть групу затверджувачів',
@ -2004,6 +2009,7 @@ URL: [url]',
'transfer_no_write_access' => '',
'transfer_objects' => '',
'transfer_objects_to_user' => '',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '',
'transfer_to_user' => 'Передати користувачу',
'transition_triggered_email' => 'Змінено стан процесу',

View File

@ -224,6 +224,9 @@ URL: [url]',
'backup_log_management' => '备份/日志',
'backup_remove' => '删除备份',
'backup_tools' => '备份工具',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => '时间段',
'bg_BG' => '保加利亚语',
'browse' => '浏览',
@ -635,6 +638,7 @@ URL: [url]',
'filetype' => '',
'file_size' => '文件大小',
'filter_for_documents' => '文档新增过滤',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => '文件夹新增过滤',
'folder' => '文件夹',
'folders' => '文件夹',
@ -1322,6 +1326,7 @@ URL: [url]',
'select_attrdefgrp_show' => '选择何时显示',
'select_attribute_value' => '选择属性值',
'select_category' => '选中分类',
'select_documents_for_process' => '',
'select_group' => '选择用户组',
'select_groups' => '点击选择组',
'select_grp_approvers' => '点击选择组审批组',
@ -1991,6 +1996,7 @@ URL: [url]',
'transfer_no_write_access' => '当前用户没有文件夹写入权限',
'transfer_objects' => '传输对象',
'transfer_objects_to_user' => '新的所有者',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '',
'transfer_to_user' => '共享给其他用户',
'transition_triggered_email' => '工作流转换触发',

View File

@ -232,6 +232,9 @@ URL: [url]',
'backup_log_management' => '備份/日誌',
'backup_remove' => '刪除備份',
'backup_tools' => '備份工具',
'batch_change_owner' => '',
'batch_new_owner_msg' => '',
'batch_operation_result' => '',
'between' => '時間段',
'bg_BG' => '保加利亞語',
'browse' => '瀏覽',
@ -645,6 +648,7 @@ URL: [url]',
'filetype' => '檔案類型',
'file_size' => '文件大小',
'filter_for_documents' => '附加文件過濾器',
'filter_for_documents_and_folders' => '',
'filter_for_folders' => '文件夾的附加過濾器',
'folder' => '資料夾',
'folders' => '資料夾',
@ -1373,6 +1377,7 @@ URL: [url]',
'select_attrdefgrp_show' => '選擇當展示時',
'select_attribute_value' => '選擇屬性值',
'select_category' => '選中分類',
'select_documents_for_process' => '',
'select_group' => '選擇群',
'select_groups' => '點擊選擇組',
'select_grp_approvers' => '請點選審核人員群組',
@ -2042,6 +2047,7 @@ URL: [url]',
'transfer_no_write_access' => '用戶在文件夾中沒有寫權限',
'transfer_objects' => '傳送物件',
'transfer_objects_to_user' => '新擁有者',
'transfer_processes_to_user' => '',
'transfer_process_to_user' => '傳送處理給使用者',
'transfer_to_user' => '傳送給使用者',
'transition_triggered_email' => '觸發工作流程過渡',

View File

@ -315,7 +315,7 @@ function reArrayFiles(&$file_post) {
return $file_ary;
}
if ($_FILES['userfile']) {
if(!empty($_FILES['userfile'])) {
$file_ary = reArrayFiles($_FILES['userfile']);
} else {
$file_ary = array();
@ -479,7 +479,7 @@ foreach($file_ary as $file) {
$controller->setParam('maxsizeforfulltext', $settings->_maxSizeForFullText);
$controller->setParam('defaultaccessdocs', $settings->_defaultAccessDocs);
if(!$document = $controller->run()) {
if(!$document = $controller()) {
$err = $controller->getErrorMsg();
if(is_string($err))
$errmsg = getMLText($err);

View File

@ -116,7 +116,7 @@ $controller->setParam('sequence', $sequence);
$controller->setParam('attributes', $attributes);
$controller->setParam('notificationgroups', $notgroups);
$controller->setParam('notificationusers', $notusers);
if(!$subFolder = $controller->run()) {
if(!$subFolder = $controller()) {
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText($controller->getErrorMsg()));
} else {
// Send notification to subscribers.

View File

@ -558,7 +558,7 @@ switch($command) {
$controller = Controller::factory('RemoveDocument', array('dms'=>$dms, 'user'=>$user));
$controller->setParam('document', $document);
$controller->setParam('fulltextservice', $fulltextservice);
if($controller->run()) {
if($controller()) {
if ($notifier){
/* $document still has the data from the just deleted document,
* which is just enough to send the email.
@ -840,7 +840,7 @@ switch($command) {
$controller->setParam('maxsizeforfulltext', $settings->_maxSizeForFullText);
$controller->setParam('defaultaccessdocs', $settings->_defaultAccessDocs);
if(!$document = $controller->run()) {
if(!$document = $controller()) {
header('Content-Type: application/json');
echo json_encode(array('success'=>false, 'message'=>getMLText($controller->getErrorMsg())));
exit;

View File

@ -84,7 +84,7 @@ if ($action == "addattrdef") {
$controller->setParam('maxvalues', $maxvalues);
$controller->setParam('valueset', $valueset);
$controller->setParam('regex', $regex);
if (!($newAttrdef = $controller($_POST))) {
if (!($newAttrdef = $controller())) {
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
}

View File

@ -43,7 +43,7 @@ if(!is_dir($settings->_cacheDir)) {
}
$controller->setParam('post', $_POST);
if(!$controller->run())
if(!$controller())
$session->setSplashMsg(array('type'=>'error', 'msg'=>getMLText('error_cleared_cache')));
else
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_cleared_cache')));

View File

@ -138,7 +138,7 @@ $controller->setParam('mode', $mode);
$controller->setParam('userid', $userid);
$controller->setParam('groupid', $groupid);
$controller->setParam('newowner', $newowner);
if(!$controller->run()) {
if(!$controller()) {
UI::exitError(getMLText("folder_title", array("foldername" => htmlspecialchars($foldername))),getMLText("error_change_access"));
}

View File

@ -66,7 +66,7 @@ if (isset($_GET["version"])) { /* {{{ */
$controller->setParam('document', $document);
$controller->setParam('version', $version);
$controller->setParam('type', 'version');
if(!$controller->run()) {
if(!$controller()) {
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version"));
}
} /* }}} */

View File

@ -82,7 +82,7 @@ if($attributes) {
$attribute = date('Y-m-d', makeTsFromDate($attribute));
break;
}
if(!$attrdef->validate($attribute, $version, true)) {
if(!$attrdef->validate($attribute, $version, false)) {
$errmsg = getAttributeValidationText($attrdef->getValidationError(), $attrdef->getName(), $attribute);
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())), $errmsg);
}

View File

@ -140,7 +140,7 @@ $controller->setParam('categories', $categories);
$controller->setParam('expires', $expires);
$controller->setParam('sequence', $sequence);
$controller->setParam('attributes', $attributes);
if(!$controller->run()) {
if(!$controller()) {
$err = $controller->getErrorMsg();
if(is_string($err))
$errmsg = getMLText($err);

View File

@ -73,7 +73,7 @@ $controller->setParam('name', isset($_POST['name']) ? $_POST['name'] : '');
$controller->setParam('comment', isset($_POST['comment']) ? $_POST['comment'] : '');
$controller->setParam('version', isset($_POST['version']) ? $_POST['version'] : '');
$controller->setParam('public', isset($_POST['public']) ? $_POST['public'] : '');
if(!$controller->run()) {
if(!$controller()) {
if($controller->getErrorMsg()) {
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())), $controller->getErrorMsg());
}

View File

@ -89,7 +89,7 @@ $controller->setParam('name', $name);
$controller->setParam('comment', $comment);
$controller->setParam('sequence', $sequence);
$controller->setParam('attributes', $attributes);
if(!$controller->run()) {
if(!$controller()) {
$err = $controller->getErrorMsg();
if(is_string($err))
$errmsg = getMLText($err);

View File

@ -58,7 +58,7 @@ if ($action == "download") { /* {{{ */
// $extMgr = new SeedDMS_Extension_Mgr($settings->_rootDir."/ext", $settings->_cacheDir);
$controller->setParam('extmgr', $extMgr);
$controller->setParam('extname', $extname);
if (!$controller($_POST)) {
if (!$controller()) {
echo json_encode(array('success'=>false, 'msg'=>'Could not download extension'));
}
add_log_line();
@ -67,7 +67,7 @@ elseif ($action == "refresh") { /* {{{ */
// $extMgr = new SeedDMS_Extension_Mgr($settings->_rootDir."/ext", $settings->_cacheDir);
$extMgr->createExtensionConf();
$controller->setParam('extmgr', $extMgr);
if (!$controller($_POST)) {
if (!$controller()) {
UI::exitError(getMLText("admin_tools"),$extMgr->getErrorMsg());
}
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_extension_refresh')));
@ -90,7 +90,7 @@ elseif ($action == "upload") { /* {{{ */
// $extMgr = new SeedDMS_Extension_Mgr($settings->_rootDir."/ext", $settings->_cacheDir);
$controller->setParam('extmgr', $extMgr);
$controller->setParam('file', $_FILES['userfile']['tmp_name']);
if (!$controller($_POST)) {
if (!$controller()) {
UI::exitError(getMLText("admin_tools"),$controller->getErrorMsg());
}
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_extension_import')));
@ -115,8 +115,8 @@ elseif ($action == "import") { /* {{{ */
// $extMgr = new SeedDMS_Extension_Mgr($settings->_rootDir."/ext", $settings->_cacheDir);
$controller->setParam('extmgr', $extMgr);
$controller->setParam('file', $file);
$_POST['action'] = 'upload';
if (!$controller($_POST)) {
$controller->setParam('action', 'upload');
if (!$controller()) {
unlink($file);
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
}
@ -130,8 +130,8 @@ elseif ($action == "getlist") { /* {{{ */
$controller->setParam('extmgr', $extMgr);
$controller->setParam('forceupdate', (isset($_POST['forceupdate']) && $_POST['forceupdate']) ? true : false);
$controller->setParam('version', $v->version());
if (!$controller($_POST)) {
$session->setSplashMsg(array('type'=>'error', 'msg'=>getMLText('error_extension_getlist').": ".$controller->getErrorMsg(), 'timeout'=>5000));
if (!$controller()) {
$session->setSplashMsg(array('type'=>'error', 'msg'=>getMLText('error_extension_getlist').":".$controller->getErrorMsg(), 'timeout'=>5000));
} else {
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_extension_getlist')));
}
@ -148,7 +148,7 @@ elseif ($action == "toggle") { /* {{{ */
}
$controller->setParam('extmgr', $extMgr);
$controller->setParam('extname', $extname);
if (!$controller($_POST)) {
if (!$controller()) {
echo json_encode(array('success'=>false, 'msg'=>getMLText('extinsion_toggle_error')));
} else {
if($settings->extensionIsDisabled($extname))

View File

@ -35,6 +35,15 @@ function renderBaseData($colname, $objdata) { /* {{{ */
return $objdata[$colname];
} /* }}} */
function getBooleanData($colname, $coldata, $objdata) { /* {{{ */
$objdata[$colname] = $coldata == '1';
return $objdata;
} /* }}} */
function renderBooleanData($colname, $objdata) { /* {{{ */
return $objdata[$colname] ? '1' : '0';
} /* }}} */
function getPasswordPlainData($colname, $coldata, $objdata) { /* {{{ */
$objdata['passenc'] = seed_pass_hash($coldata);
return $objdata;
@ -49,6 +58,10 @@ function getQuotaData($colname, $coldata, $objdata) { /* {{{ */
return $objdata;
} /* }}} */
function renderQuotaData($colname, $objdata) { /* {{{ */
return SeedDMS_Core_File::format_filesize($objdata[$colname]);
} /* }}} */
function getFolderData($colname, $coldata, $objdata) { /* {{{ */
global $dms;
if($coldata) {
@ -168,6 +181,8 @@ if (isset($_FILES['userdata']) && $_FILES['userdata']['error'] == 0) {
$colmap[$i] = array("getPasswordPlainData", "renderPasswordPlainData", 'passenc');
} elseif(in_array($colname, array('login', 'name', 'passenc', 'email', 'comment', 'group'))) {
$colmap[$i] = array("getBaseData", "renderBaseData", $colname);
} elseif(in_array($colname, array('disabled', 'hidden'))) {
$colmap[$i] = array("getBooleanData", "renderBooleanData", $colname);
} elseif(substr($colname, 0, 5) == 'attr:') {
$kk = explode(':', $colname, 2);
if(($attrdef = $dms->getAttributeDefinitionByName($kk[1])) || ($attrdef = $dms->getAttributeDefinition((int) $kk[1]))) {
@ -204,7 +219,7 @@ if (isset($_FILES['userdata']) && $_FILES['userdata']['error'] == 0) {
$newusers[$md['login']] = $md;
}
}
// echo "<pre>";print_r($newusers);echo "</pre>";
// echo "<pre>";print_r($newusers);echo "</pre>";exit;
$makeupdate = !empty($_POST['update']);
foreach($newusers as $uhash=>$u) {
$log[$uhash] = [];
@ -239,6 +254,16 @@ if (isset($_FILES['userdata']) && $_FILES['userdata']['error'] == 0) {
if($makeupdate)
$eu->setQuota($u['quota']);
}
if(isset($u['disabled']) && $u['disabled'] != $eu->isDisabled()) {
$log[$uhash][] = array('id'=>$eu->getLogin(), 'type'=>'success', 'msg'=> "Disabled flag of user updated. '".$u['disabled']."' != '".$eu->isDisabled()."'");
if($makeupdate)
$eu->setDisabled($u['disabled']);
}
if(isset($u['hidden']) && $u['hidden'] != $eu->isHidden()) {
$log[$uhash][] = array('id'=>$eu->getLogin(), 'type'=>'success', 'msg'=> "Hidden flag of user updated. '".$u['hidden']."' != '".$eu->isHidden()."'");
if($makeupdate)
$eu->setHidden($u['hidden']);
}
if(isset($u['homefolder']) && $u['homefolder']->getId() != $eu->getHomeFolder()) {
$log[$uhash][] = array('id'=>$eu->getLogin(), 'type'=>'success', 'msg'=> "Homefolder of user updated. '".(is_object($u['homefolder']) ? $u['homefolder']->getId() : '')."' != '".($eu->getHomeFolder() ? $eu->getHomeFolder() : '')."'");
if($makeupdate)
@ -281,10 +306,12 @@ if (isset($_FILES['userdata']) && $_FILES['userdata']['error'] == 0) {
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
if($view) {
$view->setParam('log', $log);
$view->setParam('newusers', $newusers);
$view->setParam('colmap', $colmap);
$view->setParam('accessobject', $accessop);
$view($_GET);
exit;
}

View File

@ -115,7 +115,7 @@ case 'login':
exit;
break;
default:
if(!$controller->run()) {
if(!$controller()) {
add_log_line("login failed", PEAR_LOG_ERR);
_printMessage(getMLText($controller->getErrorMsg()), getMLText($controller->getErrorMsg())."\n");
exit;

View File

@ -53,7 +53,7 @@ if(isset($_COOKIE['mydms_session'])) {
$controller->setParam('user', $user);
$controller->setParam('session', $session);
$controller->run();
$controller();
}
//Forward to Login-page

View File

@ -60,7 +60,7 @@ if(isset($_GET['version'])) {
$controller->setParam('version', $version);
$controller->setParam('type', 'version');
$controller->setParam('conversionmgr', $conversionmgr);
if(!$controller->run()) {
if(!$controller()) {
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version"));
}
exit;

View File

@ -55,16 +55,16 @@ if ($document->getAccessMode($user) < M_READ) {
}
$controller->setParam('conversionmgr', $conversionmgr);
$controller->setParam('width', !empty($_GET["width"]) ? $_GET["width"] : null);
$controller->setParam('document', $document);
if(isset($_GET['version'])) {
$version = $_GET["version"];
if (!is_numeric($version))
exit;
$controller->setParam('width', !empty($_GET["width"]) ? $_GET["width"] : null);
$controller->setParam('document', $document);
$controller->setParam('action', 'version');
$controller->setParam('version', $version);
$controller->setParam('type', 'version');
if(!$controller->run()) {
if(!$controller()) {
header('Content-Type: image/svg+xml');
readfile('../views/'.$theme.'/images/empty.svg');
exit;
@ -75,11 +75,9 @@ if(isset($_GET['version'])) {
if (!is_numeric($file) || intval($file)<1)
exit;
$object = $document->getDocumentFile($file);
$controller->setParam('width', !empty($_GET["width"]) ? $_GET["width"] : null);
$controller->setParam('document', $document);
$controller->setParam('action', 'file');
$controller->setParam('object', $object);
$controller->setParam('type', 'file');
if(!$controller->run()) {
if(!$controller()) {
header('Content-Type: image/svg+xml');
readfile('../views/'.$theme.'/images/empty.svg');
exit;
@ -88,29 +86,3 @@ if(isset($_GET['version'])) {
} else {
exit;
}
/* From here on old code which isn't used anymore
if (!is_object($object)) {
exit;
}
if(!empty($_GET["width"]))
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir, $_GET["width"]);
else
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir);
$previewer->setConverters($settings->_converters['preview']);
$previewer->setXsendfile($settings->_enableXsendfile);
if(!$previewer->hasPreview($object)) {
add_log_line("");
if(!$previewer->createPreview($object)) {
}
}
if(!$previewer->hasPreview($object)) {
header('Content-Type: image/svg+xml');
readfile('../views/'.$theme.'/images/empty.svg');
exit;
}
header('Content-Type: image/png');
$previewer->getPreview($object);
*/
?>

View File

@ -82,7 +82,7 @@ $docname = $document->getName();
$controller->setParam('document', $document);
$controller->setParam('fulltextservice', $fulltextservice);
if(!$controller->run()) {
if(!$controller()) {
if ($controller->getErrorMsg() != '')
$errormsg = $controller->getErrorMsg();
else

View File

@ -80,7 +80,7 @@ $nl = array(
$controller->setParam('folder', $folder);
$controller->setParam('fulltextservice', $fulltextservice);
if(!$controller->run()) {
if(!$controller()) {
UI::exitError(getMLText("folder_title", array("foldername" => htmlspecialchars($foldername))),getMLText("error_remove_folder"));
}
@ -88,6 +88,8 @@ if ($notifier) {
$notifier->sendDeleteFolderMail($folder, $user);
}
$session->setSplashMsg(array('type'=>'success', 'msg'=>getMLText('splash_rm_folder')));
add_log_line("?folderid=".$folderid."&name=".$foldername);
header("Location:../out/out.ViewFolder.php?folderid=".$parent->getID()."&showtree=".$_POST["showtree"]);

View File

@ -79,7 +79,7 @@ if (count($document->getContent())==1) {
$controller->setParam('document', $document);
$controller->setParam('fulltextservice', $fulltextservice);
if(!$controller->run()) {
if(!$controller()) {
if ($controller->getErrorMsg() != '')
$errormsg = $controller->getErrorMsg();
else

View File

@ -66,7 +66,7 @@ $oldowner = $document->getOwner();
$controller->setParam('document', $document);
$controller->setParam('newuser', $newuser);
if(!$controller->run()) {
if(!$controller()) {
UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("error_transfer_document"));
}

View File

@ -349,7 +349,7 @@ default:
$attribute = date('Y-m-d', makeTsFromDate($attribute));
break;
}
if(!$attrdef->validate($attribute)) {
if(!$attrdef->validate($attribute, null, true)) {
$errmsg = getAttributeValidationText($attrdef->getValidationError(), $attrdef->getName(), $attribute);
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())), $errmsg);
}
@ -380,7 +380,7 @@ default:
$controller->setParam('workflow', $workflow);
$controller->setParam('initialdocumentstatus', $settings->_initialDocumentStatus);
if(!$content = $controller->run()) {
if(!$content = $controller()) {
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText($controller->getErrorMsg()));
} else {
if($controller->hasHook('cleanUpDocument')) {

View File

@ -43,7 +43,7 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$controller = Controller::factory($tmp[1], array('dms'=>$dms, 'user'=>$user));
$controller->setParam('group', $group);
if(!$controller->run()) {
if(!$controller()) {
if ($controller->getErrorMsg() != '')
$errormsg = $controller->getErrorMsg();
else

View File

@ -60,7 +60,7 @@ if(isset($_GET["version"])) { /* {{{ */
$controller->setParam('document', $document);
$controller->setParam('version', intval($version));
$controller->setParam('type', 'version');
if(!$controller->run()) {
if(!$controller()) {
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("invalid_version"));
}
} /* }}} */

View File

@ -44,9 +44,9 @@ if (!is_object($rmuser)) {
UI::exitError(getMLText("rm_user"),getMLText("invalid_user_id"));
}
if ($rmuser->getID()==$user->getID()) {
UI::exitError(getMLText("rm_user"),getMLText("cannot_delete_yourself"));
}
//if ($rmuser->getID()==$user->getID()) {
// UI::exitError(getMLText("rm_user"),getMLText("cannot_delete_yourself"));
//}
$task = null;
if (isset($_GET["task"])) {

View File

@ -49,12 +49,15 @@ if (isset($_GET["navBar"])) {
}
}
$accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings);
$includecontent = false;
if (isset($_GET["includecontent"]) && $_GET["includecontent"])
$includecontent = true;
$newowner = null;
if (isset($_GET["newowner"]) && is_numeric($_GET["newowner"]) && $_GET['newowner'] > 0) {
$newowner = $dms->getUser((int) $_GET['newowner']);
}
$fullsearch = ((!isset($_GET["fullsearch"]) && $settings->_defaultSearchMethod == 'fulltext') || !empty($_GET["fullsearch"])) && $settings->_enableFullSearch;
if($fullsearch) {
// Search in Fulltext {{{
@ -592,6 +595,8 @@ if($settings->_showSingleSearchHit && count($entries) == 1) {
$view->setParam('accessobject', $accessop);
$view->setParam('query', $query);
$view->setParam('includecontent', $includecontent);
$view->setParam('marks', isset($_GET['marks']) ? $_GET['marks'] : array());
$view->setParam('newowner', $newowner);
$view->setParam('searchhits', $entries);
$view->setParam('totalpages', $totalPages);
$view->setParam('pagenumber', $pageNumber);
@ -642,6 +647,7 @@ if($settings->_showSingleSearchHit && count($entries) == 1) {
$view->setParam('enablefullsearch', $settings->_enableFullSearch);
$view->setParam('previewWidthList', $settings->_previewWidthList);
$view->setParam('previewConverters', isset($settings->_converters['preview']) ? $settings->_converters['preview'] : array());
$view->setParam('conversionmgr', $conversionmgr);
$view->setParam('timeout', $settings->_cmdTimeout);
$view->setParam('xsendfile', $settings->_enableXsendfile);
$view->setParam('reception', $reception);

View File

@ -99,6 +99,7 @@ if($view) {
$view->setParam('offset', $offset);
$view->setParam('limit', $limit);
$view->setParam('onepage', $settings->_onePageMode); // do most navigation by reloading areas of pages with ajax
$view->setParam('currenttab', 'folderinfo');
$view($_GET);
exit;
}

View File

@ -2470,7 +2470,7 @@ $app->get('/logout', \RestapiController::class.':doLogout');
$app->get('/account', \RestapiController::class.':getAccount');
$app->get('/search', \RestapiController::class.':doSearch');
$app->get('/searchbyattr', \RestapiController::class.':doSearchByAttr');
$app->get('/folder/', \RestapiController::class.':getFolder');
$app->get('/folder', \RestapiController::class.':getFolder');
$app->get('/folder/{id}', \RestapiController::class.':getFolder');
$app->post('/folder/{id}/move/{folderid}', \RestapiController::class.':moveFolder');
$app->delete('/folder/{id}', \RestapiController::class.':deleteFolder');

View File

@ -12,7 +12,7 @@ function usage() { /* {{{ */
echo " seeddms-indexer [-h] [-v] [-c] [--config <file>]".PHP_EOL;
echo PHP_EOL;
echo "Description:".PHP_EOL;
echo " This program recreates the full text index of SeedDMS.".PHP_EOL;
echo " This program recreates or updates the full text index of SeedDMS.".PHP_EOL;
echo PHP_EOL;
echo "Options:".PHP_EOL;
echo " -h, --help: print usage information and exit.".PHP_EOL;
@ -42,6 +42,10 @@ if(isset($options['v']) || isset($options['verѕion'])) {
exit(0);
}
$config['log'] = true;
$config['verbosity'] = 3;
$config['stats'] = true;
/* Set alternative config file */
if(isset($options['config'])) {
define('SEEDDMS_CONFIG_FILE', $options['config']);
@ -56,20 +60,21 @@ if(isset($options['c'])) {
}
include($myincpath."/inc/inc.Settings.php");
if(empty($options['no-log']))
if(empty($options['no-log'])) {
$config['log'] = false;
include($myincpath."/inc/inc.LogInit.php");
}
include($myincpath."/inc/inc.Init.php");
include($myincpath."/inc/inc.Extension.php");
include($myincpath."/inc/inc.DBInit.php");
function tree($dms, $fulltextservice, $folder, $indent='', $numdocs) { /* {{{ */
global $settings, $themes;
global $settings, $themes, $config, $stats;
$index = $fulltextservice->Indexer();
$lucenesearch = $fulltextservice->Search();
// echo $themes->black($indent."D ".$folder->getName()).PHP_EOL;
echo $themes->black($indent."D ".$folder->getId().":".$folder->getName()." ");
$prefix = $themes->black(($config['verbosity'] >= 3 ? $indent : '')."D ".$folder->getId().":".$folder->getName()." ");
if(($numdocs == 0) || !($hit = $lucenesearch->getFolder($folder->getId()))) {
try {
$idoc = $fulltextservice->IndexedDocument($folder, true);
@ -81,9 +86,10 @@ function tree($dms, $fulltextservice, $folder, $indent='', $numdocs) { /* {{{ */
}
}
$index->addDocument($idoc);
echo $themes->green(" (Folder added)").PHP_EOL;
echo $prefix.$themes->green(" (Folder added)").PHP_EOL;
$stats['folder']['add']++;
} catch(Exception $e) {
echo $themes->error(" (Timeout)").PHP_EOL;
echo $prefix.$themes->error(" (Timeout)").PHP_EOL;
}
} else {
try {
@ -92,7 +98,9 @@ function tree($dms, $fulltextservice, $folder, $indent='', $numdocs) { /* {{{ */
$created = 0;
}
if($created >= $folder->getDate()) {
echo $themes->italic(" (Folder unchanged)").PHP_EOL;
if($config['verbosity'] >= 3)
echo $prefix.$themes->italic(" (Folder unchanged)").PHP_EOL;
$stats['folder']['unchanged']++;
} else {
$index->delete($hit->id);
try {
@ -105,9 +113,10 @@ function tree($dms, $fulltextservice, $folder, $indent='', $numdocs) { /* {{{ */
}
}
$index->addDocument($idoc);
echo $themes->green(" (Folder updated)").PHP_EOL;
echo $prefix.$themes->green(" (Folder updated)").PHP_EOL;
$stats['folder']['update']++;
} catch(Exception $e) {
echo $themes->error(" (Timeout)").PHP_EOL;
echo $prefix.$themes->error(" (Timeout)").PHP_EOL;
}
}
}
@ -119,7 +128,7 @@ function tree($dms, $fulltextservice, $folder, $indent='', $numdocs) { /* {{{ */
$documents = $folder->getDocuments();
foreach($documents as $document) {
echo $themes->black($indent." ".$document->getId().":".$document->getName()." ");
$prefix = $themes->black(($config['verbosity'] >= 3 ? $indent : '')." ".$document->getId().":".$document->getName()." ");
if(($numdocs == 0) || !($hit = $lucenesearch->getDocument($document->getId()))) {
try {
$idoc = $fulltextservice->IndexedDocument($document, true);
@ -131,9 +140,10 @@ function tree($dms, $fulltextservice, $folder, $indent='', $numdocs) { /* {{{ */
}
}
$index->addDocument($idoc);
echo $themes->green(" (Document added)").PHP_EOL;
echo $prefix.$themes->green(" (Document added)").PHP_EOL;
$stats['document']['add']++;
} catch(Exception $e) {
echo $themes->error(" (Timeout)").PHP_EOL;
echo $prefix.$themes->error(" (Timeout)").PHP_EOL;
}
} else {
try {
@ -143,7 +153,9 @@ function tree($dms, $fulltextservice, $folder, $indent='', $numdocs) { /* {{{ */
}
$content = $document->getLatestContent();
if($created >= $content->getDate()) {
echo $themes->italic(" (Document unchanged)").PHP_EOL;
if($config['verbosity'] >= 3)
echo $prefix.$themes->italic(" (Document unchanged)").PHP_EOL;
$stats['document']['unchanged']++;
} else {
$index->delete($hit->id);
try {
@ -156,9 +168,10 @@ function tree($dms, $fulltextservice, $folder, $indent='', $numdocs) { /* {{{ */
}
}
$index->addDocument($idoc);
echo $themes->green(" (Document updated)").PHP_EOL;
echo $prefix.$themes->green(" (Document updated)").PHP_EOL;
$stats['document']['update']++;
} catch(Exception $e) {
echo $themes->error(" (Timeout)").PHP_EOL;
echo $prefix.$themes->error(" (Timeout)").PHP_EOL;
}
}
}
@ -173,6 +186,12 @@ if(!$index) {
exit(1);
}
$stats['folder']['add'] = 0;
$stats['folder']['unchanged'] = 0;
$stats['folder']['update'] = 0;
$stats['document']['add'] = 0;
$stats['document']['unchanged'] = 0;
$stats['document']['update'] = 0;
$numdocs = $fulltextservice->Indexer()->count();
$folder = $dms->getFolder($settings->_rootFolderID);
/* if numdocs is 0, then there is no need to check if a document/folder is already
@ -182,3 +201,13 @@ tree($dms, $fulltextservice, $folder,'', $numdocs);
$index->commit();
$index->optimize();
echo PHP_EOL;
echo $themes->black("Documents").PHP_EOL;
echo $themes->black(" added: ".$stats['document']['add']).PHP_EOL;
echo $themes->black(" updated: ".$stats['document']['update']).PHP_EOL;
echo $themes->black(" unchanged: ".$stats['document']['unchanged']).PHP_EOL;
echo $themes->black("Folders").PHP_EOL;
echo $themes->black(" added: ".$stats['folder']['add']).PHP_EOL;
echo $themes->black(" updated: ".$stats['folder']['update']).PHP_EOL;
echo $themes->black(" unchanged: ".$stats['folder']['unchanged']).PHP_EOL;

View File

@ -93,6 +93,7 @@ $(document).ready( function() {
$content .= "<th>".getMLText("attribute_value")."</th>\n";
$content .= "<th>".getMLText("attribute_count")."</th>\n";
$content .= "<th></th>\n";
$content .= "<th></th>\n";
$content .= "</tr></thead>\n<tbody>\n";
$separator = $selattrdef->getValueSetSeparator();
foreach($res['frequencies'][$type] as $entry) {

View File

@ -31,7 +31,7 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common {
function __construct($params, $theme='bootstrap') {
parent::__construct($params, $theme);
$this->extraheader = array('js'=>'', 'css'=>'', 'favicon'=>'', 'logo'=>'');
$this->extraheader = array('js'=>'', 'css'=>'', 'favicon'=>'', 'logo'=>'', 'logolink'=>'');
$this->footerjs = array();
$this->nonces = array();
}
@ -151,7 +151,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
} /* }}} */
function htmlAddHeader($head, $type='js') { /* {{{ */
if($type == 'logo' || $type == 'favicon')
if($type == 'logo' || $type == 'favicon' || $type == 'logolink')
$this->extraheader[$type] = $head;
else
$this->extraheader[$type] .= $head;
@ -294,8 +294,8 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
echo "<div class=\"navbar navbar-inverse navbar-fixed-top\">\n";
echo " <div class=\"navbar-inner\">\n";
echo " <div class=\"container-fluid\">\n";
echo " <a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".(!empty($this->params['dms']) ? $this->params['dms']->getRootFolder()->getId() : '1')."\">".(!empty($this->extraheader['logo']) ? '<img src="'.$this->extraheader['logo'].'"/>' : '<img src="'.$this->params['settings']->_httpRoot.'views/bootstrap/images/seeddms-logo.svg"/>')."</a>";
echo " <a class=\"brand\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</a>\n";
echo " <a href=\"".(!empty($this->extraheader['logolink']) ? $this->extraheader['logolink'] : $this->params['settings']->_httpRoot."out/out.ViewFolder.php")."\">".(!empty($this->extraheader['logo']) ? '<img id="navbar-logo" src="'.$this->extraheader['logo'].'"/>' : '<img id="navbar-logo" src="'.$this->params['settings']->_httpRoot.'views/bootstrap/images/seeddms-logo.svg"/>')."</a>";
echo " <a class=\"brand\" href=\"".(!empty($this->extraheader['logolink']) ? $this->extraheader['logolink'] : $this->params['settings']->_httpRoot."out/out.ViewFolder.php")."\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</a>\n";
echo " </div>\n";
echo " </div>\n";
echo "</div>\n";
@ -385,8 +385,8 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
echo " <a class=\"btn btn-navbar\" href=\"".$this->params['settings']->_httpRoot."op/op.Logout.php\">\n";
echo " <span class=\"fa fa-sign-out\"></span>\n";
echo " </a>\n";
echo " <a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\">".(!empty($this->extraheader['logo']) ? '<img src="'.$this->extraheader['logo'].'">' : '<img src="'.$this->params['settings']->_httpRoot.'views/bootstrap/images/seeddms-logo.svg">')."</a>";
echo " <a class=\"brand\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\"><span class=\"hidden-phone\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
echo " <a href=\"".(!empty($this->extraheader['logolink']) ? $this->extraheader['logolink'] : $this->params['settings']->_httpRoot."out/out.ViewFolder.php")."\">".(!empty($this->extraheader['logo']) ? '<img id="navbar-logo" src="'.$this->extraheader['logo'].'">' : '<img id="navbar-logo" src="'.$this->params['settings']->_httpRoot.'views/bootstrap/images/seeddms-logo.svg">')."</a>";
echo " <a class=\"brand\" href=\"".(!empty($this->extraheader['logolink']) ? $this->extraheader['logolink'] : $this->params['settings']->_httpRoot."out/out.ViewFolder.php")."\"><span class=\"hidden-phone\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
/* user profile menu {{{ */
if(isset($this->params['session']) && isset($this->params['user']) && $this->params['user']) {
@ -780,9 +780,16 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$menuitems['index_folder'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Indexer.php?folderid=". $folderID."&showtree=".showtree(), 'label'=>getMLText('index_folder'));
}
/* Check if hook exists because otherwise callHook() will override $menuitems */
if($this->hasHook('folderNavigationBar'))
$menuitems = $this->callHook('folderNavigationBar', $folder, $menuitems);
/* Do not use $this->callHook() because $menuitems must be returned by the the
* first hook and passed to next hook. $this->callHook() will just pass
* the menuitems to each single hook. Hence, the last hook will win.
*/
$hookObjs = $this->getHookObjects();
foreach($hookObjs as $hookObj) {
if (method_exists($hookObj, 'folderNavigationBar')) {
$menuitems = $hookObj->folderNavigationBar($this, $folder, $menuitems);
}
}
self::showNavigationBar($menuitems);
@ -889,9 +896,16 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$menuitems['groups'] = array('link'=>$this->params['settings']->_httpRoot."out/out.GroupView.php", 'label'=>getMLText('groups'));
}
/* Check if hook exists because otherwise callHook() will override $menuitems */
if($this->hasHook('accountNavigationBar'))
$menuitems = $this->callHook('accountNavigationBar', $menuitems);
/* Do not use $this->callHook() because $menuitems must be returned by the the
* first hook and passed to next hook. $this->callHook() will just pass
* the menuitems to each single hook. Hence, the last hook will win.
*/
$hookObjs = $this->getHookObjects();
foreach($hookObjs as $hookObj) {
if (method_exists($hookObj, 'accountNavigationBar')) {
$menuitems = $hookObj->accountNavigationBar($this, $menuitems);
}
}
self::showNavigationBar($menuitems);
@ -923,9 +937,16 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
if ($accessobject->check_view_access('RevisionSummary'))
$menuitems['revision_summary'] = array('link'=>"../out/out.RevisionSummary.php", 'label'=>getMLText('revision_summary'));
/* Check if hook exists because otherwise callHook() will override $menuitems */
if($this->hasHook('mydocumentsNavigationBar'))
$menuitems = $this->callHook('mydocumentsNavigationBar', $menuitems);
/* Do not use $this->callHook() because $menuitems must be returned by the the
* first hook and passed to next hook. $this->callHook() will just pass
* the menuitems to each single hook. Hence, the last hook will win.
*/
$hookObjs = $this->getHookObjects();
foreach($hookObjs as $hookObj) {
if (method_exists($hookObj, 'mydocumentsNavigationBar')) {
$menuitems = $hookObj->mydocumentsNavigationBar($this, $menuitems);
}
}
self::showNavigationBar($menuitems);
@ -1030,9 +1051,16 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
}
}
/* Check if hook exists because otherwise callHook() will override $menuitems */
if($this->hasHook('admintoolsNavigationBar'))
$menuitems = $this->callHook('admintoolsNavigationBar', $menuitems);
/* Do not use $this->callHook() because $menuitems must be returned by the the
* first hook and passed to next hook. $this->callHook() will just pass
* the menuitems to each single hook. Hence, the last hook will win.
*/
$hookObjs = $this->getHookObjects();
foreach($hookObjs as $hookObj) {
if (method_exists($hookObj, 'admintoolsNavigationBar')) {
$menuitems = $hookObj->admintoolsNavigationBar($this, $menuitems);
}
}
self::showNavigationBar($menuitems);
@ -1066,9 +1094,16 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
if($accessobject->check_view_access(array('AddEvent')))
$menuitems['addevent'] = array('link'=>$this->params['settings']->_httpRoot."out/out.AddEvent.php", 'label'=>getMLText('add_event'));
/* Check if hook exists because otherwise callHook() will override $menuitems */
if($this->hasHook('calendarNavigationBar'))
$menuitems = $this->callHook('calendarNavigationBar', $menuitems);
/* Do not use $this->callHook() because $menuitems must be returned by the the
* first hook and passed to next hook. $this->callHook() will just pass
* the menuitems to each single hook. Hence, the last hook will win.
*/
$hookObjs = $this->getHookObjects();
foreach($hookObjs as $hookObj) {
if (method_exists($hookObj, 'calendarNavigationBar')) {
$menuitems = $hookObj->calendarNavigationBar($this, $menuitems);
}
}
self::showNavigationBar($menuitems);
@ -1434,7 +1469,7 @@ function getOverallStatusIcon($status) { /* {{{ */
$icon = 'fa fa-question';
break;
}
return '<i class="fa '.$icon.'"'.($color ? ' style="color: '.$color.';"' : '').' title="'.getOverallStatusText($status).'"></i>';
return '<div style="display: inline-block; white-space: nowrap;"><i class="fa '.$icon.'"'.($color ? ' style="color: '.$color.';"' : '').' title="'.getOverallStatusText($status).'"></i> <span class="visible-desktop">'.getOverallStatusText($status).'</span></div>';
}
} /* }}} */
@ -1932,11 +1967,11 @@ $(document).ready(function() {
}
} /* }}} */
function printAttributeEditField($attrdef, $attribute, $fieldname='attributes', $norequire=false, $namepostfix='') { /* {{{ */
echo self::getAttributeEditField($attrdef, $attribute, $fieldname, $norequire, $namepostfix);
function printAttributeEditField($attrdef, $attribute, $fieldname='attributes', $norequire=false, $namepostfix='', $alwaysmultiple=false) { /* {{{ */
echo self::getAttributeEditField($attrdef, $attribute, $fieldname, $norequire, $namepostfix, $alwaysmultiple);
} /* }}} */
function getAttributeEditField($attrdef, $attribute, $fieldname='attributes', $norequire=false, $namepostfix='') { /* {{{ */
function getAttributeEditField($attrdef, $attribute, $fieldname='attributes', $norequire=false, $namepostfix='', $alwaysmultiple=false) { /* {{{ */
$dms = $this->params['dms'];
$content = '';
switch($attrdef->getType()) {
@ -1982,7 +2017,7 @@ $(document).ready(function() {
$users = $dms->getAllUsers();
if($users) {
$allowempty = $attrdef->getMinValues() == 0;
$allowmultiple = $attrdef->getMultipleValues();
$allowmultiple = $attrdef->getMultipleValues() || $alwaysmultiple;
$content .= "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"".$fieldname."[".$attrdef->getId()."]".($allowmultiple ? '[]' : '')."\"".($allowmultiple ? " multiple" : "")." data-placeholder=\"".getMLText("select_user")."\">";
if($allowempty)
$content .= "<option value=\"\"></option>";
@ -2002,7 +2037,7 @@ $(document).ready(function() {
$groups = $dms->getAllGroups();
if($groups) {
$allowempty = $attrdef->getMinValues() == 0;
$allowmultiple = $attrdef->getMultipleValues();
$allowmultiple = $attrdef->getMultipleValues() || $alwaysmultiple;
$content .= "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"".$fieldname."[".$attrdef->getId()."]".($allowmultiple ? '[]' : '')."\"".($allowmultiple ? " multiple" : "")." data-placeholder=\"".getMLText("select_group")."\">";
if($allowempty)
$content .= "<option value=\"\"></option>";
@ -2021,13 +2056,13 @@ $(document).ready(function() {
if($valueset = $attrdef->getValueSetAsArray()) {
$content .= "<input type=\"hidden\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"\"/>";
$content .= "<select id=\"".$fieldname."_".$attrdef->getId()."\" name=\"".$fieldname."[".$attrdef->getId()."]";
if($attrdef->getMultipleValues()) {
if($attrdef->getMultipleValues() || $alwaysmultiple) {
$content .= "[]\" multiple";
} else {
$content .= "\" data-allow-clear=\"true\"";
}
$content .= "".((!$norequire && $attrdef->getMinValues() > 0) ? ' required="required"' : '')." class=\"chzn-select\" data-placeholder=\"".getMLText("select_value")."\">";
if(!$attrdef->getMultipleValues()) {
if(!$attrdef->getMultipleValues() && !$alwaysmultiple) {
$content .= "<option value=\"\"></option>";
}
$objvalue = $attribute ? (is_object($attribute) ? $attribute->getValueAsArray() : $attribute) : array();
@ -2523,7 +2558,7 @@ $(function() {
function printDeleteDocumentButton($document, $msg, $return=false){ /* {{{ */
$docid = $document->getID();
$content = '';
$content .= '<a class="delete-document-btn" rel="'.$docid.'" msg="'.getMLText($msg).'" confirmmsg="'.htmlspecialchars(getMLText("confirm_rm_document", array ("documentname" => $document->getName())), ENT_QUOTES).'"><i class="fa fa-remove"></i></a>';
$content .= '<a class="delete-document-btn" rel="'.$docid.'" msg="'.getMLText($msg).'" confirmmsg="'.htmlspecialchars(getMLText("confirm_rm_document", array ("documentname" => $document->getName())), ENT_QUOTES).'" title="'.getMLText("delete").'"><i class="fa fa-remove"></i></a>';
if($return)
return $content;
else
@ -2597,7 +2632,7 @@ $(function() {
function printDeleteFolderButton($folder, $msg, $return=false){ /* {{{ */
$folderid = $folder->getID();
$content = '';
$content .= '<a class="delete-folder-btn" rel="'.$folderid.'" msg="'.getMLText($msg).'" confirmmsg="'.htmlspecialchars(getMLText("confirm_rm_folder", array ("foldername" => $folder->getName())), ENT_QUOTES).'"><i class="fa fa-remove"></i></a>';
$content .= '<a class="delete-folder-btn" rel="'.$folderid.'" msg="'.getMLText($msg).'" confirmmsg="'.htmlspecialchars(getMLText("confirm_rm_folder", array ("foldername" => $folder->getName())), ENT_QUOTES).'" title="'.getMLText("delete").'"><i class="fa fa-remove"></i></a>';
if($return)
return $content;
else
@ -3118,32 +3153,50 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$content = '';
$content .= "<div class=\"list-action\">";
$actions = array();
if(!empty($extracontent['begin_action_list']))
$content .= $extracontent['begin_action_list'];
if($accessop->check_view_access('RemoveDocument')) {
if($document->getAccessMode($user) >= M_ALL) {
$content .= $this->printDeleteDocumentButton($document, 'splash_rm_document', true);
$actions['remove_document'] = $this->printDeleteDocumentButton($document, 'splash_rm_document', true);
} else {
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
$actions['remove_document'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
}
}
$docID = $document->getID();
if($document->getAccessMode($user) >= M_READWRITE) {
$content .= '<a href="'.$this->params['settings']->_httpRoot.'out/out.EditDocument.php?documentid='.$docID.'" title="'.getMLText("edit_document_props").'"><i class="fa fa-edit"></i></a>';
$actions['edit_document'] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.EditDocument.php?documentid='.$docID.'" title="'.getMLText("edit_document_props").'"><i class="fa fa-edit"></i></a>';
} else {
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
$actions['edit_document'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
}
if($document->getAccessMode($user) >= M_READWRITE) {
$content .= $this->printLockButton($document, 'splash_document_locked', 'splash_document_unlocked', true);
$actions['lock_document'] = $this->printLockButton($document, 'splash_document_locked', 'splash_document_unlocked', true);
}
if($document->getAccessMode($user) >= M_READWRITE) {
$content .= $this->printAccessButton($document, true);
$actions['document_access'] = $this->printAccessButton($document, true);
}
if($enableClipboard) {
$content .= '<a class="addtoclipboard" rel="D'.$docID.'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
$actions['add_to_clipboard'] = '<a class="addtoclipboard" rel="D'.$docID.'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
}
if($onepage)
$content .= '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$docID.'" title="'.getMLText("view_document").'"><i class="fa fa-eye"></i></a>';
$actions['view_document'] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$docID.'" title="'.getMLText("view_document").'"><i class="fa fa-eye"></i></a>';
/* Do not use $this->callHook() because $menuitems must be returned by the the
* first hook and passed to next hook. $this->callHook() will just pass
* the menuitems to each single hook. Hence, the last hook will win.
*/
$hookObjs = $this->getHookObjects();
foreach($hookObjs as $hookObj) {
if (method_exists($hookObj, 'documentRowAction')) {
$actions = $hookObj->documentRowAction($this, $document, $actions);
}
}
foreach($actions as $action) {
if(is_string($action))
$content .= $action;
}
if(!empty($extracontent['end_action_list']))
$content .= $extracontent['end_action_list'];
$content .= "</div>";
@ -3367,31 +3420,49 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$content = '';
$content .= "<div class=\"list-action\">";
$actions = array();
if(!empty($extracontent['begin_action_list']))
$content .= $extracontent['begin_action_list'];
$subFolderAccessMode = $subFolder->getAccessMode($user);
if ($accessop->check_view_access('RemoveFolder')) {
if($subFolderAccessMode >= M_ALL) {
$content .= $this->printDeleteFolderButton($subFolder, 'splash_rm_folder', true);
$actions['remove_folder'] = $this->printDeleteFolderButton($subFolder, 'splash_rm_folder', true);
} else {
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
$actions['remove_folder'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
}
}
if ($accessop->check_view_access('EditFolder')) {
if($subFolderAccessMode >= M_READWRITE) {
$content .= '<a class_="btn btn-mini" href="'.$this->params['settings']->_httpRoot.'out/out.EditFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("edit_folder_props").'"><i class="fa fa-edit"></i></a>';
$actions['edit_folder'] = '<a class_="btn btn-mini" href="'.$this->params['settings']->_httpRoot.'out/out.EditFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("edit_folder_props").'"><i class="fa fa-edit"></i></a>';
} else {
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
$actions['edit_folder'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
}
}
if($subFolderAccessMode >= M_READWRITE) {
$content .= $this->printAccessButton($subFolder, true);
$actions['folder_access'] = $this->printAccessButton($subFolder, true);
}
if($enableClipboard) {
$content .= '<a class="addtoclipboard" rel="F'.$subFolder->getID().'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
$actions['add_to_clipboard'] = '<a class="addtoclipboard" rel="F'.$subFolder->getID().'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
}
if($onepage)
$content .= '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("view_folder").'"><i class="fa fa-eye"></i></a>';
$actions['view_folder'] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("view_folder").'"><i class="fa fa-eye"></i></a>';
/* Do not use $this->callHook() because $menuitems must be returned by the the
* first hook and passed to next hook. $this->callHook() will just pass
* the menuitems to each single hook. Hence, the last hook will win.
*/
$hookObjs = $this->getHookObjects();
foreach($hookObjs as $hookObj) {
if (method_exists($hookObj, 'folderRowAction')) {
$actions = $hookObj->folderRowAction($this, $folder, $actions);
}
}
foreach($actions as $action) {
if(is_string($action))
$content .= $action;
}
if(!empty($extracontent['end_action_list']))
$content .= $extracontent['end_action_list'];
$content .= "</div>";
@ -3910,7 +3981,7 @@ $("body").on("click", "span.openpopupbox", function(e) {
echo $html;
} /* }}} */
public function printAccordion($title, $content) { /* {{{ */
public function printAccordion($title, $content, $open=false) { /* {{{ */
$id = substr(md5(uniqid()), 0, 4);
?>
<div class="accordion" id="accordion<?php echo $id; ?>">
@ -3920,7 +3991,7 @@ $("body").on("click", "span.openpopupbox", function(e) {
<?php echo $title; ?>
</a>
</div>
<div id="collapse<?php echo $id; ?>" class="accordion-body collapse" style="height: 0px;">
<div id="collapse<?php echo $id; ?>" class="accordion-body collapse<?= $open ? " in" : "" ?>">
<div class="accordion-inner">
<?php
echo $content;

View File

@ -79,7 +79,7 @@ $('.folderselect').click(function(ev) {
$finfo = finfo_open(FILEINFO_MIME_TYPE);
while (false !== ($entry = $d->read())) {
if($entry != '..' && $entry != '.') {
if($showfolders == 0 && !is_dir($dir.'/'.$entry)) {
if($showfolders == 0 && !is_dir($dir.'/'.$entry) && is_readable($dir.'/'.$entry)) {
$c++;
$subitem = array('label'=>'', 'attributes'=>array(array('title', getMLText('menu_upload_from_dropfolder'))));
if($folder)

View File

@ -16,7 +16,7 @@
/**
* Include parent class
*/
require_once("class.Bootstrap.php");
//require_once("class.Bootstrap.php");
/**
* Class which outputs the html page for FolderAttributeGroup view

View File

@ -95,7 +95,7 @@ class SeedDMS_View_ImportUsers extends SeedDMS_Theme_Style {
foreach($newusers as $uhash=>$newuser) {
foreach($colmap as $i=>$coldata) {
echo "<td>";
echo call_user_func($colmap[$i][1], $colmap[$i][2], $newuser);
echo htmlspecialchars(call_user_func($colmap[$i][1], $colmap[$i][2], $newuser));
echo "</td>\n";
}
echo "<td>";

View File

@ -300,7 +300,7 @@ $(document).ready( function() {
'options'=>$options
)
);
echo '<p><button type="submit" class="btn btn-primary"><i class="fa fa-remove"></i> '.getMLText('transfer').'</button>';
echo '<button type="submit" class="btn btn-primary"><i class="fa fa-remove"></i> '.getMLText('transfer_processes_to_user').'</button>';
echo '</form>';
}
} /* }}} */
@ -506,7 +506,7 @@ $(document).ready( function() {
<?php
echo "<table class=\"table table-condensed table-sm\">";
foreach($out as $o) {
echo "<tr><td>".$o[3]."</td><td>".$o[4]."</td><td><input style=\"margin-top: 0px;\" type=\"checkbox\" name=\"status[".$o[1]."][]\" value=\"".$o[0]."\"></td><td><span data-action=\"printList\" data-userid=\"".$rmuser->getId()."\" data-task=\"".$o[1]."s_".$o[2]."\" data-type=\"".$o[1]."_".$o[0]."\"><i class=\"fa fa-list\"></i></span></td></tr>";
echo "<tr><td>".$o[3]."</td><td>".$o[4]."</td><td><input style=\"margin-top: 0px;\" type=\"checkbox\" name=\"status[".$o[1]."][]\" value=\"".$o[0]."\"></td><td><span title=\"".getMLText('select_documents_for_process')."\" data-action=\"printList\" data-userid=\"".$rmuser->getId()."\" data-task=\"".$o[1]."s_".$o[2]."\" data-type=\"".$o[1]."_".$o[0]."\"><i class=\"fa fa-list\"></i></span></td></tr>";
}
echo "</table>";

View File

@ -45,10 +45,10 @@ class SeedDMS_View_Search extends SeedDMS_Theme_Style {
*/
function markQuery($str, $tag = "b") { /* {{{ */
$querywords = preg_split("/ /", $this->query);
foreach ($querywords as $queryword)
$str = str_ireplace("($queryword)", "<" . $tag . ">\\1</" . $tag . ">", $str);
return $str;
} /* }}} */
@ -61,12 +61,39 @@ class SeedDMS_View_Search extends SeedDMS_Theme_Style {
$(document).ready( function() {
$('#export').on('click', function(e) {
e.preventDefault();
window.location.href = $(this).attr('href')+'&includecontent='+($('#includecontent').prop('checked') ? '1' : '0');
var url = "";
url = $(this).attr('href')+'&includecontent='+($('#includecontent').prop('checked') ? '1' : '0');
var inputs = $('input[name^=\"marks\"]');
var values = {};
inputs.each(function() {
console.log(this.name+'='+this.checked);
if(this.checked)
values[this.name] = 1;
});
url += '&'+$.param(values);
window.location.href = url;
});
$('#changeowner').on('click', function(e) {
e.preventDefault();
var url = "";
url = $(this).attr('href')+'&newowner='+($('#newowner').val());
var inputs = $('input[name^=\"marks\"]');
var values = {};
inputs.each(function() {
console.log(this.name+'='+this.checked);
if(this.checked)
values[this.name] = 1;
});
url += '&'+$.param(values);
window.location.href = url;
});
});
<?php
// $this->printFolderChooserJs("form1");
$this->printDeleteFolderButtonJs();
$this->printMarkDocumentButtonJs();
$this->printDeleteDocumentButtonJs();
/* Add js for catching click on document in one page mode */
$this->printClickDocumentJs();
@ -79,11 +106,64 @@ $(document).ready(function() {
<?php
} /* }}} */
/**
* Print button with icon for marking a document
*
* @param object $document document to be marked
* @param boolean $return return html instead of printing it
* @return string html content if $return is true, otherwise an empty string
*/
function printMarkDocumentButton($document, $return=false){ /* {{{ */
$docid = $document->getID();
$content = '';
$content .= '<br /><span class="mark-btn document-unmarked" title="'.getMLText('mark_document').'" rel="D'.$docid.'"><i class="fa fa-square-o"></i></span><input type="checkbox" id="marks_D'.$docid.'" name="marks[D'.$docid.']" value="1" style="display: none;">';
if($return)
return $content;
else
echo $content;
return '';
} /* }}} */
/**
* Print button with icon for marking a folder
*
* @param object $folder folder to be marked
* @param boolean $return return html instead of printing it
* @return string html content if $return is true, otherwise an empty string
*/
function printMarkFolderButton($folder, $return=false){ /* {{{ */
$folderid = $folder->getID();
$content = '';
$content .= '<br /><span class="mark-btn folder-unmarked" title="'.getMLText('mark_folder').'" rel="F'.$folderid.'"><i class="fa fa-square-o"></i></span><input type="checkbox" id="marks_F'.$folderid.'" name="marks[F'.$folderid.']" value="1" style="display: none;">';
if($return)
return $content;
else
echo $content;
return '';
} /* }}} */
function printMarkDocumentButtonJs(){ /* {{{ */
$url = $this->html_url('Search', array_merge($_GET, array('action'=>null)));
echo "
// ".$url."
$(document).ready(function () {
$('body').on('click', 'span.mark-btn', function(ev){
ev.stopPropagation();
id = $(ev.currentTarget).attr('rel');
$('#marks_'+id).each(function () { this.checked = !this.checked; });
$(this).parents('tr').toggleClass('table-info');
$(this).find('i').toggleClass('fa-square-o fa-check-square-o')
});
});
";
} /* }}} */
function export() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
$entries = $this->params['searchhits'];
$includecontent = $this->params['includecontent'];
$marks = $this->params['marks'];
include("../inc/inc.ClassDownloadMgr.php");
$downmgr = new SeedDMS_Download_Mgr();
@ -91,12 +171,14 @@ $(document).ready(function() {
$downmgr->addHeader($extraheader);
foreach($entries as $entry) {
if($entry->isType('document')) {
$extracols = $this->callHook('extraDownloadColumns', $entry);
$filename = $this->callHook('filenameDownloadItem', $entry->getLatestContent());
if($includecontent && $rawcontent = $this->callHook('rawcontent', $entry->getLatestContent())) {
$downmgr->addItem($entry->getLatestContent(), $extracols, $rawcontent, $filename);
} else
$downmgr->addItem($entry->getLatestContent(), $extracols, null, $filename);
if(empty($marks) || !empty($marks['D'.$entry->getId()])) {
$extracols = $this->callHook('extraDownloadColumns', $entry);
$filename = $this->callHook('filenameDownloadItem', $entry->getLatestContent());
if($includecontent && $rawcontent = $this->callHook('rawcontent', $entry->getLatestContent())) {
$downmgr->addItem($entry->getLatestContent(), $extracols, $rawcontent, $filename);
} else
$downmgr->addItem($entry->getLatestContent(), $extracols, null, $filename);
}
}
}
$filename = tempnam(sys_get_temp_dir(), '');
@ -120,6 +202,31 @@ $(document).ready(function() {
unlink($filename);
} /* }}} */
function changeowner() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
$entries = $this->params['searchhits'];
$newowner = $this->params['newowner'];
$marks = $this->params['marks'];
if($newowner && $user->isAdmin()) {
$j = $i = 0;
foreach($entries as $entry) {
$prefix = $entry->isType('document') ? 'D' : 'F';
if(empty($marks) || !empty($marks[$prefix.$entry->getId()])) {
if($entry->getOwner()->getId() != $newowner->getId()) {
$entry->setOwner($newowner);
$j++;
}
}
}
$this->setParam('batchmsg', getMLText('batch_new_owner_msg', ['count'=>$j]));
} else {
}
return self::show();
} /* }}} */
function opensearchsuggestion() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
@ -183,7 +290,7 @@ function typeahead() { /* {{{ */
$tmp['orderby'] = ($orderby=="d"||$orderby=="da") ? "dd" : "d";
$headcol .= " <a href=\"../out/out.Search.php?".http_build_query($tmp)."\" title=\"".getMLText("sort_by_date")."\">".($orderby=="d"||$orderby=="da"?' <i class="fa fa-sort-amount-asc selected"></i>':($orderby=="dd"?' <i class="fa fa-sort-amount-desc selected"></i>':' <i class="fa fa-sort-amount-asc"></i>'))."</a>";
}
return $headcol;
return $headcol;
} /* }}} */
function show() { /* {{{ */
@ -238,25 +345,12 @@ function typeahead() { /* {{{ */
$cachedir = $this->params['cachedir'];
$previewwidth = $this->params['previewWidthList'];
$previewconverters = $this->params['previewConverters'];
$conversionmgr = $this->params['conversionmgr'];
$timeout = $this->params['timeout'];
$xsendfile = $this->params['xsendfile'];
$reception = $this->params['reception'];
$showsinglesearchhit = $this->params['showsinglesearchhit'];
if($showsinglesearchhit && count($entries) == 1) {
$entry = $entries[0];
if($entry->isType('document')) {
header('Location: ../out/out.ViewDocument.php?documentid='.$entry->getID());
exit;
} elseif($entry->isType('folder')) {
header('Location: ../out/out.ViewFolder.php?folderid='.$entry->getID());
exit;
}
}
// if ($pageNumber != 'all')
// $entries = array_slice($entries, ($pageNumber-1)*$limit, $limit);
$this->htmlStartPage(getMLText("search_results"));
$this->globalNavigation();
$this->contentStart();
@ -267,7 +361,7 @@ function typeahead() { /* {{{ */
//$this->contentHeading("<button class=\"btn btn-primary\" id=\"searchform-toggle\" data-toggle=\"collapse\" href=\"#searchform\"><i class=\"fa fa-exchange\"></i></button> ".getMLText('search'), true);
$this->contentHeading(getMLText('search'), true);
if($this->query) {
echo "<div id=\"searchform\" class=\"_collapse mb-sm-4\">";
echo "<div id=\"searchform\" class=\"_collapse mb-sm-4\">";
}
?>
<ul class="nav nav-pills" id="searchtab">
@ -285,7 +379,7 @@ function typeahead() { /* {{{ */
// Database search Form {{{
?>
<div class="tab-pane <?php echo ($fullsearch == false) ? 'active' : ''; ?>" id="database">
<form class="form-horizontal" action="<?= $this->params['settings']->_httpRoot ?>out/out.Search.php" name="form1">
<form class="form-horizontal mb-4" action="<?= $this->params['settings']->_httpRoot ?>out/out.Search.php" name="form1">
<input type="hidden" name="fullsearch" value="0" />
<?php
// General search options {{{
@ -410,17 +504,42 @@ function typeahead() { /* {{{ */
}
}
} elseif($attrdefs) {
$this->contentContainerEnd();
// Seach options for documents and folders {{{
/* First check if any of the folder/document filters are set. If it is,
* open the accordion.
*/
$openfilterdlg = false;
$hasattrs = false;
foreach($attrdefs as $attrdef) {
if($attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_all) {
if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date) {
$this->formField(htmlspecialchars($attrdef->getName().' ('.getMLText('from').')'), $this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['from']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['from'])) : '', 'attributes', true, 'from'));
$this->formField(htmlspecialchars($attrdef->getName().' ('.getMLText('to').')'), $this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['to']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['to'])) : '', 'attributes', true, 'to'));
} else
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : '', 'attributes', true));
/* Do not check dates because they always have 'from' and 'to' element
* even if it is empty. FIXME should be also checked.
*/
$hasattrs = true;
if($attrdef->getType() != SeedDMS_Core_AttributeDefinition::type_date)
if(!empty($attributes[$attrdef->getID()]))
$openfilterdlg = true;
}
}
}
$this->contentContainerEnd();
if($hasattrs) {
ob_start();
if($attrdefs) {
foreach($attrdefs as $attrdef) {
if($attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_all) {
if($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date) {
$this->formField(htmlspecialchars($attrdef->getName().' ('.getMLText('from').')'), $this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['from']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['from'])) : '', 'attributes', true, 'from'));
$this->formField(htmlspecialchars($attrdef->getName().' ('.getMLText('to').')'), $this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['to']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['to'])) : '', 'attributes', true, 'to'));
} else
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : '', 'attributes', true));
}
}
}
$content = ob_get_clean();
$this->printAccordion(getMLText('filter_for_documents_and_folders'), $content, $openfilterdlg);
}
// }}}
// Seach options for documents {{{
@ -431,8 +550,12 @@ function typeahead() { /* {{{ */
if($attrdefs) {
foreach($attrdefs as $attrdef) {
if($attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_document || $attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_documentcontent) {
if(!empty($attributes[$attrdef->getID()]))
$openfilterdlg = true;
/* Do not check dates because they always have 'from' and 'to' element
* even if it is empty. FIXME should be also checked.
*/
if($attrdef->getType() != SeedDMS_Core_AttributeDefinition::type_date)
if(!empty($attributes[$attrdef->getID()]))
$openfilterdlg = true;
}
}
}
@ -449,24 +572,6 @@ function typeahead() { /* {{{ */
if($statusdate)
$openfilterdlg = true;
if($totaldocs) {
ob_start();
$this->formField(
getMLText("include_content"),
array(
'element'=>'input',
'type'=>'checkbox',
'name'=>'includecontent',
'id'=>'includecontent',
'value'=>1,
)
);
//$this->formSubmit("<i class=\"fa fa-download\"></i> ".getMLText('export'));
print $this->html_link('Search', array_merge($_GET, array('action'=>'export')), array('class'=>'btn btn-primary', 'id'=>'export'), "<i class=\"fa fa-download\"></i> ".getMLText("export"), false, true)."\n";
$content = ob_get_clean();
$this->printAccordion(getMLText('export'), $content);
}
/* Start of fields only applicable to documents */
ob_start();
$tmpcatids = array();
@ -571,24 +676,28 @@ function typeahead() { /* {{{ */
$this->formField(htmlspecialchars($attrdef->getName().' ('.getMLText('from').')'), $this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['from']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['from'])) : '', 'attributes', true, 'from'));
$this->formField(htmlspecialchars($attrdef->getName().' ('.getMLText('to').')'), $this->getAttributeEditField($attrdef, !empty($attributes[$attrdef->getID()]['to']) ? getReadableDate(makeTsFromDate($attributes[$attrdef->getID()]['to'])) : '', 'attributes', true, 'to'));
} else
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : '', 'attributes', true));
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : '', 'attributes', true, '', true));
}
}
}
$content = ob_get_clean();
$this->printAccordion(getMLText('filter_for_documents'), $content, $openfilterdlg);
// }}}
// Seach options for folders {{{
$content = ob_get_clean();
$this->printAccordion(getMLText('filter_for_documents'), $content);
/* First check if any of the folder filters are set. If it is,
* open the accordion.
*/
$openfilterdlg = false;
$hasattrs = false;
if($attrdefs) {
foreach($attrdefs as $attrdef) {
if($attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_folder) {
if(!empty($attributes[$attrdef->getID()]))
$openfilterdlg = true;
$hasattrs = true;
if($attrdef->getType() != SeedDMS_Core_AttributeDefinition::type_date)
if(!empty($attributes[$attrdef->getID()]))
$openfilterdlg = true;
}
}
}
@ -631,8 +740,7 @@ function typeahead() { /* {{{ */
}
}
$content = ob_get_clean();
if($content)
$this->printAccordion(getMLText('filter_for_folders'), $content);
$this->printAccordion(getMLText('filter_for_folders'), $content, $openfilterdlg);
// }}}
$this->formSubmit("<i class=\"fa fa-search\"></i> ".getMLText('search'));
@ -641,7 +749,6 @@ function typeahead() { /* {{{ */
</div>
<?php
// }}}
// }}}
// Fulltext search Form {{{
if($enablefullsearch) {
@ -795,8 +902,60 @@ function typeahead() { /* {{{ */
if($this->query) {
echo "</div>\n";
}
/* Batch operations {{{ */
if($total)
$this->contentHeading(getMLText('batch_operation'));
if($totaldocs) {
ob_start();
$this->formField(
getMLText("include_content"),
array(
'element'=>'input',
'type'=>'checkbox',
'name'=>'includecontent',
'id'=>'includecontent',
'value'=>1,
)
);
//$this->formSubmit("<i class=\"fa fa-download\"></i> ".getMLText('export'));
print $this->html_link('Search', array_merge($_GET, array('action'=>'export')), array('class'=>'btn btn-primary', 'id'=>'export'), "<i class=\"fa fa-download\"></i> ".getMLText("export"), false, true)."\n";
$content = ob_get_clean();
$this->printAccordion(getMLText('export'), $content);
}
if($user->isAdmin() && $total) {
ob_start();
$users = $dms->getAllUsers();
$options = array();
$options[] = array("-1", getMLText("choose_user"));
foreach ($users as $currUser) {
$options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin().' - '.$currUser->getFullName()), false, array(array('data-subtitle', htmlspecialchars($currUser->getEmail()))));
}
$this->formField(
null, //getMLText("selection"),
array(
'element'=>'select',
'id'=>'newowner',
'class'=>'chzn-select',
'options'=>$options,
'placeholder'=>getMLText('select_users'),
)
);
print $this->html_link('Search', array_merge($_GET, array('action'=>'changeowner')), array('class'=>'btn btn-primary', 'id'=>'changeowner'), "<i class=\"fa fa-user\"></i> ".getMLText("batch_change_owner"), false, true)."\n";
$content = ob_get_clean();
$this->printAccordion(getMLText('batch_change_owner'), $content);
}
// }}}
?>
<?php
$this->columnEnd();
$this->columnStart(8);
if($batchmsg = $this->getParam('batchmsg')) {
$this->contentHeading(getMLText('batch_operation_result'));
echo $this->infoMsg($batchmsg);
}
$this->contentHeading(getMLText('search_results'));
// Search Result {{{
$foldercount = $doccount = 0;
@ -829,7 +988,10 @@ function typeahead() { /* {{{ */
print "<tbody>\n";
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile);
$previewer->setConverters($previewconverters);
if($conversionmgr)
$previewer->setConversionMgr($conversionmgr);
else
$previewer->setConverters($previewconverters);
foreach ($entries as $entry) {
if($entry->isType('document')) {
$document = $entry;
@ -883,6 +1045,7 @@ function typeahead() { /* {{{ */
$extracontent['below_title'] = $this->getListRowPath($document);
if($attrstr)
$extracontent['bottom_title'] = '<br />'.$this->printPopupBox('<span class="btn btn-mini btn-sm btn-secondary">'.getMLText('attributes').'</span>', $attrstr, true);
$extracontent['end_action_list'] = $this->printMarkDocumentButton($document, true);
$txt = $this->callHook('documentListItem', $entry, $previewer, false, 'search', $extracontent);
if(is_string($txt))
@ -912,7 +1075,8 @@ function typeahead() { /* {{{ */
$extracontent['below_title'] = $this->getListRowPath($folder);
if($attrstr)
$extracontent['bottom_title'] = '<br />'.$this->printPopupBox('<span class="btn btn-mini btn-sm btn-secondary">'.getMLText('attributes').'</span>', $attrstr, true);
print $this->folderListRow($folder, false, $extracontent, SeedDMS_Core_AttributeDefinitionGroup::show_search);
$extracontent['end_action_list'] = $this->printMarkFolderButton($folder, true);
print $this->folderListRow($folder, false, $extracontent);
}
}
}

View File

@ -649,7 +649,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
case "attributedefinitions":
$objtype = empty($conf['objtype']) ? 0 : $conf['objtype'];
$attrtype = empty($conf['attrtype']) ? 0 : $conf['attrtype'];
$recs = $dms->getAllAttributeDefinitions(explode(',', $objtype), explode(',', $attrtype));
$recs = $dms->getAllAttributeDefinitions($objtype, $attrtype);
if($recs) {
echo "<select class=\"chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"extensions[".$extname."][".$confkey."][]\"".(!empty($conf['multiple']) ? " multiple" : "").(!empty($conf['size']) ? " size=\"".$conf['size']."\"" : "")." data-placeholder=\"".getMLText("select_attrdef")."\" data-no_results_text=\"".getMLText('unknown_attrdef')."\">";
if($allowempty)

View File

@ -66,8 +66,16 @@ $(document).ready(function() {
$action = $transition->getAction();
$currentstate = $latestContent->getWorkflowState();
$wkflogs = $latestContent->getWorkflowLog();
$wkflog = array_shift($wkflogs);
$workflow = $latestContent->getWorkflow();
/* Check if latest content is still in workflow, which should be
* always the case, otherwise this code would be executed.
* In that case the returned log is just a list of entries for the
* current workflow. If the document was not in a workflow, then the
* log entries for all workflows of this content will be returned
*/
if($workflow = $latestContent->getWorkflow())
$wkflog = $wkflogs;
else
$wkflog = array_shift($wkflogs);
$msg = "The document is currently in state: ".$currentstate->getName()."<br />";
if($wkflog) {

View File

@ -359,7 +359,8 @@ $('body').on('click', '.order-btn', function(ev) {
}
echo "</table>\n";
$infos = ob_get_clean();
$this->printAccordion2(getMLText("folder_infos"), $infos);
echo $infos;
// $this->printAccordion2(getMLText("folder_infos"), $infos);
$txt = $this->callHook('postFolderInfos', $folder);
if(is_string($txt))
echo $txt;
@ -601,6 +602,7 @@ $('body').on('click', '.order-btn', function(ev) {
$previewconverters = $this->params['previewConverters'];
$timeout = $this->params['timeout'];
$xsendfile = $this->params['xsendfile'];
$currenttab = $this->params['currenttab'];
$folderid = $folder->getId();
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile);
@ -660,15 +662,36 @@ $('body').on('click', '.order-btn', function(ev) {
$this->rowStart();
$this->columnStart(8);
}
// $this->folderInfos();
?>
<ul class="nav nav-pills" id="folderinfotab" role="tablist">
<li class="nav-item <?php if(!$currenttab || $currenttab == 'folderinfo') echo 'active'; ?>"><a class="nav-link <?php if(!$currenttab || $currenttab == 'folderinfo') echo 'active'; ?>" data-target="#folderinfo" data-toggle="tab" role="button"><?php printMLText('folder_infos'); ?></a></li>
<?php
$tabs = $this->callHook('extraTabs', $folder);
if($tabs) {
foreach($tabs as $tabid=>$tab) {
echo '<li class="nav-item '.($currenttab == $tabid ? 'active' : '').'"><a class="nav-link '.($currenttab == $tabid ? 'active' : '').'" data-target="#'.$tabid.'" data-toggle="tab" role="button">'.$tab['title'].'</a></li>';
}
}
?>
</ul>
<div class="tab-content">
<div class="tab-pane <?php if(!$currenttab || $currenttab == 'folderinfo') echo 'active'; ?>" id="folderinfo" role="tabpanel">
<div class="ajax" data-view="ViewFolder" data-action="folderInfos" data-no-spinner="true" <?php echo ($folder ? "data-query=\"folderid=".$folder->getID()."\"" : "") ?>></div>
</div>
<?php
if($tabs) {
foreach($tabs as $tabid=>$tab) {
echo '<div class="tab-pane '.($currenttab == $tabid ? 'active' : '').'" id="'.$tabid.'" role="tabpanel">';
echo $tab['content'];
echo "</div>\n";
}
}
?>
</div>
<?php
if ($enableDropUpload/* && $folder->getAccessMode($user) >= M_READWRITE*/) {
$this->columnEnd();
$this->columnStart(4);
// $this->dropUpload();
?>
<div class="ajax" data-view="ViewFolder" data-action="dropUpload" data-no-spinner="true" <?php echo ($folder ? "data-query=\"folderid=".$folder->getID()."\"" : "") ?>></div>
<?php

View File

@ -7,7 +7,7 @@
margin: auto auto;
width: 460px;
}
.navbar img {
#navbar-logo {
height: 1.93rem;
float: left;
padding-top: 5px;
@ -434,6 +434,9 @@ ul.qq-upload-list li span {
width: 900px;
margin-left: -450px;
}
.modal-wide .modal-body {
max-height: 642px;
}
}
@media (max-width: 480px) {

View File

@ -822,6 +822,15 @@ function onAddClipboard(ev) { /* {{{ */
target_type = droptarget.split("_")[0];
target_id = droptarget.split("_")[1];
}
var afterupload = obj.data('afterupload');
if(afterupload) {
afteruploadfunc = eval(afterupload);
} else {
afteruploadfunc = function() {
if(target_id == seeddms_folder)
$("div.ajax[data-action='folderList']").trigger('update', {folderid: seeddms_folder});
}
}
if(target_type == 'folder' && target_id) {
for (var i = 0; i < files.length; i++) {
if(files[i].size <= maxFileSize) {
@ -844,10 +853,7 @@ function onAddClipboard(ev) { /* {{{ */
statusbar.parent().show();
var status = new SeedDMSUpload.createStatusbar(statusbar);
status.setFileNameSize(files[i].name,files[i].size);
SeedDMSUpload.sendFileToServer(fd,status,function(){
if(target_id == seeddms_folder)
$("div.ajax[data-action='folderList']").trigger('update', {folderid: seeddms_folder});
});
SeedDMSUpload.sendFileToServer(fd,status,afteruploadfunc);
} else {
noty({
text: maxFileSizeMsg + '<br /><em>' + files[i].name + ' (' + files[i].size + ' Bytes)</em>',

View File

@ -31,7 +31,7 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common {
function __construct($params, $theme='bootstrap') {
parent::__construct($params, $theme);
$this->extraheader = array('js'=>'', 'css'=>'', 'favicon'=>'', 'logo'=>'');
$this->extraheader = array('js'=>'', 'css'=>'', 'favicon'=>'', 'logo'=>'', 'logolink'=>'');
$this->footerjs = array();
$this->nonces = array();
}
@ -151,7 +151,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
} /* }}} */
function htmlAddHeader($head, $type='js') { /* {{{ */
if($type == 'logo' || $type == 'favicon')
if($type == 'logo' || $type == 'favicon' || $type == 'logolink')
$this->extraheader[$type] = $head;
else
$this->extraheader[$type] .= $head;
@ -306,7 +306,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
function globalBanner() { /* {{{ */
echo "<nav class=\"navbar navbar-expand-lg navbar-dark bg-dark fixed-top\">\n";
echo " <a class=\"navbar-brand\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php\">".(!empty($this->extraheader['logo']) ? '<img src="'.$this->extraheader['logo'].'"/>' : '<img src="'.$this->params['settings']->_httpRoot.'views/bootstrap4/images/seeddms-logo.svg"/>')." <span class=\"d-none d-md-inline-block ml-4\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
echo " <a class=\"navbar-brand\" href=\"".(!empty($this->extraheader['logolink']) ? $this->extraheader['logolink'] : $this->params['settings']->_httpRoot."out/out.ViewFolder.php")."\">".(!empty($this->extraheader['logo']) ? '<img id="navbar-logo" src="'.$this->extraheader['logo'].'"/>' : '<img id="navbar-logo" src="'.$this->params['settings']->_httpRoot.'views/bootstrap4/images/seeddms-logo.svg"/>')." <span class=\"d-none d-md-inline-block ml-4\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
echo "</nav>\n";
} /* }}} */
@ -314,7 +314,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$dms = $this->params['dms'];
$accessobject = $this->params['accessobject'];
echo "<nav class=\"navbar navbar-expand-lg navbar-dark bg-dark border-bottom fixed-top\">\n";
echo " <a class=\"navbar-brand\" href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$this->params['dms']->getRootFolder()->getId()."\">".(!empty($this->extraheader['logo']) ? '<img src="'.$this->extraheader['logo'].'">' : '<img src="'.$this->params['settings']->_httpRoot.'views/bootstrap4/images/seeddms-logo.svg">')." <span class=\"d-none d-md-inline-block ml-4\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
echo " <a class=\"navbar-brand\" href=\"".(!empty($this->extraheader['logolink']) ? $this->extraheader['logolink'] : $this->params['settings']->_httpRoot."out/out.ViewFolder.php")."\">".(!empty($this->extraheader['logo']) ? '<img id="navbar-logo" src="'.$this->extraheader['logo'].'">' : '<img id="navbar-logo" src="'.$this->params['settings']->_httpRoot.'views/bootstrap4/images/seeddms-logo.svg">')." <span class=\"d-none d-md-inline-block ml-4\">".(strlen($this->params['sitename'])>0 ? $this->params['sitename'] : "SeedDMS")."</span></a>\n";
if(isset($this->params['user']) && $this->params['user']) {
/* search form {{{ */
@ -703,9 +703,16 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$menuitems['index_folder'] = array('link'=>$this->params['settings']->_httpRoot."out/out.Indexer.php?folderid=". $folderID."&showtree=".showtree(), 'label'=>getMLText('index_folder'));
}
/* Check if hook exists because otherwise callHook() will override $menuitems */
if($this->hasHook('folderNavigationBar'))
$menuitems = $this->callHook('folderNavigationBar', $folder, $menuitems);
/* Do not use $this->callHook() because $menuitems must be returned by the the
* first hook and passed to next hook. $this->callHook() will just pass
* the menuitems to each single hook. Hence, the last hook will win.
*/
$hookObjs = $this->getHookObjects();
foreach($hookObjs as $hookObj) {
if (method_exists($hookObj, 'folderNavigationBar')) {
$menuitems = $hookObj->folderNavigationBar($this, $folder, $menuitems);
}
}
self::showNavigationBar($menuitems);
} /* }}} */
@ -802,9 +809,16 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
$menuitems['groups'] = array('link'=>$this->params['settings']->_httpRoot."out/out.GroupView.php", 'label'=>getMLText('groups'));
}
/* Check if hook exists because otherwise callHook() will override $menuitems */
if($this->hasHook('accountNavigationBar'))
$menuitems = $this->callHook('accountNavigationBar', $menuitems);
/* Do not use $this->callHook() because $menuitems must be returned by the the
* first hook and passed to next hook. $this->callHook() will just pass
* the menuitems to each single hook. Hence, the last hook will win.
*/
$hookObjs = $this->getHookObjects();
foreach($hookObjs as $hookObj) {
if (method_exists($hookObj, 'accountNavigationBar')) {
$menuitems = $hookObj->accountNavigationBar($this, $menuitems);
}
}
self::showNavigationBar($menuitems);
@ -832,9 +846,16 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
if ($accessobject->check_view_access('RevisionSummary'))
$menuitems['revision_summary'] = array('link'=>"../out/out.RevisionSummary.php", 'label'=>getMLText('revision_summary'));
/* Check if hook exists because otherwise callHook() will override $menuitems */
if($this->hasHook('mydocumentsNavigationBar'))
$menuitems = $this->callHook('mydocumentsNavigationBar', $menuitems);
/* Do not use $this->callHook() because $menuitems must be returned by the the
* first hook and passed to next hook. $this->callHook() will just pass
* the menuitems to each single hook. Hence, the last hook will win.
*/
$hookObjs = $this->getHookObjects();
foreach($hookObjs as $hookObj) {
if (method_exists($hookObj, 'mydocumentsNavigationBar')) {
$menuitems = $hookObj->mydocumentsNavigationBar($this, $menuitems);
}
}
self::showNavigationBar($menuitems);
@ -934,9 +955,16 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
}
}
/* Check if hook exists because otherwise callHook() will override $menuitems */
if($this->hasHook('admintoolsNavigationBar'))
$menuitems = $this->callHook('admintoolsNavigationBar', $menuitems);
/* Do not use $this->callHook() because $menuitems must be returned by the the
* first hook and passed to next hook. $this->callHook() will just pass
* the menuitems to each single hook. Hence, the last hook will win.
*/
$hookObjs = $this->getHookObjects();
foreach($hookObjs as $hookObj) {
if (method_exists($hookObj, 'admintoolsNavigationBar')) {
$menuitems = $hookObj->admintoolsNavigationBar($this, $menuitems);
}
}
self::showNavigationBar($menuitems);
@ -967,9 +995,16 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
if($accessobject->check_view_access(array('AddEvent')))
$menuitems['addevent'] = array('link'=>$this->params['settings']->_httpRoot."out/out.AddEvent.php", 'label'=>getMLText('add_event'));
/* Check if hook exists because otherwise callHook() will override $menuitems */
if($this->hasHook('calendarNavigationBar'))
$menuitems = $this->callHook('calendarNavigationBar', $menuitems);
/* Do not use $this->callHook() because $menuitems must be returned by the the
* first hook and passed to next hook. $this->callHook() will just pass
* the menuitems to each single hook. Hence, the last hook will win.
*/
$hookObjs = $this->getHookObjects();
foreach($hookObjs as $hookObj) {
if (method_exists($hookObj, 'calendarNavigationBar')) {
$menuitems = $hookObj->calendarNavigationBar($this, $menuitems);
}
}
self::showNavigationBar($menuitems);
@ -1354,7 +1389,7 @@ function getOverallStatusIcon($status) { /* {{{ */
$icon = 'fa fa-question';
break;
}
return '<i class="fa '.$icon.'"'.($color ? ' style="color: '.$color.';"' : '').' title="'.getOverallStatusText($status).'"></i>';
return '<div style="display: inline-block; white-space: nowrap;"><i class="fa '.$icon.'"'.($color ? ' style="color: '.$color.';"' : '').' title="'.getOverallStatusText($status).'"></i> <span class="d-none d-md-inline-block">'.getOverallStatusText($status).'</span></div>';
}
} /* }}} */
@ -1885,11 +1920,11 @@ $(document).ready(function() {
}
} /* }}} */
function printAttributeEditField($attrdef, $attribute, $fieldname='attributes', $norequire=false, $namepostfix='') { /* {{{ */
echo self::getAttributeEditField($attrdef, $attribute, $fieldname, $norequire, $namepostfix);
function printAttributeEditField($attrdef, $attribute, $fieldname='attributes', $norequire=false, $namepostfix='', $alwaysmultiple=false) { /* {{{ */
echo self::getAttributeEditField($attrdef, $attribute, $fieldname, $norequire, $namepostfix, $alwaysmultiple);
} /* }}} */
function getAttributeEditField($attrdef, $attribute, $fieldname='attributes', $norequire=false, $namepostfix='') { /* {{{ */
function getAttributeEditField($attrdef, $attribute, $fieldname='attributes', $norequire=false, $namepostfix='', $alwaysmultiple=false) { /* {{{ */
$dms = $this->params['dms'];
$content = '';
switch($attrdef->getType()) {
@ -1945,7 +1980,7 @@ $(document).ready(function() {
$users = $dms->getAllUsers();
if($users) {
$allowempty = $attrdef->getMinValues() == 0;
$allowmultiple = $attrdef->getMultipleValues();
$allowmultiple = $attrdef->getMultipleValues() || $alwaysmultiple;
$content .= "<select class=\"form-control chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"".$fieldname."[".$attrdef->getId()."]".($allowmultiple ? '[]' : '')."\"".($allowmultiple ? " multiple" : "")." data-placeholder=\"".getMLText("select_user")."\">";
if($allowempty)
$content .= "<option value=\"\"></option>";
@ -1965,7 +2000,7 @@ $(document).ready(function() {
$groups = $dms->getAllGroups();
if($groups) {
$allowempty = $attrdef->getMinValues() == 0;
$allowmultiple = $attrdef->getMultipleValues();
$allowmultiple = $attrdef->getMultipleValues() || $alwaysmultiple;
$content .= "<select class=\"form-control chzn-select\"".($allowempty ? " data-allow-clear=\"true\"" : "")."\" name=\"".$fieldname."[".$attrdef->getId()."]".($allowmultiple ? '[]' : '')."\"".($allowmultiple ? " multiple" : "")." data-placeholder=\"".getMLText("select_group")."\">";
if($allowempty)
$content .= "<option value=\"\"></option>";
@ -1984,13 +2019,13 @@ $(document).ready(function() {
if($valueset = $attrdef->getValueSetAsArray()) {
$content .= "<input type=\"hidden\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"\"/>";
$content .= "<select class=\"form-control\" id=\"".$fieldname."_".$attrdef->getId()."\" name=\"".$fieldname."[".$attrdef->getId()."]";
if($attrdef->getMultipleValues()) {
if($attrdef->getMultipleValues() || $alwaysmultiple) {
$content .= "[]\" multiple";
} else {
$content .= "\" data-allow-clear=\"true\"";
}
$content .= "".((!$norequire && $attrdef->getMinValues() > 0) ? ' required="required"' : '')." class=\"form-control chzn-select\" data-placeholder=\"".getMLText("select_value")."\">";
if(!$attrdef->getMultipleValues()) {
if(!$attrdef->getMultipleValues() && !$alwaysmultiple) {
$content .= "<option value=\"\"></option>";
}
$objvalue = $attribute ? (is_object($attribute) ? $attribute->getValueAsArray() : $attribute) : array();
@ -2488,7 +2523,7 @@ $(function() {
function printDeleteDocumentButton($document, $msg, $return=false){ /* {{{ */
$docid = $document->getID();
$content = '';
$content .= '<a class="delete-document-btn" rel="'.$docid.'" msg="'.getMLText($msg).'" confirmmsg="'.htmlspecialchars(getMLText("confirm_rm_document", array ("documentname" => $document->getName())), ENT_QUOTES).'"><i class="fa fa-remove"></i></a>';
$content .= '<a class="delete-document-btn" rel="'.$docid.'" msg="'.getMLText($msg).'" confirmmsg="'.htmlspecialchars(getMLText("confirm_rm_document", array ("documentname" => $document->getName())), ENT_QUOTES).'" title="'.getMLText("delete").'"><i class="fa fa-remove"></i></a>';
if($return)
return $content;
else
@ -2568,7 +2603,7 @@ $(function() {
function printDeleteFolderButton($folder, $msg, $return=false){ /* {{{ */
$folderid = $folder->getID();
$content = '';
$content .= '<a class="delete-folder-btn" rel="'.$folderid.'" msg="'.getMLText($msg).'" confirmmsg="'.htmlspecialchars(getMLText("confirm_rm_folder", array ("foldername" => $folder->getName())), ENT_QUOTES).'"><i class="fa fa-remove"></i></a>';
$content .= '<a class="delete-folder-btn" rel="'.$folderid.'" msg="'.getMLText($msg).'" confirmmsg="'.htmlspecialchars(getMLText("confirm_rm_folder", array ("foldername" => $folder->getName())), ENT_QUOTES).'" title="'.getMLText("delete").'"><i class="fa fa-remove"></i></a>';
if($return)
return $content;
else
@ -3107,32 +3142,49 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$content = '';
$content .= "<div class=\"list-action\">";
$actions = array();
if(!empty($extracontent['begin_action_list']))
$content .= $extracontent['begin_action_list'];
if($accessop->check_view_access('RemoveDocument')) {
if($document->getAccessMode($user) >= M_ALL) {
$content .= $this->printDeleteDocumentButton($document, 'splash_rm_document', true);
$actions['remove_document'] = $this->printDeleteDocumentButton($document, 'splash_rm_document', true);
} else {
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
$actions['remove_document'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
}
}
$docID = $document->getID();
if($document->getAccessMode($user) >= M_READWRITE) {
$content .= '<a href="'.$this->params['settings']->_httpRoot.'out/out.EditDocument.php?documentid='.$docID.'" title="'.getMLText("edit_document_props").'"><i class="fa fa-edit"></i></a>';
$actions['edit_document'] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.EditDocument.php?documentid='.$docID.'" title="'.getMLText("edit_document_props").'"><i class="fa fa-edit"></i></a>';
} else {
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
$actions['edit_document'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
}
if($document->getAccessMode($user) >= M_READWRITE) {
$content .= $this->printLockButton($document, 'splash_document_locked', 'splash_document_unlocked', true);
$actions['lock_document'] = $this->printLockButton($document, 'splash_document_locked', 'splash_document_unlocked', true);
}
if($document->getAccessMode($user) >= M_READWRITE) {
$content .= $this->printAccessButton($document, true);
$actions['document_access'] = $this->printAccessButton($document, true);
}
if($enableClipboard) {
$content .= '<a class="addtoclipboard" rel="D'.$docID.'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
$actions['add_to_clipboard'] = '<a class="addtoclipboard" rel="D'.$docID.'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
}
if($onepage)
$content .= '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$docID.'" title="'.getMLText("view_document").'"><i class="fa fa-eye"></i></a>';
$actions['view_document'] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewDocument.php?documentid='.$docID.'" title="'.getMLText("view_document").'"><i class="fa fa-eye"></i></a>';
/* Do not use $this->callHook() because $menuitems must be returned by the the
* first hook and passed to next hook. $this->callHook() will just pass
* the menuitems to each single hook. Hence, the last hook will win.
*/
$hookObjs = $this->getHookObjects();
foreach($hookObjs as $hookObj) {
if (method_exists($hookObj, 'documentRowAction')) {
$actions = $hookObj->documentRowAction($this, $document, $actions);
}
}
foreach($actions as $action) {
if(is_string($action))
$content .= $action;
}
if(!empty($extracontent['end_action_list']))
$content .= $extracontent['end_action_list'];
$content .= "</div>";
@ -3368,31 +3420,49 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$content = '';
$content .= "<div class=\"list-action\">";
$actions = array();
if(!empty($extracontent['begin_action_list']))
$content .= $extracontent['begin_action_list'];
$subFolderAccessMode = $subFolder->getAccessMode($user);
if ($accessop->check_view_access('RemoveFolder')) {
if($subFolderAccessMode >= M_ALL) {
$content .= $this->printDeleteFolderButton($subFolder, 'splash_rm_folder', true);
$actions['remove_folder'] = $this->printDeleteFolderButton($subFolder, 'splash_rm_folder', true);
} else {
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
$actions['remove_folder'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-remove"></i></span>';
}
}
if ($accessop->check_view_access('EditFolder')) {
if($subFolderAccessMode >= M_READWRITE) {
$content .= '<a class_="btn btn-mini" href="'.$this->params['settings']->_httpRoot.'out/out.EditFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("edit_folder_props").'"><i class="fa fa-edit"></i></a>';
$actions['edit_folder'] = '<a class_="btn btn-mini" href="'.$this->params['settings']->_httpRoot.'out/out.EditFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("edit_folder_props").'"><i class="fa fa-edit"></i></a>';
} else {
$content .= '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
$actions['edit_folder'] = '<span style="padding: 2px; color: #CCC;"><i class="fa fa-edit"></i></span>';
}
}
if($subFolderAccessMode >= M_READWRITE) {
$content .= $this->printAccessButton($subFolder, true);
$actions['folder_access'] = $this->printAccessButton($subFolder, true);
}
if($enableClipboard) {
$content .= '<a class="addtoclipboard" rel="F'.$subFolder->getID().'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
$actions['add_to_clipboard'] = '<a class="addtoclipboard" rel="F'.$subFolder->getID().'" msg="'.getMLText('splash_added_to_clipboard').'" title="'.getMLText("add_to_clipboard").'"><i class="fa fa-copy"></i></a>';
}
if($onepage)
$content .= '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("view_folder").'"><i class="fa fa-eye"></i></a>';
$actions['view_folder'] = '<a href="'.$this->params['settings']->_httpRoot.'out/out.ViewFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("view_folder").'"><i class="fa fa-eye"></i></a>';
/* Do not use $this->callHook() because $menuitems must be returned by the the
* first hook and passed to next hook. $this->callHook() will just pass
* the menuitems to each single hook. Hence, the last hook will win.
*/
$hookObjs = $this->getHookObjects();
foreach($hookObjs as $hookObj) {
if (method_exists($hookObj, 'folderRowAction')) {
$actions = $hookObj->folderRowAction($this, $folder, $actions);
}
}
foreach($actions as $action) {
if(is_string($action))
$content .= $action;
}
if(!empty($extracontent['end_action_list']))
$content .= $extracontent['end_action_list'];
$content .= "</div>";
@ -3864,17 +3934,17 @@ $("body").on("click", "span.openpopupbox", function(e) {
echo $html;
} /* }}} */
public function printAccordion($title, $content) { /* {{{ */
public function printAccordion($title, $content, $open=false) { /* {{{ */
$id = substr(md5(uniqid()), 0, 4);
?>
<div class="accordion" id="accordion<?php echo $id; ?>">
<div class="accordion mb-4" id="accordion<?php echo $id; ?>">
<div class="card">
<div class="card-header" id="accordionheader<?php echo $id; ?>">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion<?php echo $id; ?>" data-target="#collapse<?php echo $id; ?>">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion<?php echo $id; ?>" data-target="#collapse<?php echo $id; ?>"<?= $open ? ' aria-expanded="true"' : '' ?>>
<?php echo $title; ?>
</a>
</div>
<div id="collapse<?php echo $id; ?>" class="collapse" data-parent="accordion<?php echo $id; ?>">
<div id="collapse<?php echo $id; ?>" class="collapse<?= $open ? ' show' : '' ?>" data-parent="accordion<?php echo $id; ?>">
<div class="card-body">
<?php
echo $content;

View File

@ -853,6 +853,15 @@ function onAddClipboard(ev) { /* {{{ */
target_type = droptarget.split("_")[0];
target_id = droptarget.split("_")[1];
}
var afterupload = obj.data('afterupload');
if(afterupload) {
afteruploadfunc = eval(afterupload);
} else {
afteruploadfunc = function() {
if(target_id == seeddms_folder)
$("div.ajax[data-action='folderList']").trigger('update', {folderid: seeddms_folder});
}
}
if(target_type == 'folder' && target_id) {
for (var i = 0; i < files.length; i++) {
if(files[i].size <= maxFileSize) {
@ -875,10 +884,7 @@ function onAddClipboard(ev) { /* {{{ */
statusbar.parent().show();
var status = new SeedDMSUpload.createStatusbar(statusbar);
status.setFileNameSize(files[i].name,files[i].size);
SeedDMSUpload.sendFileToServer(fd,status,function(){
if(target_id == seeddms_folder)
$("div.ajax[data-action='folderList']").trigger('update', {folderid: seeddms_folder});
});
SeedDMSUpload.sendFileToServer(fd,status,afteruploadfunc);
} else {
noty({
text: maxFileSizeMsg + '<br /><em>' + files[i].name + ' (' + files[i].size + ' Bytes)</em>',