aboutsummaryrefslogtreecommitdiffstats
path: root/search.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2011-12-18 21:46:24 +0000
committermistic100 <mistic@piwigo.org>2011-12-18 21:46:24 +0000
commitca230a6f53e3a102faf5cb3633465ee8fc326663 (patch)
tree9613ef04023af2927ed452c370af4814fb866fc5 /search.php
parentf5004995306cb603d63724c98af2d657c3c4a64b (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 'search.php')
-rw-r--r--search.php10
1 files changed, 2 insertions, 8 deletions
diff --git a/search.php b/search.php
index f59323db9..201531e31 100644
--- a/search.php
+++ b/search.php
@@ -31,7 +31,6 @@ include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
check_status(ACCESS_GUEST);
//------------------------------------------------------------------ form check
-$errors = array();
$search = array();
if (isset($_POST['submit']))
{
@@ -148,11 +147,11 @@ INSERT INTO '.SEARCH_TABLE.'
}
else
{
- array_push($errors, l10n('Empty query. No criteria has been entered.'));
+ array_push($page['errors'], l10n('Empty query. No criteria has been entered.'));
}
}
//----------------------------------------------------------------- redirection
-if (isset($_POST['submit']) and count($errors) == 0)
+if (isset($_POST['submit']) and count($page['errors']) == 0)
{
redirect(
make_index_url(
@@ -222,11 +221,6 @@ SELECT id,name,global_rank,uppercats
;';
display_select_cat_wrapper($query, array(), 'category_options', false);
-//-------------------------------------------------------------- errors display
-if (sizeof($errors) != 0)
-{
- $template->assign('errors', $errors);
-}
// include menubar
$themeconf = $template->get_template_vars('themeconf');