cvs: pear /LiveUser_Admin/Perm Complex.php

From: Date: Wed, 19 Jan 2005 00:03:13 +0000
Subject: cvs: pear /LiveUser_Admin/Perm Complex.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-28674@lists.php.net to get a copy of this message
dufuz Tue Jan 18 19:03:13 2005 EDT Modified files: /pear/LiveUser_Admin/Perm Complex.php Log: add selectable table, add function _getImliedRight and use it in implyRight, small fix to getGroups http://cvs.php.net/diff.php/pear/LiveUser_Admin/Perm/Complex.php?r1=1.40&r2=1.41&ty=u Index: pear/LiveUser_Admin/Perm/Complex.php diff -u pear/LiveUser_Admin/Perm/Complex.php:1.40 pear/LiveUser_Admin/Perm/Complex.php:1.41 --- pear/LiveUser_Admin/Perm/Complex.php:1.40 Tue Jan 18 16:27:45 2005 +++ pear/LiveUser_Admin/Perm/Complex.php Tue Jan 18 19:03:13 2005 @@ -36,7 +36,7 @@ * @author Christian Dickmann <dickmann@php.net> * @author Markus Wolff <wolff@21st.de> * @author Matt Scifo <mscifo@php.net> - * @version $Id: Complex.php,v 1.40 2005/01/18 21:27:45 dufuz Exp $ + * @version $Id: Complex.php,v 1.41 2005/01/19 00:03:13 dufuz Exp $ * @package LiveUser */ class LiveUser_Admin_Perm_Complex extends LiveUser_Admin_Perm_Medium @@ -52,6 +52,7 @@ { $this->selectable_tables['getRights'][] = 'right_implied'; $this->selectable_tables['getAreas'][] = 'area_admin_areas'; + $this->selectable_tables['getGroups'][] = 'group_subgroups'; $this->LiveUser_Admin_Perm_Medium($confArray); } @@ -147,7 +148,7 @@ ) ); - $result = $this->getRights($params); + $result = $this->_getImpliedRight($params); if ($result === false) { return false; } @@ -385,7 +386,7 @@ /** * * - * @access public + * @access private * @param array $params * @return */ @@ -399,6 +400,22 @@ } /** + * + * + * @access private + * @param array $params + * @return + */ + function _getImpliedRight($params = array()) + { + $selectable_tables = array('right_implied'); + $root_table = 'right_implied'; + + $data = $this->_makeGet($params, $root_table, $selectable_tables); + return $data; + } + + /** * Removes groups, can remove subgroups recursively if * option revursive is passed on as true. * @@ -542,7 +559,7 @@ ), 'select' => 'one' ); - $result = parent::getGroups($params, array('group_subgroups'), 'group_subgroups'); + $result = $this->_getSubGroups($params); return $result; } @@ -558,13 +575,13 @@ { !isset($params['hierarchy']) ? $params['hierarchy'] = false : null; !isset($params['subgroups']) ? $params['subgroups'] = true : null; - $old_rekey = isset($params['rekey']) ? $params['rekey'] : false; if ($params['subgroups']) { + $old_rekey = isset($params['rekey']) ? $params['rekey'] : false; $params['rekey'] = true; } - $_groups = $this->_getSubGroups($param); + $_groups = parent::getGroups($params); if ($_groups === false) { return $_groups; }

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