diff options
author | rub <rub@piwigo.org> | 2007-07-07 09:23:04 +0000 |
---|---|---|
committer | rub <rub@piwigo.org> | 2007-07-07 09:23:04 +0000 |
commit | f3b1fed9c61a4fa9e3e761191e9d377f06d52f80 (patch) | |
tree | c50364f66e3691baf37c33f63d5d67a3f58abaea | |
parent | c9465002447bd13fcd18f952d3530435c938c764 (diff) |
Resolved issue 0000717: guest must be guest
git-svn-id: http://piwigo.org/svn/trunk@2055 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | include/common.inc.php | 7 | ||||
-rw-r--r-- | include/functions_user.inc.php | 6 | ||||
-rw-r--r-- | language/en_UK.iso-8859-1/common.lang.php | 2 | ||||
-rw-r--r-- | language/fr_FR.iso-8859-1/common.lang.php | 2 |
4 files changed, 17 insertions, 0 deletions
diff --git a/include/common.inc.php b/include/common.inc.php index 39de9a42f..49fc70dba 100644 --- a/include/common.inc.php +++ b/include/common.inc.php @@ -186,6 +186,13 @@ else $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template'], $user['theme'] ); } +if (isset($user['internal_status']['guest_must_be_guest']) + and + $user['internal_status']['guest_must_be_guest'] === true) +{ + $header_msgs[] = l10n('guest_must_be_guest'); +} + if ($conf['gallery_locked']) { $header_msgs[] = $lang['gallery_locked_message']; diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index 26ca7dd7e..f3b078dbf 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -149,6 +149,12 @@ function build_user( $user_id, $use_cache ) $user['id'] = $user_id; $user = array_merge( $user, getuserdata($user_id, $use_cache) ); + if ($user['id'] == $conf['guest_id'] and $user['status'] <> 'guest') + { + $user['status'] = 'guest'; + $user['internal_status']['guest_must_be_guest'] = true; + } + // calculation of the number of picture to display per page $user['nb_image_page'] = $user['nb_image_line'] * $user['nb_line_page']; diff --git a/language/en_UK.iso-8859-1/common.lang.php b/language/en_UK.iso-8859-1/common.lang.php index fd6aa5cd3..e959ecb6a 100644 --- a/language/en_UK.iso-8859-1/common.lang.php +++ b/language/en_UK.iso-8859-1/common.lang.php @@ -632,6 +632,8 @@ $lang['Picture name: %s'] = 'Picture name: %s'; $lang['Creation date: %s'] = 'Creation date: %s'; $lang['Waiting page: %s'] = 'Waiting page: %s'; $lang['Picture uploaded by %s'] = 'Picture uploaded by %s'; +// --------- Starting below: New or revised $lang ---- from version 1.7.1 +$lang['guest_must_be_guest'] = 'Bad status for user "guest", using default status. Please notify the webmaster.'; // --------- Starting below: New or revised $lang ---- from Butterfly (1.8) $lang['Administrator, webmaster and special user cannot use this method'] = 'Administrator, webmaster and special user cannot use this method'; ?> diff --git a/language/fr_FR.iso-8859-1/common.lang.php b/language/fr_FR.iso-8859-1/common.lang.php index d6d7f359e..5eb37eb9e 100644 --- a/language/fr_FR.iso-8859-1/common.lang.php +++ b/language/fr_FR.iso-8859-1/common.lang.php @@ -632,6 +632,8 @@ $lang['Picture name: %s'] = 'Nom de l\'image: %s'; $lang['Creation date: %s'] = 'Date de création: %d'; $lang['Waiting page: %s'] = 'Page en attente: %s'; $lang['Picture uploaded by %s'] = 'Image téléchargée par %s'; +// --------- Starting below: New or revised $lang ---- from version 1.7.1 +$lang['guest_must_be_guest'] = 'Statut de l\'utilisateur "guest" non conforme, utilisation du statut par défaut. Veuillez prévenir le webmestre.'; // --------- Starting below: New or revised $lang ---- from Butterfly (1.8) $lang['Administrator, webmaster and special user cannot use this method'] = 'Administrateur, webmestre et utilisateur spécial ne peuvent pas utiliser cette méthode'; ?> |