mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
Merge branch 'seeddms-4.3.x' into seeddms-5.0.x
This commit is contained in:
commit
2045060f78
|
@ -30,6 +30,7 @@
|
|||
- move some left over javascript from html code into application.js (Closes #253)
|
||||
- take out last empty line from view/bootstrap/class.Search.php which causes a
|
||||
header to be send to early (Closes: #252, #254)
|
||||
- regular users with sufficient access rights may remove documents via webdav
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 4.3.25
|
||||
|
|
|
@ -1280,7 +1280,16 @@ class SeedDMS_Core_DMS {
|
|||
if (!$res)
|
||||
return false;
|
||||
|
||||
return $this->getUser($this->db->getInsertID());
|
||||
$user = $this->getUser($this->db->getInsertID());
|
||||
|
||||
/* Check if 'onPostAddUser' callback is set */
|
||||
if(isset($this->_dms->callbacks['onPostAddUser'])) {
|
||||
$callback = $this->_dms->callbacks['onPostUser'];
|
||||
if(!call_user_func($callback[0], $callback[1], $user)) {
|
||||
}
|
||||
}
|
||||
|
||||
return $user;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
|
@ -1332,7 +1341,16 @@ class SeedDMS_Core_DMS {
|
|||
if (!$this->db->getResult($queryStr))
|
||||
return false;
|
||||
|
||||
return $this->getGroup($this->db->getInsertID());
|
||||
$group = $this->getGroup($this->db->getInsertID());
|
||||
|
||||
/* Check if 'onPostAddGroup' callback is set */
|
||||
if(isset($this->_dms->callbacks['onPostAddGroup'])) {
|
||||
$callback = $this->_dms->callbacks['onPostAddGroup'];
|
||||
if(!call_user_func($callback[0], $callback[1], $group)) {
|
||||
}
|
||||
}
|
||||
|
||||
return $group;
|
||||
} /* }}} */
|
||||
|
||||
function getKeywordCategory($id) { /* {{{ */
|
||||
|
@ -1411,7 +1429,16 @@ class SeedDMS_Core_DMS {
|
|||
if (!$this->db->getResult($queryStr))
|
||||
return false;
|
||||
|
||||
return $this->getKeywordCategory($this->db->getInsertID());
|
||||
$category = $this->getKeywordCategory($this->db->getInsertID());
|
||||
|
||||
/* Check if 'onPostAddKeywordCategory' callback is set */
|
||||
if(isset($this->_dms->callbacks['onPostAddKeywordCategory'])) {
|
||||
$callback = $this->_dms->callbacks['onPostAddKeywordCategory'];
|
||||
if(!call_user_func($callback[0], $callback[1], $category)) {
|
||||
}
|
||||
}
|
||||
|
||||
return $category;
|
||||
} /* }}} */
|
||||
|
||||
function getDocumentCategory($id) { /* {{{ */
|
||||
|
@ -1477,7 +1504,16 @@ class SeedDMS_Core_DMS {
|
|||
if (!$this->db->getResult($queryStr))
|
||||
return false;
|
||||
|
||||
return $this->getDocumentCategory($this->db->getInsertID());
|
||||
$category = $this->getDocumentCategory($this->db->getInsertID());
|
||||
|
||||
/* Check if 'onPostAddDocumentCategory' callback is set */
|
||||
if(isset($this->_dms->callbacks['onPostAddDocumentCategory'])) {
|
||||
$callback = $this->_dms->callbacks['onPostAddDocumentCategory'];
|
||||
if(!call_user_func($callback[0], $callback[1], $category)) {
|
||||
}
|
||||
}
|
||||
|
||||
return $category;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
|
|
|
@ -1828,7 +1828,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
|
||||
$db->startTransaction();
|
||||
|
||||
// FIXME: call a new function removeContent instead
|
||||
// remove content of document
|
||||
foreach ($this->_content as $version) {
|
||||
if (!$this->removeContent($version)) {
|
||||
$db->rollbackTransaction();
|
||||
|
|
|
@ -531,6 +531,14 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
|
|||
}
|
||||
|
||||
$db->commitTransaction();
|
||||
|
||||
/* Check if 'onPostAddSubFolder' callback is set */
|
||||
if(isset($this->_dms->callbacks['onPostAddSubFolder'])) {
|
||||
$callback = $this->_dms->callbacks['onPostAddSubFolder'];
|
||||
if(!call_user_func($callback[0], $callback[1], $newFolder)) {
|
||||
}
|
||||
}
|
||||
|
||||
return $newFolder;
|
||||
} /* }}} */
|
||||
|
||||
|
@ -841,6 +849,14 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
|
|||
}
|
||||
|
||||
$db->commitTransaction();
|
||||
|
||||
/* Check if 'onPostAddDocument' callback is set */
|
||||
if(isset($this->_dms->callbacks['onPostAddDocument'])) {
|
||||
$callback = $this->_dms->callbacks['onPostAddDocument'];
|
||||
if(!call_user_func($callback[0], $callback[1], $document)) {
|
||||
}
|
||||
}
|
||||
|
||||
return array($document, $res);
|
||||
} /* }}} */
|
||||
|
||||
|
@ -856,6 +872,14 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
|
|||
protected function removeFromDatabase() { /* {{{ */
|
||||
$db = $this->_dms->getDB();
|
||||
|
||||
/* Check if 'onPreRemoveFolder' callback is set */
|
||||
if(isset($this->_dms->callbacks['onPreRemoveFolder'])) {
|
||||
$callback = $this->_dms->callbacks['onPreRemoveFolder'];
|
||||
if(!call_user_func($callback[0], $callback[1], $this)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$db->startTransaction();
|
||||
// unset homefolder as it will no longer exist
|
||||
$queryStr = "UPDATE tblUsers SET homefolder=NULL WHERE homefolder = " . $this->_id;
|
||||
|
@ -863,6 +887,7 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
|
|||
$db->rollbackTransaction();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Remove database entries
|
||||
$queryStr = "DELETE FROM tblFolders WHERE id = " . $this->_id;
|
||||
if (!$db->getResult($queryStr)) {
|
||||
|
@ -887,6 +912,13 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
|
|||
}
|
||||
$db->commitTransaction();
|
||||
|
||||
/* Check if 'onPostRemoveFolder' callback is set */
|
||||
if(isset($this->_dms->callbacks['onPostRemoveFolder'])) {
|
||||
$callback = $this->_dms->callbacks['onPostRemoveFolder'];
|
||||
if(!call_user_func($callback[0], $callback[1], $this->_id)) {
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} /* }}} */
|
||||
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
<email>uwe@steinmann.cx</email>
|
||||
<active>yes</active>
|
||||
</lead>
|
||||
<date>2016-03-09</date>
|
||||
<time>14:34:58</time>
|
||||
<date>2016-04-04</date>
|
||||
<time>08:56:33</time>
|
||||
<version>
|
||||
<release>5.0.2</release>
|
||||
<api>5.0.2</api>
|
||||
<release>5.0.3</release>
|
||||
<api>5.0.3</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
|
@ -24,10 +24,7 @@
|
|||
</stability>
|
||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||
<notes>
|
||||
- all changes from 4.3.25 merged
|
||||
- rename SeedDMS_Core_Group::getNotificationsByGroup() to getNotifications()
|
||||
- use __construct() for all constructors
|
||||
- fix setting multi value attributes for versions
|
||||
- all changes from 4.3.26 merged
|
||||
</notes>
|
||||
<contents>
|
||||
<dir baseinstalldir="SeedDMS" name="/">
|
||||
|
@ -1010,6 +1007,24 @@ SeedDMS_Core_DMS::getNotificationsByUser() are deprecated
|
|||
- SeedDMS_Core_User::getDocumentsLocked() sets locking user propperly
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
<date>2016-03-08</date>
|
||||
<time>07:12:53</time>
|
||||
<version>
|
||||
<release>4.3.25</release>
|
||||
<api>4.3.25</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
<api>stable</api>
|
||||
</stability>
|
||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||
<notes>
|
||||
- rename SeedDMS_Core_Group::getNotificationsByGroup() to getNotifications()
|
||||
- use __construct() for all constructors
|
||||
- fix setting multi value attributes for versions
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
<date>2016-01-22</date>
|
||||
<time>14:34:58</time>
|
||||
|
|
|
@ -668,9 +668,11 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
|||
} else {
|
||||
// check if user is admin
|
||||
// only admins may delete documents
|
||||
/* There is not reason to allow only admins to remove a document
|
||||
if(!$this->user->isAdmin()) {
|
||||
return "403 Forbidden";
|
||||
}
|
||||
*/
|
||||
|
||||
if(!$obj->remove()) {
|
||||
return "409 Conflict";
|
||||
|
|
Loading…
Reference in New Issue
Block a user