Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.8/wp-admin/admin-ajax.php

    r11512 r11659  
    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;
     
    815819        if ( !current_user_can( 'edit_post', $meta->post_id ) )
    816820            die('-1');
    817         if ( !$u = update_meta( $mid, $key, $value ) )
    818             die('0'); // We know meta exists; we also know it's unchanged (or DB error, in which case there are bigger problems).
     821        if ( $meta->meta_value != stripslashes($value) ) {
     822            if ( !$u = update_meta( $mid, $key, $value ) )
     823                die('0'); // We know meta exists; we also know it's unchanged (or DB error, in which case there are bigger problems).
     824        }
    819825
    820826        $key = stripslashes($key);
Note: See TracChangeset for help on using the changeset viewer.