Changeset 10082 for trunk/wp-admin/includes/template.php
- Timestamp:
- 12/06/2008 03:59:03 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/template.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r10071 r10082 1891 1891 $approved = "( comment_approved = '0' OR comment_approved = '1' )"; 1892 1892 1893 if ( $post ) 1893 if ( $post ) { 1894 1894 $post = " AND comment_post_ID = '$post'"; 1895 else 1895 $orderby = "ORDER BY comment_date_gmt ASC LIMIT $start, $num"; 1896 } else { 1896 1897 $post = ''; 1898 $orderby = "ORDER BY comment_date_gmt DESC LIMIT $start, $num"; 1899 } 1897 1900 1898 1901 if ( 'comment' == $type ) … … 1917 1920 $approved 1918 1921 $typesql 1919 ORDER BY comment_date_gmt DESC LIMIT $start, $num");1922 $orderby"); 1920 1923 } else { 1921 $comments = $wpdb->get_results( "SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb->comments WHERE $approved $post $typesql ORDER BY comment_date_gmt DESC LIMIT $start, $num" );1924 $comments = $wpdb->get_results( "SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb->comments WHERE $approved $post $typesql $orderby" ); 1922 1925 } 1923 1926
Note: See TracChangeset
for help on using the changeset viewer.