Changeset 10123 for branches/2.2/picture.php
- Timestamp:
- Apr 6, 2011, 9:31:02 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/picture.php
r9073 r10123 190 190 // +-----------------------------------------------------------------------+ 191 191 192 $infos = array(); 193 192 194 // caching first_rank, last_rank, current_rank in the displayed 193 195 // section. This should also help in readability. … … 332 334 if (!empty($_POST['content'])) 333 335 { 334 update_user_comment(336 $comment_action = update_user_comment( 335 337 array( 336 338 'comment_id' => $_GET['comment_to_edit'], … … 341 343 ); 342 344 343 redirect($url_self); 345 switch ($comment_action) 346 { 347 case 'moderate': 348 array_push($infos, l10n('An administrator must authorize your comment before it is visible.')); 349 case 'validate': 350 array_push($infos, l10n('Your comment has been registered')); 351 break; 352 case 'reject': 353 set_status_header(403); 354 array_push($infos, l10n('Your comment has NOT been registered because it did not pass the validation rules')); 355 break; 356 default: 357 trigger_error('Invalid comment action '.$comment_action, E_USER_WARNING); 358 } 359 360 $template->assign( 361 ($comment_action=='reject') ? 'errors' : 'infos', 362 $infos 363 ); 364 365 unset($_POST['content']); 366 break; 344 367 } 345 368 else … … 835 858 } 836 859 837 $infos = array();838 839 860 // author 840 861 if (!empty($picture['current']['author']))
Note: See TracChangeset
for help on using the changeset viewer.