2011-08-05, 07:25 PM
Actually, that permission system is still the same. The permission in question comes from the board_permissions table, not the regular permissions table. The issue here seems to be an incorrect variable re-initialization:
Should not have the 2nd $permissions = array();
Try removing that from the code and let me know what happens. Thanks.
It should be using the default permission in the even one doesn't exist in either table for that usergroup, in merge/resources/modules/usergroups.php we have:
Which should fill in the ones that aren't set for each group.
Out of curiosity, which version of PHP are you using?
function get_group_permissions()
{
$query = $this->old_db->simple_select("permissions", "*", "add_deny = 1");
$permissions = array();
while($permission = $this->old_db->fetch_array($query))
{
$permissions[$permission['id_group']][$permission['permission']] = 1;
}
$this->old_db->free_result($query);
$query = $this->old_db->simple_select("board_permissions", "id_group, permission", "add_deny = 1");
$permissions = array();
while($permission = $this->old_db->fetch_array($query))
{
$permissions[$permission['id_group']][$permission['permission']] = 1;
}
$this->old_db->free_result($query);
return $permissions;
}
Should not have the 2nd $permissions = array();
Try removing that from the code and let me know what happens. Thanks.
It should be using the default permission in the even one doesn't exist in either table for that usergroup, in merge/resources/modules/usergroups.php we have:
// Should loop through and fill in any values that aren't set based on the MyBB db schema or other standard default values
$data = $this->process_default_values($data);
Which should fill in the ones that aren't set for each group.
Out of curiosity, which version of PHP are you using?