Changeset 10213 for extensions/Comments_on_Albums/include/coa_albums.php
- Timestamp:
- Apr 9, 2011, 6:40:27 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Comments_on_Albums/include/coa_albums.php
r9766 r10213 31 31 if (can_manage_comment('edit', $author_id)) { 32 32 if (!empty($_POST['content'])) { 33 update_user_comment_albums(array( 34 'comment_id' => $_GET['comment_to_edit'], 35 'image_id' => $category['id'], 36 'content' => $_POST['content'] 37 ), $_POST['key']); 38 39 redirect($url_self); 33 $comment_action = update_user_comment_albums( 34 array( 35 'comment_id' => $_GET['comment_to_edit'], 36 'image_id' => $category['id'], 37 'content' => $_POST['content'] 38 ), 39 $_POST['key'] 40 ); 41 42 $infos = array(); 43 44 switch ($comment_action) 45 { 46 case 'moderate': 47 array_push($infos, l10n('An administrator must authorize your comment before it is visible.')); 48 case 'validate': 49 array_push($infos, l10n('Your comment has been registered')); 50 break; 51 case 'reject': 52 set_status_header(403); 53 array_push($infos, l10n('Your comment has NOT been registered because it did not pass the validation rules')); 54 break; 55 default: 56 trigger_error('Invalid comment action '.$comment_action, E_USER_WARNING); 57 } 58 59 $template->assign( 60 ($comment_action=='reject') ? 'errors' : 'infos', 61 $infos 62 ); 63 64 unset($_POST['content']); 65 break; 40 66 } else { 41 67 $edit_comment = $_GET['comment_to_edit'];
Note: See TracChangeset
for help on using the changeset viewer.