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

git-svn-id: https://develop.svn.wordpress.org/trunk@1490 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2004-07-28 01:59:29 +00:00
parent 483dfd5388
commit d605d2aa6f

View File

@ -25,6 +25,14 @@ class WP_Query_State {
parse_str($query);
$this->init();
if ('' != $name) {
$this->single = true;
}
if (($p != '') && ($p != 'all')) {
$this->single = true;
}
if ('' != $m) {
$this->date = true;
}
@ -57,25 +65,11 @@ class WP_Query_State {
$this->date = true;
}
if ('' != $name) {
$this->single = true;
}
if (($p != '') && ($p != 'all')) {
$this->single = true;
}
if (!empty($s)) {
$this->search = true;
}
if ((empty($cat)) || ($cat == 'all') || ($cat == '0') ||
// Bypass cat checks if fetching specific posts
(
intval($year) || intval($monthnum) || intval($day) || intval($w) ||
intval($p) || !empty($name) || !empty($s)
)
) {
if (empty($cat) || ($cat == 'all') || ($cat == '0')) {
$this->category = false;
} else {
if (stristr($cat,'-')) {
@ -88,6 +82,11 @@ class WP_Query_State {
if ('' != $category_name) {
$this->category = true;
}
// single, date, and search override category.
if ($this->single || $this->date || $this->search) {
$this->category = false;
}
if ((empty($author)) || ($author == 'all') || ($author == '0')) {
$this->author = false;