diff --git a/CHANGELOG b/CHANGELOG index 88a9ddab1..65465dbeb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -163,8 +163,12 @@ -------------------------------------------------------------------------------- Changes in version 4.3.36 -------------------------------------------------------------------------------- +- mark disabled users in user list and substitute user list +- if expandFolderTree is set to hidden the tree actually is hidden (partially + closes #312) - fix sql statement for creating temp. tables (sqlite) - remove empty lines at end of view/bootstrap/class.*.php files (Closes #329) +- make sure contentDir ends with DIRECTORY_SEPARATOR (Closes #323) -------------------------------------------------------------------------------- Changes in version 4.3.35 diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 4745459be..b7af5ab83 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -475,6 +475,8 @@ class Settings { /* {{{ */ $this->_rootDir = strval($tab["rootDir"]); $this->_httpRoot = strval($tab["httpRoot"]); $this->_contentDir = strval($tab["contentDir"]); + if(substr($this->_contentDir, -1, 1) != DIRECTORY_SEPARATOR) + $this->_contentDir .= DIRECTORY_SEPARATOR; $this->_cacheDir = strval($tab["cacheDir"]); $this->_stagingDir = strval($tab["stagingDir"]); $this->_luceneDir = strval($tab["luceneDir"]); diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php index 436de5b48..10c4bbc11 100644 --- a/inc/inc.Utils.php +++ b/inc/inc.Utils.php @@ -122,7 +122,7 @@ function cmpVersion($ver1, $ver2) { // $string = str_replace("/*", "", $string); // $string = str_replace("*/", "", $string); // $string = str_replace("\"", """, $string); -// +// // return $string; //} @@ -184,48 +184,48 @@ function mydmsDecodeString($string) { /* {{{ */ function createVersionigFile($document) { /* {{{ */ global $settings, $dms; - + // if directory has been removed recreate it if (!file_exists($dms->contentDir . $document->getDir())) if (!SeedDMS_Core_File::makeDir($dms->contentDir . $document->getDir())) return false; - + $handle = fopen($dms->contentDir . $document->getDir() .$settings-> _versioningFileName , "wb"); - + if (is_bool($handle)&&!$handle) return false; - + $tmp = $document->getName()." (ID ".$document->getID().")\n\n"; fwrite($handle, $tmp); $owner = $document->getOwner(); $tmp = getMLText("owner")." = ".$owner->getFullName()." <".$owner->getEmail().">\n"; fwrite($handle, $tmp); - + $tmp = getMLText("creation_date")." = ".getLongReadableDate($document->getDate())."\n"; fwrite($handle, $tmp); - + $latestContent = $document->getLatestContent(); $tmp = "\n### ".getMLText("current_version")." ###\n\n"; fwrite($handle, $tmp); - + $tmp = getMLText("version")." = ".$latestContent->getVersion()."\n"; - fwrite($handle, $tmp); - + fwrite($handle, $tmp); + $tmp = getMLText("file")." = ".$latestContent->getOriginalFileName()." (".$latestContent->getMimeType().")\n"; fwrite($handle, $tmp); - + $tmp = getMLText("comment")." = ". $latestContent->getComment()."\n"; fwrite($handle, $tmp); - + $status = $latestContent->getStatus(); $tmp = getMLText("status")." = ".getOverallStatusText($status["status"])."\n"; fwrite($handle, $tmp); - + $reviewStatus = $latestContent->getReviewStatus(); $tmp = "\n### ".getMLText("reviewers")." ###\n"; fwrite($handle, $tmp); - + foreach ($reviewStatus as $r) { - + switch ($r["type"]) { case 0: // Reviewer is an individual. $required = $dms->getUser($r["required"]); @@ -241,25 +241,25 @@ function createVersionigFile($document) { /* {{{ */ $tmp = "\n".$reqName."\n"; fwrite($handle, $tmp); - + $tmp = getMLText("status")." = ".getReviewStatusText($r["status"])."\n"; fwrite($handle, $tmp); - + $tmp = getMLText("comment")." = ". $r["comment"]."\n"; fwrite($handle, $tmp); - + $tmp = getMLText("last_update")." = ".$r["date"]."\n"; fwrite($handle, $tmp); } - - + + $approvalStatus = $latestContent->getApprovalStatus(); $tmp = "\n### ".getMLText("approvers")." ###\n"; fwrite($handle, $tmp); foreach ($approvalStatus as $r) { - + switch ($r["type"]) { case 0: // Reviewer is an individual. $required = $dms->getUser($r["required"]); @@ -275,42 +275,42 @@ function createVersionigFile($document) { /* {{{ */ $tmp = "\n".$reqName."\n"; fwrite($handle, $tmp); - + $tmp = getMLText("status")." = ".getApprovalStatusText($r["status"])."\n"; fwrite($handle, $tmp); - + $tmp = getMLText("comment")." = ". $r["comment"]."\n"; fwrite($handle, $tmp); - + $tmp = getMLText("last_update")." = ".$r["date"]."\n"; fwrite($handle, $tmp); - + } - $versions = $document->getContent(); + $versions = $document->getContent(); $tmp = "\n### ".getMLText("previous_versions")." ###\n"; fwrite($handle, $tmp); for ($i = count($versions)-2; $i >= 0; $i--){ - + $version = $versions[$i]; - $status = $version->getStatus(); - + $status = $version->getStatus(); + $tmp = "\n".getMLText("version")." = ".$version->getVersion()."\n"; - fwrite($handle, $tmp); - + fwrite($handle, $tmp); + $tmp = getMLText("file")." = ".$version->getOriginalFileName()." (".$version->getMimeType().")\n"; fwrite($handle, $tmp); - + $tmp = getMLText("comment")." = ". $version->getComment()."\n"; fwrite($handle, $tmp); - + $status = $latestContent->getStatus(); $tmp = getMLText("status")." = ".getOverallStatusText($status["status"])."\n"; fwrite($handle, $tmp); - + } - + fclose($handle); return true; } /* }}} */ @@ -388,13 +388,13 @@ function add_log_line($msg="", $priority=null) { /* {{{ */ function _add_log_line($msg="") { /* {{{ */ global $settings,$user; - + if ($settings->_logFileEnable!=TRUE) return; if ($settings->_logFileRotation=="h") $logname=date("YmdH", time()); else if ($settings->_logFileRotation=="d") $logname=date("Ymd", time()); else $logname=date("Ym", time()); - + if($h = fopen($settings->_contentDir.$logname.".log", "a")) { fwrite($h,date("Y/m/d H:i", time())." ".$user->getLogin()." (".$_SERVER['REMOTE_ADDR'].") ".basename($_SERVER["REQUEST_URI"], ".php").$msg."\n"); fclose($h); @@ -419,13 +419,13 @@ function _add_log_line($msg="") { /* {{{ */ return $txtpath; } /* }}} */ - + function showtree() { /* {{{ */ global $settings; - + if (isset($_GET["showtree"])) return intval($_GET["showtree"]); - else if ($settings->_enableFolderTree==0) return 0; - + else if ($settings->_expandFolderTree==0) return 0; + return 1; } /* }}} */ @@ -458,7 +458,7 @@ function createFormKey($formid='') { /* {{{ */ * @return string input field for html formular */ function createHiddenFieldWithKey($formid='') { /* {{{ */ - return ''; + return ''; } /* }}} */ /** @@ -482,7 +482,7 @@ function checkFormKey($formid='', $method='POST') { /* {{{ */ if(isset($_POST['formtoken']) && $_POST['formtoken'] == createFormKey($formid)) return true; } - + return false; } /* }}} */ diff --git a/views/bootstrap/class.SubstituteUser.php b/views/bootstrap/class.SubstituteUser.php index 877b95787..584a721f9 100644 --- a/views/bootstrap/class.SubstituteUser.php +++ b/views/bootstrap/class.SubstituteUser.php @@ -45,7 +45,6 @@ class SeedDMS_View_SubstituteUser extends SeedDMS_Bootstrap_Style { $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); $this->contentHeading(getMLText("substitute_user")); - $this->contentContainerStart(); ?> @@ -54,7 +53,7 @@ class SeedDMS_View_SubstituteUser extends SeedDMS_Bootstrap_Style { "; + echo "isDisabled() ? " class=\"error\"" : "").">"; echo ""; echo "
"; echo htmlspecialchars($currUser->getFullName())." (".htmlspecialchars($currUser->getLogin()).")
"; echo "".htmlspecialchars($currUser->getComment()).""; @@ -97,7 +96,6 @@ class SeedDMS_View_SubstituteUser extends SeedDMS_Bootstrap_Style { } echo "
"; - $this->contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); diff --git a/views/bootstrap/class.UserList.php b/views/bootstrap/class.UserList.php index ab47e1d73..263922b07 100644 --- a/views/bootstrap/class.UserList.php +++ b/views/bootstrap/class.UserList.php @@ -44,7 +44,6 @@ class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style { $this->contentStart(); $this->pageNavigation("", "admin_tools"); $this->contentHeading(getMLText("user_list")); - $this->contentContainerStart(); $sessionmgr = new SeedDMS_SessionMgr($dms->getDB()); ?> @@ -53,7 +52,7 @@ class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style { "; + echo "isDisabled() ? " class=\"error\"" : "").">"; echo ""; if ($currUser->hasImage()) print "html_url('UserImage', array('userid'=>$currUser->getId()))."\" >"; @@ -116,7 +115,6 @@ class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style { } echo ""; - $this->contentContainerEnd(); $this->contentEnd(); $this->htmlEndPage(); } /* }}} */