Make WordPress Core

Changeset 1490


Ignore:
Timestamp:
07/28/2004 01:59:29 AM (21 years ago)
Author:
rboren
Message:

Fix for 0000190. Do not set the category query state to true if single, date, or search are true.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/classes.php

    r1449 r1490  
    2525        parse_str($query);
    2626        $this->init();
     27
     28        if ('' != $name) {
     29            $this->single = true;
     30        }
     31
     32        if (($p != '') && ($p != 'all')) {
     33            $this->single = true;
     34        }
    2735
    2836        if ('' != $m) {
     
    5866        }
    5967
    60         if ('' != $name) {
    61             $this->single = true;
    62         }
    63 
    64         if (($p != '') && ($p != 'all')) {
    65             $this->single = true;
    66         }
    67 
    6868        if (!empty($s)) {
    6969            $this->search = true;
    7070        }
    7171
    72         if ((empty($cat)) || ($cat == 'all') || ($cat == '0') ||
    73             // Bypass cat checks if fetching specific posts
    74             (
    75              intval($year) || intval($monthnum) || intval($day) || intval($w) ||
    76              intval($p) || !empty($name) || !empty($s)
    77              )
    78             ) {
     72        if (empty($cat) || ($cat == 'all') || ($cat == '0')) {
    7973            $this->category = false;
    8074        } else {
     
    8882        if ('' != $category_name) {
    8983            $this->category = true;
     84        }
     85           
     86        // single, date, and search override category.
     87        if ($this->single || $this->date || $this->search) {
     88            $this->category = false;               
    9089        }
    9190
Note: See TracChangeset for help on using the changeset viewer.