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/Include/distributions.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'h-source/Application/Include') 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