From 69b26ddc47829d3876fbf786ad1c4e5b33f05b76 Mon Sep 17 00:00:00 2001 From: rub Date: Wed, 28 Mar 2007 22:30:04 +0000 Subject: Issue 578 User guest must be real user Step 2: Installation finished, guest must be used on list and group, corrections git-svn-id: http://piwigo.org/svn/trunk@1930 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/cat_perm.php | 1 - admin/user_list.php | 16 ++++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'admin') diff --git a/admin/cat_perm.php b/admin/cat_perm.php index 7fa279c49..3782d7190 100644 --- a/admin/cat_perm.php +++ b/admin/cat_perm.php @@ -275,7 +275,6 @@ $query = ' SELECT '.$conf['user_fields']['id'].' AS id, '.$conf['user_fields']['username'].' AS username FROM '.USERS_TABLE.' - WHERE '.$conf['user_fields']['id'].' != '.$conf['guest_id'].' ;'; $result = pwg_query($query); while($row = mysql_fetch_array($result)) diff --git a/admin/user_list.php b/admin/user_list.php index 15b009290..ae1c0af36 100644 --- a/admin/user_list.php +++ b/admin/user_list.php @@ -103,7 +103,7 @@ SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id, ON u.'.$conf['user_fields']['id'].' = ui.user_id LEFT JOIN '.USER_GROUP_TABLE.' AS ug ON u.'.$conf['user_fields']['id'].' = ug.user_id - WHERE u.'.$conf['user_fields']['id'].' != '.$conf['guest_id']; + WHERE u.'.$conf['user_fields']['id'].' > 0'; if (isset($filter['username'])) { $query.= ' @@ -791,11 +791,19 @@ foreach ($page['filtered_users'] as $num => $local_user) 'CHECKED' => $checked, 'U_PROFILE' => $profile_url.$local_user['id'], 'U_PERM' => $perm_url.$local_user['id'], - 'USERNAME' => $local_user['username'], - 'STATUS' => $lang['user_status_'.$local_user['status']].(($local_user['adviser'] == 'true') ? ' ['.$lang['adviser'].']' : ''), + 'USERNAME' => $local_user['username'] + .($local_user['id'] == $conf['guest_id'] + ? '
['.l10n('is_the_guest').']' : '') + .($local_user['id'] == $conf['default_user_id'] + ? '
['.l10n('is_the_default').']' : ''), + 'STATUS' => $lang['user_status_'. + $local_user['status']].(($local_user['adviser'] == 'true') + ? '
['.l10n('adviser').']' : ''), 'EMAIL' => get_email_address_as_display_text($local_user['email']), 'GROUPS' => $groups_string, - 'PROPERTIES' => (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true')) ? $lang['is_high_enabled'] : $lang['is_high_disabled'] + 'PROPERTIES' => + (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true')) + ? $lang['is_high_enabled'] : $lang['is_high_disabled'] ) ); } -- cgit v1.2.3