Ticket #3367: 3367.diff
File 3367.diff, 1.1 KB (added by , 18 years ago) |
---|
-
wp-includes/classes.php
598 598 } 599 599 600 600 if ( $this->is_attachment ) { 601 $where .= ' AND (post_status = "attachment")';601 $where .= " AND (post_status = 'attachment')"; 602 602 } elseif ($this->is_page) { 603 $where .= ' AND (post_status = "static")';603 $where .= " AND (post_status = 'static')"; 604 604 } elseif ($this->is_single) { 605 $where .= ' AND (post_status != "static")';605 $where .= " AND (post_status != 'static')"; 606 606 } else { 607 $where .= ' AND (post_status = "publish"';607 $where .= " AND (post_status = 'publish'"; 608 608 609 609 if (isset($user_ID) && ('' != intval($user_ID))) 610 610 $where .= " OR post_author = $user_ID AND post_status != 'draft' AND post_status != 'static')"; … … 613 613 } 614 614 615 615 if (! $this->is_attachment ) 616 $where .= ' AND post_status != "attachment"';616 $where .= " AND post_status != 'attachment'"; 617 617 618 618 // Apply filters on where and join prior to paging so that any 619 619 // manipulations to them are reflected in the paging by day queries.