aboutsummaryrefslogtreecommitdiffstats
path: root/admin.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-08-16 15:19:40 +0000
committerplegall <plg@piwigo.org>2005-08-16 15:19:40 +0000
commit5840251d559a368c084602d971e8d0926860c186 (patch)
tree984da246c5e7c0f5fa97dd553da5405106c0fdfb /admin.php
parent149edc131d7cac50dfac0a9d00c0a36c4355ec9a (diff)
- modification : admin/group_list screen completely rewrite to present the
list of existing groups and a form to add a new group. Here you can delete a group, go to permissions management for a group, go to member list of a group (on admin/user_list with a filter on group). - modification : admin/user_perm and admin/group_perm are not directly reachable by the admin menu anymore. Only the user/group list lets you reach user/group permissions management screen. git-svn-id: http://piwigo.org/svn/trunk@815 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin.php29
1 files changed, 15 insertions, 14 deletions
diff --git a/admin.php b/admin.php
index 23bb3f76f..fa031da6e 100644
--- a/admin.php
+++ b/admin.php
@@ -76,21 +76,26 @@ switch ( $_GET['page'] )
case 'group_list' :
$title = $lang['title_groups']; $page_valide = true; break;
case 'group_perm' :
- /*if ( !is_numeric( $_GET['group_id'] ) ) $_GET['group_id'] = -1;
- $query = 'SELECT name FROM '.GROUPS_TABLE;
- $query.= ' WHERE id = '.$_GET['group_id'];
- $query.= ';';
- $result = pwg_query( $query );
- if ( mysql_num_rows( $result ) > 0 )
+ if (!is_numeric($_GET['group_id']))
{
- $row = mysql_fetch_array( $result );*/
- $title = $lang['title_group_perm'];//.' "'.$row['name'].'"';
+ $_GET['group_id'] = -1;
+ }
+ $query = '
+SELECT name
+ FROM '.GROUPS_TABLE.'
+ WHERE id = '.$_GET['group_id'].'
+;';
+ $result = pwg_query($query);
+ if (mysql_num_rows($result) > 0 )
+ {
+ $row = mysql_fetch_array($result);
+ $title = $lang['title_group_perm'].' "'.$row['name'].'"';
$page_valide = true;
- /*}
+ }
else
{
$page_valide = false;
- }*/
+ }
break;
case 'stats':
$title = $lang['title_history']; $page_valide = true; break;
@@ -252,7 +257,6 @@ $template->assign_vars(array(
'L_IDENTIFY'=>$lang['identification'],
'L_USERS'=>$lang['users'],
'L_GROUPS'=>$lang['groups'],
- 'L_AUTH'=>$lang['permissions'],
'L_UPDATE'=>$lang['update'],
'L_CAT_UPLOAD'=>$lang['upload'],
'L_CAT_COMMENTS'=>$lang['comments'],
@@ -282,9 +286,6 @@ $template->assign_vars(array(
'U_THUMBNAILS'=>add_session_id($link_start.'thumbnail' ),
'U_USERS'=>add_session_id($link_start.'user_list' ),
'U_GROUPS'=>add_session_id($link_start.'group_list' ),
- 'U_USERS_AUTH'=>add_session_id($link_start.'user_perm' ),
- 'U_GROUPS_AUTH'=>add_session_id($link_start.'group_perm'),
- 'U_CAT_AUTH'=>add_session_id($link_start.'cat_perm' ),
'U_RETURN'=>add_session_id(PHPWG_ROOT_PATH.'category.php')
));