Make WordPress Core


Ignore:
Timestamp:
07/02/2008 11:07:56 PM (17 years ago)
Author:
mdawaffe
Message:

crazyhorse: merge with log:trunk@8151:8240

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/crazyhorse/wp-includes/query.php

    r7941 r8242  
    929929                $q['pagename'] = sanitize_title(basename($page_paths));
    930930                $q['name'] = $q['pagename'];
    931                 $where .= " AND (ID = '$reqpage')";
     931                $where .= " AND ($wpdb->posts.ID = '$reqpage')";
    932932                $reqpage_obj = get_page($reqpage);
    933933                if ( 'attachment' == $reqpage_obj->post_type ) {
     
    15311531        if ($this->current_post + 1 < $this->post_count) {
    15321532            return true;
    1533         } elseif ($this->current_post + 1 == $this->post_count) {
     1533        } elseif ($this->current_post + 1 == $this->post_count && $this->post_count > 0) {
    15341534            do_action('loop_end');
    15351535            // Do some cleaning up after the loop
Note: See TracChangeset for help on using the changeset viewer.