Changeset 3445 for trunk/picture.php
- Timestamp:
- Jun 23, 2009, 3:44:58 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/picture.php
r3409 r3445 26 26 include(PHPWG_ROOT_PATH.'include/section_init.inc.php'); 27 27 include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php'); 28 include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php'); 28 29 29 30 // Check Access and exit when user status is not ok … … 308 309 redirect($url_self); 309 310 } 311 case 'edit_comment' : 312 { 313 if (isset($_GET['comment_to_edit']) 314 and is_numeric($_GET['comment_to_edit']) 315 and (is_admin() || $conf['user_can_edit_comment'])) 316 { 317 if (!empty($_POST['content'])) 318 { 319 update_user_comment(array('comment_id' => $_GET['comment_to_edit'], 320 'image_id' => $page['image_id'], 321 'content' => $_POST['content']), 322 $_POST['key'] 323 ); 324 redirect($url_self); 325 } else { 326 $edit_comment = $_GET['comment_to_edit']; 327 break; 328 } 329 } 330 } 310 331 case 'delete_comment' : 311 332 { 312 333 if (isset($_GET['comment_to_delete']) 313 334 and is_numeric($_GET['comment_to_delete']) 314 and is_admin() and !is_adviser())335 and (is_admin() || $conf['user_can_delete_comment'])) 315 336 { 316 $query = ' 317 DELETE FROM '.COMMENTS_TABLE.' 318 WHERE id = '.$_GET['comment_to_delete'].' 319 ;'; 320 pwg_query( $query ); 337 delete_user_comment($_GET['comment_to_delete']); 321 338 } 322 323 339 redirect($url_self); 324 340 } … … 593 609 594 610 595 596 611 $page['body_id'] = 'thePicturePage'; 597 612 … … 948 963 $template->assign( 'ELEMENT_CONTENT', $element_content ); 949 964 950 951 965 // +-----------------------------------------------------------------------+ 952 966 // | sub pages |
Note: See TracChangeset
for help on using the changeset viewer.