From 71b4a351d80ee07fe9ff288bc15b08b16af67356 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 25 Jun 2008 14:25:30 -0400 Subject: [PATCH] class_sort.php --- includes/class_sort.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/class_sort.php b/includes/class_sort.php index dba2291..8052ecd 100644 --- a/includes/class_sort.php +++ b/includes/class_sort.php @@ -37,7 +37,7 @@ class ListSorter * @var object * @access private */ - var $registry; + var $db; /** * Page name @@ -77,7 +77,7 @@ class ListSorter function ListSorter($page) { global $bugsys; - $this->registry = $bugsys; + $this->db = BSApp::$db; $this->page = $page; $this->process_incoming(); } @@ -91,13 +91,13 @@ class ListSorter */ function process_incoming() { - $this->sortkey = $this->registry->in['by']; - if (!$this->fetch_by_text($this->registry->in['by'])) + $this->sortkey = BSApp::$input->in['by']; + if (!$this->fetch_by_text(BSApp::$input->in['by'])) { $this->sortkey = (isset(bugdar::$userinfo['defaultsortkey']) ? bugdar::$userinfo['defaultsortkey'] : bugdar::$options['defaultsortkey']); } - $this->direction = $this->registry->in['as']; + $this->direction = BSApp::$input->in['as']; if (!in_array($this->direction, array('asc', 'desc'))) { $this->direction = (isset(bugdar::$userinfo['defaultsortas']) ? bugdar::$userinfo['defaultsortas'] : bugdar::$options['defaultsortas']); @@ -524,7 +524,7 @@ class ListSorter if ($doPerm) { - $fields_fetch = $bugsys->db->query(" + $fields_fetch = BSApp::$db->query(" SELECT bugfield.*, MAX(permission.mask) AS mask FROM " . TABLE_PREFIX . "bugfield AS bugfield LEFT JOIN " . TABLE_PREFIX . "bugfieldpermission AS permission @@ -536,10 +536,10 @@ class ListSorter } else { - $fields_fetch = $bugsys->db->query("SELECT * FROM " . TABLE_PREFIX . "bugfield"); + $fields_fetch = BSApp::$db->query("SELECT * FROM " . TABLE_PREFIX . "bugfield"); } - while ($field = $bugsys->db->fetch_array($fields_fetch)) + foreach ($fields_fetch as $field) { if ($doPerm) { -- 2.43.5