Make WordPress Core


Ignore:
Timestamp:
12/06/2008 03:59:03 AM (17 years ago)
Author:
markjaquith
Message:

Cron order for single-post Edit Comments page. Remember Single Post when searching, switching comment statuses, and filtering comment types

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r10071 r10082  
    18911891        $approved = "( comment_approved = '0' OR comment_approved = '1' )";
    18921892
    1893     if ( $post )
     1893    if ( $post ) {
    18941894        $post = " AND comment_post_ID = '$post'";
    1895     else
     1895        $orderby = "ORDER BY comment_date_gmt ASC LIMIT $start, $num";
     1896    } else {
    18961897        $post = '';
     1898        $orderby = "ORDER BY comment_date_gmt DESC LIMIT $start, $num";
     1899    }
    18971900
    18981901    if ( 'comment' == $type )
     
    19171920            $approved
    19181921            $typesql
    1919             ORDER BY comment_date_gmt DESC LIMIT $start, $num");
     1922            $orderby");
    19201923    } 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" );
    19221925    }
    19231926
Note: See TracChangeset for help on using the changeset viewer.