diff --git a/CHANGELOG b/CHANGELOG index 052f21366..522563cc0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -216,6 +216,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 diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 48ad52122..b9c5e8f18 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -1241,7 +1241,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` "; @@ -1323,7 +1323,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` "; @@ -1620,10 +1620,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()." "; @@ -3151,8 +3151,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"]); @@ -3189,7 +3191,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; @@ -3279,7 +3281,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; @@ -3316,14 +3318,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]; @@ -3347,8 +3351,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]; @@ -3469,7 +3475,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); @@ -3548,7 +3554,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; @@ -3648,7 +3654,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; @@ -3942,7 +3948,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; diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 0953db9a1..f136b2adf 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -247,6 +247,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; } /* }}} */ /** @@ -330,30 +351,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; } /* }}} */ /** @@ -1331,6 +1331,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 @@ -2112,8 +2115,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; @@ -2123,7 +2127,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */ if ($revision->getVersion() == $version) return $revision; } - return false; + return null; } $db = $this->_dms->getDB(); @@ -2132,7 +2136,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'); @@ -2141,7 +2145,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 { @@ -2475,8 +2479,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"]); @@ -2494,12 +2500,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)) { @@ -2540,39 +2556,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; } /* }}} */ @@ -2580,20 +2598,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; @@ -2627,8 +2664,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) { /* {{{ */ @@ -2666,7 +2704,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(); @@ -2699,29 +2737,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; @@ -2840,7 +2886,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)) { } } } 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; diff --git a/SeedDMS_Core/Core/inc.ClassFolder.php b/SeedDMS_Core/Core/inc.ClassFolder.php index a99c746e0..5156826c8 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; } /* }}} */ /** @@ -389,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 @@ -794,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); } /* }}} */ @@ -814,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) @@ -1307,14 +1319,14 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object { $pacl = array("groups" => array(), "users" => array()); } - 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); @@ -1328,7 +1340,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]; return SeedDMS_Core_DMS::mergeAccessLists($pacl, $this->_accessList[$mode]); @@ -1369,6 +1381,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 @@ -1443,32 +1458,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 */ diff --git a/SeedDMS_Core/Core/inc.ClassGroup.php b/SeedDMS_Core/Core/inc.ClassGroup.php index b171e6cc2..3a6eb4a68 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; diff --git a/SeedDMS_Core/Core/inc.ClassKeywords.php b/SeedDMS_Core/Core/inc.ClassKeywords.php index 0981023d3..aa11c9dc3 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; @@ -105,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; diff --git a/SeedDMS_Core/Core/inc.ClassUser.php b/SeedDMS_Core/Core/inc.ClassUser.php index c70e3779c..e89025f29 100644 --- a/SeedDMS_Core/Core/inc.ClassUser.php +++ b/SeedDMS_Core/Core/inc.ClassUser.php @@ -655,7 +655,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; @@ -676,7 +676,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; @@ -697,7 +697,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; @@ -718,7 +718,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; diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php index 17c453afc..ba033b392 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -257,6 +257,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 */ @@ -1105,7 +1114,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"); diff --git a/SeedDMS_Core/package.xml b/SeedDMS_Core/package.xml index 9e1ad2727..b79aaeea1 100644 --- a/SeedDMS_Core/package.xml +++ b/SeedDMS_Core/package.xml @@ -44,9 +44,6 @@ - - - @@ -88,8 +85,17 @@ - - + + + + + + + + + + + @@ -1939,6 +1945,10 @@ add method SeedDMS_Core_DatabaseAccess::setLogFp() - 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() +- 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 diff --git a/conf/settings.xml.template b/conf/settings.xml.template index 2295116c3..b08102c45 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 + + 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 diff --git a/ext/example/conf.php b/ext/example/conf.php index e9427966d..0c5e25c93 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 demonstrates 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'), 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')); diff --git a/restapi/index.php b/restapi/index.php index 227631ec3..c4b9663fc 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(); ?> 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 de626d5de..000000000 Binary files a/styles/blue/favicon.ico and /dev/null differ diff --git a/styles/blue/img/bg-global-tl.png b/styles/blue/img/bg-global-tl.png deleted file mode 100644 index 99c68e0d7..000000000 Binary files a/styles/blue/img/bg-global-tl.png and /dev/null differ diff --git a/styles/blue/img/bg-global-tr.png b/styles/blue/img/bg-global-tr.png deleted file mode 100644 index 82613fbed..000000000 Binary files a/styles/blue/img/bg-global-tr.png and /dev/null differ diff --git a/styles/blue/img/bg-global.png b/styles/blue/img/bg-global.png deleted file mode 100644 index dc7ebd41f..000000000 Binary files a/styles/blue/img/bg-global.png and /dev/null differ diff --git a/styles/blue/img/blue-gradient-48px.png b/styles/blue/img/blue-gradient-48px.png deleted file mode 100644 index f15e66937..000000000 Binary files a/styles/blue/img/blue-gradient-48px.png and /dev/null differ diff --git a/styles/blue/img/blue-gradient.png b/styles/blue/img/blue-gradient.png deleted file mode 100644 index bb1dfd82a..000000000 Binary files a/styles/blue/img/blue-gradient.png and /dev/null differ diff --git a/styles/blue/img/content-bl.png b/styles/blue/img/content-bl.png deleted file mode 100644 index 369b26081..000000000 Binary files a/styles/blue/img/content-bl.png and /dev/null differ diff --git a/styles/blue/img/content-br.png b/styles/blue/img/content-br.png deleted file mode 100644 index 60c3603e7..000000000 Binary files a/styles/blue/img/content-br.png and /dev/null differ diff --git a/styles/blue/img/content-gradient.png b/styles/blue/img/content-gradient.png deleted file mode 100644 index e3122e182..000000000 Binary files a/styles/blue/img/content-gradient.png and /dev/null differ diff --git a/styles/blue/img/edge.png b/styles/blue/img/edge.png deleted file mode 100644 index b1a4b9389..000000000 Binary files a/styles/blue/img/edge.png and /dev/null differ diff --git a/styles/blue/img/small-blue-gradient.png b/styles/blue/img/small-blue-gradient.png deleted file mode 100644 index b91f3eef7..000000000 Binary files a/styles/blue/img/small-blue-gradient.png and /dev/null differ diff --git a/styles/blue/img/small-grey-gradient.png b/styles/blue/img/small-grey-gradient.png deleted file mode 100644 index 38194f416..000000000 Binary files a/styles/blue/img/small-grey-gradient.png and /dev/null differ diff --git a/styles/blue/style.css b/styles/blue/style.css deleted file mode 100644 index ffad53abb..000000000 --- a/styles/blue/style.css +++ /dev/null @@ -1,522 +0,0 @@ -/* Copyright (C) 2006-2008 Malcolm Cowe -*/ -body { - font-size: 76%; - font-family: sans-serif; -} -body.login { - width: 50%; - margin-left: auto; - margin-right: auto; -} -.headingContainer { - background: #35566c url(img/blue-gradient.png) repeat-x bottom; - border: 1px solid rgb(53,85,107); - position: relative; -} -/* IE6 Hack */ -* html .headingContainer { - position: relative; -} -.localNavContainer { - padding: 2px; - margin-bottom: 0.4em; - background: #35566c; - border: 1px solid rgb(53,85,107); - position: relative; -} -a:link { - color: rgb(231,111,0); - text-decoration: none; -} -a:visited { - color: rgb(231,111,0); - text-decoration: none; -} -a:hover { - text-decoration: underline; -} -a:active { - color: rgb(231,111,0); - text-decoration: none; -} -.headingContainer a:link { - color: white; -} -.headingContainer a:visited { - color: white; -} -.localNavContainer a:link { - color: white; -} -.localNavContainer a:visited { - color: white; -} -.contentHeading a:link { - color: white; -} -.contentHeading a:visited { - color: white; -} -.localNav a:link { - text-decoration: none; -} -.localNav a:visited { - text-decoration: none; -} -.localNav a:hover { - text-decoration: underline; -} -.globalNav a:link { - color: rgb(192,102,0); - text-decoration: none; -} -.globalNav a:visited { - color: rgb(192,102,0); - text-decoration: none; -} -.globalNav a:hover { - color: rgb(192,102,0); - text-decoration: underline; -} -.globalNav a:active { - color: rgb(192,102,0); -} -.mainHeading { - padding: 2px 4px 0px 4px; - font-size: 1.5em; - font-weight: bold; - color: white; - position: absolute; - bottom: 0px; -} -/* IE6 Hack */ -* html .mainHeading { - position: relative; -} -.contentHeading { - background: #35566c url(img/blue-gradient.png) repeat-x bottom; - color: white; - padding: 2px 4px 2px 4px; - margin-top: 10px; - font-size: 1.2em; - font-weight: bold; -} -.contentSubHeading { - font-weight: bold; - border-bottom: 1px solid; - margin-top: 1em; - margin-bottom: 2px; -} -.contentSubHeading#first { - margin-top: 0; - margin-bottom: 2px; -} - -#logo { - float:left; - margin-right: 5px; -} - -.siteName { - background: url(img/bg-global-tl.png) no-repeat top left; - padding: 2px 4px 2px 4px; - font-size: 1.6em; - font-weight: bold; - /*width: 40%; */ -} - -.siteNameLogin { - background: url(img/bg-global-tl.png) no-repeat top left; - padding: 2px 4px 0px 4px; - font-size: 3em; - font-weight: bold; - font-style: italic; - color: #fff; -} -.globalBox { - background: url(img/bg-global.png) repeat-x top left; - position: relative; - height: 4em; -} - -/* IE6 Hack */ -* html .globalBox { - position: relative; -} - -.globalBox#noNav { - height: 4em; -} -.globalBox div#signatory { - padding-left: 55px; - position: absolute; - bottom: 1px; -} - -/* IE6 Hack */ -* html .globalBox div#signatory { - position: relative; -} - -.globalNav { - padding: 4px; - list-style-type: none; - margin: 0px; - text-align: right; - float:right; -} - -/* IE6 Hack */ -* html .globalNav { - position: relative; -} - -.globalNav li { - display: inline; - padding: 0px 4px 0px 4px; - border-left: 1px solid; - } -.globalNav li#first { - border-left: none; - padding: 0px 4px 0px 0px; -} -.globalNav li form { - display: inline; -} -.globalNav li input { - font-size: 0.8em; - border: 1px solid; - padding: 1px; -} -.globalNav li input#searchButton { - border-left:0px; - padding: 0px; -} -.localNav { - padding:1px; - margin: 0px; - text-align: center; - list-style-type: none; - text-align:left; - color: white; - text-transform: uppercase; -} -.localNav li { - display: inline; - padding: 0px 4px 0px 4px; - border-left: 1px solid; -} -.localNav li#first { - border-left: none; -} -.globalTR { - background: url(img/bg-global-tr.png) no-repeat top right; - float: right; - width: 8px; - height: 8px; -} -.smallText { - font-size: 0.8em; -} -.contentContainer { - padding: 0px; - width: 100%; - margin: auto; -} -.content { - background: url(img/content-gradient.png) repeat-x bottom left; - background-color: white; - margin-top: 0.2em; - padding: 0; - border-top: 1px solid #e0e0e0; -} -.content-l { - background: url(img/edge.png) repeat-y bottom left; -} -.content-r { - background: url(img/edge.png) repeat-y bottom right; -} -.content-br { - background: url(img/content-br.png) no-repeat bottom right; -} -.content-bl { - background: url(img/content-bl.png) no-repeat bottom left; - padding: 0.6em 1em; -} -.content input, .content select { - font-size: 0.8em; - border: 1px solid; -} -.content textarea { - border: 1px solid; - font-family: sans-serif; - font-size: 1.0em; -} -td { - vertical-align: top; -} -table.folderView { - border-collapse: collapse; - width: 100%; -} -table.folderView thead tr { - border-bottom: 1px solid rgb(189, 190, 192); -} -table.folderView th, table.folderView td { - padding: 0.1em 0.4em; -} -table.folderView th { - text-align: left; -} -table.folderView td { - border-bottom: 1px solid rgb(224, 224, 224); -} -table.folderView td.center { - text-align: center; -} -table.folderView tr.folder { - border-bottom: 1px solid rgb(224, 224, 224); - background: rgb(240, 240, 240); -} -table.defaultView { - border-collapse: collapse; -} -table.defaultView thead tr { - border-bottom: 1px solid rgb(189, 190, 192); -} -table.defaultView th, table.defaultView td { - padding: 0.1em 0.4em; -} -table.defaultView th { - text-align: left; -} -table.defaultView td { - border-bottom: 1px solid rgb(224, 224, 224); -} -table.defaultView td.center { - text-align: center; -} -table.defaultView tr.folder { - border-bottom: 1px solid rgb(224, 224, 224); - background: rgb(240, 240, 240); -} -td#userImage { - border: 1px solid rgb(189, 190, 192); -} -img.userImage { - height: 72px; -} -img.mimeicon { - height: 18px; - vertical-align: middle; - border: none; -} -img.treeicon { - border: none; - padding-right: 0.1em; -} -input.mimeicon { - height: 18px; - vertical-align: middle; - border: none; -} -ul.reviewer { - padding: 0; - margin: 0; -} -ul.reviewer li { - list-style: none; - padding: 0.1em 0em; - border-top: 1px solid rgb(163, 184, 203); -} -ul.reviewer li.first { - border-top: none; -} -ul.actions, ul.documentDetail { - padding: 0; - margin: 0; -} -ul.actions li, ul.documentDetail li { - list-style: none; - padding: 0 0 0.1em 0; -} -ul.actions li.first, ul.documentDetail li.first { - border-top: none; -} -dl.documentDetail { - margin: 0; -} -dl.documentDetail dt { - font-weight: bold; -} -.cbSelectTitle { - float:left; - width: 9em; -} -.cbSelectContainer { - overflow:auto; - height: 8em; - border: 1px solid; - padding: 0.2em 0; - margin: 0.2em 0; -} -.cbSelectContainer.empty { - height: 1em; -} -.cbSelectList { - padding: 0.1em; -} -.cbSelectItem { - list-style-type: none; -} -div.pageList{ - border: 1px solid #ddd; - padding: 3px; - margin-top: 15px; - margin-bottom: 15px; -} -div.pageList span.selected{ - font-weight: bold; - color: #fff; - background-color: #35566c; - padding: 1px; -} -/* - * I rather foolishly decided to have the title of the page exist at the - * bottom of the containing DIV element. This means using absolute - * positioning in order to get the desired effect in a way that is consistent. - * However, this causes problems when the fonts are scaled as overlap can - * occur with other elements, leading to unclean layout (since absolute - * positioning removes the element from the document flow). My solution is to - * place an empty element in the page directly before the title that remains - * in the document flow. This fakes a margin around the title. - * I've also applied this to the login form in the global navigation section. - */ -span.absSpacerNorm { - display: block; - height: 1.4em; - line-height: 14px; - font-size: 1.2em; -} - -span.absSpacerTitle { - display: block; - min-height: 1.8em; - font-size: 1.5em; - padding-top: 0.2em; - visibility: hidden; -} - -div.error { - text-align: center; - margin: 20px; - padding: 20px; - border: 1px solid black; - border-radius: 15px; - background-color: #ff8787; - font-weight: bold; -} - -.disclaimer { - margin-top: 1em; - padding: 3px; - text-align: center; - border: 1px solid #000; -} - -.footNote { - text-align: center; - margin-top: 1em; -} -.legend{ - list-style: none; - border: 1px solid black; - padding: 5px; -} - -/* these are used in help only */ - -h1{ - font-size: 140%; - font-weight: bold; - background: #35566c; - color: #fff; -} - -h2{ - font-size: 110%; - font-weight: bold; - border-bottom: 1px solid #999; -} -/* these are used in calendar */ - -table.calendaryear td.today{ - border: 1px solid #000; - font-weight: bold; -} - -table.calendaryear td.header{ - font-weight: bold; -} - -table.calendaryear td{ - border: 1px solid #000; - padding : 10px; -} - -table.calendaryear table td{ - border: 0; - padding : 1px; -} - -table.calendarmonth , table.calendarweek { - margin-top: 1em; -} - -table.calendarmonth td, table.calendarweek td{ - border-bottom: 1px solid #ddd; - padding-left: 1em; - padding-right: 1em; -} - -table.calendarmonth td.separator, table.calendarweek td.separator{ - border: 0; - padding: 0; - margin:0; -} - -table.calendarmonth td.header, table.calendarmonth td.todayHeader, table.calendarweek td.header, table.calendarweek td.todayHeader{ - border: 1px solid #000; - background: #eee; - font-weight: bold; - padding: 1px; - color: #222; - padding-left: 1em; - padding-right: 1em; - padding-bottom: 1em; -} - -table.calendarmonth td.header a, table.calendarmonth td.todayHeader a, table.calendarweek td.header a, table.calendarweek td.todayHeader a{ - color: #000; -} - - -table.calendarmonth td.today, table.calendarweek td.today{ - background: #ddd; -} - -table.calendarmonth td.todayHeader, table.calendarweek td.todayHeader,table.calendarmonth td.todayHeader a, table.calendarweek td.todayHeader a{ - background: #000; - color: #eee; -} - -table.calendarweek td.header, table.calendarweek td.todayHeader{ - padding-bottom: 2em; -} - -table.searchform td{ - padding-top: 5px; - padding-bottom: 10px; - padding-right: 5px; -} diff --git a/styles/clean/application.js b/styles/clean/application.js deleted file mode 100644 index 2122cec18..000000000 --- a/styles/clean/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/clean/favicon.ico b/styles/clean/favicon.ico deleted file mode 100644 index e1ecd2a64..000000000 Binary files a/styles/clean/favicon.ico and /dev/null differ diff --git a/styles/clean/img/bg-global-tl.png b/styles/clean/img/bg-global-tl.png deleted file mode 100644 index 99c68e0d7..000000000 Binary files a/styles/clean/img/bg-global-tl.png and /dev/null differ diff --git a/styles/clean/img/bg-global-tr.png b/styles/clean/img/bg-global-tr.png deleted file mode 100644 index 82613fbed..000000000 Binary files a/styles/clean/img/bg-global-tr.png and /dev/null differ diff --git a/styles/clean/img/bg-global.png b/styles/clean/img/bg-global.png deleted file mode 100644 index dc7ebd41f..000000000 Binary files a/styles/clean/img/bg-global.png and /dev/null differ diff --git a/styles/clean/img/blue-gradient-48px.png b/styles/clean/img/blue-gradient-48px.png deleted file mode 100644 index f15e66937..000000000 Binary files a/styles/clean/img/blue-gradient-48px.png and /dev/null differ diff --git a/styles/clean/img/blue-gradient.png b/styles/clean/img/blue-gradient.png deleted file mode 100644 index bb1dfd82a..000000000 Binary files a/styles/clean/img/blue-gradient.png and /dev/null differ diff --git a/styles/clean/img/content-bl.png b/styles/clean/img/content-bl.png deleted file mode 100644 index 369b26081..000000000 Binary files a/styles/clean/img/content-bl.png and /dev/null differ diff --git a/styles/clean/img/content-br.png b/styles/clean/img/content-br.png deleted file mode 100644 index 60c3603e7..000000000 Binary files a/styles/clean/img/content-br.png and /dev/null differ diff --git a/styles/clean/img/content-gradient.png b/styles/clean/img/content-gradient.png deleted file mode 100644 index e3122e182..000000000 Binary files a/styles/clean/img/content-gradient.png and /dev/null differ diff --git a/styles/clean/img/edge.png b/styles/clean/img/edge.png deleted file mode 100644 index b1a4b9389..000000000 Binary files a/styles/clean/img/edge.png and /dev/null differ diff --git a/styles/clean/img/small-blue-gradient.png b/styles/clean/img/small-blue-gradient.png deleted file mode 100644 index b91f3eef7..000000000 Binary files a/styles/clean/img/small-blue-gradient.png and /dev/null differ diff --git a/styles/clean/img/small-grey-gradient.png b/styles/clean/img/small-grey-gradient.png deleted file mode 100644 index 38194f416..000000000 Binary files a/styles/clean/img/small-grey-gradient.png and /dev/null differ diff --git a/styles/clean/style.css b/styles/clean/style.css deleted file mode 100644 index 83f9c38cc..000000000 --- a/styles/clean/style.css +++ /dev/null @@ -1,556 +0,0 @@ -/* Copyright (C) 2010 Matteo Lucarelli -*/ -body { - font-size: 70%; - font-family: sans-serif; -} -body.login { - width: 50%; - margin-left: auto; - margin-right: auto; -} -.headingContainer { - background: #fff; - position: relative; -} -/* IE6 Hack */ -* html .headingContainer { - position: relative; -} -.localNavContainer { - padding: 2px; - margin-bottom: 0.4em; - background: #fff; - position: relative; -} -a:link { - color: rgb(150,50,0); - text-decoration: none; -} -a:visited { - color: rgb(150,50,0); - text-decoration: none; -} -a:hover { - color: rgb(231,111,0); - text-decoration: none; -} -a:active { - color: rgb(150,50,0); - text-decoration: none; -} - -.mainHeading { - padding: 2px 4px 0px 4px; - font-size: 1.5em; - font-weight: bold; - color: black; - position: absolute; - bottom: 0px; -} -/* IE6 Hack */ -* html .mainHeading { - position: relative; -} -.contentHeading { - background: #7d8288; - color: white; - padding: 2px 4px 2px 4px; - margin-top: 10px; - font-size: 1.2em; - font-weight: bold; -} -.contentSubHeading { - font-weight: bold; - border-bottom: 1px solid; - margin-top: 1em; - margin-bottom: 2px; -} -.contentSubHeading#first { - margin-top: 0; - margin-bottom: 2px; -} - -#logo { - float:left; - margin-right: 5px; -} - -.siteName { - background: url(img/bg-global-tl.png) no-repeat top left; - padding: 2px 4px 0px 4px; - font-size: 1.6em; - font-weight: bold; - font-style: italic; - color: #fff; -} - -.siteNameLogin { - background: url(img/bg-global-tl.png) no-repeat top left; - padding: 2px 4px 0px 4px; - font-size: 3em; - font-weight: bold; - font-style: italic; - color: #fff; -} - -.globalBox { - background: url(img/bg-global.png) repeat-x top left; - position: relative; - height: 4em; -} - -/* IE6 Hack */ -* html .globalBox { - position: relative; -} - -.globalBox#noNav { - height: 4em; -} - -div#signatory { - padding-left: 55px; - position: absolute; - bottom: 1px; -} - -/* IE6 Hack */ -* html .globalBox div#signatory { - position: relative; -} - -.globalNav { - padding: 4px; - list-style-type: none; - margin: 0px; - text-align: right; - float:right; - /*font-variant: small-caps;*/ -} - -/* IE6 Hack */ -* html .globalNav { - position: relative; -} - -.globalNav li { - display: inline; - padding: 0px 4px 0px 4px; - border-left: 1px solid; - } -.globalNav li#first { - border-left: none; - padding: 0px 4px 0px 0px; -} -.globalNav li form { - display: inline; -} -.globalNav li input { - font-size: 0.8em; - border: 1px solid; - padding: 1px; -} -.globalNav li input#searchButton { - border-left:0px; - padding: 0px; -} -.localNav { - padding:1px; - margin: 0px; - margin-top: 3px; - text-align: left; - list-style-type: none; - color: white; - text-transform: uppercase; -} -.localNav li { - font-size: 0.8em; - display: inline; - padding: 2px 4px 2px 4px; - border: 1px solid #fff; - background-color: #eee; -} - -.globalTR { - background: url(img/bg-global-tr.png) no-repeat top right; - float: right; - width: 8px; - height: 8px; -} -.smallText { - font-size: 0.8em; -} -.contentContainer { - padding: 0px; - width: 100%; - margin: auto; -} -.content { - background: url(img/content-gradient.png) repeat-x bottom left; - background-color: white; - padding: 0; - border-top: 1px solid #e0e0e0; -} -.content-l { - background: url(img/edge.png) repeat-y bottom left; -} -.content-r { - background: url(img/edge.png) repeat-y bottom right; -} -.content-br { - background: url(img/content-br.png) no-repeat bottom right; -} -.content-bl { - background: url(img/content-bl.png) no-repeat bottom left; - padding: 0.6em 1em; -} -.content input, .content select { - font-size: 1em; -} - -.content textarea { - border: 1px solid; - font-family: sans-serif; - font-size: 1em; -} -td { - vertical-align: top; -} - -table.userView { - border-collapse: collapse; - width: 100%; -} - -table.userView th { - text-align: left; -} - -ul.groupView{ - list-style: none; - font-weight: bold; -} - -ul.groupView ul{ - margin-top: 5px; - margin-bottom: 20px; - border-top: 1px solid #000; - list-style-image:url("../../out/images/usericon.gif"); - font-weight: normal; -} - -#tree-open{ - width: 25%; -} - -#tree-open ul{ - margin-left: 0px; - padding: 0; - padding-left:15px; -} - -#tree-closed{ - width: 20px; -} - -table.folderView { - border-collapse: collapse; - width: 100%; -} -table.folderView thead tr { - border-bottom: 1px solid rgb(189, 190, 192); -} -table.folderView th, table.folderView td { - padding: 0.1em 0.4em; -} -table.folderView th { - text-align: left; -} - -table.folderView td { - border-bottom: 1px solid rgb(224, 224, 224); -} - -table.folderView tr.folder { - border-bottom: 1px solid rgb(224, 224, 224); -} -table.defaultView { - border-collapse: collapse; -} -table.defaultView thead tr { - border-bottom: 1px solid rgb(189, 190, 192); -} -table.defaultView th, table.defaultView td { - padding: 0.1em 0.4em; -} -table.defaultView th { - text-align: left; -} -table.defaultView td { - border-bottom: 1px solid rgb(224, 224, 224); -} -table.defaultView td.center { - text-align: center; -} -table.defaultView tr.folder { - border-bottom: 1px solid rgb(224, 224, 224); -} -td#userImage { - border: 1px solid rgb(189, 190, 192); -} -img.userImage { - height: 72px; -} -img.mimeicon { - height: 18px; - vertical-align: middle; - border: none; -} -img.treeicon { - border: none; - padding-right: 0.1em; -} -span.selectedfoldertree{ - font-weight: bold; -} - -input.mimeicon { - height: 18px; - vertical-align: middle; - border: none; -} -ul.reviewer { - padding: 0; - margin: 0; -} -ul.reviewer li { - list-style: none; - padding: 0.1em 0em; -} - -ul.reviewer li.first { - border-top: none; -} -ul.actions { - padding: 0; - margin: 0; -} -form ul.actions li { - list-style: none; - padding: 0 0 0.1em 0; -} -ul.actions li { - list-style: none; - padding: 0 0 0.1em 0; -} - -ul.actions li img{ - padding: 3px; -} - -ul.documentDetail { - margin: 0; - padding:0; - font-size: 0.8em; - list-style: none; -} - -.cbSelectTitle { - float:left; - width: 9em; -} -.cbSelectContainer { - overflow:auto; - height: 6em; - width: 30em; - border: 1px solid #777; - margin-bottom: 3px; -} -.cbSelectContainer.empty { - height: 1em; -} -.cbSelectList { - margin:0; - padding: 0.1em; -} -.cbSelectItem { - list-style-type: none; -} - -div.pageList{ - border: 1px solid #ddd; - padding: 3px; - margin-top: 15px; - margin-bottom: 15px; -} -div.pageList span.selected{ - font-weight: bold; - color: #fff; - background-color: #7d8288; - padding: 1px; -} - -/* - * I rather foolishly decided to have the title of the page exist at the - * bottom of the containing DIV element. This means using absolute - * positioning in order to get the desired effect in a way that is consistent. - * However, this causes problems when the fonts are scaled as overlap can - * occur with other elements, leading to unclean layout (since absolute - * positioning removes the element from the document flow). My solution is to - * place an empty element in the page directly before the title that remains - * in the document flow. This fakes a margin around the title. - * I've also applied this to the login form in the global navigation section. - */ -span.absSpacerNorm { - display: block; - height: 1.4em; - line-height: 14px; - font-size: 1.2em; -} - -span.absSpacerTitle { - display: block; - min-height: 1.8em; - font-size: 1.5em; - padding-top: 0.2em; - visibility: hidden; -} - -.disclaimer { - margin-top: 1em; - padding: 3px; - text-align: center; - border: 1px solid #000; -} - -.footNote { - text-align: center; - margin-top: 1em; -} - -.warning{ - font-weight: bold; - padding:0.1em; - border: 1px solid rgb(255,0,0); -} - -.install_warning{ - margin: 20px; - padding: 10px; - background: #fa0; - color: #fff; - font-weight: bold; - font-size: 120%; -} -.error, .install_error{ - margin: 20px; - padding: 10px; - background: #f00; - color: #fff; - font-weight: bold; - font-size: 120%; -} -.legend{ - list-style: none; - border: 1px solid black; - padding: 5px; -} - -pre{ - font-size: 140%; -} - -/* these are used in help only */ - -h1{ - font-size: 140%; - font-weight: bold; - background: #7d8288; - color: #fff; - padding-left: 5px; -} - -h2{ - font-size: 110%; - font-weight: bold; - border-bottom: 1px solid #999; -} - -/* these are used in calendar */ - -table.calendaryear td.today{ - border: 1px solid #7d8288; - font-weight: bold; -} - -table.calendaryear td.header{ - font-weight: bold; - color: #444; -} - -table.calendaryear td{ - border: 1px solid #000; - padding : 10px; -} - -table.calendaryear table td{ - border: 0; - padding : 1px; -} - -table.calendarmonth , table.calendarweek { - margin-top: 1em; -} - -table.calendarmonth td, table.calendarweek td{ - border-bottom: 1px solid #ddd; - padding-left: 1em; - padding-right: 1em; -} - -table.calendarmonth td.separator, table.calendarweek td.separator{ - border: 0; - padding: 0; - margin:0; -} - -table.calendarmonth td.header, table.calendarmonth td.todayHeader, table.calendarweek td.header, table.calendarweek td.todayHeader{ - border: 1px solid #7d8288; - background: #eee; - font-weight: bold; - padding: 1px; - color: #222; - padding-left: 1em; - padding-right: 1em; - padding-bottom: 1em; -} - -table.calendarmonth td.header a, table.calendarmonth td.todayHeader a, table.calendarweek td.header a, table.calendarweek td.todayHeader a{ - color: #000; -} - - -table.calendarmonth td.today, table.calendarweek td.today{ - background: #eee; -} - -table.calendarmonth td.todayHeader, table.calendarweek td.todayHeader,table.calendarmonth td.todayHeader a, table.calendarweek td.todayHeader a{ - background: #7d8288; - color: #fff; -} - -table.calendarweek td.header, table.calendarweek td.todayHeader{ - padding-bottom: 2em; -} - -table.searchform td{ - padding-top: 5px; - padding-bottom: 10px; - padding-right: 5px; -} - -div.logview{ - overflow:auto; - font-size: 80%; -} diff --git a/styles/hc/application.js b/styles/hc/application.js deleted file mode 100644 index 2122cec18..000000000 --- a/styles/hc/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/hc/favicon.ico b/styles/hc/favicon.ico deleted file mode 100644 index e1ecd2a64..000000000 Binary files a/styles/hc/favicon.ico and /dev/null differ diff --git a/styles/hc/img/bg-global-tl.png b/styles/hc/img/bg-global-tl.png deleted file mode 100644 index 99c68e0d7..000000000 Binary files a/styles/hc/img/bg-global-tl.png and /dev/null differ diff --git a/styles/hc/img/bg-global-tr.png b/styles/hc/img/bg-global-tr.png deleted file mode 100644 index 82613fbed..000000000 Binary files a/styles/hc/img/bg-global-tr.png and /dev/null differ diff --git a/styles/hc/img/bg-global.png b/styles/hc/img/bg-global.png deleted file mode 100644 index dc7ebd41f..000000000 Binary files a/styles/hc/img/bg-global.png and /dev/null differ diff --git a/styles/hc/img/blue-gradient-48px.png b/styles/hc/img/blue-gradient-48px.png deleted file mode 100644 index f15e66937..000000000 Binary files a/styles/hc/img/blue-gradient-48px.png and /dev/null differ diff --git a/styles/hc/img/blue-gradient.png b/styles/hc/img/blue-gradient.png deleted file mode 100644 index bb1dfd82a..000000000 Binary files a/styles/hc/img/blue-gradient.png and /dev/null differ diff --git a/styles/hc/img/content-bl.png b/styles/hc/img/content-bl.png deleted file mode 100644 index 369b26081..000000000 Binary files a/styles/hc/img/content-bl.png and /dev/null differ diff --git a/styles/hc/img/content-br.png b/styles/hc/img/content-br.png deleted file mode 100644 index 60c3603e7..000000000 Binary files a/styles/hc/img/content-br.png and /dev/null differ diff --git a/styles/hc/img/content-gradient.png b/styles/hc/img/content-gradient.png deleted file mode 100644 index e3122e182..000000000 Binary files a/styles/hc/img/content-gradient.png and /dev/null differ diff --git a/styles/hc/img/edge.png b/styles/hc/img/edge.png deleted file mode 100644 index b1a4b9389..000000000 Binary files a/styles/hc/img/edge.png and /dev/null differ diff --git a/styles/hc/img/small-blue-gradient.png b/styles/hc/img/small-blue-gradient.png deleted file mode 100644 index b91f3eef7..000000000 Binary files a/styles/hc/img/small-blue-gradient.png and /dev/null differ diff --git a/styles/hc/img/small-grey-gradient.png b/styles/hc/img/small-grey-gradient.png deleted file mode 100644 index 38194f416..000000000 Binary files a/styles/hc/img/small-grey-gradient.png and /dev/null differ diff --git a/styles/hc/style.css b/styles/hc/style.css deleted file mode 100644 index 74c0dea5c..000000000 --- a/styles/hc/style.css +++ /dev/null @@ -1,482 +0,0 @@ -/* Copyright (C) 2006-2008 Malcolm Cowe -*/ -body { - font-size: 90%; - font-family: sans-serif; -} -body.login { - width: 50%; - margin-left: auto; - margin-right: auto; -} -.headingContainer { - background: #fff; - position: relative; -} -/* IE6 Hack */ -* html .headingContainer { - position: relative; -} -.localNavContainer { - padding: 2px; - margin-bottom: 0.4em; - background: #fff; - position: relative; -} -a:link { - color: rgb(0,0,100); - text-decoration: none; -} -a:visited { - color: rgb(0,0,100); - text-decoration: none; -} -a:hover { - color: rgb(255,0,0); - text-decoration: none; -} -a:active { - color: rgb(0,0,100); - text-decoration: none; -} - -.mainHeading { - padding: 2px 4px 0px 4px; - font-size: 1.5em; - font-weight: bold; - color: black; - position: absolute; - bottom: 0px; -} -/* IE6 Hack */ -* html .mainHeading { - position: relative; -} -.contentHeading { - background: #000; - color: white; - padding: 2px 4px 2px 4px; - margin-top: 10px; - font-size: 1.2em; - font-weight: bold; -} -.contentSubHeading { - font-weight: bold; - border-bottom: 1px solid; - margin-top: 1em; - margin-bottom: 2px; -} -.contentSubHeading#first { - margin-top: 0; - margin-bottom: 2px; -} - -#logo { - float:left; - margin-right: 5px; -} - -.siteName { - background: url(img/bg-global-tl.png) no-repeat top left; - padding: 2px 4px 0px 4px; - font-size: 1.8em; - font-weight: bold; - font-style: italic; - color: #fff; -} - -.siteNameLogin { - background: url(img/bg-global-tl.png) no-repeat top left; - padding: 2px 4px 0px 4px; - font-size: 3em; - font-weight: bold; - font-style: italic; - color: #fff; -} - -.globalBox { - background: url(img/bg-global.png) repeat-x top left; - position: relative; - height: 4em; -} - -/* IE6 Hack */ -* html .globalBox { - position: relative; -} - -.globalBox#noNav { - height: 4em; -} -.globalBox div#signatory { - padding-left: 55px; - position: absolute; - bottom: 1px; -} - -/* IE6 Hack */ -* html .globalBox div#signatory { - position: relative; -} - -.globalNav { - padding: 4px; - list-style-type: none; - margin: 0px; - text-align: right; - float:right; -} - -/* IE6 Hack */ -* html .globalNav { - position: relative; -} - -.globalNav li { - display: inline; - padding: 0px 4px 0px 4px; - border-left: 1px solid; - } -.globalNav li#first { - border-left: none; - padding: 0px 4px 0px 0px; -} -.globalNav li form { - display: inline; -} -.globalNav li input { - font-size: 0.8em; - border: 1px solid; - padding: 1px; -} -.globalNav li input#searchButton { - border-left:0; - padding: 0px; -} -.localNav { - padding:1px; - margin: 0px; - margin-top: 3px; - text-align: left; - list-style-type: none; - color: white; - text-transform: uppercase; -} -.localNav li { - font-size: 0.8em; - display: inline; - padding: 2px 4px 2px 4px; - border: 1px solid #000; - background-color: #fff; -} - -.globalTR { - background: url(img/bg-global-tr.png) no-repeat top right; - float: right; - width: 8px; - height: 8px; -} -.smallText { - font-size: 0.8em; -} -.contentContainer { - padding: 0px; - width: 100%; - margin: auto; -} -.content { - background: url(img/content-gradient.png) repeat-x bottom left; - background-color: white; - padding: 0; - border-top: 1px solid #e0e0e0; -} -.content-l { - background: url(img/edge.png) repeat-y bottom left; -} -.content-r { - background: url(img/edge.png) repeat-y bottom right; -} -.content-br { - background: url(img/content-br.png) no-repeat bottom right; -} -.content-bl { - background: url(img/content-bl.png) no-repeat bottom left; - padding: 0.6em 1em; -} -.content input, .content select { - font-size: 0.8em; -} - -.content textarea { - border: 1px solid; - font-family: sans-serif; - font-size: 1.0em; -} -td { - vertical-align: top; -} -table.folderView { - border-collapse: collapse; - width: 100%; -} -table.folderView thead tr { - border-bottom: 1px solid rgb(189, 190, 192); -} -table.folderView th, table.folderView td { - padding: 0.1em 0.4em; -} -table.folderView th { - text-align: left; -} -table.folderView td { - border-bottom: 1px solid rgb(224, 224, 224); -} -table.folderView td.center { - text-align: center; -} -table.folderView tr.folder { - border-bottom: 1px solid rgb(224, 224, 224); - background: #fff; -} -table.defaultView { - border-collapse: collapse; -} -table.defaultView thead tr { - border-bottom: 1px solid rgb(189, 190, 192); -} -table.defaultView th, table.defaultView td { - padding: 0.1em 0.4em; -} -table.defaultView th { - text-align: left; -} -table.defaultView td { - border-bottom: 1px solid rgb(224, 224, 224); -} -table.defaultView td.center { - text-align: center; -} -table.defaultView tr.folder { - border-bottom: 1px solid rgb(224, 224, 224); - background: #fff; -} -td#userImage { - border: 1px solid rgb(189, 190, 192); -} -img.userImage { - height: 72px; -} -img.mimeicon { - height: 18px; - vertical-align: middle; - border: none; -} -img.treeicon { - border: none; - padding-right: 0.1em; -} -input.mimeicon { - height: 18px; - vertical-align: middle; - border: none; -} -ul.reviewer { - padding: 0; - margin: 0; -} -ul.reviewer li { - list-style: none; - padding: 0.1em 0em; - border-top: 1px solid rgb(163, 184, 203); -} - -ul.reviewer li.first { - border-top: none; -} -ul.actions { - padding: 0; - margin: 0; -} -form ul.actions li { - list-style: none; - padding: 0 0 0.1em 0; - display: inline; -} -ul.actions li { - list-style: none; - padding: 0 0 0.1em 0; -} -ul.actions li.first { - border-top: none; -} -dl.documentDetail { - margin: 0; - font-size: 0.8em; -} -dl.documentDetail dt { - font-weight: bold; -} -.cbSelectTitle { - float:left; - width: 9em; -} -.cbSelectContainer { - overflow:auto; - height: 8em; - border: 1px solid; - padding: 0.2em 0; - margin: 0.2em 0; -} -.cbSelectContainer.empty { - height: 1em; -} -.cbSelectList { - padding: 0.1em; -} -.cbSelectItem { - list-style-type: none; -} - -div.pageList{ - border: 1px solid #ddd; - padding: 3px; - margin-top: 15px; - margin-bottom: 15px; -} -div.pageList span.selected{ - font-weight: bold; - color: #fff; - background-color: #000; - padding: 1px; -} - -/* - * I rather foolishly decided to have the title of the page exist at the - * bottom of the containing DIV element. This means using absolute - * positioning in order to get the desired effect in a way that is consistent. - * However, this causes problems when the fonts are scaled as overlap can - * occur with other elements, leading to unclean layout (since absolute - * positioning removes the element from the document flow). My solution is to - * place an empty element in the page directly before the title that remains - * in the document flow. This fakes a margin around the title. - * I've also applied this to the login form in the global navigation section. - */ -span.absSpacerNorm { - display: block; - height: 1.4em; - line-height: 14px; - font-size: 1.2em; -} - -span.absSpacerTitle { - display: block; - min-height: 1.8em; - font-size: 1.5em; - padding-top: 0.2em; - visibility: hidden; -} - -.disclaimer { - margin-top: 1em; - padding: 3px; - text-align: center; - border: 1px solid #000; - background: #000; - color: #fff; -} - -.footNote { - text-align: center; - margin-top: 1em; -} - -.warning{ - color: rgb(150,50,0); - font-weight: bold; - text-decoration: underline; -} - -.error{ - margin: 20px; - padding: 10px; - background: #f00; - color: #fff; - font-weight: bold; - font-size: 1.2em; -} -.legend{ - list-style: none; - border: 1px solid black; - padding: 5px; -} -/* these are used in calendar */ - -table.calendaryear td.today{ - border: 1px solid #000; - font-weight: bold; -} - -table.calendaryear td.header{ - font-weight: bold; -} - -table.calendaryear td{ - border: 1px solid #000; - padding : 10px; -} - -table.calendaryear table td{ - border: 0; - padding : 1px; -} - -table.calendarmonth , table.calendarweek { - margin-top: 1em; -} - -table.calendarmonth td, table.calendarweek td{ - border-bottom: 1px solid #ddd; - padding-left: 1em; - padding-right: 1em; -} - -table.calendarmonth td.separator, table.calendarweek td.separator{ - border: 0; - padding: 0; - margin:0; -} - -table.calendarmonth td.header, table.calendarmonth td.todayHeader, table.calendarweek td.header, table.calendarweek td.todayHeader{ - border: 1px solid #000; - background: #eee; - font-weight: bold; - padding: 1px; - color: #222; - padding-left: 1em; - padding-right: 1em; - padding-bottom: 1em; -} - -table.calendarmonth td.header a, table.calendarmonth td.todayHeader a, table.calendarweek td.header a, table.calendarweek td.todayHeader a{ - color: #000; -} - - -table.calendarmonth td.today, table.calendarweek td.today{ - background: #ddd; -} - -table.calendarmonth td.todayHeader, table.calendarweek td.todayHeader,table.calendarmonth td.todayHeader a, table.calendarweek td.todayHeader a{ - background: #000; - color: #eee; -} - -table.calendarweek td.header, table.calendarweek td.todayHeader{ - padding-bottom: 2em; -} - -table.searchform td{ - padding-top: 5px; - padding-bottom: 10px; - padding-right: 5px; -} diff --git a/styles/logo.png b/styles/logo.png deleted file mode 100644 index b662349ae..000000000 Binary files a/styles/logo.png and /dev/null differ diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index f3473a44f..272c68e7c 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']) @@ -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"; } /* }}} */ @@ -289,7 +291,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo "
\n"; echo " \n"; @@ -1229,7 +1231,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']; @@ -1248,11 +1250,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; @@ -1747,7 +1749,7 @@ $(document).ready(function() { $content = ''; $content .= '
- '; + '; $content .= $this->getModalBoxLink( array( 'target' => 'keywordChooser', @@ -1892,11 +1894,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; @@ -1963,7 +1965,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 .= ""; } @@ -1982,9 +1984,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 e4808b6f2..2a307af35 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']) @@ -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"; } /* }}} */ @@ -298,7 +300,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; function globalBanner() { /* {{{ */ echo "\n"; } /* }}} */ @@ -1128,7 +1130,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']; @@ -1147,7 +1149,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].'"'; @@ -1165,11 +1167,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; @@ -1695,7 +1697,7 @@ $(document).ready(function() { $content = ''; $content .= '
- +
'; $content .= $this->getModalBoxLink( array( @@ -1852,11 +1854,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; @@ -1923,7 +1925,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 .= ""; } @@ -1942,9 +1944,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;