From 7c1c14cf64b59f211b9d505112797cb855e5b604 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 18 Jan 2015 17:59:41 -0500 Subject: Pagination refactoring --- app/Core/Helper.php | 68 +---------------------------------------------------- 1 file changed, 1 insertion(+), 67 deletions(-) (limited to 'app/Core/Helper.php') diff --git a/app/Core/Helper.php b/app/Core/Helper.php index 146cb2f8..dbe5a271 100644 --- a/app/Core/Helper.php +++ b/app/Core/Helper.php @@ -462,73 +462,7 @@ class Helper $values += $params; - return '?'.http_build_query($values, ''); - } - - /** - * Pagination links - * - * @param array $pagination Pagination information - * @return string - */ - public function paginate(array $pagination) - { - extract($pagination); - - if ($pagination['offset'] === 0 && ($total - $pagination['offset']) <= $limit) { - return ''; - } - - $html = ''; - - return $html; - } - - /** - * Column sorting (work with pagination) - * - * @param string $label Column title - * @param string $column SQL column name - * @param array $pagination Pagination information - * @return string - */ - public function order($label, $column, array $pagination) - { - extract($pagination); - - $prefix = ''; - - if ($order === $column) { - $prefix = $direction === 'DESC' ? '▼ ' : '▲ '; - $direction = $direction === 'DESC' ? 'ASC' : 'DESC'; - } - - $order = $column; - - return $prefix.$this->a($label, $controller, $action, $params + compact('offset', 'order', 'direction')); + return '?'.http_build_query($values); } /** -- cgit v1.2.3