Edit Comments paging fix from nbachiyski. fixes #3481
git-svn-id: http://svn.automattic.com/wordpress/trunk@4649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
71a2674bde
commit
e01d9334f6
|
@ -90,9 +90,8 @@ if (isset($_GET['s'])) {
|
||||||
else
|
else
|
||||||
$page = 1;
|
$page = 1;
|
||||||
$start = $offset = ( $page - 1 ) * 20;
|
$start = $offset = ( $page - 1 ) * 20;
|
||||||
$end = $start + 20;
|
|
||||||
|
|
||||||
$comments = $wpdb->get_results( "SELECT * FROM $wpdb->comments WHERE comment_approved = '0' OR comment_approved = '1' ORDER BY comment_date DESC LIMIT $start, $end" );
|
$comments = $wpdb->get_results( "SELECT * FROM $wpdb->comments WHERE comment_approved = '0' OR comment_approved = '1' ORDER BY comment_date DESC LIMIT $start, 20" );
|
||||||
$total = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0' OR comment_approved = '1'" );
|
$total = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0' OR comment_approved = '1'" );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue