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);
		}
  }

Comments

James Andres’s picture

Status: Active » Fixed

I believe this has been fixed for a while now ..

Status: Fixed » Closed (fixed)
Issue tags: -install_add_permissions, -install_remove_permissions

Automatically closed -- issue fixed for 2 weeks with no activity.