Ticket #3367: 3367.diff

File 3367.diff, 1.1 KB (added by foolswisdom, 6 years ago)

Attaching again b/c .txt don't get the fancy diff when viewing attach

  • wp-includes/classes.php

     
    598598                } 
    599599 
    600600                if ( $this->is_attachment ) { 
    601                         $where .= ' AND (post_status = "attachment")'; 
     601                        $where .= " AND (post_status = 'attachment')"; 
    602602                } elseif ($this->is_page) { 
    603                         $where .= ' AND (post_status = "static")'; 
     603                        $where .= " AND (post_status = 'static')"; 
    604604                } elseif ($this->is_single) { 
    605                         $where .= ' AND (post_status != "static")'; 
     605                        $where .= " AND (post_status != 'static')"; 
    606606                } else { 
    607                         $where .= ' AND (post_status = "publish"'; 
     607                        $where .= " AND (post_status = 'publish'"; 
    608608 
    609609                        if (isset($user_ID) && ('' != intval($user_ID))) 
    610610                                $where .= " OR post_author = $user_ID AND post_status != 'draft' AND post_status != 'static')"; 
     
    613613                } 
    614614 
    615615                if (! $this->is_attachment ) 
    616                         $where .= ' AND post_status != "attachment"'; 
     616                        $where .= " AND post_status != 'attachment'"; 
    617617 
    618618                // Apply filters on where and join prior to paging so that any 
    619619                // manipulations to them are reflected in the paging by day queries.