mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 17:44:56 +00:00
- constructor of LetoDMS_[Group|User]Access requires the user/group not
its id anymore
This commit is contained in:
parent
81f4c235d5
commit
fbc6ce4c9a
|
@ -25,23 +25,20 @@
|
|||
*/
|
||||
class LetoDMS_UserAccess
|
||||
{
|
||||
var $_userID;
|
||||
var $_user;
|
||||
var $_mode;
|
||||
|
||||
function LetoDMS_UserAccess($userID, $mode)
|
||||
function LetoDMS_UserAccess($user, $mode)
|
||||
{
|
||||
$this->_userID = $userID;
|
||||
$this->_user = $user;
|
||||
$this->_mode = $mode;
|
||||
}
|
||||
|
||||
function getUserID() { return $this->_userID; }
|
||||
function getUserID() { return $this->_user->getID(); }
|
||||
|
||||
function getMode() { return $this->_mode; }
|
||||
|
||||
function getUser()
|
||||
{
|
||||
if (!isset($this->_user))
|
||||
$this->_user = getUser($this->_userID);
|
||||
function getUser() {
|
||||
return $this->_user;
|
||||
}
|
||||
}
|
||||
|
@ -49,23 +46,20 @@ class LetoDMS_UserAccess
|
|||
|
||||
class LetoDMS_GroupAccess
|
||||
{
|
||||
var $_groupID;
|
||||
var $_group;
|
||||
var $_mode;
|
||||
|
||||
function LetoDMS_GroupAccess($groupID, $mode)
|
||||
function LetoDMS_GroupAccess($group, $mode)
|
||||
{
|
||||
$this->_groupID = $groupID;
|
||||
$this->_group = $group;
|
||||
$this->_mode = $mode;
|
||||
}
|
||||
|
||||
function getGroupID() { return $this->_groupID; }
|
||||
function getGroupID() { return $this->_group->getID(); }
|
||||
|
||||
function getMode() { return $this->_mode; }
|
||||
|
||||
function getGroup()
|
||||
{
|
||||
if (!isset($this->_group))
|
||||
$this->_group = getGroup($this->_groupID);
|
||||
function getGroup() {
|
||||
return $this->_group;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -390,7 +390,7 @@ class LetoDMS_Folder {
|
|||
if (!$db->getResult($queryStr))
|
||||
return false;
|
||||
|
||||
$document = getDocument($db->getInsertID());
|
||||
$document = $this->_dms->getDocument($db->getInsertID());
|
||||
|
||||
if ($version_comment!="")
|
||||
$res = $document->addContent($version_comment, $owner, $tmpFile, $orgFileName, $fileType, $mimeType, $reviewers, $approvers,$reqversion,FALSE);
|
||||
|
@ -470,9 +470,9 @@ class LetoDMS_Folder {
|
|||
$this->_accessList[$mode] = array("groups" => array(), "users" => array());
|
||||
foreach ($resArr as $row) {
|
||||
if ($row["userID"] != -1)
|
||||
array_push($this->_accessList[$mode]["users"], new LetoDMS_UserAccess($row["userID"], $row["mode"]));
|
||||
array_push($this->_accessList[$mode]["users"], new LetoDMS_UserAccess($this->_dms->getUser($row["userID"]), $row["mode"]));
|
||||
else //if ($row["groupID"] != -1)
|
||||
array_push($this->_accessList[$mode]["groups"], new LetoDMS_GroupAccess($row["groupID"], $row["mode"]));
|
||||
array_push($this->_accessList[$mode]["groups"], new LetoDMS_GroupAccess($this->_dms->getGroup($row["groupID"]), $row["mode"]));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user