Changeset 12764 for trunk/include/picture_comment.inc.php
- Timestamp:
- Dec 18, 2011, 10:46:24 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/picture_comment.inc.php
r11839 r12764 54 54 include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php'); 55 55 56 $comment_action = insert_user_comment($comm, @$_POST['key'], $ infos);56 $comment_action = insert_user_comment($comm, @$_POST['key'], $page['infos']); 57 57 58 58 switch ($comment_action) 59 59 { 60 60 case 'moderate': 61 array_push( $infos, l10n('An administrator must authorize your comment before it is visible.') );61 array_push($page['infos'], l10n('An administrator must authorize your comment before it is visible.') ); 62 62 case 'validate': 63 array_push( $infos, l10n('Your comment has been registered'));63 array_push($page['infos'], l10n('Your comment has been registered')); 64 64 break; 65 65 case 'reject': 66 66 set_status_header(403); 67 array_push($ infos, l10n('Your comment has NOT been registered because it did not pass the validation rules') );67 array_push($page['errors'], l10n('Your comment has NOT been registered because it did not pass the validation rules') ); 68 68 break; 69 69 default: 70 70 trigger_error('Invalid comment action '.$comment_action, E_USER_WARNING); 71 71 } 72 73 $template->assign(74 ($comment_action=='reject') ? 'errors' : 'infos',75 $infos76 );77 72 78 73 // allow plugins to notify what's going on
Note: See TracChangeset
for help on using the changeset viewer.