Problem with permission
coreykck - May 27, 2009 - 09:27
| Project: | Install Profile API |
| Version: | 6.x-2.0 |
| Component: | CRUD functions and includes |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
| Issue tags: | install_add_permissions, install_remove_permissions |
Description
I spent few days in using install_add_permissions and install_remove_permissions without success.
Today, with a watchdog over query results i saw that privileges are separeted simply by a coma, in explode function, the module, use coma and space so a write few code lines to resolve the bug.
Please correct the maodule asap
TNX a lot
old code:
while ($row = db_fetch_object($result)) {
$existing_perms += explode(', ', $row->perm);
}new_code:
while ($row = db_fetch_object($result)) {
$add2perms = array();
$add2perms = explode(',', $row->perm);
if (sizeOf($add2perms)) {
$existing_perms += array_map(trim, $add2perms);
}
}