Make WordPress Core


Ignore:
Timestamp:
06/27/2009 10:40:06 PM (16 years ago)
Author:
azaozz
Message:

Fix pending comments count, paging and comments requests while moderating for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r11644 r11660  
    603603        die('-1');
    604604    $search = isset($_POST['s']) ? $_POST['s'] : false;
    605     $start = isset($_POST['page']) ? intval($_POST['page']) * 25 - 1: 24;
    606     $status = isset($_POST['comment_status']) ? $_POST['comment_status'] : false;
     605    $status = isset($_POST['comment_status']) ? $_POST['comment_status'] : 'all';
     606    $per_page = isset($_POST['per_page']) ?  (int) $_POST['per_page'] + 8 : 28;
     607    $start = isset($_POST['page']) ? ( intval($_POST['page']) * $per_page ) -1 : $per_page - 1;
     608    if ( 1 > $start )
     609        $start = 27;
     610
    607611    $mode = isset($_POST['mode']) ? $_POST['mode'] : 'detail';
    608612    $p = isset($_POST['p']) ? $_POST['p'] : 0;
Note: See TracChangeset for help on using the changeset viewer.