mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-12 01:54:57 +00:00
add optional parameter cleasAccessList()
will turn off removal of notification
This commit is contained in:
parent
9643c12429
commit
905bc9c140
|
@ -936,9 +936,10 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
||||||
/**
|
/**
|
||||||
* Delete all entries for this document from the access control list
|
* Delete all entries for this document from the access control list
|
||||||
*
|
*
|
||||||
|
* @param boolean $noclean set to true if notifier list shall not be clean up
|
||||||
* @return boolean true if operation was successful otherwise false
|
* @return boolean true if operation was successful otherwise false
|
||||||
*/
|
*/
|
||||||
function clearAccessList() { /* {{{ */
|
function clearAccessList($noclean=false) { /* {{{ */
|
||||||
$db = $this->_dms->getDB();
|
$db = $this->_dms->getDB();
|
||||||
|
|
||||||
$queryStr = "DELETE FROM tblACLs WHERE targetType = " . T_DOCUMENT . " AND target = " . $this->_id;
|
$queryStr = "DELETE FROM tblACLs WHERE targetType = " . T_DOCUMENT . " AND target = " . $this->_id;
|
||||||
|
@ -946,6 +947,10 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
unset($this->_accessList);
|
unset($this->_accessList);
|
||||||
|
|
||||||
|
if(!$noclean)
|
||||||
|
self::cleanNotifyList();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
|
|
@ -955,9 +955,10 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
|
||||||
/**
|
/**
|
||||||
* Delete all entries for this folder from the access control list
|
* Delete all entries for this folder from the access control list
|
||||||
*
|
*
|
||||||
|
* @param boolean $noclean set to true if notifier list shall not be clean up
|
||||||
* @return boolean true if operation was successful otherwise false
|
* @return boolean true if operation was successful otherwise false
|
||||||
*/
|
*/
|
||||||
function clearAccessList() { /* {{{ */
|
function clearAccessList($noclean=false) { /* {{{ */
|
||||||
$db = $this->_dms->getDB();
|
$db = $this->_dms->getDB();
|
||||||
|
|
||||||
$queryStr = "DELETE FROM tblACLs WHERE targetType = " . T_FOLDER . " AND target = " . $this->_id;
|
$queryStr = "DELETE FROM tblACLs WHERE targetType = " . T_FOLDER . " AND target = " . $this->_id;
|
||||||
|
@ -965,6 +966,10 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
unset($this->_accessList);
|
unset($this->_accessList);
|
||||||
|
|
||||||
|
if(!$noclean)
|
||||||
|
self::cleanNotifyList();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user