From e506648cbcda0b6021cf0a3b5e2f6381d8f1d0ea Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 25 Jan 2015 11:55:12 -0500 Subject: Do not show inactive projects info on the dashboard and update picodb (merge #546) --- app/Model/Board.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/Model/Board.php') diff --git a/app/Model/Board.php b/app/Model/Board.php index d5b83283..8dd68a80 100644 --- a/app/Model/Board.php +++ b/app/Model/Board.php @@ -178,7 +178,7 @@ class Board extends Base */ public function moveDown($project_id, $column_id) { - $columns = $this->db->table(self::TABLE)->eq('project_id', $project_id)->asc('position')->listing('id', 'position'); + $columns = $this->db->hashtable(self::TABLE)->eq('project_id', $project_id)->asc('position')->getAll('id', 'position'); $positions = array_flip($columns); if (isset($columns[$column_id]) && $columns[$column_id] < count($columns)) { @@ -207,7 +207,7 @@ class Board extends Base */ public function moveUp($project_id, $column_id) { - $columns = $this->db->table(self::TABLE)->eq('project_id', $project_id)->asc('position')->listing('id', 'position'); + $columns = $this->db->hashtable(self::TABLE)->eq('project_id', $project_id)->asc('position')->getAll('id', 'position'); $positions = array_flip($columns); if (isset($columns[$column_id]) && $columns[$column_id] > 1) { @@ -264,11 +264,11 @@ class Board extends Base public function getColumnStats($project_id, $prepend = false) { $listing = $this->db - ->table(Task::TABLE) + ->hashtable(Task::TABLE) ->eq('project_id', $project_id) ->eq('is_active', 1) ->groupBy('column_id') - ->listing('column_id', 'COUNT(*) AS total'); + ->getAll('column_id', 'COUNT(*) AS total'); return $prepend ? array(-1 => t('All columns')) + $listing : $listing; } @@ -295,7 +295,7 @@ class Board extends Base */ public function getColumnsList($project_id, $prepend = false) { - $listing = $this->db->table(self::TABLE)->eq('project_id', $project_id)->asc('position')->listing('id', 'title'); + $listing = $this->db->hashtable(self::TABLE)->eq('project_id', $project_id)->asc('position')->getAll('id', 'title'); return $prepend ? array(-1 => t('All columns')) + $listing : $listing; } -- cgit v1.2.3