cvs: pear /LiveUser_Admin/Perm Complex.php

From: Date: Sun, 09 Apr 2006 15:35:10 +0000
Subject: cvs: pear /LiveUser_Admin/Perm Complex.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-39512@lists.php.net to get a copy of this message
lsmith Sun Apr 9 15:35:10 2006 UTC Modified files: /pear/LiveUser_Admin/Perm Complex.php Log: - hierarchy overwrites implied in getRights() http://cvs.php.net/viewcvs.cgi/pear/LiveUser_Admin/Perm/Complex.php?r1=1.93&r2=1.94&diff_format=u Index: pear/LiveUser_Admin/Perm/Complex.php diff -u pear/LiveUser_Admin/Perm/Complex.php:1.93 pear/LiveUser_Admin/Perm/Complex.php:1.94 --- pear/LiveUser_Admin/Perm/Complex.php:1.93 Sun Apr 9 15:27:47 2006 +++ pear/LiveUser_Admin/Perm/Complex.php Sun Apr 9 15:35:10 2006 @@ -57,7 +57,7 @@ * @author Bjoern Kraus <krausbn@php.net> * @copyright 2002-2006 Markus Wolff * @license http://www.gnu.org/licenses/lgpl.txt - * @version CVS: $Id: Complex.php,v 1.93 2006/04/09 15:27:47 lsmith Exp $ + * @version CVS: $Id: Complex.php,v 1.94 2006/04/09 15:35:10 lsmith Exp $ * @link http://pear.php.net/LiveUser_Admin */ @@ -839,8 +839,8 @@ * 'inherited' - filter array to fetch all rughts from (sub)group membership * 'implied' - filter array for fetching implied rights - * 'hierarchy' - boolean if implied rights should be fetched - into a nested array + * 'hierarchy' - filter array for fetching implied rights + into a nested array (overwrites 'implied') * @return bool|array false on failure or array with selected data * * @access public @@ -848,8 +848,12 @@ function getRights($params = array()) { $inherited = array_key_exists('inherited', $params); - $hierarchy = array_key_exists('hierarchy', $params); - $implied = ($hierarchy || array_key_exists('implied', $params)); + if (array_key_exists('hierarchy', $params)) { + $hierarchy = $implied = true; + $params['implied'] = $params['hierarchy']; + } else { + $implied = array_key_exists('implied', $params); + } if ($inherited || $implied) { if ((!array_key_exists('rekey', $params) || !$params['rekey'])

« previous php.pear.cvs (#39512) next »