mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-29 04:57:20 +00:00
check if argument passed to setDefaultAccess() is in valid range
This commit is contained in:
parent
b5a6ea330b
commit
a0b95e8792
|
@ -752,6 +752,9 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
function setDefaultAccess($mode, $noclean="false") { /* {{{ */
|
||||
$db = $this->_dms->getDB();
|
||||
|
||||
if($mode < M_LOWEST_RIGHT || $mode > M_HIGHEST_RIGHT)
|
||||
return false;
|
||||
|
||||
$queryStr = "UPDATE `tblDocuments` set `defaultAccess` = " . (int) $mode . " WHERE `id` = " . $this->_id;
|
||||
if (!$db->getResult($queryStr))
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user