WordPress.org

Plugin Directory

Changeset 698826


Ignore:
Timestamp:
04/17/13 00:42:23 (12 months ago)
Author:
ethitter
Message:

Jetpack Infinite Scroll update

Include posts table's prefix when modifying the SQL WordPress generates to retrieve posts for Infinite Scroll. Ensures that in queries where the posts table is aliased and joined upon itself, the post_date_gmt column name isn't ambiguous.

See http://wordpress.org/support/topic/jetpack-infinite-scroll-wont-work-con-custom-taxonomy-archive-page and http://wordpress.org/support/topic/infinity-scroll-bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jetpack/trunk/modules/infinite-scroll/infinity.php

    r698115 r698826  
    375375 
    376376        // Construct the date query using our timestamp 
    377         $clause = $wpdb->prepare( " AND post_date_gmt {$operator} %s", self::set_last_post_time() ); 
     377        $clause = $wpdb->prepare( " AND {$wpdb->posts}.post_date_gmt {$operator} %s", self::set_last_post_time() ); 
    378378 
    379379        $where .= apply_filters( 'infinite_scroll_posts_where', $clause, $query, $operator, self::set_last_post_time() ); 
Note: See TracChangeset for help on using the changeset viewer.