WordPress.org

Make WordPress Core

Changeset 6287


Ignore:
Timestamp:
10/23/2007 11:02:24 PM (11 years ago)
Author:
ryan
Message:

Post filter fixes from mdawaffe. fixes #5249

Location:
trunk
Files:
6 edited

Legend:

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

    r6213 r6287  
    1616    check_ajax_referer( 'add-post' );
    1717    add_filter( 'post_limits', $limit_filter = create_function( '$a', '$b = split(" ",$a); if ( !isset($b[2]) ) return $a; $start = intval(trim($b[1])) / 20 * 15; if ( !is_int($start) ) return $a; $start += intval(trim($b[2])) - 1; return "LIMIT $start, 1";' ) );
    18     wp_edit_posts_query( '_POST' );
     18    wp_edit_posts_query( $_POST );
     19    if ( !have_posts() )
     20        die('1');
    1921    $posts_columns = wp_manage_posts_columns();
    2022    ob_start();
  • trunk/wp-admin/edit.php

    r6277 r6287  
    109109    </fieldset>
    110110    <input type="submit" id="post-query-submit" value="<?php _e('Filter &#187;'); ?>" class="button" />
    111     <?php wp_nonce_field( 'add-post', '_ajax_nonce', false ); ?>
    112     <input type="button" id="get-extra-button" class="add:the-extra-list:searchform" style="display:none" />
    113111</form>
    114112
     
    118116
    119117<?php include( 'edit-post-rows.php' ); ?>
     118
     119<form action="" method="post" id="get-extra-posts" class="add:the-extra-list:" style="display:none">
     120    <?php wp_nonce_field( 'add-post', '_ajax_nonce', false ); ?>
     121</form>
    120122
    121123<div id="ajax-response"></div>
  • trunk/wp-admin/includes/post.php

    r6229 r6287  
    477477}
    478478
    479 function wp_edit_posts_query( $q = '_GET' ) {
    480     global $wpdb;
    481     $$q['m']   = (int) $$q['m'];
    482     $$q['cat'] = (int) $$q['cat'];
     479function wp_edit_posts_query( $q = false ) {
     480    global $wpdb;
     481    if ( false === $q )
     482        $q = $_GET;
     483    $q['m']   = (int) $q['m'];
     484    $q['cat'] = (int) $q['cat'];
    483485    $post_stati  = array(   //  array( adj, noun )
    484486                'draft' => array(__('Draft'), _c('Drafts|manage posts header')),
     
    493495    $post_status_q = '';
    494496    $post_status_label = _c('Posts|manage posts header');
    495     if ( isset($$q['post_status']) && in_array( $$q['post_status'], array_keys($post_stati) ) ) {
    496         $post_status_label = $post_stati[$$q['post_status']][1];
    497         $post_status_q = '&post_status=' . $$q['post_status'];
    498     }
    499 
    500     if ( 'pending' === $$q['post_status'] ) {
     497    if ( isset($q['post_status']) && in_array( $q['post_status'], array_keys($post_stati) ) ) {
     498        $post_status_label = $post_stati[$q['post_status']][1];
     499        $post_status_q = '&post_status=' . $q['post_status'];
     500    }
     501
     502    if ( 'pending' === $q['post_status'] ) {
    501503        $order = 'ASC';
    502504        $orderby = 'modified';
    503     } elseif ( 'draft' === $$q['post_status'] ) {
     505    } elseif ( 'draft' === $q['post_status'] ) {
    504506        $order = 'DESC';
    505507        $orderby = 'modified';
  • trunk/wp-admin/js/edit-posts.js

    r6215 r6287  
    77    delAfter = function() {
    88        list[0].wpList.add( extra.children(':eq(0)').remove().clone() );
    9         $('#get-extra-button').click();
     9        $('#get-extra-posts').submit();
    1010    }
    1111
  • trunk/wp-includes/js/wp-lists.js

    r6215 r6287  
    283283
    284284        if ( 'none' != s.addColor ) {
     285            var b = e.css( 'background-color' );
     286            if ( b == 'transparent' ) { b = ''; }
    285287            Fat.fade_element(e.attr('id'),null,700,s.addColor);
    286288            setTimeout( function() {
    287                 var b = e.css( 'background-color' );
    288289                var g = e.css( 'background-color', '' ).css( 'background-color' );
    289290                if ( b != g ) { e.css( 'background-color', b ); }
  • trunk/wp-includes/script-loader.php

    r6218 r6287  
    6262        ) );
    6363
    64         $this->add( 'wp-lists', '/wp-includes/js/wp-lists.js', array('jquery'), '20070823' );
     64        $this->add( 'wp-lists', '/wp-includes/js/wp-lists.js', array('jquery'), '20071023' );
    6565        $this->localize( 'wp-lists', 'wpListL10n', array(
    6666            'url' => get_option( 'siteurl' ) . '/wp-admin/admin-ajax.php'
     
    119119            $this->add( 'admin-custom-fields', '/wp-admin/js/custom-fields.js', array('wp-lists'), '20070823' );
    120120            $this->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists'), '20070822' );
    121             $this->add( 'admin-posts', '/wp-admin/js/edit-posts.js', array('wp-lists'), '20070823' );
     121            $this->add( 'admin-posts', '/wp-admin/js/edit-posts.js', array('wp-lists'), '20071023' );
    122122            $this->add( 'admin-users', '/wp-admin/js/users.js', array('wp-lists'), '20070823' );
    123123            $this->add( 'xfn', '/wp-admin/js/xfn.js', false, '3517' );
Note: See TracChangeset for help on using the changeset viewer.