From e8a65561680b518e29bd96004ef132cdb1db913f Mon Sep 17 00:00:00 2001 From: Ian Gilfillan Date: Tue, 19 Jul 2016 19:24:50 +0000 Subject: Only allow active distributions to be added, increase visible issues --- h-source/Application/Controllers/IssuesController.php | 6 +++--- h-source/Application/Include/distributions.php | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'h-source/Application') diff --git a/h-source/Application/Controllers/IssuesController.php b/h-source/Application/Controllers/IssuesController.php index 9c7b799..6f7b74b 100644 --- a/h-source/Application/Controllers/IssuesController.php +++ b/h-source/Application/Controllers/IssuesController.php @@ -111,10 +111,10 @@ class IssuesController extends BaseController $recordNumber = $this->m['IssuesModel']->rowNumber(); $page = $this->viewArgs['page']; //set the limit clause - $this->m['IssuesModel']->limit = $this->h['Pages']->getLimit($page,$recordNumber,20); + $this->m['IssuesModel']->limit = $this->h['Pages']->getLimit($page,$recordNumber,30); $data['table'] = $this->m['IssuesModel']->select('issues.*,messages.message,count(*) as numb_mess')->send(); - $data['pageList'] = $this->h['Pages']->render($page-3,7); + $data['pageList'] = $this->h['Pages']->render($page-4,10); $this->append($data); $this->load('viewall'); @@ -200,4 +200,4 @@ class IssuesController extends BaseController } } -} \ No newline at end of file +} diff --git a/h-source/Application/Include/distributions.php b/h-source/Application/Include/distributions.php index 048d1d9..e8c61f0 100644 --- a/h-source/Application/Include/distributions.php +++ b/h-source/Application/Include/distributions.php @@ -25,6 +25,8 @@ class Distributions public static $allowed = array(); + public static $allowed_active = array(); + public static function getList() { return implode(' , ',array_keys(self::$allowed)); @@ -36,6 +38,7 @@ class Distributions $distros = new DistrosModel(); self::$allowed = $distros->clear()->toList("clean_name","full_name")->orderBy("id_order")->send(); + self::$allowed_active = $distros->clear()->where(array('active'=>'1'))->toList("clean_name","full_name")->orderBy("id_order")->send(); } public static function getName($distList = '') @@ -73,7 +76,7 @@ class Distributions { $str = "
"; $str .= "
"; - foreach (self::$allowed as $value => $label) + foreach (self::$allowed_active as $value => $label) { $str .= "
$label
"; } @@ -85,4 +88,4 @@ class Distributions return $str; } -} \ No newline at end of file +} -- cgit v1.2.3