From ada7c1d692f7ae85c960240182e973902aee344b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Sep 2021 10:05:00 +0200 Subject: [PATCH 01/40] add method clearCache() --- SeedDMS_Core/Core/inc.ClassDocument.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 96d982680..d883d33d6 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -220,6 +220,27 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $this->_notifyList = array(); $this->_latestContent = null; $this->_content = null; + /* Cache */ + $this->clearCache(); + } /* }}} */ + + /** + * Clear cache of this instance. + * + * The result of some expensive database actions (e.g. get all subfolders + * or documents) will be saved in a class variable to speed up consecutive + * calls of the same method. If a second call of the same method shall not + * use the cache, then it must be cleared. + * + */ + public function clearCache() { /* {{{ */ + $this->_parent = null; + $this->_owner = null; + $this->_documentLinks = null; + $this->_documentFiles = null; + $this->_content = null; + $this->_accessList = null; + $this->_notifyList = null; } /* }}} */ /** From 85f838b354f4667f602833ccb636aa489245628b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Sep 2021 10:05:59 +0200 Subject: [PATCH 02/40] remove old unused code --- SeedDMS_Core/Core/inc.ClassDocument.php | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index d883d33d6..51e7b21d9 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -324,30 +324,9 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ return null; $resArr = $resArr[0]; - // New Locking mechanism uses a separate table to track the lock. - /* - $queryStr = "SELECT * FROM `tblDocumentLocks` WHERE `document` = " . (int) $id; - $lockArr = $db->getResultArray($queryStr); - if ((is_bool($lockArr) && $lockArr==false) || (count($lockArr)==0)) { - // Could not find a lock on the selected document. - $resArr['lock'] = -1; - } - else { - // A lock has been identified for this document. - $resArr['lock'] = $lockArr[0]["userID"]; - } -*/ $resArr['lock'] = !$resArr['lock'] ? -1 : $resArr['lock']; -// print_r($resArr);exit; return self::getInstanceByData($resArr, $dms); - - $classname = $dms->getClassname('document'); - /** @var SeedDMS_Core_Document $document */ - $document = new $classname($resArr["id"], $resArr["name"], $resArr["comment"], $resArr["date"], $resArr["expires"], $resArr["owner"], $resArr["folder"], $resArr["inheritAccess"], $resArr["defaultAccess"], $resArr['lock'], $resArr["keywords"], $resArr["sequence"]); - $document->setDMS($dms); - $document = $document->applyDecorators(); - return $document; } /* }}} */ /** From 2c7b7344ddbf886508a66a11344b739eee599aca Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Sep 2021 10:06:41 +0200 Subject: [PATCH 03/40] check paramert $mode of addAccess() has valid value --- SeedDMS_Core/Core/inc.ClassDocument.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 51e7b21d9..6c44b8845 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -1023,6 +1023,9 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ function addAccess($mode, $userOrGroupID, $isUser) { /* {{{ */ $db = $this->_dms->getDB(); + if($mode < M_NONE || $mode > M_ALL) + return false; + $userOrGroup = ($isUser) ? "`userID`" : "`groupID`"; $queryStr = "INSERT INTO `tblACLs` (`target`, `targetType`, ".$userOrGroup.", `mode`) VALUES From 01e243e9667b7defaa864301e65a8454c32229e2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Sep 2021 10:07:18 +0200 Subject: [PATCH 04/40] fix indenting of comment for method getContentByVersion() --- SeedDMS_Core/Core/inc.ClassDocument.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 6c44b8845..546d55513 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -1803,8 +1803,9 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ * currently logged in user. * * @param integer $version version number of content element - * @return SeedDMS_Core_DocumentContent|boolean object of class {@link SeedDMS_Core_DocumentContent} - * or false + * @return SeedDMS_Core_DocumentContent|null|boolean object of class + * {@link SeedDMS_Core_DocumentContent}, null if not content was found, + * false in case of an error */ function getContentByVersion($version) { /* {{{ */ if (!is_numeric($version)) return false; From 2f9148e5b934fe7790ea64eed5598621aad2e34c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Sep 2021 10:09:13 +0200 Subject: [PATCH 05/40] method which return content will return null if no content was found false is only returned if an error occured --- SeedDMS_Core/Core/inc.ClassDocument.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 546d55513..d187be109 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -1815,7 +1815,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ if ($revision->getVersion() == $version) return $revision; } - return false; + return null; } $db = $this->_dms->getDB(); @@ -1824,7 +1824,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ if (is_bool($resArr) && !$resArr) return false; if (count($resArr) != 1) - return false; + return null; $resArr = $resArr[0]; $classname = $this->_dms->getClassname('documentcontent'); @@ -1833,7 +1833,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $user = $this->_dms->getLoggedInUser(); /* A user with write access on the document may always see the version */ if($user && $content->getAccessMode($user) == M_NONE) - return false; + return null; else return $content; } else { @@ -2100,8 +2100,10 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ $queryStr = "SELECT * FROM `tblDocumentLinks` WHERE `document` = " . $this->_id ." AND `id` = " . (int) $linkID; $resArr = $db->getResultArray($queryStr); - if ((is_bool($resArr) && !$resArr) || count($resArr)==0) + if (is_bool($resArr) && !$resArr) return false; + if (count($resArr)==0) + return null; $resArr = $resArr[0]; $document = $this->_dms->getDocument($resArr["document"]); From 77de9bfaae36b6695360492a23d41564d2f57220 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Sep 2021 10:11:13 +0200 Subject: [PATCH 06/40] better documentation of getReverseDocumentLinks() and getDocumentLinks() --- SeedDMS_Core/Core/inc.ClassDocument.php | 72 ++++++++++++++----------- 1 file changed, 42 insertions(+), 30 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index d187be109..963b4a980 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -2121,12 +2121,22 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ * The list may contain all links to other documents, even those which * may not be visible by certain users, unless you pass appropriate * parameters to filter out public links and those created by - * the given user. The application may call - * SeedDMS_Core_DMS::filterDocumentLinks() afterwards. + * the given user. The two parameters are or'ed. If $publiconly + * is set the method will return all public links disregarding the + * user. If $publiconly is not set but a user is set, the method + * will return all links of that user (public and none public). + * Setting a user and $publiconly to true will *not* return the + * public links of that user but all links which are public or + * owned by that user. * - * @param boolean $publiconly return on publically visible links - * @param object $user return also private links of this user - * @return array list of objects of class SeedDMS_Core_DocumentLink + * The application must call + * SeedDMS_Core_DMS::filterDocumentLinks() afterwards to filter out + * those links pointing to a document not accessible by a given user. + * + * @param boolean $publiconly return all publically visible links + * @param SeedDMS_Core_User $user return also private links of this user + * + * @return array list of objects of class {@see SeedDMS_Core_DocumentLink} */ function getDocumentLinks($publiconly=false, $user=null) { /* {{{ */ if (!isset($this->_documentLinks)) { @@ -2167,39 +2177,41 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ * parameters to filter out public links and those created by * the given user. * This functions is basically the reverse of - * SeedDMS_Core_Document::getDocumentLinks() + * {@see SeedDMS_Core_Document::getDocumentLinks()} * - * The application may call - * SeedDMS_Core_DMS::filterDocumentLinks() afterwards. + * The application must call + * SeedDMS_Core_DMS::filterDocumentLinks() afterwards to filter out + * those links pointing to a document not accessible by a given user. + * + * @param boolean $publiconly return all publically visible links + * @param SeedDMS_Core_User $user return also private links of this user * - * @param boolean $publiconly return on publically visible links - * @param object $user return also private links of this user * @return array list of objects of class SeedDMS_Core_DocumentLink */ function getReverseDocumentLinks($publiconly=false, $user=null) { /* {{{ */ - $db = $this->_dms->getDB(); + $db = $this->_dms->getDB(); - $queryStr = "SELECT * FROM `tblDocumentLinks` WHERE `target` = " . $this->_id; - $tmp = array(); - if($publiconly) - $tmp[] = "`public`=1"; - if($user) - $tmp[] = "`userID`=".$user->getID(); - if($tmp) { - $queryStr .= " AND (".implode(" OR ", $tmp).")"; - } + $queryStr = "SELECT * FROM `tblDocumentLinks` WHERE `target` = " . $this->_id; + $tmp = array(); + if($publiconly) + $tmp[] = "`public`=1"; + if($user) + $tmp[] = "`userID`=".$user->getID(); + if($tmp) { + $queryStr .= " AND (".implode(" OR ", $tmp).")"; + } - $resArr = $db->getResultArray($queryStr); - if (is_bool($resArr) && !$resArr) - return false; + $resArr = $db->getResultArray($queryStr); + if (is_bool($resArr) && !$resArr) + return false; - $links = array(); - foreach ($resArr as $row) { - $document = $this->_dms->getDocument($row["document"]); - $link = new SeedDMS_Core_DocumentLink($row["id"], $document, $this, $row["userID"], $row["public"]); - if($link->getAccessMode($user, $document, $this) >= M_READ) - array_push($links, $link); - } + $links = array(); + foreach ($resArr as $row) { + $document = $this->_dms->getDocument($row["document"]); + $link = new SeedDMS_Core_DocumentLink($row["id"], $document, $this, $row["userID"], $row["public"]); + if($link->getAccessMode($user, $document, $this) >= M_READ) + array_push($links, $link); + } return $links; } /* }}} */ From 7a606ca1fb0cf25fc67397bece00adbf50de6f21 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Sep 2021 10:12:05 +0200 Subject: [PATCH 07/40] much better checking of passed parameters in addDocumentLink() --- SeedDMS_Core/Core/inc.ClassDocument.php | 27 +++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 963b4a980..0e71c9054 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -2219,20 +2219,39 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ function addDocumentLink($targetID, $userID, $public) { /* {{{ */ $db = $this->_dms->getDB(); - $public = ($public) ? "1" : "0"; + $public = ($public) ? 1 : 0; - $queryStr = "INSERT INTO `tblDocumentLinks` (`document`, `target`, `userID`, `public`) VALUES (".$this->_id.", ".(int)$targetID.", ".(int)$userID.", ".(int)$public.")"; + if (!is_numeric($targetID) || $targetID < 1) + return false; + + if ($targetID == $this->_id) + return false; + + if (!is_numeric($userID) || $userID < 1) + return false; + + if(!($target = $this->_dms->getDocument($targetID))) + return false; + + if(!($user = $this->_dms->getUser($userID))) + return false; + + $queryStr = "INSERT INTO `tblDocumentLinks` (`document`, `target`, `userID`, `public`) VALUES (".$this->_id.", ".(int)$targetID.", ".(int)$userID.", ".$public.")"; if (!$db->getResult($queryStr)) return false; unset($this->_documentLinks); - return true; + + $id = $db->getInsertID('tblDocumentLinks'); + $link = new SeedDMS_Core_DocumentLink($id, $this, $target, $user->getId(), $public); + return $link; } /* }}} */ function removeDocumentLink($linkID) { /* {{{ */ $db = $this->_dms->getDB(); - if (!is_numeric($linkID)) return false; + if (!is_numeric($linkID) || $linkID < 1) + return false; $queryStr = "DELETE FROM `tblDocumentLinks` WHERE `document` = " . $this->_id ." AND `id` = " . (int) $linkID; if (!$db->getResult($queryStr)) return false; From efa85c70a05607bc47d289a99425dbea47b09e2e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Sep 2021 10:12:51 +0200 Subject: [PATCH 08/40] fix documentation of getDocumentFiles() --- SeedDMS_Core/Core/inc.ClassDocument.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 0e71c9054..bd352bf32 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -2285,8 +2285,9 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ /** * Get list of files attached to document * - * @param integer $version get only attachments for this version - *@param boolean $incnoversion include attachments without a version + * @param integer $version get only attachments for this version + * @param boolean $incnoversion include attachments without a version + * * @return array list of files, false in case of an sql error */ function getDocumentFiles($version=0, $incnoversion=true) { /* {{{ */ From 08887fcbd9dc217a621600c8f48c6dd228f77814 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Sep 2021 10:14:19 +0200 Subject: [PATCH 09/40] just added some spaces in parameter list --- SeedDMS_Core/Core/inc.ClassDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index bd352bf32..2a89f7185 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -2325,7 +2325,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ return $this->_documentFiles[$hash]; } /* }}} */ - function addDocumentFile($name, $comment, $user, $tmpFile, $orgFileName,$fileType, $mimeType,$version=0,$public=1) { /* {{{ */ + function addDocumentFile($name, $comment, $user, $tmpFile, $orgFileName, $fileType, $mimeType, $version=0, $public=1) { /* {{{ */ $db = $this->_dms->getDB(); $dir = $this->getDir(); From 233e464692d87f9c66564df403d22b0ab06016b6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Sep 2021 10:15:06 +0200 Subject: [PATCH 10/40] addDocumentFiles() clears internal list, make removeDocumentFile() more robust --- SeedDMS_Core/Core/inc.ClassDocument.php | 28 ++++++++++++++++--------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 2a89f7185..ba9f9bec8 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -2358,29 +2358,37 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ } $db->commitTransaction(); + unset ($this->_documentFiles); return $file; } /* }}} */ function removeDocumentFile($ID) { /* {{{ */ $db = $this->_dms->getDB(); - if (!is_numeric($ID)) return false; + if (!is_numeric($ID) || $ID < 1) + return false; $file = $this->getDocumentFile($ID); if (is_bool($file) && !$file) return false; - if (file_exists( $this->_dms->contentDir . $file->getPath() )){ - if (!SeedDMS_Core_File::removeFile( $this->_dms->contentDir . $file->getPath() )) - return false; + $db->startTransaction(); + /* First delete the database record, because that can be undone + * if deletion of the file fails. + */ + $queryStr = "DELETE FROM `tblDocumentFiles` WHERE `document` = " . $this->getID() . " AND `id` = " . (int) $ID; + if (!$db->getResult($queryStr)) { + $db->rollbackTransaction(); + return false; } - $name=$file->getName(); - $comment=$file->getcomment(); - - $queryStr = "DELETE FROM `tblDocumentFiles` WHERE `document` = " . $this->getID() . " AND `id` = " . (int) $ID; - if (!$db->getResult($queryStr)) - return false; + if (file_exists( $this->_dms->contentDir . $file->getPath() )){ + if (!SeedDMS_Core_File::removeFile( $this->_dms->contentDir . $file->getPath() )) { + $db->rollbackTransaction(); + return false; + } + } + $db->commitTransaction(); unset ($this->_documentFiles); return true; From 0f5b189838668e5f9fe93ce2095745c9bdf358eb Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Sep 2021 10:16:25 +0200 Subject: [PATCH 11/40] pass document itself to callback onPostRemoveDocument --- SeedDMS_Core/Core/inc.ClassDocument.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index ba9f9bec8..3d7df7a0d 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -2502,7 +2502,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ /* Check if 'onPostRemoveDocument' callback is set */ if(isset($this->_dms->callbacks['onPostRemoveDocument'])) { foreach($this->_dms->callbacks['onPostRemoveDocument'] as $callback) { - if(!call_user_func($callback[0], $callback[1], $this->_id)) { + if(!call_user_func($callback[0], $callback[1], $this)) { } } } From 3d7357fca9cb02c87dbc1722bb96c20b1ee53715 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Sep 2021 10:17:04 +0200 Subject: [PATCH 12/40] clear _notifyList in clearCache() --- SeedDMS_Core/Core/inc.ClassFolder.php | 1 + 1 file changed, 1 insertion(+) diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php index 58f98571b..2fd697dd3 100644 --- a/SeedDMS_Core/Core/inc.ClassFolder.php +++ b/SeedDMS_Core/Core/inc.ClassFolder.php @@ -146,6 +146,7 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { $this->_subFolders = null; $this->_documents = null; $this->_accessList = null; + $this->_notifyList = null; } /* }}} */ /** From 3cf58fbc86841b42019289f70e4c135804753bea Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Sep 2021 10:19:31 +0200 Subject: [PATCH 13/40] add some documentation for isDescendant() and isSubFolder() --- SeedDMS_Core/Core/inc.ClassFolder.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php index 2fd697dd3..551c5a908 100644 --- a/SeedDMS_Core/Core/inc.ClassFolder.php +++ b/SeedDMS_Core/Core/inc.ClassFolder.php @@ -390,6 +390,8 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { * to say it differently the passed folder is somewhere below the * current folder. * + * This is basically the opposite of {@see SeedDMS_Core_Folder::isDescendant()} + * * @param SeedDMS_Core_Folder $subfolder folder to be checked if it is * a subfolder on any level of the current folder * @return bool true if passed folder is a subfolder, otherwise false @@ -795,15 +797,22 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { /** * Check, if this folder is a subfolder of a given folder - * + * + * This is basically the opposite of {@see SeedDMS_Core_Folder::isSubFolder()} + * * @param object $folder parent folder * @return boolean true if folder is a subfolder */ - function isDescendant($folder) { /* {{{ */ + function isDescendant($folder) { /* {{{ */ + /* If the current folder has no parent it cannot be a descendant */ if(!$this->getParent()) - return false; + return false; + /* Check if the passed folder is the parent of the current folder. + * In that case the current folder is a subfolder of the passed folder. + */ if($this->getParent()->getID() == $folder->getID()) - return true; + return true; + /* Recursively go up to the root folder */ return $this->getParent()->isDescendant($folder); } /* }}} */ From 8e302bc77049223a158da9fed48565172bf7b3f9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Sep 2021 10:20:19 +0200 Subject: [PATCH 14/40] hasDocuments() doesn't use internal cache anymore --- SeedDMS_Core/Core/inc.ClassFolder.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php index 551c5a908..e8c7f6af4 100644 --- a/SeedDMS_Core/Core/inc.ClassFolder.php +++ b/SeedDMS_Core/Core/inc.ClassFolder.php @@ -824,11 +824,13 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { * @return int number of documents or false in case of an error */ function hasDocuments() { /* {{{ */ - $db = $this->_dms->getDB(); + $db = $this->_dms->getDB(); + /* Do not use the cache because it may not contain all documents if + * the former call getDocuments() limited the number of documents if (isset($this->_documents)) { - /** @noinspection PhpUndefinedFieldInspection */ return count($this->_documents); - } + } + */ $queryStr = "SELECT count(*) as c FROM `tblDocuments` WHERE `folder` = " . $this->_id; $resArr = $db->getResultArray($queryStr); if (is_bool($resArr) && !$resArr) From ce124bb862bbd503a6d8efb79aa256465129ad0f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Sep 2021 10:21:10 +0200 Subject: [PATCH 15/40] fix indenting --- SeedDMS_Core/Core/inc.ClassFolder.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php index e8c7f6af4..0431aef47 100644 --- a/SeedDMS_Core/Core/inc.ClassFolder.php +++ b/SeedDMS_Core/Core/inc.ClassFolder.php @@ -1314,14 +1314,14 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { return $this->_parent->getAccessList($mode, $op); } - if (!isset($this->_accessList[$mode])) { + if (!isset($this->_accessList[$mode])) { if ($op!=O_GTEQ && $op!=O_LTEQ && $op!=O_EQ) { return false; } $modeStr = ""; if ($mode!=M_ANY) { $modeStr = " AND mode".$op.(int)$mode; - } + } $queryStr = "SELECT * FROM `tblACLs` WHERE `targetType` = ".T_FOLDER. " AND `target` = " . $this->_id . $modeStr . " ORDER BY `targetType`"; $resArr = $db->getResultArray($queryStr); @@ -1335,7 +1335,7 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { else //if ($row["groupID"] != -1) array_push($this->_accessList[$mode]["groups"], new SeedDMS_Core_GroupAccess($this->_dms->getGroup($row["groupID"]), (int) $row["mode"])); } - } + } return $this->_accessList[$mode]; } /* }}} */ From 959c75ff79c01b472621fd0eb629695b34f9bcc1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Sep 2021 10:21:32 +0200 Subject: [PATCH 16/40] check parameter $mode of addAccess() --- SeedDMS_Core/Core/inc.ClassFolder.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php index 0431aef47..51e78ab1a 100644 --- a/SeedDMS_Core/Core/inc.ClassFolder.php +++ b/SeedDMS_Core/Core/inc.ClassFolder.php @@ -1375,6 +1375,9 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { function addAccess($mode, $userOrGroupID, $isUser) { /* {{{ */ $db = $this->_dms->getDB(); + if($mode < M_NONE || $mode > M_ALL) + return false; + $userOrGroup = ($isUser) ? "`userID`" : "`groupID`"; $queryStr = "INSERT INTO `tblACLs` (`target`, `targetType`, ".$userOrGroup.", `mode`) VALUES From 9d926fb55cd8943f5cde1370e397f56b1e2522ac Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Sep 2021 10:22:28 +0200 Subject: [PATCH 17/40] better documentation of getAccessMode() --- SeedDMS_Core/Core/inc.ClassFolder.php | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php index 51e78ab1a..1be3964ca 100644 --- a/SeedDMS_Core/Core/inc.ClassFolder.php +++ b/SeedDMS_Core/Core/inc.ClassFolder.php @@ -1452,32 +1452,32 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { /** * Get the access mode of a user on the folder - * + * + * The access mode is either M_READ, M_READWRITE, M_ALL, or M_NONE. + * It is determined + * - by the user (admins and owners have always access mode M_ALL) + * - by the access list for the user (possibly inherited) + * - by the default access mode + * * This function returns the access mode for a given user. An administrator * and the owner of the folder has unrestricted access. A guest user has * read only access or no access if access rights are further limited - * by access control lists. All other users have access rights according + * by access control lists all the default access. + * All other users have access rights according * to the access control lists or the default access. This function will - * recursive check for access rights of parent folders if access rights + * recursively check for access rights of parent folders if access rights * are inherited. * - * This function returns the access mode for a given user. An administrator - * and the owner of the folder has unrestricted access. A guest user has - * read only access or no access if access rights are further limited - * by access control lists. All other users have access rights according - * to the access control lists or the default access. This function will - * recursive check for access rights of parent folders if access rights - * are inherited. - * - * Before checking the access in the method itself a callback 'onCheckAccessFolder' + * Before checking the access itself a callback 'onCheckAccessFolder' * is called. If it returns a value > 0, then this will be returned by this * method without any further checks. The optional paramater $context * will be passed as a third parameter to the callback. It contains * the operation for which the access mode is retrieved. It is for example * set to 'removeDocument' if the access mode is used to check for sufficient - * permission on deleting a document. + * permission on deleting a document. This callback could be used to + * override any existing access mode in a certain context. * - * @param object $user user for which access shall be checked + * @param SeedDMS_Core_User $user user for which access shall be checked * @param string $context context in which the access mode is requested * @return integer access mode */ From 8c3c49e3b5a05337fef3b6af2656ffa5401bad9c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Sep 2021 10:23:11 +0200 Subject: [PATCH 18/40] add method useViews() to turn on/off the use of views --- SeedDMS_Core/Core/inc.DBAccessPDO.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php index 947c33d54..396942afe 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -245,6 +245,15 @@ class SeedDMS_Core_DatabaseAccess { return $this->_driver; } /* }}} */ + /** + * Turn on views instead of temp. tables + * + * @param bool $onoff turn use of views instead of temp. table on/off + */ + function useViews($onoff) { /* {{{ */ + $this->_useviews = $onoff; + } /* }}} */ + /** * Destructor of SeedDMS_Core_DatabaseAccess */ From a002a23c9b87ba9b36924852960c54e8d11d1894 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Sep 2021 10:23:50 +0200 Subject: [PATCH 19/40] do not dump table sqlite_sequence --- SeedDMS_Core/Core/inc.DBAccessPDO.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php index 396942afe..f7d09680b 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -931,7 +931,9 @@ class SeedDMS_Core_DatabaseAccess { */ function createDump($fp) { /* {{{ */ $tables = $this->TableList('TABLES'); - foreach($tables as $table) { + foreach($tables as $table) { + if($table == 'sqlite_sequence') + continue; $query = "SELECT * FROM `".$table."`"; $records = $this->getResultArray($query); fwrite($fp,"\n-- TABLE: ".$table."--\n\n"); From 84ffa71d242c5e540d7c64c4a608d73b6850a7ea Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Sep 2021 10:06:07 +0200 Subject: [PATCH 20/40] use upper case for all sql keywords in sql statements --- SeedDMS_Core/Core/inc.ClassDMS.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 723125d7b..b98827068 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -1022,7 +1022,7 @@ class SeedDMS_Core_DMS { $selectStr .= ", `tblDocumentReviewLog`.`date` as `duedate` "; $queryStr .= - "LEFT JOIN `tblDocumentReviewers` on `ttcontentid`.`document`=`tblDocumentReviewers`.`documentID` AND `ttcontentid`.`maxVersion`=`tblDocumentReviewers`.`version` ". + "LEFT JOIN `tblDocumentReviewers` ON `ttcontentid`.`document`=`tblDocumentReviewers`.`documentID` AND `ttcontentid`.`maxVersion`=`tblDocumentReviewers`.`version` ". "LEFT JOIN `ttreviewid` ON `ttreviewid`.`reviewID` = `tblDocumentReviewers`.`reviewID` ". "LEFT JOIN `tblDocumentReviewLog` ON `tblDocumentReviewLog`.`reviewLogID`=`ttreviewid`.`maxLogID` "; @@ -1104,7 +1104,7 @@ class SeedDMS_Core_DMS { $selectStr .= ", `tblDocumentApproveLog`.`date` as `duedate` "; $queryStr .= - "LEFT JOIN `tblDocumentApprovers` on `ttcontentid`.`document`=`tblDocumentApprovers`.`documentID` AND `ttcontentid`.`maxVersion`=`tblDocumentApprovers`.`version` ". + "LEFT JOIN `tblDocumentApprovers` ON `ttcontentid`.`document`=`tblDocumentApprovers`.`documentID` AND `ttcontentid`.`maxVersion`=`tblDocumentApprovers`.`version` ". "LEFT JOIN `ttapproveid` ON `ttapproveid`.`approveID` = `tblDocumentApprovers`.`approveID` ". "LEFT JOIN `tblDocumentApproveLog` ON `tblDocumentApproveLog`.`approveLogID`=`ttapproveid`.`maxLogID` "; @@ -1186,10 +1186,10 @@ class SeedDMS_Core_DMS { } $selectStr = 'distinct '.$selectStr; $queryStr .= - "LEFT JOIN `tblWorkflowDocumentContent` on `ttcontentid`.`document`=`tblWorkflowDocumentContent`.`document` AND `ttcontentid`.`maxVersion`=`tblWorkflowDocumentContent`.`version` ". - "LEFT JOIN `tblWorkflowTransitions` on `tblWorkflowDocumentContent`.`workflow`=`tblWorkflowTransitions`.`workflow` AND `tblWorkflowDocumentContent`.`state`=`tblWorkflowTransitions`.`state` ". - "LEFT JOIN `tblWorkflowTransitionUsers` on `tblWorkflowTransitionUsers`.`transition` = `tblWorkflowTransitions`.`id` ". - "LEFT JOIN `tblWorkflowTransitionGroups` on `tblWorkflowTransitionGroups`.`transition` = `tblWorkflowTransitions`.`id` "; + "LEFT JOIN `tblWorkflowDocumentContent` ON `ttcontentid`.`document`=`tblWorkflowDocumentContent`.`document` AND `ttcontentid`.`maxVersion`=`tblWorkflowDocumentContent`.`version` ". + "LEFT JOIN `tblWorkflowTransitions` ON `tblWorkflowDocumentContent`.`workflow`=`tblWorkflowTransitions`.`workflow` AND `tblWorkflowDocumentContent`.`state`=`tblWorkflowTransitions`.`state` ". + "LEFT JOIN `tblWorkflowTransitionUsers` ON `tblWorkflowTransitionUsers`.`transition` = `tblWorkflowTransitions`.`id` ". + "LEFT JOIN `tblWorkflowTransitionGroups` ON `tblWorkflowTransitionGroups`.`transition` = `tblWorkflowTransitions`.`id` "; if($user) { $queryStr .= "WHERE (`tblWorkflowTransitionUsers`.`userid` = ".$user->getID()." "; @@ -2442,7 +2442,7 @@ class SeedDMS_Core_DMS { $name = trim($name); if (!$name) return false; - $queryStr = "SELECT * FROM `tblCategory` where `name`=".$this->db->qstr($name); + $queryStr = "SELECT * FROM `tblCategory` WHERE `name`=".$this->db->qstr($name); $resArr = $this->db->getResultArray($queryStr); if (!$resArr) return false; @@ -2532,7 +2532,7 @@ class SeedDMS_Core_DMS { */ function checkPasswordRequest($hash) { /* {{{ */ /* Get the password request from the database */ - $queryStr = "SELECT * FROM `tblUserPasswordRequest` where `hash`=".$this->db->qstr($hash); + $queryStr = "SELECT * FROM `tblUserPasswordRequest` WHERE `hash`=".$this->db->qstr($hash); $resArr = $this->db->getResultArray($queryStr); if (is_bool($resArr) && !$resArr) return false; @@ -3117,7 +3117,7 @@ class SeedDMS_Core_DMS { * @return array|bool */ function getDuplicateDocumentContent() { /* {{{ */ - $queryStr = "SELECT a.*, b.`id` as dupid FROM `tblDocumentContent` a LEFT JOIN `tblDocumentContent` b ON a.`checksum`=b.`checksum` where a.`id`!=b.`id` ORDER by a.`id` LIMIT 1000"; + $queryStr = "SELECT a.*, b.`id` as dupid FROM `tblDocumentContent` a LEFT JOIN `tblDocumentContent` b ON a.`checksum`=b.`checksum` WHERE a.`id`!=b.`id` ORDER by a.`id` LIMIT 1000"; $resArr = $this->db->getResultArray($queryStr); if ($resArr === false) return false; From 79bcdb60863416a5ab90fd68453db47eb1b5de2e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Sep 2021 10:07:19 +0200 Subject: [PATCH 21/40] getting category or attributedef. returns null not false if none was found --- SeedDMS_Core/Core/inc.ClassDMS.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index b98827068..ef1b5b48d 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -2404,8 +2404,10 @@ class SeedDMS_Core_DMS { $queryStr = "SELECT * FROM `tblCategory` WHERE `id` = " . (int) $id; $resArr = $this->db->getResultArray($queryStr); - if ((is_bool($resArr) && !$resArr) || (count($resArr) != 1)) + if (is_bool($resArr) && !$resArr) return false; + if (count($resArr) != 1) + return null; $resArr = $resArr[0]; $cat = new SeedDMS_Core_DocumentCategory($resArr["id"], $resArr["name"]); @@ -2569,14 +2571,16 @@ class SeedDMS_Core_DMS { * @return bool|SeedDMS_Core_AttributeDefinition or false */ function getAttributeDefinition($id) { /* {{{ */ - if (!is_numeric($id)) + if (!is_numeric($id) || $id < 1) return false; $queryStr = "SELECT * FROM `tblAttributeDefinitions` WHERE `id` = " . (int) $id; $resArr = $this->db->getResultArray($queryStr); - if (is_bool($resArr) && $resArr == false) return false; - if (count($resArr) != 1) return false; + if (is_bool($resArr) && $resArr == false) + return false; + if (count($resArr) != 1) + return null; $resArr = $resArr[0]; @@ -2600,8 +2604,10 @@ class SeedDMS_Core_DMS { $queryStr = "SELECT * FROM `tblAttributeDefinitions` WHERE `name` = " . $this->db->qstr($name); $resArr = $this->db->getResultArray($queryStr); - if (is_bool($resArr) && $resArr == false) return false; - if (count($resArr) != 1) return false; + if (is_bool($resArr) && $resArr == false) + return false; + if (count($resArr) != 1) + return null; $resArr = $resArr[0]; From 88e0dcc58dbae9d5aa7c3e3dfb365d749063f4d7 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Sep 2021 10:08:20 +0200 Subject: [PATCH 22/40] check if passed id > 0 in getWorkflow(), getWorkflowAction(), getWorkflowState() --- SeedDMS_Core/Core/inc.ClassDMS.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index ef1b5b48d..8637f4b82 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -2728,7 +2728,7 @@ class SeedDMS_Core_DMS { * @return SeedDMS_Core_Workflow|bool of instances of {@link SeedDMS_Core_Workflow}, null if no workflow was found or false */ function getWorkflow($id) { /* {{{ */ - if (!is_numeric($id)) + if (!is_numeric($id) || $id < 1) return false; $queryStr = "SELECT * FROM `tblWorkflows` WHERE `id`=".intval($id); @@ -2807,7 +2807,7 @@ class SeedDMS_Core_DMS { * @return bool|SeedDMS_Core_Workflow_State or false */ function getWorkflowState($id) { /* {{{ */ - if (!is_numeric($id)) + if (!is_numeric($id) || $id < 1) return false; $queryStr = "SELECT * FROM `tblWorkflowStates` WHERE `id` = " . (int) $id; @@ -2907,7 +2907,7 @@ class SeedDMS_Core_DMS { * @return SeedDMS_Core_Workflow_Action|bool instance of {@link SeedDMS_Core_Workflow_Action} or false */ function getWorkflowAction($id) { /* {{{ */ - if (!is_numeric($id)) + if (!is_numeric($id) || $id < 1) return false; $queryStr = "SELECT * FROM `tblWorkflowActions` WHERE `id` = " . (int) $id; From 7a5123aa6c79f9d5210ceb76c97633df61fd9f7b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Sep 2021 10:09:18 +0200 Subject: [PATCH 23/40] trim name in setName() --- SeedDMS_Core/Core/inc.ClassDocumentCategory.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassDocumentCategory.php b/SeedDMS_Core/Core/inc.ClassDocumentCategory.php index 6d5451664..f7aa2fb64 100644 --- a/SeedDMS_Core/Core/inc.ClassDocumentCategory.php +++ b/SeedDMS_Core/Core/inc.ClassDocumentCategory.php @@ -53,7 +53,11 @@ class SeedDMS_Core_DocumentCategory { function getName() { return $this->_name; } - function setName($newName) { /* {{{ */ + function setName($newName) { /* {{{ */ + $newName = trim($newName); + if(!$name) + return false; + $db = $this->_dms->getDB(); $queryStr = "UPDATE `tblCategory` SET `name` = ".$db->qstr($newName)." WHERE `id` = ". $this->_id; From 3101d6d9528d4a07f8852ad37df943bd13e1611a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Sep 2021 10:09:42 +0200 Subject: [PATCH 24/40] trim name in setName() --- SeedDMS_Core/Core/inc.ClassGroup.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SeedDMS_Core/Core/inc.ClassGroup.php b/SeedDMS_Core/Core/inc.ClassGroup.php index 890cba355..666059858 100644 --- a/SeedDMS_Core/Core/inc.ClassGroup.php +++ b/SeedDMS_Core/Core/inc.ClassGroup.php @@ -162,6 +162,10 @@ class SeedDMS_Core_Group { /* {{{ */ * @return bool */ function setName($newName) { /* {{{ */ + $newName = trim($newName); + if(!$newName) + return false; + $db = $this->_dms->getDB(); $queryStr = "UPDATE `tblGroups` SET `name` = ".$db->qstr($newName)." WHERE `id` = " . $this->_id; From e36f6ee15c645e1101433d52f45817f24aa227d9 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Sep 2021 10:12:08 +0200 Subject: [PATCH 25/40] trim email, commen, language, theme before saving in database --- SeedDMS_Core/Core/inc.ClassUser.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassUser.php b/SeedDMS_Core/Core/inc.ClassUser.php index 309be1abf..727ed960c 100644 --- a/SeedDMS_Core/Core/inc.ClassUser.php +++ b/SeedDMS_Core/Core/inc.ClassUser.php @@ -389,7 +389,7 @@ class SeedDMS_Core_User { /* {{{ */ function setEmail($newEmail) { /* {{{ */ $db = $this->_dms->getDB(); - $queryStr = "UPDATE `tblUsers` SET `email` =".$db->qstr($newEmail)." WHERE `id` = " . $this->_id; + $queryStr = "UPDATE `tblUsers` SET `email` =".$db->qstr(trim($newEmail))." WHERE `id` = " . $this->_id; $res = $db->getResult($queryStr); if (!$res) return false; @@ -410,7 +410,7 @@ class SeedDMS_Core_User { /* {{{ */ function setLanguage($newLanguage) { /* {{{ */ $db = $this->_dms->getDB(); - $queryStr = "UPDATE `tblUsers` SET `language` =".$db->qstr($newLanguage)." WHERE `id` = " . $this->_id; + $queryStr = "UPDATE `tblUsers` SET `language` =".$db->qstr(trim($newLanguage))." WHERE `id` = " . $this->_id; $res = $db->getResult($queryStr); if (!$res) return false; @@ -431,7 +431,7 @@ class SeedDMS_Core_User { /* {{{ */ function setTheme($newTheme) { /* {{{ */ $db = $this->_dms->getDB(); - $queryStr = "UPDATE `tblUsers` SET `theme` =".$db->qstr($newTheme)." WHERE `id` = " . $this->_id; + $queryStr = "UPDATE `tblUsers` SET `theme` =".$db->qstr(trim($newTheme))." WHERE `id` = " . $this->_id; $res = $db->getResult($queryStr); if (!$res) return false; @@ -452,7 +452,7 @@ class SeedDMS_Core_User { /* {{{ */ function setComment($newComment) { /* {{{ */ $db = $this->_dms->getDB(); - $queryStr = "UPDATE `tblUsers` SET `comment` =".$db->qstr($newComment)." WHERE `id` = " . $this->_id; + $queryStr = "UPDATE `tblUsers` SET `comment` =".$db->qstr(trim($newComment))." WHERE `id` = " . $this->_id; $res = $db->getResult($queryStr); if (!$res) return false; From 378377780e99ccc1c1f60d3dff3d44d742d3e68b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Sep 2021 10:13:00 +0200 Subject: [PATCH 26/40] trim name and check if not empty in setName() --- SeedDMS_Core/Core/inc.ClassKeywords.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SeedDMS_Core/Core/inc.ClassKeywords.php b/SeedDMS_Core/Core/inc.ClassKeywords.php index 0981023d3..019ec98ac 100644 --- a/SeedDMS_Core/Core/inc.ClassKeywords.php +++ b/SeedDMS_Core/Core/inc.ClassKeywords.php @@ -91,6 +91,10 @@ class SeedDMS_Core_KeywordCategory { * @return bool */ function setName($newName) { + $newName = trim($newName); + if(!$newName) + return false; + $db = $this->_dms->getDB(); $queryStr = "UPDATE `tblKeywordCategories` SET `name` = ".$db->qstr($newName)." WHERE `id` = ". $this->_id; From 28ddd4b5b2a2c1a78b6dd5e87299f0843dbf3eac Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Sep 2021 10:13:46 +0200 Subject: [PATCH 27/40] check if passed user is a valid user in setOwner() --- SeedDMS_Core/Core/inc.ClassKeywords.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SeedDMS_Core/Core/inc.ClassKeywords.php b/SeedDMS_Core/Core/inc.ClassKeywords.php index 019ec98ac..aa11c9dc3 100644 --- a/SeedDMS_Core/Core/inc.ClassKeywords.php +++ b/SeedDMS_Core/Core/inc.ClassKeywords.php @@ -109,10 +109,13 @@ class SeedDMS_Core_KeywordCategory { * @param SeedDMS_Core_User $user * @return bool */ - function setOwner($user) { + function setOwner($user) { + if(!$user || !$user->isType('user')) + return false; + $db = $this->_dms->getDB(); - $queryStr = "UPDATE `tblKeywordCategories` SET `owner` = " . $user->getID() . " WHERE = `id` = " . $this->_id; + $queryStr = "UPDATE `tblKeywordCategories` SET `owner` = " . $user->getID() . " WHERE `id` = " . $this->_id; if (!$db->getResult($queryStr)) return false; From 6d4f00a137d3a54d8f1abb539472e6bf0fbe9423 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Sep 2021 10:18:16 +0200 Subject: [PATCH 28/40] fix echo test --- restapi/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/restapi/index.php b/restapi/index.php index 7f1eefb75..211386a55 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -2328,8 +2328,8 @@ class TestController { /* {{{ */ $this->container = $container; } - public function echoData($request, $response) { /* {{{ */ - return $response->withJson(array('success'=>true, 'message'=>'This is the result of the echo call.', 'data'=>''), 200); + public function echoData($request, $response, $args) { /* {{{ */ + return $response->withJson(array('success'=>true, 'message'=>'This is the result of the echo call.', 'data'=>$args['data']), 200); } /* }}} */ } /* }}} */ @@ -2504,7 +2504,7 @@ $app->post('/categories', \RestapiController::class.':createCategory'); $app->put('/categories/{id}/name', \RestapiController::class.':changeCategoryName'); $app->get('/attributedefinitions', \RestapiController::class.':getAttributeDefinitions'); $app->put('/attributedefinitions/{id}/name', \RestapiController::class.':changeAttributeDefinitionName'); -$app->get('/echo', \TestController::class.':echoData'); +$app->get('/echo/{data}', \TestController::class.':echoData'); $app->run(); ?> From cf4f49e57ac3ae5bc72a137a7d74bed5ab5dd1c8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Sep 2021 10:18:33 +0200 Subject: [PATCH 29/40] more changes in 5.1.24 --- SeedDMS_Core/package.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 0220aab85..a62df4247 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -35,7 +35,11 @@ - SeedDMS_Core_Folder::getParent() returns null if there is no parent (used to be false) - SeedDMS_Core_DMS::search() will not find document without an expiration date anymore, if the search is limited by an expiration end date but no start date - add method SeedDMS_Core_Folder::getFoldersMinMax() -- init internal cache variables of SeedDMS_Core_Folder and add method clearCache() +- init internal cache variables of SeedDMS_Core_Folder/SeedDMS_Core_Document and add method clearCache() +- SeedDMS_Core_Folder::hasDocuments() does not use the interal document cache anymore +- SeedDMS_Core_Document::addDocumentLink() returns an object of type SeedDMS_Core_DocumentLink in case of success +- trim email, comment, language, theme when setting data of user +- more checks whether an id > 0 when getting a database record From 145d4021a90ae54baab45a70611c90e66e90dd6f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Sep 2021 10:23:46 +0200 Subject: [PATCH 30/40] class tags (img, meta, link) with '/>' --- views/bootstrap/class.Bootstrap.php | 24 ++++++++++++------------ views/bootstrap4/class.Bootstrap4.php | 24 ++++++++++++------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index d4617d178..ee11081b7 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -84,7 +84,7 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common { echo "\n"; echo "\n\n"; echo "\n"; - echo ''."\n"; + echo ''."\n"; if($base) echo ''."\n"; elseif($this->baseurl) @@ -92,19 +92,19 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common { $sitename = trim(strip_tags($this->params['sitename'])); if($this->params['session']) echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; if($this->extraheader['css']) echo $this->extraheader['css']; if(method_exists($this, 'css')) - echo ''."\n"; + echo ''."\n"; echo ''."\n"; if($this->extraheader['js']) @@ -289,7 +289,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo "
\n"; echo " \n"; diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 13cd61724..4523944dd 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -84,7 +84,7 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common { echo "\n"; echo "\n\n"; echo "\n"; - echo ''."\n"; + echo ''."\n"; if($base) echo ''."\n"; elseif($this->baseurl) @@ -93,19 +93,19 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common { if($this->params['session']) echo ''."\n"; $parenttheme = 'bootstrap'; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; if($this->extraheader['css']) echo $this->extraheader['css']; if(method_exists($this, 'css')) - echo ''."\n"; + echo ''."\n"; echo ''."\n"; if($this->extraheader['js']) @@ -298,7 +298,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; function globalBanner() { /* {{{ */ echo "\n"; } /* }}} */ From e982737630fbe26c86e64c4c0fb4d22bad321ef6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Sep 2021 10:25:39 +0200 Subject: [PATCH 31/40] run some urls through htmlentities --- views/bootstrap/class.Bootstrap.php | 8 +++++--- views/bootstrap4/class.Bootstrap4.php | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index ee11081b7..73e70adfd 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -181,8 +181,10 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $tmp['action'] = 'webrootjs'; if(isset($tmp['formtoken'])) unset($tmp['formtoken']); + if(isset($tmp['referuri'])) + unset($tmp['referuri']); if(!empty($this->params['class'])) - echo ''."\n"; + echo ''."\n"; echo ''."\n"; if($this->params['enablemenutasks'] && isset($this->params['user']) && $this->params['user']) { $this->addFooterJS('SeedDMSTask.run();'); @@ -205,12 +207,12 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } $tmp['action'] = 'footerjs'; $tmp['hashjs'] = $hashjs; - echo ''."\n"; + echo ''."\n"; } if(method_exists($this, 'js')) { parse_str($_SERVER['QUERY_STRING'], $tmp); $tmp['action'] = 'js'; - echo ''."\n"; + echo ''."\n"; } echo "\n\n"; } /* }}} */ diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 4523944dd..c0646dde2 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -181,8 +181,10 @@ background-image: linear-gradient(to bottom, #882222, #111111);; $tmp['action'] = 'webrootjs'; if(isset($tmp['formtoken'])) unset($tmp['formtoken']); + if(isset($tmp['referuri'])) + unset($tmp['referuri']); if(!empty($this->params['class'])) - echo ''."\n"; + echo ''."\n"; echo ''."\n"; if($this->params['enablemenutasks'] && isset($this->params['user']) && $this->params['user']) { $this->addFooterJS('SeedDMSTask.run();'); @@ -205,12 +207,12 @@ background-image: linear-gradient(to bottom, #882222, #111111);; } $tmp['action'] = 'footerjs'; $tmp['hashjs'] = $hashjs; - echo ''."\n"; + echo ''."\n"; } if(method_exists($this, 'js')) { parse_str($_SERVER['QUERY_STRING'], $tmp); $tmp['action'] = 'js'; - echo ''."\n"; + echo ''."\n"; } echo "\n\n"; } /* }}} */ From b10241f3f1c6791d2ad0bf764c04a12886c109f6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Sep 2021 10:26:10 +0200 Subject: [PATCH 32/40] replace attribute required by required="required" --- views/bootstrap/class.Bootstrap.php | 18 +++++++++--------- views/bootstrap4/class.Bootstrap4.php | 20 ++++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 73e70adfd..0e92f8539 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1120,7 +1120,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; (!empty($value['class']) ? ' class="'.$value['class'].'"' : ''). (!empty($value['rows']) ? ' rows="'.$value['rows'].'"' : ''). (!empty($value['cols']) ? ' rows="'.$value['cols'].'"' : ''). - (!empty($value['required']) ? ' required' : '').">".(!empty($value['value']) ? $value['value'] : '').""; + (!empty($value['required']) ? ' required="required"' : '').">".(!empty($value['value']) ? $value['value'] : '').""; break; case 'plain': echo $value['value']; @@ -1139,11 +1139,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);; (!empty($value['autocomplete']) ? ' autocomplete="'.$value['autocomplete'].'"' : ''). (isset($value['min']) ? ' min="'.$value['min'].'"' : ''). (!empty($value['checked']) ? ' checked' : ''). - (!empty($value['required']) ? ' required' : ''); + (!empty($value['required']) ? ' required="required"' : ''); if(!empty($value['attributes']) && is_array($value['attributes'])) foreach($value['attributes'] as $a) echo ' '.$a[0].'="'.$a[1].'"'; - echo ">"; + echo "/>"; break; } break; @@ -1633,7 +1633,7 @@ $(document).ready(function() { $content = ''; $content .= '
- '; + '; $content .= $this->getModalBoxLink( array( 'target' => 'keywordChooser', @@ -1777,11 +1777,11 @@ $(document).ready(function() { break; case SeedDMS_Core_AttributeDefinition::type_email: $objvalue = $attribute ? (is_object($attribute) ? $attribute->getValue() : $attribute) : ''; - $content .= "getId()."]\" value=\"".htmlspecialchars($objvalue)."\"".((!$norequire && $attrdef->getMinValues() > 0) ? ' required' : '').' data-rule-email="true"'." />"; + $content .= "getId()."]\" value=\"".htmlspecialchars($objvalue)."\"".((!$norequire && $attrdef->getMinValues() > 0) ? ' required="required"' : '').' data-rule-email="true"'." />"; break; case SeedDMS_Core_AttributeDefinition::type_float: $objvalue = $attribute ? (is_object($attribute) ? $attribute->getValue() : $attribute) : ''; - $content .= "getId()."\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"".htmlspecialchars($objvalue)."\"".((!$norequire && $attrdef->getMinValues() > 0) ? ' required' : '')." data-rule-number=\"true\"/>"; + $content .= "getId()."\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"".htmlspecialchars($objvalue)."\"".((!$norequire && $attrdef->getMinValues() > 0) ? ' required="required"' : '')." data-rule-number=\"true\"/>"; break; case SeedDMS_Core_AttributeDefinition::type_folder: $objvalue = $attribute ? (is_object($attribute) ? (int) $attribute->getValue() : (int) $attribute) : 0; @@ -1848,7 +1848,7 @@ $(document).ready(function() { } else { $content .= "\" data-allow-clear=\"true\""; } - $content .= "".((!$norequire && $attrdef->getMinValues() > 0) ? ' required' : '')." class=\"chzn-select\" data-placeholder=\"".getMLText("select_value")."\">"; + $content .= "".((!$norequire && $attrdef->getMinValues() > 0) ? ' required="required"' : '')." class=\"chzn-select\" data-placeholder=\"".getMLText("select_value")."\">"; if(!$attrdef->getMultipleValues()) { $content .= ""; } @@ -1867,9 +1867,9 @@ $(document).ready(function() { } else { $objvalue = $attribute ? (is_object($attribute) ? $attribute->getValue() : $attribute) : ''; if(strlen($objvalue) > 80) { - $content .= ""; + $content .= ""; } else { - $content .= "getId()."\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"".htmlspecialchars($objvalue)."\"".((!$norequire && $attrdef->getMinValues() > 0) ? ' required' : '').($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_int ? ' data-rule-digits="true"' : '')." />"; + $content .= "getId()."\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"".htmlspecialchars($objvalue)."\"".((!$norequire && $attrdef->getMinValues() > 0) ? ' required="required"' : '').($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_int ? ' data-rule-digits="true"' : '')." />"; } } break; diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index c0646dde2..61da1600d 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -1097,7 +1097,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; (empty($value['class']) ? ' class="form-control"' : ' class="form-control '.$value['class'].'"'). (!empty($value['rows']) ? ' rows="'.$value['rows'].'"' : ''). (!empty($value['cols']) ? ' rows="'.$value['cols'].'"' : ''). - (!empty($value['required']) ? ' required' : '').">".(!empty($value['value']) ? $value['value'] : '').""; + (!empty($value['required']) ? ' required="required"' : '').">".(!empty($value['value']) ? $value['value'] : '').""; break; case 'plain': echo $value['value']; @@ -1116,7 +1116,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; (!empty($value['placeholder']) ? ' placeholder="'.$value['placeholder'].'"' : ''). (!empty($value['autocomplete']) ? ' autocomplete="'.$value['autocomplete'].'"' : ''). (!empty($value['checked']) ? ' checked' : ''). - (!empty($value['required']) ? ' required' : ''); + (!empty($value['required']) ? ' required="required"' : ''); if(!empty($value['attributes']) && is_array($value['attributes'])) foreach($value['attributes'] as $a) echo ' '.$a[0].'="'.$a[1].'"'; @@ -1134,11 +1134,11 @@ background-image: linear-gradient(to bottom, #882222, #111111);; (!empty($value['autocomplete']) ? ' autocomplete="'.$value['autocomplete'].'"' : ''). (isset($value['min']) ? ' min="'.$value['min'].'"' : ''). (!empty($value['checked']) ? ' checked' : ''). - (!empty($value['required']) ? ' required' : ''); + (!empty($value['required']) ? ' required="required"' : ''); if(!empty($value['attributes']) && is_array($value['attributes'])) foreach($value['attributes'] as $a) echo ' '.$a[0].'="'.$a[1].'"'; - echo ">"; + echo "/>"; break; } break; @@ -1661,7 +1661,7 @@ $(document).ready(function() { $content = ''; $content .= '
- +
'; $content .= $this->getModalBoxLink( array( @@ -1818,11 +1818,11 @@ $(document).ready(function() { break; case SeedDMS_Core_AttributeDefinition::type_email: $objvalue = $attribute ? (is_object($attribute) ? $attribute->getValue() : $attribute) : ''; - $content .= "getId()."]\" value=\"".htmlspecialchars($objvalue)."\"".((!$norequire && $attrdef->getMinValues() > 0) ? ' required' : '').' data-rule-email="true"'." />"; + $content .= "getId()."]\" value=\"".htmlspecialchars($objvalue)."\"".((!$norequire && $attrdef->getMinValues() > 0) ? ' required="required"' : '').' data-rule-email="true"'." />"; break; case SeedDMS_Core_AttributeDefinition::type_float: $objvalue = $attribute ? (is_object($attribute) ? $attribute->getValue() : $attribute) : ''; - $content .= "getId()."\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"".htmlspecialchars($objvalue)."\"".((!$norequire && $attrdef->getMinValues() > 0) ? ' required' : '')." data-rule-number=\"true\"/>"; + $content .= "getId()."\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"".htmlspecialchars($objvalue)."\"".((!$norequire && $attrdef->getMinValues() > 0) ? ' required="required"' : '')." data-rule-number=\"true\"/>"; break; case SeedDMS_Core_AttributeDefinition::type_folder: $objvalue = $attribute ? (is_object($attribute) ? (int) $attribute->getValue() : (int) $attribute) : 0; @@ -1889,7 +1889,7 @@ $(document).ready(function() { } else { $content .= "\" data-allow-clear=\"true\""; } - $content .= "".((!$norequire && $attrdef->getMinValues() > 0) ? ' required' : '')." class=\"form-control chzn-select\" data-placeholder=\"".getMLText("select_value")."\">"; + $content .= "".((!$norequire && $attrdef->getMinValues() > 0) ? ' required="required"' : '')." class=\"form-control chzn-select\" data-placeholder=\"".getMLText("select_value")."\">"; if(!$attrdef->getMultipleValues()) { $content .= ""; } @@ -1908,9 +1908,9 @@ $(document).ready(function() { } else { $objvalue = $attribute ? (is_object($attribute) ? $attribute->getValue() : $attribute) : ''; if(strlen($objvalue) > 80) { - $content .= ""; + $content .= ""; } else { - $content .= "getId()."\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"".htmlspecialchars($objvalue)."\"".((!$norequire && $attrdef->getMinValues() > 0) ? ' required' : '').($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_int ? ' data-rule-digits="true"' : '')." />"; + $content .= "getId()."\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"".htmlspecialchars($objvalue)."\"".((!$norequire && $attrdef->getMinValues() > 0) ? ' required="required"' : '').($attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_int ? ' data-rule-digits="true"' : '')." />"; } } break; From 4b25badcf66953eb7ffd42e6363df758f9d83be1 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Sep 2021 11:22:37 +0200 Subject: [PATCH 33/40] remove old styles which hasn't be used for years --- styles/blue/application.js | 18 - styles/blue/favicon.ico | Bin 1406 -> 0 bytes styles/blue/img/bg-global-tl.png | Bin 294 -> 0 bytes styles/blue/img/bg-global-tr.png | Bin 305 -> 0 bytes styles/blue/img/bg-global.png | Bin 238 -> 0 bytes styles/blue/img/blue-gradient-48px.png | Bin 174 -> 0 bytes styles/blue/img/blue-gradient.png | Bin 185 -> 0 bytes styles/blue/img/content-bl.png | Bin 251 -> 0 bytes styles/blue/img/content-br.png | Bin 250 -> 0 bytes styles/blue/img/content-gradient.png | Bin 193 -> 0 bytes styles/blue/img/edge.png | Bin 130 -> 0 bytes styles/blue/img/small-blue-gradient.png | Bin 162 -> 0 bytes styles/blue/img/small-grey-gradient.png | Bin 165 -> 0 bytes styles/blue/style.css | 522 --------------------- styles/clean/application.js | 18 - styles/clean/favicon.ico | Bin 1150 -> 0 bytes styles/clean/img/bg-global-tl.png | Bin 294 -> 0 bytes styles/clean/img/bg-global-tr.png | Bin 305 -> 0 bytes styles/clean/img/bg-global.png | Bin 238 -> 0 bytes styles/clean/img/blue-gradient-48px.png | Bin 174 -> 0 bytes styles/clean/img/blue-gradient.png | Bin 185 -> 0 bytes styles/clean/img/content-bl.png | Bin 251 -> 0 bytes styles/clean/img/content-br.png | Bin 250 -> 0 bytes styles/clean/img/content-gradient.png | Bin 193 -> 0 bytes styles/clean/img/edge.png | Bin 130 -> 0 bytes styles/clean/img/small-blue-gradient.png | Bin 162 -> 0 bytes styles/clean/img/small-grey-gradient.png | Bin 165 -> 0 bytes styles/clean/style.css | 556 ----------------------- styles/hc/application.js | 18 - styles/hc/favicon.ico | Bin 1150 -> 0 bytes styles/hc/img/bg-global-tl.png | Bin 294 -> 0 bytes styles/hc/img/bg-global-tr.png | Bin 305 -> 0 bytes styles/hc/img/bg-global.png | Bin 238 -> 0 bytes styles/hc/img/blue-gradient-48px.png | Bin 174 -> 0 bytes styles/hc/img/blue-gradient.png | Bin 185 -> 0 bytes styles/hc/img/content-bl.png | Bin 251 -> 0 bytes styles/hc/img/content-br.png | Bin 250 -> 0 bytes styles/hc/img/content-gradient.png | Bin 193 -> 0 bytes styles/hc/img/edge.png | Bin 130 -> 0 bytes styles/hc/img/small-blue-gradient.png | Bin 162 -> 0 bytes styles/hc/img/small-grey-gradient.png | Bin 165 -> 0 bytes styles/hc/style.css | 482 -------------------- 42 files changed, 1614 deletions(-) delete mode 100644 styles/blue/application.js delete mode 100644 styles/blue/favicon.ico delete mode 100644 styles/blue/img/bg-global-tl.png delete mode 100644 styles/blue/img/bg-global-tr.png delete mode 100644 styles/blue/img/bg-global.png delete mode 100644 styles/blue/img/blue-gradient-48px.png delete mode 100644 styles/blue/img/blue-gradient.png delete mode 100644 styles/blue/img/content-bl.png delete mode 100644 styles/blue/img/content-br.png delete mode 100644 styles/blue/img/content-gradient.png delete mode 100644 styles/blue/img/edge.png delete mode 100644 styles/blue/img/small-blue-gradient.png delete mode 100644 styles/blue/img/small-grey-gradient.png delete mode 100644 styles/blue/style.css delete mode 100644 styles/clean/application.js delete mode 100644 styles/clean/favicon.ico delete mode 100644 styles/clean/img/bg-global-tl.png delete mode 100644 styles/clean/img/bg-global-tr.png delete mode 100644 styles/clean/img/bg-global.png delete mode 100644 styles/clean/img/blue-gradient-48px.png delete mode 100644 styles/clean/img/blue-gradient.png delete mode 100644 styles/clean/img/content-bl.png delete mode 100644 styles/clean/img/content-br.png delete mode 100644 styles/clean/img/content-gradient.png delete mode 100644 styles/clean/img/edge.png delete mode 100644 styles/clean/img/small-blue-gradient.png delete mode 100644 styles/clean/img/small-grey-gradient.png delete mode 100644 styles/clean/style.css delete mode 100644 styles/hc/application.js delete mode 100644 styles/hc/favicon.ico delete mode 100644 styles/hc/img/bg-global-tl.png delete mode 100644 styles/hc/img/bg-global-tr.png delete mode 100644 styles/hc/img/bg-global.png delete mode 100644 styles/hc/img/blue-gradient-48px.png delete mode 100644 styles/hc/img/blue-gradient.png delete mode 100644 styles/hc/img/content-bl.png delete mode 100644 styles/hc/img/content-br.png delete mode 100644 styles/hc/img/content-gradient.png delete mode 100644 styles/hc/img/edge.png delete mode 100644 styles/hc/img/small-blue-gradient.png delete mode 100644 styles/hc/img/small-grey-gradient.png delete mode 100644 styles/hc/style.css diff --git a/styles/blue/application.js b/styles/blue/application.js deleted file mode 100644 index 2122cec18..000000000 --- a/styles/blue/application.js +++ /dev/null @@ -1,18 +0,0 @@ - $(document).ready( function() { - $(".pwd").passStrength({ - url: "../op/op.Ajax.php", - minscore: , - onChange: function(data, target) { - pws = ; - kids = $('#'+target).children(); - $(kids[1]).html(Math.round(data.strength)); - $(kids[0]).width(data.strength); - if(data.strength > pws) { - $(kids[0]).css('background-color', 'green'); - } else { - $(kids[0]).css('background-color', 'red'); - } - } - }); - }); - diff --git a/styles/blue/favicon.ico b/styles/blue/favicon.ico deleted file mode 100644 index de626d5de60372c1a04041d318022961077d030d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1406 zcmeIv*;i6g6vy$O8fK+QrD%gDrR0=ZsR)QD2!a9%m;uhF!0B9z(LIdIZ^CmFaji9p!Arf@Tsl+8m zm~+b!arYwXRvQBAhh4uG zF9kZh^6Rj-HiW$ZH86zN+&ZVn8}c@&$9~X&{Sci)yapTy9mYY}fOmpn97Z@J4x`kl z5%0N}5g!C5eB3Z0FBm~SK7vmqpP&jxag^lDI3`CaD*2qU;FwWKfmu-4wBQRVY+9*S zeC2&X6^!BA))-FG+&I3IlMGd0!;g#&r&$}$$Z6J2wc{smj!MpQ4*c42ocH|y_y70} zTr4du6^Sm0ic5-%ONxrXDl021u2z&+lwZ11ez^>+Mp7fGmQ+_&-4KhfUju8Xzg>T~ zuKrftotw3_wO|jLnq)Frqpb1XeW_Fm*3t2(y}kWmYg=1uOG`6YcTZ2(ldh+a`E+)I zsnzN}l~SctDin%dIhcOfpx5d2LmI7iV6Y!-%wn;c&F0Zj(}>Yz0((CBY+}MeW4AkO z<6yIMGt)F~mut%9bb|R-e9J4#ON$%rh!V9oDeT?I=f6RCJ25#5MH NW3dR>AM>}*{~NX()cybf diff --git a/styles/blue/img/bg-global-tl.png b/styles/blue/img/bg-global-tl.png deleted file mode 100644 index 99c68e0d70f1006ce6a63d6fba54b25f4c326f0e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 294 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPmvlzRDa@Vy#yg(t@64!_l=ltB<)VvY~=c3falGGH1 z^30M9g^-L?1$R&1fcGh?c|e7oo-U3d6}No*4EYWj2(YB{|Nmd8ASHB>RVc{fhHHSv zv_lO=N5#swFP@mYd3F%j_d=!TXLjxL`2Be4Ysofgg%-gD@((MlCKt2y2r_MuUif;w z&gmwn6NefYyq832U$$7-aqW-?leu5j8Dp+}0nLjzSMFW@X^o3ahF0#%{2LRteZQ9D hoY44>&Eo^3;C$B_#YHO=fsSJEboFyt=akUI1pu17X3PKp diff --git a/styles/blue/img/bg-global-tr.png b/styles/blue/img/bg-global-tr.png deleted file mode 100644 index 82613fbed88078d31a38ad93e7ea60cc6f94a184..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 305 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPmvlzQ2`}%X5bAdv#C9V-A&iT2ysd*&~&PAz-C8;S2 z<(VZJ3LzP(3hti10q;{(^MDGcc)B=-RNV6I-WYT!fPtkv|B}bVnIQ)v4*&n((D$EV z?k%Q?Op30PUIn&vgx|gM?&r6Efnwd_vz8_9jS9MM`agK(m%j%t$Xm+z?^zd~vwgO` zVyDVMk12;&rf$D&&pLMjr&ec7-TIokTKm=)ETS{3Zf`4zb)U+?>LRd(f$2lBU9hX; t%;!ekta;b_PMvsc|5)>oLEjz5hP^tDvPX8b0^P^p>FVdQ&MBdZ3jp+yaI63T diff --git a/styles/blue/img/bg-global.png b/styles/blue/img/bg-global.png deleted file mode 100644 index dc7ebd41f4f2e721293c41a4a4122caaf397e8b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 238 zcmeAS@N?(olHy`uVBq!ia0vp^j6iI_!3HER7z;E4DYhhUcNd2LAh=-f^2tCE&H|6f zVg?3oVGw3ym^DWND9B#o>FdgVjaiJ{l<}3s;Uz#J*%H@?66gHf+|;}h2Ir#G#FEq$ zh4Rdj426)4R0VfW-+=cis(C<#fu1goAr-e``*sR87zi+jzy9alv~aWXhFY7MOD-NS zj7t>?nW@3%YaqDQ^p1xi%i`QTt&C-Vg|koR2f3c~>R~DDzwNyG>Gv-S7f8nbvhxeQ a%G;O25qKtJtuxSY22WQ%mvv4FO5{7SQrtJrcS$MiQhHzY;+PjgLK|z3t zQ+wCM**i4SKX!hU7GAyhfkU#Mw^2d|D;uBo^Hb)RcOUZl`1b4i{db?`Zv9anwsP-F RPM{eKp00i_>zoprxBy9sHWmN? diff --git a/styles/blue/img/blue-gradient.png b/styles/blue/img/blue-gradient.png deleted file mode 100644 index bb1dfd82a12e35d794ecf23e3e4ba21cbc862deb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^j6m$b!2~2jio3*t6kC$Fy9+}wLleWoqZ5L@07W

$QC+c@G%y9Ome~ z(YwpjELEOY;JHIwo62ml^S7B;dZk_jCx10fx|#gr@4IP#XSD|2FnSqnCLvQbH9mU% c+T-jmf7O?45MoXN8pz=3>gTe~DWQoA01j|Br~m)} diff --git a/styles/blue/img/content-bl.png b/styles/blue/img/content-bl.png deleted file mode 100644 index 369b26081406a058208dbdd98f97359edbee7369..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 251 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#8oMa3g?hT=mN!5l*%H@?66gHf+|;}h2Ir#G#FEq$h4Rdj426)4R0VfW-+=ci zs(C<#1)eUBAr-euPi^FCF%V$5c=2xQjU|B}{{Pq6+WMAl@`kYTf(f(p9_TKea>8=) zsxv{MOSiUl_#E8z-um6S{b9z;3$9tQD;=twx8t|SS_VzkzQ;cnbucI>MLa5Q*j*ee t&TxBMV%mO&gr0++ZSH*ceLq(`XoAJOS7BLOfOa!@y85}Sb4qC90ssV;TcQ8} diff --git a/styles/blue/img/content-br.png b/styles/blue/img/content-br.png deleted file mode 100644 index 60c3603e74dacb601cdb58d4ba869cbe91e755bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 250 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#8oMa3nf2S*M|FWhvL&t&CC>S|xv6<249-QVi6yBi3gww4844j8sS56%z5(x3 zRP%re^F3W0Ln>~S_BnDfD+;h^zuxg8^5XycLOtc448KSY!`iircE_*UWtnoWbCpuH zyyd&Tj)ITsX>OWNb$SdLIt>4DCG(u=xo54&vhIBQ-tWxWYnM!6n6OpsUEfT`3sK6? q|Cn^GQc~J-ZO8lB0*9_YkuGR6N&CL)=S85^44$rjF6*2Unz#Uj$5!S5 diff --git a/styles/blue/img/content-gradient.png b/styles/blue/img/content-gradient.png deleted file mode 100644 index e3122e182d77a26763d9f2993ef3829061857e77..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 193 zcmeAS@N?(olHy`uVBq!ia0vp^j6m$b!3HF63(7hGDYhhUcNc~aAh?q+>m5*pv%n*= zn1O*?7=#%aX3dcR3bL1Y`ns}TV;ALRQwrM_Ee8~mEpd$~an8@pP0cG|a4t$sEJ;mK zD9*<;_2cTQgJK!$N&HT>($tRfa4>O#ipX?d!((~Ro<>9 bfq~)c6cag@zPm|4^$eb_elF{r5}LRG2iG-3 diff --git a/styles/blue/img/edge.png b/styles/blue/img/edge.png deleted file mode 100644 index b1a4b9389ca0077ffcae04dad2723b20b7181d66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 130 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1SBVv2j2ryoCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#8oMYjuOQc?$A^JJ93`$1CC>S|xv6<24ByU7+Yc1u@pN$vskoI~@!ww}6p00i_>zoprxB!ew9~A%q diff --git a/styles/blue/img/small-blue-gradient.png b/styles/blue/img/small-blue-gradient.png deleted file mode 100644 index b91f3eef7c12765bf5e32ca6ec4ba468d070e7bf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 162 zcmeAS@N?(olHy`uVBq!ia0vp^j6f{G!2~3?tYhc}2^0spJ29*~C-V}>;VkfoEM{Qf z76xHPhFNnYfP(BLp1!W^H&_{YwPoYI?}-3~j6Gc(LpZMcc5UQsaA0WR(B3t1_Kp{c zA6vy*S`L)jJDDxnsirV{V(EkYw7L6h=N6S(dF~b7Y@88MUkfsk!PC{xWt~$(6BhuU Cr!5Kq diff --git a/styles/blue/img/small-grey-gradient.png b/styles/blue/img/small-grey-gradient.png deleted file mode 100644 index 38194f416d0f1973358bd8ea74ee46a0f99658b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 165 zcmeAS@N?(olHy`uVBq!ia0vp^j6f{G!2~3?tYhc}Qk(@Ik;M!Q+`=Ht$S`Y;1W=H@ z#M9T6{Te4LpCyYS*WwDG5J!n?M2T~LZf, - onChange: function(data, target) { - pws = ; - kids = $('#'+target).children(); - $(kids[1]).html(Math.round(data.strength)); - $(kids[0]).width(data.strength); - if(data.strength > pws) { - $(kids[0]).css('background-color', 'green'); - } else { - $(kids[0]).css('background-color', 'red'); - } - } - }); - }); - diff --git a/styles/clean/favicon.ico b/styles/clean/favicon.ico deleted file mode 100644 index e1ecd2a6420ef7b226671ed3061b37b4bbf00194..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1150 zcmb7EOKTHh6dl2xA_YMNH$^x80zq)?!hcY4q2fX)bm6`r6l&K-a3K_0NTf#VBj}=y zg2hJ*zB-wt(N;~RQ`=7M_4H``@6|5v z)wDyJrXA;@i=K|3kFLNjD7pd4JpYPz6d_gfaDU53i}uM+O`Q4cAc%lFn;x$7olpOt z@XiTvq-f*PHy0~jh#QR0Ye@`Bw_lzAVtt7uR zF`?qj*;%|A9#-~3HjApRLo^kg&T<}l+=DFxCL+FjIW&Y9Jb~w__{CffQ4ru^Ums=$ z2hog&v&NYw_`-fJlEZX8K*(6hRgn4d2*elqzUuu1_iBo<2_A6YjaW6@X?0TYi;`{a4^`r0~ F&L1A;xq1Kq diff --git a/styles/clean/img/bg-global-tl.png b/styles/clean/img/bg-global-tl.png deleted file mode 100644 index 99c68e0d70f1006ce6a63d6fba54b25f4c326f0e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 294 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPmvlzRDa@Vy#yg(t@64!_l=ltB<)VvY~=c3falGGH1 z^30M9g^-L?1$R&1fcGh?c|e7oo-U3d6}No*4EYWj2(YB{|Nmd8ASHB>RVc{fhHHSv zv_lO=N5#swFP@mYd3F%j_d=!TXLjxL`2Be4Ysofgg%-gD@((MlCKt2y2r_MuUif;w z&gmwn6NefYyq832U$$7-aqW-?leu5j8Dp+}0nLjzSMFW@X^o3ahF0#%{2LRteZQ9D hoY44>&Eo^3;C$B_#YHO=fsSJEboFyt=akUI1pu17X3PKp diff --git a/styles/clean/img/bg-global-tr.png b/styles/clean/img/bg-global-tr.png deleted file mode 100644 index 82613fbed88078d31a38ad93e7ea60cc6f94a184..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 305 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPmvlzQ2`}%X5bAdv#C9V-A&iT2ysd*&~&PAz-C8;S2 z<(VZJ3LzP(3hti10q;{(^MDGcc)B=-RNV6I-WYT!fPtkv|B}bVnIQ)v4*&n((D$EV z?k%Q?Op30PUIn&vgx|gM?&r6Efnwd_vz8_9jS9MM`agK(m%j%t$Xm+z?^zd~vwgO` zVyDVMk12;&rf$D&&pLMjr&ec7-TIokTKm=)ETS{3Zf`4zb)U+?>LRd(f$2lBU9hX; t%;!ekta;b_PMvsc|5)>oLEjz5hP^tDvPX8b0^P^p>FVdQ&MBdZ3jp+yaI63T diff --git a/styles/clean/img/bg-global.png b/styles/clean/img/bg-global.png deleted file mode 100644 index dc7ebd41f4f2e721293c41a4a4122caaf397e8b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 238 zcmeAS@N?(olHy`uVBq!ia0vp^j6iI_!3HER7z;E4DYhhUcNd2LAh=-f^2tCE&H|6f zVg?3oVGw3ym^DWND9B#o>FdgVjaiJ{l<}3s;Uz#J*%H@?66gHf+|;}h2Ir#G#FEq$ zh4Rdj426)4R0VfW-+=cis(C<#fu1goAr-e``*sR87zi+jzy9alv~aWXhFY7MOD-NS zj7t>?nW@3%YaqDQ^p1xi%i`QTt&C-Vg|koR2f3c~>R~DDzwNyG>Gv-S7f8nbvhxeQ a%G;O25qKtJtuxSY22WQ%mvv4FO5{7SQrtJrcS$MiQhHzY;+PjgLK|z3t zQ+wCM**i4SKX!hU7GAyhfkU#Mw^2d|D;uBo^Hb)RcOUZl`1b4i{db?`Zv9anwsP-F RPM{eKp00i_>zoprxBy9sHWmN? diff --git a/styles/clean/img/blue-gradient.png b/styles/clean/img/blue-gradient.png deleted file mode 100644 index bb1dfd82a12e35d794ecf23e3e4ba21cbc862deb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^j6m$b!2~2jio3*t6kC$Fy9+}wLleWoqZ5L@07W

$QC+c@G%y9Ome~ z(YwpjELEOY;JHIwo62ml^S7B;dZk_jCx10fx|#gr@4IP#XSD|2FnSqnCLvQbH9mU% c+T-jmf7O?45MoXN8pz=3>gTe~DWQoA01j|Br~m)} diff --git a/styles/clean/img/content-bl.png b/styles/clean/img/content-bl.png deleted file mode 100644 index 369b26081406a058208dbdd98f97359edbee7369..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 251 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#8oMa3g?hT=mN!5l*%H@?66gHf+|;}h2Ir#G#FEq$h4Rdj426)4R0VfW-+=ci zs(C<#1)eUBAr-euPi^FCF%V$5c=2xQjU|B}{{Pq6+WMAl@`kYTf(f(p9_TKea>8=) zsxv{MOSiUl_#E8z-um6S{b9z;3$9tQD;=twx8t|SS_VzkzQ;cnbucI>MLa5Q*j*ee t&TxBMV%mO&gr0++ZSH*ceLq(`XoAJOS7BLOfOa!@y85}Sb4qC90ssV;TcQ8} diff --git a/styles/clean/img/content-br.png b/styles/clean/img/content-br.png deleted file mode 100644 index 60c3603e74dacb601cdb58d4ba869cbe91e755bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 250 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#8oMa3nf2S*M|FWhvL&t&CC>S|xv6<249-QVi6yBi3gww4844j8sS56%z5(x3 zRP%re^F3W0Ln>~S_BnDfD+;h^zuxg8^5XycLOtc448KSY!`iircE_*UWtnoWbCpuH zyyd&Tj)ITsX>OWNb$SdLIt>4DCG(u=xo54&vhIBQ-tWxWYnM!6n6OpsUEfT`3sK6? q|Cn^GQc~J-ZO8lB0*9_YkuGR6N&CL)=S85^44$rjF6*2Unz#Uj$5!S5 diff --git a/styles/clean/img/content-gradient.png b/styles/clean/img/content-gradient.png deleted file mode 100644 index e3122e182d77a26763d9f2993ef3829061857e77..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 193 zcmeAS@N?(olHy`uVBq!ia0vp^j6m$b!3HF63(7hGDYhhUcNc~aAh?q+>m5*pv%n*= zn1O*?7=#%aX3dcR3bL1Y`ns}TV;ALRQwrM_Ee8~mEpd$~an8@pP0cG|a4t$sEJ;mK zD9*<;_2cTQgJK!$N&HT>($tRfa4>O#ipX?d!((~Ro<>9 bfq~)c6cag@zPm|4^$eb_elF{r5}LRG2iG-3 diff --git a/styles/clean/img/edge.png b/styles/clean/img/edge.png deleted file mode 100644 index b1a4b9389ca0077ffcae04dad2723b20b7181d66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 130 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1SBVv2j2ryoCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#8oMYjuOQc?$A^JJ93`$1CC>S|xv6<24ByU7+Yc1u@pN$vskoI~@!ww}6p00i_>zoprxB!ew9~A%q diff --git a/styles/clean/img/small-blue-gradient.png b/styles/clean/img/small-blue-gradient.png deleted file mode 100644 index b91f3eef7c12765bf5e32ca6ec4ba468d070e7bf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 162 zcmeAS@N?(olHy`uVBq!ia0vp^j6f{G!2~3?tYhc}2^0spJ29*~C-V}>;VkfoEM{Qf z76xHPhFNnYfP(BLp1!W^H&_{YwPoYI?}-3~j6Gc(LpZMcc5UQsaA0WR(B3t1_Kp{c zA6vy*S`L)jJDDxnsirV{V(EkYw7L6h=N6S(dF~b7Y@88MUkfsk!PC{xWt~$(6BhuU Cr!5Kq diff --git a/styles/clean/img/small-grey-gradient.png b/styles/clean/img/small-grey-gradient.png deleted file mode 100644 index 38194f416d0f1973358bd8ea74ee46a0f99658b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 165 zcmeAS@N?(olHy`uVBq!ia0vp^j6f{G!2~3?tYhc}Qk(@Ik;M!Q+`=Ht$S`Y;1W=H@ z#M9T6{Te4LpCyYS*WwDG5J!n?M2T~LZf, - onChange: function(data, target) { - pws = ; - kids = $('#'+target).children(); - $(kids[1]).html(Math.round(data.strength)); - $(kids[0]).width(data.strength); - if(data.strength > pws) { - $(kids[0]).css('background-color', 'green'); - } else { - $(kids[0]).css('background-color', 'red'); - } - } - }); - }); - diff --git a/styles/hc/favicon.ico b/styles/hc/favicon.ico deleted file mode 100644 index e1ecd2a6420ef7b226671ed3061b37b4bbf00194..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1150 zcmb7EOKTHh6dl2xA_YMNH$^x80zq)?!hcY4q2fX)bm6`r6l&K-a3K_0NTf#VBj}=y zg2hJ*zB-wt(N;~RQ`=7M_4H``@6|5v z)wDyJrXA;@i=K|3kFLNjD7pd4JpYPz6d_gfaDU53i}uM+O`Q4cAc%lFn;x$7olpOt z@XiTvq-f*PHy0~jh#QR0Ye@`Bw_lzAVtt7uR zF`?qj*;%|A9#-~3HjApRLo^kg&T<}l+=DFxCL+FjIW&Y9Jb~w__{CffQ4ru^Ums=$ z2hog&v&NYw_`-fJlEZX8K*(6hRgn4d2*elqzUuu1_iBo<2_A6YjaW6@X?0TYi;`{a4^`r0~ F&L1A;xq1Kq diff --git a/styles/hc/img/bg-global-tl.png b/styles/hc/img/bg-global-tl.png deleted file mode 100644 index 99c68e0d70f1006ce6a63d6fba54b25f4c326f0e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 294 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPmvlzRDa@Vy#yg(t@64!_l=ltB<)VvY~=c3falGGH1 z^30M9g^-L?1$R&1fcGh?c|e7oo-U3d6}No*4EYWj2(YB{|Nmd8ASHB>RVc{fhHHSv zv_lO=N5#swFP@mYd3F%j_d=!TXLjxL`2Be4Ysofgg%-gD@((MlCKt2y2r_MuUif;w z&gmwn6NefYyq832U$$7-aqW-?leu5j8Dp+}0nLjzSMFW@X^o3ahF0#%{2LRteZQ9D hoY44>&Eo^3;C$B_#YHO=fsSJEboFyt=akUI1pu17X3PKp diff --git a/styles/hc/img/bg-global-tr.png b/styles/hc/img/bg-global-tr.png deleted file mode 100644 index 82613fbed88078d31a38ad93e7ea60cc6f94a184..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 305 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqY)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPmvlzQ2`}%X5bAdv#C9V-A&iT2ysd*&~&PAz-C8;S2 z<(VZJ3LzP(3hti10q;{(^MDGcc)B=-RNV6I-WYT!fPtkv|B}bVnIQ)v4*&n((D$EV z?k%Q?Op30PUIn&vgx|gM?&r6Efnwd_vz8_9jS9MM`agK(m%j%t$Xm+z?^zd~vwgO` zVyDVMk12;&rf$D&&pLMjr&ec7-TIokTKm=)ETS{3Zf`4zb)U+?>LRd(f$2lBU9hX; t%;!ekta;b_PMvsc|5)>oLEjz5hP^tDvPX8b0^P^p>FVdQ&MBdZ3jp+yaI63T diff --git a/styles/hc/img/bg-global.png b/styles/hc/img/bg-global.png deleted file mode 100644 index dc7ebd41f4f2e721293c41a4a4122caaf397e8b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 238 zcmeAS@N?(olHy`uVBq!ia0vp^j6iI_!3HER7z;E4DYhhUcNd2LAh=-f^2tCE&H|6f zVg?3oVGw3ym^DWND9B#o>FdgVjaiJ{l<}3s;Uz#J*%H@?66gHf+|;}h2Ir#G#FEq$ zh4Rdj426)4R0VfW-+=cis(C<#fu1goAr-e``*sR87zi+jzy9alv~aWXhFY7MOD-NS zj7t>?nW@3%YaqDQ^p1xi%i`QTt&C-Vg|koR2f3c~>R~DDzwNyG>Gv-S7f8nbvhxeQ a%G;O25qKtJtuxSY22WQ%mvv4FO5{7SQrtJrcS$MiQhHzY;+PjgLK|z3t zQ+wCM**i4SKX!hU7GAyhfkU#Mw^2d|D;uBo^Hb)RcOUZl`1b4i{db?`Zv9anwsP-F RPM{eKp00i_>zoprxBy9sHWmN? diff --git a/styles/hc/img/blue-gradient.png b/styles/hc/img/blue-gradient.png deleted file mode 100644 index bb1dfd82a12e35d794ecf23e3e4ba21cbc862deb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^j6m$b!2~2jio3*t6kC$Fy9+}wLleWoqZ5L@07W

$QC+c@G%y9Ome~ z(YwpjELEOY;JHIwo62ml^S7B;dZk_jCx10fx|#gr@4IP#XSD|2FnSqnCLvQbH9mU% c+T-jmf7O?45MoXN8pz=3>gTe~DWQoA01j|Br~m)} diff --git a/styles/hc/img/content-bl.png b/styles/hc/img/content-bl.png deleted file mode 100644 index 369b26081406a058208dbdd98f97359edbee7369..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 251 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#8oMa3g?hT=mN!5l*%H@?66gHf+|;}h2Ir#G#FEq$h4Rdj426)4R0VfW-+=ci zs(C<#1)eUBAr-euPi^FCF%V$5c=2xQjU|B}{{Pq6+WMAl@`kYTf(f(p9_TKea>8=) zsxv{MOSiUl_#E8z-um6S{b9z;3$9tQD;=twx8t|SS_VzkzQ;cnbucI>MLa5Q*j*ee t&TxBMV%mO&gr0++ZSH*ceLq(`XoAJOS7BLOfOa!@y85}Sb4qC90ssV;TcQ8} diff --git a/styles/hc/img/content-br.png b/styles/hc/img/content-br.png deleted file mode 100644 index 60c3603e74dacb601cdb58d4ba869cbe91e755bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 250 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#8oMa3nf2S*M|FWhvL&t&CC>S|xv6<249-QVi6yBi3gww4844j8sS56%z5(x3 zRP%re^F3W0Ln>~S_BnDfD+;h^zuxg8^5XycLOtc448KSY!`iircE_*UWtnoWbCpuH zyyd&Tj)ITsX>OWNb$SdLIt>4DCG(u=xo54&vhIBQ-tWxWYnM!6n6OpsUEfT`3sK6? q|Cn^GQc~J-ZO8lB0*9_YkuGR6N&CL)=S85^44$rjF6*2Unz#Uj$5!S5 diff --git a/styles/hc/img/content-gradient.png b/styles/hc/img/content-gradient.png deleted file mode 100644 index e3122e182d77a26763d9f2993ef3829061857e77..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 193 zcmeAS@N?(olHy`uVBq!ia0vp^j6m$b!3HF63(7hGDYhhUcNc~aAh?q+>m5*pv%n*= zn1O*?7=#%aX3dcR3bL1Y`ns}TV;ALRQwrM_Ee8~mEpd$~an8@pP0cG|a4t$sEJ;mK zD9*<;_2cTQgJK!$N&HT>($tRfa4>O#ipX?d!((~Ro<>9 bfq~)c6cag@zPm|4^$eb_elF{r5}LRG2iG-3 diff --git a/styles/hc/img/edge.png b/styles/hc/img/edge.png deleted file mode 100644 index b1a4b9389ca0077ffcae04dad2723b20b7181d66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 130 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1SBVv2j2ryoCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#8oMYjuOQc?$A^JJ93`$1CC>S|xv6<24ByU7+Yc1u@pN$vskoI~@!ww}6p00i_>zoprxB!ew9~A%q diff --git a/styles/hc/img/small-blue-gradient.png b/styles/hc/img/small-blue-gradient.png deleted file mode 100644 index b91f3eef7c12765bf5e32ca6ec4ba468d070e7bf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 162 zcmeAS@N?(olHy`uVBq!ia0vp^j6f{G!2~3?tYhc}2^0spJ29*~C-V}>;VkfoEM{Qf z76xHPhFNnYfP(BLp1!W^H&_{YwPoYI?}-3~j6Gc(LpZMcc5UQsaA0WR(B3t1_Kp{c zA6vy*S`L)jJDDxnsirV{V(EkYw7L6h=N6S(dF~b7Y@88MUkfsk!PC{xWt~$(6BhuU Cr!5Kq diff --git a/styles/hc/img/small-grey-gradient.png b/styles/hc/img/small-grey-gradient.png deleted file mode 100644 index 38194f416d0f1973358bd8ea74ee46a0f99658b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 165 zcmeAS@N?(olHy`uVBq!ia0vp^j6f{G!2~3?tYhc}Qk(@Ik;M!Q+`=Ht$S`Y;1W=H@ z#M9T6{Te4LpCyYS*WwDG5J!n?M2T~LZf Date: Mon, 27 Sep 2021 11:23:53 +0200 Subject: [PATCH 34/40] remove old logo --- styles/logo.png | Bin 1748 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 styles/logo.png diff --git a/styles/logo.png b/styles/logo.png deleted file mode 100644 index b662349aeccd315b969e4a0ccee235b8c39329b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1748 zcmV;_1}piAP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2ige{ z2onVIRTEJF00vY^L_t(&-tC!Ph#OTD$A5QssI_0C?HUBLZa@%8uq@V(2V1A8lnTB` zjUTj7s`&XLJ_v#jOVxr8V#PNRZ5J$+jffOqS`a&Q!QxYpolw`7&ay#ln!-+POKB&2 ze3*|+l9_ZT$x;eEFmN+7x%d3f`JZ#{xdXT5wk(UNTS-|FSpz%-tN~_}QuUh(L`2pD z>tZddl#RyrGE^Yz5Gdxq>)iv;49qhoR#m5vLjh|8 z<*#0Vl^a6E+vQp?(E0%JG_LcWRn=7?%3e*6U({_{wvdg0hybfMOf1_7l_v+A{JAUu zJNRFxq5AR2c0hSb>q&g4$?>RH^icUgMurV<(5AfAHl?MttTogzNa+m?cqMAhU~HZ- zv1~BUm?3=%InPsQF@QB4tE%(oc_;K_9DoG5H?>DZWEJo(Pyn6)M%yi4ZvpGHiHO&pMzPJ#qBXT_$T5jHbf5)PPa} z*#M}3GGV&Zy2MBdnO$_)*vC9+fUE?tr>pGVy)&*pbWo;eX}5ar#(zl@?CSwm$%-U-sly`B0xS@q~0(G3ZR=ex`F7m zv04!v0t8vBG=0o_QeDOhZZmKo-{Lx|bljtqRn>2}$iOIN4+x0gC61P+kA-`!Le`O?UPL&`lU&)9;J|V&@LZq0=S&c(^?nB z9|9i7b%uZ}uJa+V8sLiZ5?5w4gE?1jHd?OZ#Yxubk48OEHP$0?ec=;aX9m|f2z&>8 zY*qEu?FVoE$sm?Z%TCy;>amA(%T@6^JR;W@z5reV?u%2T-Y~JMty_}Xd<|o>Lw$3$ z^;9tes*oK-$5^5Q>Xr@Ey=p2Ipk$xMm=~sez3@;}M#c!kCDomVZ!jDltZsQYS@Z z26!0Pq24IRDsS7TTa+~Cyzz^>Cjcig=J<+Dj z#Pq+Rlv*;@3x#dG`dG`Vdz4atx9Huavfm9H0-g(sUd8s@ennklm8>AMC4=#R(bAU$ z%7=lk=`QdGFdLhrT;~Yz6tKTEeN2_?BKb&scp&s>fbUUC{hTU)i-;1D&n1xS3v&GQ zahW;mjYUKb9{gTr&PvO@h@2CV?fyI+SELYc6_LfM-=?H^K%_V^B@+jxyg8e4*#A!1 zoA`^qBO*0fnm8hIR774Ek+n-)BNqiSbzmxLl>bCzPZW6Uc|r<6clZ?81+-gc)~EAH zpGHIjaS3y4z%|Q8RqT@2b$YQg3%sn9Di6HLxe-lzoHHjPixIERi^vBevYJ~-L_`yj qBO)>>B1XT4x!GXUEe+tdw8{S@kFeGK?D|*$0000 Date: Mon, 27 Sep 2021 15:55:52 +0200 Subject: [PATCH 35/40] remove inc.DBAccess.php and add tests to package --- SeedDMS_Core/package.xml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index a62df4247..f445d1e52 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -59,9 +59,6 @@ - - - @@ -100,8 +97,17 @@

- - + + + + + + + + + + + From 590fc0c957f5d457622b6169c04baf5abf15c397 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Sep 2021 15:56:33 +0200 Subject: [PATCH 36/40] turn off example extension --- ext/example/conf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/example/conf.php b/ext/example/conf.php index 33abc377d..4229d29c7 100644 --- a/ext/example/conf.php +++ b/ext/example/conf.php @@ -2,7 +2,7 @@ $EXT_CONF['example'] = array( 'title' => 'Example Extension', 'description' => 'This sample extension demonstrate the use of various hooks', - 'disable' => false, + 'disable' => true, 'version' => '1.0.1', 'releasedate' => '2018-03-21', 'author' => array('name'=>'Uwe Steinmann', 'email'=>'uwe@steinmann.cx', 'company'=>'MMK GmbH'), From cf30ad5ddd8361f22bdb63000e2095e47e72a748 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Sep 2021 15:56:50 +0200 Subject: [PATCH 37/40] initialize path if not explicitly set in settings.xml --- inc/inc.Settings.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/inc/inc.Settings.php b/inc/inc.Settings.php index 659653cd0..c8fd9c0d4 100644 --- a/inc/inc.Settings.php +++ b/inc/inc.Settings.php @@ -35,6 +35,31 @@ if(!trim($settings->_encryptionKey)) { $settings->save(); } +/* Set some directories if not set in the configuration file */ +$__basedir = dirname(dirname(__DIR__)); +$__datadir = dirname(dirname(__DIR__))."/data";; +if(empty($settings->_rootDir)) { + $settings->_rootDir = $__basedir."/www/"; +} +if(empty($settings->_contentDir)) { + $settings->_contentDir = $__basedir; +} +if(empty($settings->_cacheDir)) { + $settings->_cacheDir = $__datadir."/cache/"; +} +if(empty($settings->_backupDir)) { + $settings->_backupDir = $__datadir."/backup/"; +} +if(empty($settings->_luceneDir)) { + $settings->_luceneDir = $__datadir."/lucene/"; +} +if(empty($settings->_stagingDir)) { + $settings->_stagingDir = $__datadir."/lucene/"; +} +if($settings->_dbDriver == 'sqlite' && empty($settings->_dbDatabase)) { + $settings->_dbDatabase = $__datadir."/content.db"; +} + ini_set('include_path', $settings->_rootDir.'pear'. PATH_SEPARATOR .ini_get('include_path')); if(!empty($settings->_extraPath)) { ini_set('include_path', $settings->_extraPath. PATH_SEPARATOR .ini_get('include_path')); From 5f5d2549efc53816ab94b77110664ed9d8bfe0df Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Sep 2021 16:03:36 +0200 Subject: [PATCH 38/40] turn off example extension --- conf/settings.xml.template | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/conf/settings.xml.template b/conf/settings.xml.template index 075192b8a..6d8a7dd2c 100644 --- a/conf/settings.xml.template +++ b/conf/settings.xml.template @@ -96,7 +96,7 @@ --> a2ps -1 -a1 -R -B -o - '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dFirstPage=1 -dLastPage=1 -dPDFFitPage -r72x72 -sOutputFile=- -q - | convert -resize %wx png:- '%o' - + + + 1 + + From 84f3e3ef96b7715200e03caa21359c9e624b7337 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 27 Sep 2021 16:08:32 +0200 Subject: [PATCH 39/40] add changes for 5.1.24 --- CHANGELOG | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index ed43b14bc..e16c71140 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,8 @@ - more settings to disable import and download of extensions - add new configuration for excluding sequence and comment when creating a folder +- get zendframework from pkgist +- auto generate path if not set in settings.xml -------------------------------------------------------------------------------- Changes in version 5.1.23 From 2b14bb5748e17ae3e6422f42a302c70a2c69d883 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 28 Sep 2021 10:31:30 +0200 Subject: [PATCH 40/40] move stopwords.txt away --- conf/{stopwords.txt => stopwords.txt.template} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename conf/{stopwords.txt => stopwords.txt.template} (100%) diff --git a/conf/stopwords.txt b/conf/stopwords.txt.template similarity index 100% rename from conf/stopwords.txt rename to conf/stopwords.txt.template