Make WordPress Core

Ticket #3367: 3367-patch.txt

File 3367-patch.txt, 1.1 KB (added by foolswisdom, 18 years ago)
Line 
1Index: wp-includes/classes.php
2===================================================================
3--- wp-includes/classes.php     (revision 4476)
4+++ wp-includes/classes.php     (working copy)
5@@ -598,13 +598,13 @@
6                }
7 
8                if ( $this->is_attachment ) {
9-                       $where .= ' AND (post_status = "attachment")';
10+                       $where .= " AND (post_status = 'attachment')";
11                } elseif ($this->is_page) {
12-                       $where .= ' AND (post_status = "static")';
13+                       $where .= " AND (post_status = 'static')";
14                } elseif ($this->is_single) {
15-                       $where .= ' AND (post_status != "static")';
16+                       $where .= " AND (post_status != 'static')";
17                } else {
18-                       $where .= ' AND (post_status = "publish"';
19+                       $where .= " AND (post_status = 'publish'";
20 
21                        if (isset($user_ID) && ('' != intval($user_ID)))
22                                $where .= " OR post_author = $user_ID AND post_status != 'draft' AND post_status != 'static')";
23@@ -613,7 +613,7 @@
24                }
25 
26                if (! $this->is_attachment )
27-                       $where .= ' AND post_status != "attachment"';
28+                       $where .= " AND post_status != 'attachment'";
29 
30                // Apply filters on where and join prior to paging so that any
31                // manipulations to them are reflected in the paging by day queries.