From ca230a6f53e3a102faf5cb3633465ee8fc326663 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Sun, 18 Dec 2011 21:46:24 +0000 Subject: 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 --- identification.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'identification.php') 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'])) -- cgit v1.2.3