PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Authentication » LiveUser » Bug #429

LiveUser_Admin_Perm_DB_Common::outputRightsConstants

Details

Submitted2003-12-15 19:38 UTC
Fromkipaten21 at hotmail dot com
Assignedlsmith
StatusClosed
PackageLiveUser
PHP VersionIrrelevant
OSANY
Roadmaps(Not assigned)

Comments

[2003-12-15 19:38 UTC] kipaten21 at hotmail dot com

Description:
------------
In LiveUser_Admin_Perm_DB_Common::outputRightsConstants(), constants should be built using the define_names only. They are currently using

$r['area']['name'] and $r['application']['name'].

switch ($naming) {
case 2:
foreach ($rights as $k => $r) {
$generate[$r['right_id']] = $prefix . $r['area']['name'] . '_'
. $r['define_name'];
};
break;
case 3:
foreach ($rights as $k => $r) {
$generate[$r['right_id']] = $prefix . $r['application']['name'] . '_'
. $r['area']['name'] . '_' . $r['define_name'];
};
break;

As for getAreas() not including the define_name, I was wrong about that. Just had to take a closer look.

However, I noticed that the function name is spelled wrong. It is spelled as ouputRightsConstants, missing the first 't'.

[2003-12-16 04:01 UTC] kipaten21 at hotmail dot com

Also just noticed that when getRights() sees that the options 'with_applications' and/or 'with_areas' are passed, it only gets the name and comment for the applications and areas (using getTranslation()). This method probably needs to be rethinked.