From: <var...@us...> - 2010-06-17 15:48:26
|
Revision: 7550 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7550&view=rev Author: vargenau Date: 2010-06-17 15:48:19 +0000 (Thu, 17 Jun 2010) Log Message: ----------- array_diff_assoc_recursive is not used Modified Paths: -------------- trunk/lib/PagePerm.php Modified: trunk/lib/PagePerm.php =================================================================== --- trunk/lib/PagePerm.php 2010-06-17 15:43:18 UTC (rev 7549) +++ trunk/lib/PagePerm.php 2010-06-17 15:48:19 UTC (rev 7550) @@ -334,25 +334,6 @@ return $access; } -// from php.net docs -function array_diff_assoc_recursive($array1, $array2) { - foreach ($array1 as $key => $value) { - if (is_array($value)) { - if (!is_array($array2[$key])) { - $difference[$key] = $value; - } else { - $new_diff = array_diff_assoc_recursive($value, $array2[$key]); - if ($new_diff != false) { - $difference[$key] = $new_diff; - } - } - } elseif(!isset($array2[$key]) || $array2[$key] != $value) { - $difference[$key] = $value; - } - } - return !isset($difference) ? 0 : $difference; -} - /** * The ACL object per page. It is stored in a page, but can also * be merged with ACL's from other pages or taken from the master (pseudo) dot-file. @@ -522,9 +503,6 @@ // The equal function seems to be unable to detect removed perm. // Use case is when a rule is removed. return (print_r($this->perm, true) === print_r($otherperm, true)); - -// $diff = array_diff_assoc_recursive($this->perm, $otherperm); -// return empty($diff); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |