Changeset 9023 for trunk/wp-admin/includes/template.php
- Timestamp:
- 09/28/2008 05:48:55 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r9022 r9023 1530 1530 } 1531 1531 1532 function _wp_get_comment_list( $status = '', $s = false, $start, $num ) {1532 function _wp_get_comment_list( $status = '', $s = false, $start, $num, $post = 0 ) { 1533 1533 global $wpdb; 1534 1534 1535 1535 $start = abs( (int) $start ); 1536 1536 $num = (int) $num; 1537 $post = (int) $post; 1537 1538 1538 1539 if ( 'moderated' == $status ) … … 1544 1545 else 1545 1546 $approved = "( comment_approved = '0' OR comment_approved = '1' )"; 1547 1548 if ( $post ) 1549 $post = " AND comment_post_ID = '$post'"; 1550 else 1551 $post = ''; 1546 1552 1547 1553 if ( $s ) { … … 1556 1562 ORDER BY comment_date_gmt DESC LIMIT $start, $num"); 1557 1563 } else { 1558 $comments = $wpdb->get_results( "SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb->comments WHERE $approved ORDER BY comment_date_gmt DESC LIMIT $start, $num" );1564 $comments = $wpdb->get_results( "SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb->comments WHERE $approved $post ORDER BY comment_date_gmt DESC LIMIT $start, $num" ); 1559 1565 } 1560 1566
Note: See TracChangeset
for help on using the changeset viewer.