Home » Authentication » LiveUser_Admin » Bug #5453
return of getRight() method
Details
| Submitted | 2005-09-19 14:45 UTC |
|---|---|
| From | l dot nienhaus at gmail dot com |
| Assigned | lsmith |
| Status | Closed |
| Package | LiveUser_Admin |
| PHP Version | 4.3.0 |
| Roadmaps | (Not assigned) |
Comments
[2005-09-19 14:45 UTC] l dot nienhaus at gmail dot com
Description:
------------
When using Perm_Simple or Perm_Medium Container, the getRights() method returns the result as an array with incrementing indexes
when switching to Perm_Complex it occured, that the return array has the right_ids as indexes
Test script:
---------------
$result = $lu_admin->perm->getRights(...)
Expected result:
----------------
//expected result like in perm_simple & perm_medium:
$result = array(0 => array(rightstuff),
1 => array(rightstuff),
...);
Actual result:
--------------
//perm_complex:
$result = array(first_right_id => array(rightstuff),
second_right_id => array(rightstuff),
...);
[2005-09-20 23:36 UTC] l dot nienhaus at gmail dot com
voilĂ , tell me if you need more
'permContainer' => array('type' => 'Complex',
'storage' => array('DB' => array('dsn' => DSN,
'prefix' => 'liveuser_',
'tables' => array(),
'fields' => array(),
'alias' => array(),
'force_seq' => true,
),
),
)
[2005-09-20 23:53 UTC] l dot nienhaus at gmail dot com
Doesn't matter which arguments.
A simple $lu_admin->perm->getRights() call does it,
try switching vom Simple or Medium to Complex and compare the returned arrays.
I think this bug is obvious, just have a look at the getRights method of the Complex container.
http://cvs.php.net/co.php/pear/LiveUser_Admin/Perm/Complex.php?r=1.69#793
Normally lu-admin's get*() methods return arrays with incrementing indexes, this one does not.