diff options
author | mistic100 <mistic@piwigo.org> | 2011-12-18 21:46:24 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2011-12-18 21:46:24 +0000 |
commit | ca230a6f53e3a102faf5cb3633465ee8fc326663 (patch) | |
tree | 9613ef04023af2927ed452c370af4814fb866fc5 /identification.php | |
parent | f5004995306cb603d63724c98af2d657c3c4a64b (diff) |
feature:2538 Make a unified messages management
use only $page['infos'] and $page['errors'] vars and and necessary template to all main pages
git-svn-id: http://piwigo.org/svn/trunk@12764 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | identification.php | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/identification.php b/identification.php index 70e46b18e..9a3128536 100644 --- a/identification.php +++ b/identification.php @@ -31,15 +31,13 @@ include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); check_status(ACCESS_FREE); //-------------------------------------------------------------- identification -$errors = array(); - $redirect_to = ''; if ( !empty($_GET['redirect']) ) { $redirect_to = urldecode($_GET['redirect']); if ( is_a_guest() ) { - array_push($errors, l10n('You are not authorized to access the requested page')); + array_push($page['errors'], l10n('You are not authorized to access the requested page')); } } @@ -48,7 +46,7 @@ if (isset($_POST['login'])) if (!isset($_COOKIE[session_name()])) { array_push( - $errors, + $page['errors'], l10n('Cookies are blocked or not supported by your browser. You must enable cookies to connect.') ); } @@ -68,7 +66,7 @@ if (isset($_POST['login'])) } else { - array_push( $errors, l10n('Invalid password!') ); + array_push($page['errors'], l10n('Invalid password!') ); } } } @@ -96,12 +94,6 @@ if ($conf['allow_user_registration']) $template->assign('U_REGISTER', get_root_url().'register.php' ); } -//-------------------------------------------------------------- errors display -if ( sizeof( $errors ) != 0 ) -{ - $template->assign('errors', $errors); -} - // include menubar $themeconf = $template->get_template_vars('themeconf'); if (!isset($themeconf['hide_menu_on']) OR !in_array('theIdentificationPage', $themeconf['hide_menu_on'])) |