diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 25834e267..e0433bad0 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -334,61 +334,6 @@ class SeedDMS_Core_DMS { return $tmp; } /* }}} */ - /** - * Merge access lists - * - * Merges two access lists. Objects of the second list will override objects - * in the first list. - * - * @param array $first list of access rights as returned by - * SeedDMS_Core_Document:: getAccessList() or SeedDMS_Core_Folder::getAccessList() - * @param array $secont list of access rights - * @return array merged list - */ - static function mergeAccessLists($first, $second) { /* {{{ */ - if($first && !$second) - return $first; - if(!$first && $second) - return $second; - - $tmp = array('users'=>array(), 'groups'=>array()); - if(!isset($first['users']) || !isset($first['groups']) || - !isset($second['users']) || !isset($second['groups'])) - return false; - - foreach ($first['users'] as $f) { - $new = $f; - foreach ($second['users'] as $i=>$s) { - if($f->getUserID() == $s->getUserID()) { - $new = $s; - unset($second['users'][$i]); - break; - } - } - array_push($tmp['users'], $new); - } - foreach ($seconf['users'] as $f) { - array_push($tmp['users'], $f); - } - - foreach ($first['groups'] as $f) { - $new = $f; - foreach ($second['groups'] as $i=>$s) { - if($f->getGroupID() == $s->getGroupID()) { - $new = $s; - unset($second['groups'][$i]); - break; - } - } - array_push($tmp['groups'], $new); - } - foreach ($second['groups'] as $f) { - array_push($tmp['groups'], $f); - } - - return $tmp; - } /* }}} */ - /** * Create a new instance of the dms *