Merge branch 'seeddms-4.3.5' into develop

This commit is contained in:
Uwe Steinmann 2014-03-06 11:42:09 +01:00
commit 4f31a040b6
3 changed files with 64 additions and 47 deletions

View File

@ -5,7 +5,9 @@
- fix ordering by sequence in folder listing - fix ordering by sequence in folder listing
- list mandatory approvers/reviewers without access on document - list mandatory approvers/reviewers without access on document
- login failures will actually increment the failure counter of the user - login failures will actually increment the failure counter of the user
- fix runtime error when doing operations on root folder (Bug #128) - fix error when doing operations on root folder and notification is
turned on (Bug #128)
- renew session timeout on each click unless cookie lifetime is set to 0
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Changes in version 4.3.4 Changes in version 4.3.4

View File

@ -93,4 +93,10 @@ if (!$user->isAdmin()) {
} }
} }
} }
/* Update cookie lifetime */
if($settings->_cookieLifetime) {
$lifetime = time() + intval($settings->_cookieLifetime);
setcookie("mydms_session", $dms_session, $lifetime, $settings->_httpRoot, null, null, true);
}
?> ?>

View File

@ -48,12 +48,11 @@ if (isset($_COOKIE["mydms_session"])) {
$user = $dms->getUser($resArr["su"]); $user = $dms->getUser($resArr["su"]);
} }
} }
include $settings->_rootDir . "languages/" . $resArr["language"] . "/lang.inc";
} else { } else {
$user = null; $user = null;
} }
include $settings->_rootDir . "languages/" . $resArr["language"] . "/lang.inc";
$command = $_REQUEST["command"]; $command = $_REQUEST["command"];
switch($command) { switch($command) {
case 'checkpwstrength': case 'checkpwstrength':
@ -75,6 +74,12 @@ switch($command) {
} }
break; break;
case 'sessioninfo': /* {{{ */
if($user) {
echo json_encode($resArr);
}
break; /* }}} */
case 'searchdocument': /* {{{ */ case 'searchdocument': /* {{{ */
if($user) { if($user) {
$query = $_GET['query']; $query = $_GET['query'];
@ -108,6 +113,7 @@ switch($command) {
break; /* }}} */ break; /* }}} */
case 'subtree': /* {{{ */ case 'subtree': /* {{{ */
if($user) {
if(empty($_GET['node'])) if(empty($_GET['node']))
$nodeid = $settings->_rootFolderID; $nodeid = $settings->_rootFolderID;
else else
@ -140,9 +146,11 @@ switch($command) {
echo json_encode($tree); echo json_encode($tree);
// echo json_encode(array(array('label'=>'test1', 'id'=>1, 'load_on_demand'=> true), array('label'=>'test2', 'id'=>2, 'load_on_demand'=> true))); // echo json_encode(array(array('label'=>'test1', 'id'=>1, 'load_on_demand'=> true), array('label'=>'test2', 'id'=>2, 'load_on_demand'=> true)));
}
break; /* }}} */ break; /* }}} */
case 'addtoclipboard': /* {{{ */ case 'addtoclipboard': /* {{{ */
if($user) {
if (isset($_GET["id"]) && is_numeric($_GET["id"]) && isset($_GET['type'])) { if (isset($_GET["id"]) && is_numeric($_GET["id"]) && isset($_GET['type'])) {
switch($_GET['type']) { switch($_GET['type']) {
case "folder": case "folder":
@ -161,6 +169,7 @@ switch($command) {
echo json_encode($content); echo json_encode($content);
} else { } else {
} }
}
break; /* }}} */ break; /* }}} */
case 'testmail': /* {{{ */ case 'testmail': /* {{{ */