aboutsummaryrefslogtreecommitdiffstats
path: root/picture.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 /picture.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 '')
-rw-r--r--picture.php13
1 files changed, 3 insertions, 10 deletions
diff --git a/picture.php b/picture.php
index fb7b19307..bcc1a2939 100644
--- a/picture.php
+++ b/picture.php
@@ -189,8 +189,6 @@ function default_picture_content($content, $element_info)
// | initialization |
// +-----------------------------------------------------------------------+
-$infos = array();
-
// caching first_rank, last_rank, current_rank in the displayed
// section. This should also help in readability.
$page['first_rank'] = 0;
@@ -338,22 +336,17 @@ UPDATE '.USER_CACHE_CATEGORIES_TABLE.'
switch ($comment_action)
{
case 'moderate':
- array_push($infos, l10n('An administrator must authorize your comment before it is visible.'));
+ array_push($page['infos'], l10n('An administrator must authorize your comment before it is visible.'));
case 'validate':
- array_push($infos, l10n('Your comment has been registered'));
+ array_push($page['infos'], l10n('Your comment has been registered'));
break;
case 'reject':
set_status_header(403);
- array_push($infos, l10n('Your comment has NOT been registered because it did not pass the validation rules'));
+ array_push($page['errors'], l10n('Your comment has NOT been registered because it did not pass the validation rules'));
break;
default:
trigger_error('Invalid comment action '.$comment_action, E_USER_WARNING);
}
-
- $template->assign(
- ($comment_action=='reject') ? 'errors' : 'infos',
- $infos
- );
unset($_POST['content']);
break;