Changeset 5199 for trunk/comments.php
- Timestamp:
- Mar 20, 2010, 7:11:21 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/comments.php
r5196 r5199 185 185 if (isset($_GET[$loop_action])) 186 186 { 187 $action = $loop_action; 187 $action = $loop_action; 188 188 check_input_parameter($action, $_GET, false, PATTERN_ID); 189 189 $comment_id = $_GET[$action]; … … 197 197 198 198 $comment_author_id = get_comment_author_id($comment_id); 199 199 200 200 if (can_manage_comment($action, $comment_author_id)) 201 201 { 202 202 $perform_redirect = false; 203 203 204 204 if ('delete' == $action) 205 205 { … … 213 213 $perform_redirect = true; 214 214 } 215 215 216 216 if ('edit' == $action) 217 217 { … … 226 226 $_POST['key'] 227 227 ); 228 228 229 229 $edit_comment = null; 230 230 } … … 234 234 } 235 235 } 236 236 237 237 if ($perform_redirect) 238 238 { … … 241 241 .'comments.php' 242 242 .get_query_string_diff(array('delete','validate','pwg_token')); 243 243 244 244 redirect($redirect_url); 245 245 } … … 330 330 SELECT COUNT(DISTINCT(com.id)) 331 331 FROM '.IMAGE_CATEGORY_TABLE.' AS ic 332 INNER JOIN '.COMMENTS_TABLE.' AS com 332 INNER JOIN '.COMMENTS_TABLE.' AS com 333 333 ON ic.image_id = com.image_id 334 334 LEFT JOIN '.USERS_TABLE.' As u … … 375 375 WHERE '.implode(' 376 376 AND ', $page['where_clauses']).' 377 GROUP BY comment_id, com.image_id, ic.category_id, com.author, 378 com.author_id, com.date, com.content, com.validated 377 GROUP BY comment_id 379 378 ORDER BY '.$page['sort_by'].' '.$page['sort_order']; 380 379 if ('all' != $page['items_number']) … … 438 437 ) 439 438 ); 440 439 441 440 $tpl_comment = array( 442 441 'U_PICTURE' => $url, … … 454 453 .'comments.php' 455 454 .get_query_string_diff(array('delete','validate','edit', 'pwg_token')); 456 455 457 456 $tpl_comment['U_DELETE'] = add_url_params( 458 457 $url, … … 463 462 ); 464 463 } 465 464 466 465 if (can_manage_comment('edit', $comment['author_id'])) 467 466 { … … 470 469 .'comments.php' 471 470 .get_query_string_diff(array('edit', 'delete','validate', 'pwg_token')); 472 471 473 472 $tpl_comment['U_EDIT'] = add_url_params( 474 473 $url, … … 478 477 ) 479 478 ); 480 479 481 480 if (isset($edit_comment) and ($comment['comment_id'] == $edit_comment)) 482 481 {
Note: See TracChangeset
for help on using the changeset viewer.