r1000: Changing the way we look for hidden statuses in the various options
authorRobert Sesek <rsesek@bluestatic.org>
Tue, 1 Aug 2006 05:18:27 +0000 (05:18 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Tue, 1 Aug 2006 05:18:27 +0000 (05:18 +0000)
includes/class_sort.php
index.php

index b41e6072c431c885b1228821262ef0d2e7bc128c..97861b7f31a6bb4fdfbf0fae017b6553178a5a0e 100644 (file)
@@ -114,7 +114,7 @@ class ListSorter
                // this WHERE clause is used for all the queries
                $basewhere = "bug.product IN (" . fetch_on_bits('canviewbugs') . ")
                                                AND (!bug.hidden OR (bug.hidden AND bug.product IN (" . fetch_on_bits('canviewhidden') . ")))" . (($this->registry->options['hidestatuses'] OR isset($this->registry->userinfo['hidestatuses'])) ? "
-                                               AND bug.status NOT IN (" . (isset($this->registry->userinfo['hidestatuses']) ? $this->registry->userinfo['hidestatuses'] : $this->registry->options['hidestatuses']) . ")" : "");
+                                               AND bug.status NOT IN (" . ($this->registry->userinfo['hidestatuses'] != '' ? $this->registry->userinfo['hidestatuses'] : $this->registry->options['hidestatuses']) . ")" : "");
                                                
                // remap the sort keys to be actual SQL fields
                $querykeys = array(
index 03a97b254a44e96015616a7fd0666db83237e3b6..8188c3f00e3a9d6e8706c03978595087441b60eb 100644 (file)
--- a/index.php
+++ b/index.php
@@ -49,7 +49,7 @@ $count = $db->query_first("
        FROM " . TABLE_PREFIX . "bug
        WHERE (!hidden OR (hidden AND product IN (" . fetch_on_bits('canviewhidden') . ")))
        AND product IN (" . fetch_on_bits('canviewbugs') . ")" . (($bugsys->options['hidestatuses'] OR isset($bugsys->userinfo['hidestatuses'])) ? "
-       AND status NOT IN (" . (isset($bugsys->userinfo['hidestatuses']) ? $bugsys->userinfo['hidestatuses'] : $bugsys->options['hidestatuses']) . ")" : "")
+       AND status NOT IN (" . ($bugsys->userinfo['hidestatuses'] != '' ? $bugsys->userinfo['hidestatuses'] : $bugsys->options['hidestatuses']) . ")" : "")
 );
 
 $pagination->total = $count['count'];