Merge branch 'seeddms-4.3.x' into seeddms-5.0.x

This commit is contained in:
Uwe Steinmann 2017-03-23 17:43:39 +01:00
commit a001d32854
9 changed files with 105 additions and 14 deletions

View File

@ -1,3 +1,8 @@
--------------------------------------------------------------------------------
Changes in version 5.0.12
--------------------------------------------------------------------------------
- merged changes from 4.3.35
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Changes in version 5.0.11 Changes in version 5.0.11
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -76,6 +81,12 @@
- add .xml to online file types by default - add .xml to online file types by default
- add home folder for users - add home folder for users
--------------------------------------------------------------------------------
Changes in version 4.3.35
--------------------------------------------------------------------------------
- fix authentication in webdav.php (Closes #250)
- update last access time only once a minute
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Changes in version 4.3.34 Changes in version 4.3.34
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
VERSION=5.0.11 VERSION=5.0.12
SRC=CHANGELOG inc conf utils index.php languages views op out controllers doc styles TODO LICENSE webdav install restapi pdfviewer SRC=CHANGELOG inc conf utils index.php languages views op out controllers doc styles TODO LICENSE webdav install restapi pdfviewer
# webapp # webapp

View File

@ -344,7 +344,7 @@ class SeedDMS_Core_DMS {
$this->callbacks = array(); $this->callbacks = array();
$this->version = '@package_version@'; $this->version = '@package_version@';
if($this->version[0] == '@') if($this->version[0] == '@')
$this->version = '5.0.11'; $this->version = '5.0.12';
} /* }}} */ } /* }}} */
/** /**

View File

@ -38,7 +38,7 @@ class SeedDMS_Core_DatabaseAccess {
protected $_hostname; protected $_hostname;
/** /**
* @var int port number of database * @var int port number of database
*/ */
protected $_port; protected $_port;
@ -91,7 +91,17 @@ class SeedDMS_Core_DatabaseAccess {
* @var boolean set to true if in a database transaction * @var boolean set to true if in a database transaction
*/ */
private $_intransaction; private $_intransaction;
/**
* @var string set a valid file name for logging all sql queries
*/
private $_logfile;
/**
* @var resource file pointer of log file
*/
private $_logfp;
/** /**
* Return list of all database tables * Return list of all database tables
* *
@ -139,6 +149,13 @@ class SeedDMS_Core_DatabaseAccess {
$this->_user = $user; $this->_user = $user;
$this->_passw = $passw; $this->_passw = $passw;
$this->_connected = false; $this->_connected = false;
$this->_logfile = '';
if($this->_logfile) {
$this->_logfp = fopen($this->_logfile, 'a+');
if($this->_logfp)
fwrite($this->_logfp, microtime()." BEGIN ------------------------------------------\n");
} else
$this->_logfp = null;
// $tt*****id is a hack to ensure that we do not try to create the // $tt*****id is a hack to ensure that we do not try to create the
// temporary table twice during a single connection. Can be fixed by // temporary table twice during a single connection. Can be fixed by
// using Views (MySQL 5.0 onward) instead of temporary tables. // using Views (MySQL 5.0 onward) instead of temporary tables.
@ -154,6 +171,24 @@ class SeedDMS_Core_DatabaseAccess {
$this->_debug = false; $this->_debug = false;
} /* }}} */ } /* }}} */
/**
* Constructor of SeedDMS_Core_DatabaseAccess
*
* Sets all database parameters but does not connect.
*
* @param string $driver the database type e.g. mysql, sqlite
* @param string $hostname host of database server
* @param string $user name of user having access to database
* @param string $passw password of user
* @param string $database name of database
*/
function __destruct() { /* {{{ */
if($this->_logfp) {
fwrite($this->_logfp, microtime()." END --------------------------------------------\n");
fclose($this->_logfp);
}
} /* }}} */
/** /**
* Connect to database * Connect to database
* *
@ -233,7 +268,10 @@ class SeedDMS_Core_DatabaseAccess {
*/ */
function getResultArray($queryStr) { /* {{{ */ function getResultArray($queryStr) { /* {{{ */
$resArr = array(); $resArr = array();
if($this->_logfp) {
fwrite($this->_logfp, microtime()." ".$queryStr."\n");
}
$res = $this->_conn->query($queryStr); $res = $this->_conn->query($queryStr);
if ($res === false) { if ($res === false) {
if($this->_debug) if($this->_debug)
@ -256,6 +294,9 @@ class SeedDMS_Core_DatabaseAccess {
* @return boolean true if query could be executed otherwise false * @return boolean true if query could be executed otherwise false
*/ */
function getResult($queryStr, $silent=false) { /* {{{ */ function getResult($queryStr, $silent=false) { /* {{{ */
if($this->_logfp) {
fwrite($this->_logfp, microtime()." ".$queryStr."\n");
}
$res = $this->_conn->exec($queryStr); $res = $this->_conn->exec($queryStr);
if($res === false) { if($res === false) {
if($this->_debug) if($this->_debug)
@ -263,7 +304,7 @@ class SeedDMS_Core_DatabaseAccess {
return false; return false;
} else } else
return true; return true;
return $res; return $res;
} /* }}} */ } /* }}} */

View File

@ -12,11 +12,11 @@
<email>uwe@steinmann.cx</email> <email>uwe@steinmann.cx</email>
<active>yes</active> <active>yes</active>
</lead> </lead>
<date>2017-02-28</date> <date>2017-03-23</date>
<time>07:07:02</time> <time>07:07:02</time>
<version> <version>
<release>5.0.11</release> <release>5.0.12</release>
<api>5.0.11</api> <api>5.0.12</api>
</version> </version>
<stability> <stability>
<release>stable</release> <release>stable</release>
@ -24,7 +24,6 @@
</stability> </stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license> <license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes> <notes>
SeedDMS_Core_DMS::getDuplicateDocumentContent() returns complete document
</notes> </notes>
<contents> <contents>
<dir baseinstalldir="SeedDMS" name="/"> <dir baseinstalldir="SeedDMS" name="/">
@ -1179,6 +1178,22 @@ SeedDMS_Core_DMS::getNotificationsByUser() are deprecated
</stability> </stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license> <license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes> <notes>
SeedDMS_Core_DMS::getDuplicateDocumentContent() returns complete document
</notes>
</release>
<release>
<date>2017-03-23</date>
<time>06:38:12</time>
<version>
<release>4.3.35</release>
<api>4.3.35</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes>
</notes> </notes>
</release> </release>
<release> <release>
@ -1343,5 +1358,21 @@ SeedDMS_Core_DMS::getNotificationsByUser() are deprecated
- all changes from 4.3.33 merged - all changes from 4.3.33 merged
</notes> </notes>
</release> </release>
<release>
<date>2017-02-28</date>
<time>07:07:02</time>
<version>
<release>5.0.11</release>
<api>5.0.11</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes>
- all changes from 4.3.34 merged
</notes>
<release>
</changelog> </changelog>
</package> </package>

View File

@ -70,7 +70,8 @@ if (!isset($_COOKIE["mydms_session"])) {
} }
/* Update last access time */ /* Update last access time */
$session->updateAccess($dms_session); if((int)$resArr['lastAccess']+60 < time())
$session->updateAccess($dms_session);
/* Load user data */ /* Load user data */
$user = $dms->getUser($resArr["userID"]); $user = $dms->getUser($resArr["userID"]);

View File

@ -20,7 +20,7 @@
class SeedDMS_Version { class SeedDMS_Version {
public $_number = "5.0.11"; public $_number = "5.0.12";
private $_string = "SeedDMS"; private $_string = "SeedDMS";
function __construct() { function __construct() {

View File

@ -118,7 +118,7 @@ function fileExistsInIncludePath($file) { /* {{{ */
* Load default settings + set * Load default settings + set
*/ */
define("SEEDDMS_INSTALL", "on"); define("SEEDDMS_INSTALL", "on");
define("SEEDDMS_VERSION", "5.0.11"); define("SEEDDMS_VERSION", "5.0.12");
require_once('../inc/inc.ClassSettings.php'); require_once('../inc/inc.ClassSettings.php');

View File

@ -138,7 +138,14 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
if(!$userobj) if(!$userobj)
return false; return false;
if(md5($pass) != $userobj->getPwd())
if(($userobj->getID() == $settings->_guestID) && (!$settings->_enableGuestLogin))
return false;
if($userobj->isDisabled())
return false;
if($userobj->isAdmin() && ($_SERVER['REMOTE_ADDR'] != $settings->_adminIP ) && ( $settings->_adminIP != ""))
return false; return false;
$this->user = $userobj; $this->user = $userobj;