PDA

View Full Version : User Admin does not show permissions


stag47
11-06-04, 08:21 PM
Hi everybody,

first, I have to congratulate the developers for this project. I'm watching .project for some time - and I really like it.

This morning I fetched the lastest files from CVS and tried a clean install.
Everything works as expected, except User Admin.

I receive the errormessage:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /var/www/dotproject.test/includes/db_mysql.php on line 66
instead of the permissions of any user.

Any help appreciated

Thanks
Markus

miinx
17-06-04, 01:36 AM
I was also getting that error on a clean install, so investigated a bit & discovered it was to do with the SQL that grabs all the info for the Permissions tab, which was hard-coded in 1.0.2 but is now dynamic.

Line 30 of /modules/admin/vw_user_perms.php is:
if( isset($module['permissions_item_field']) && isset($module['permissions_item_table']) && isset($module['permissions_item_label'])){
but this is allowing null/empty string values through it seems. Change this line to:
if( !empty($module['permissions_item_field']) && !empty($module['permissions_item_table']) && !empty($module['permissions_item_label'])){
and you'll be right.

Cheers
Karen

miinx
17-06-04, 08:19 AM
actually just rethinking this -- my code works but my explanation was wrong...

think it's more that Line 30 isn't working as 3 falses = True.

Cheers
Karen