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

git-svn-id: http://svn.automattic.com/wordpress/trunk@1490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren 2004-07-28 01:59:29 +00:00
parent a095fdaf84
commit 487c3dbd66
1 changed files with 14 additions and 15 deletions

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;