From 13e078256809152967b58b9765d4bb19dc207b6c Mon Sep 17 00:00:00 2001 From: Deon George Date: Tue, 26 Aug 2014 16:22:31 +1000 Subject: [PATCH] Enabled SSL active services, exclude external_billing in active services --- modules/service/classes/Model/Service.php | 2 +- modules/ssl/classes/Controller/Reseller/Ssl.php | 4 ++-- modules/ssl/classes/Model/SSL/CA.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/service/classes/Model/Service.php b/modules/service/classes/Model/Service.php index 533ebc3c..04889844 100644 --- a/modules/service/classes/Model/Service.php +++ b/modules/service/classes/Model/Service.php @@ -372,7 +372,7 @@ class Model_Service extends ORM_OSB { $result = array(); foreach ($this->list_active() as $so) - if ($so->expiring($days)) + if ($so->expiring($days) AND ! $so->external_billing) array_push($result,$so); return $result; diff --git a/modules/ssl/classes/Controller/Reseller/Ssl.php b/modules/ssl/classes/Controller/Reseller/Ssl.php index 2f076395..d133853d 100644 --- a/modules/ssl/classes/Controller/Reseller/Ssl.php +++ b/modules/ssl/classes/Controller/Reseller/Ssl.php @@ -25,7 +25,7 @@ class Controller_Reseller_SSL extends Controller_SSL { ->title_icon('icon-th-list') ->body(Table::factory() ->jssort('ca') - ->data(ORM::factory('SSL_CA')->where_authorised($this->ao)->find_all()) + ->data(ORM::factory('SSL_CA')->where_authorised($this->ao)->where_active()->find_all()) ->columns(array( 'id'=>'ID', 'sign_cert'=>'Cert', @@ -53,7 +53,7 @@ class Controller_Reseller_SSL extends Controller_SSL { ->title_icon('icon-th-list') ->body(Table::factory() ->jssort('ca') - ->data($sco->where_authorised($this->ao)->list_childca()) + ->data($sco->where_authorised($this->ao)->where_active()->list_childca()) ->columns(array( 'id'=>'ID', 'sign_cert'=>'Cert', diff --git a/modules/ssl/classes/Model/SSL/CA.php b/modules/ssl/classes/Model/SSL/CA.php index caae5ff7..9a6c77b8 100644 --- a/modules/ssl/classes/Model/SSL/CA.php +++ b/modules/ssl/classes/Model/SSL/CA.php @@ -148,7 +148,7 @@ class Model_SSL_CA extends ORM_OSB { } public function list_childca() { - return $this->children->find_all(); + return $this->children->where_active()->find_all(); } public function list_childcrt() {