diff -r bda11e521e8a -r 0a74676a2f2f includes/pageutils.php --- a/includes/pageutils.php Sat Jul 21 11:28:59 2007 -0400 +++ b/includes/pageutils.php Sat Jul 21 18:12:10 2007 -0400 @@ -1,7 +1,7 @@ free_result(); + $return['page_groups'] = Array(); + $q = $db->sql_query('SELECT pg_id,pg_name FROM '.table_prefix.'page_groups ORDER BY pg_name ASC;'); + if ( !$q ) + return Array( + 'mode' => 'error', + 'error' => $db->get_error() + ); + while ( $row = $db->fetchrow() ) + { + $return['page_groups'][] = Array( + 'id' => $row['pg_id'], + 'name' => $row['pg_name'] + ); + } break; case 'seltarget': $return['mode'] = 'seltarget'; @@ -1739,7 +1753,7 @@ } $db->free_result(); // Eliminate types that don't apply to this namespace - if ( $namespace ) + if ( $namespace && $namespace != '__PageGroup' ) { foreach ( $return['current_perms'] AS $i => $perm ) { @@ -1786,7 +1800,7 @@ } $db->free_result(); // Eliminate types that don't apply to this namespace - if ( $namespace ) + if ( $namespace && $namespace != '__PageGroup' ) { foreach ( $return['current_perms'] AS $i => $perm ) {