From 28cdf6476bbafff1b09831abb2c6b4aefcb6d965 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Thu, 26 Nov 2020 23:34:01 -0500 Subject: [PATCH 01/58] Update .htaccess --- src/.htaccess | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/.htaccess b/src/.htaccess index fcd5b8b82..7404debb8 100644 --- a/src/.htaccess +++ b/src/.htaccess @@ -2,7 +2,7 @@ # If you are receiving "Internal Server Error" message, make sure mod_rewrite is enabled in apache Options -Indexes -Options +FollowSymLinks +# Options +FollowSymLinks RewriteEngine On From 2ebfe6f63177e8a5ed5624baea59284624ee5e58 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Thu, 26 Nov 2020 23:55:04 -0500 Subject: [PATCH 02/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 82f7f7fd2..e5a3fb625 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,7 +444,7 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); + $serviceHostingServerModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); @@ -652,7 +652,7 @@ class Service implements InjectionAwareInterface return $newId; } - public function deleteServer(\Model_ServiceHostingServer $model) + public function deleteServer(\Model_ServiceHosting $model) { $id = $model->id; $this->di['db']->trash($model); @@ -660,7 +660,7 @@ class Service implements InjectionAwareInterface return true; } - public function updateServer(\Model_ServiceHostingServer $model, array $data) + public function updateServer(\Model_ServiceHosting $model, array $data) { $model->name = $this->di['array_get']($data, 'name', $model->name); $model->ip = $this->di['array_get']($data, 'ip', $model->ip); @@ -696,7 +696,7 @@ class Service implements InjectionAwareInterface return true; } - public function getServerManager(\Model_ServiceHostingServer $model) + public function getServerManager(\Model_ServiceHosting $model) { if(empty($model->manager)) { throw new \Box_Exception('Invalid server manager. Server was not configured properly.', null, 654); @@ -720,7 +720,7 @@ class Service implements InjectionAwareInterface return $manager; } - public function testConnection(\Model_ServiceHostingServer $model) + public function testConnection(\Model_ServiceHosting $model) { $m = $this->getServerManager($model); return $m->testConnection(); From 4a149d48d3a9be4b9fa57ff9221b69de71bafcdd Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Thu, 26 Nov 2020 23:59:52 -0500 Subject: [PATCH 03/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index e5a3fb625..db8e083a5 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -462,7 +462,7 @@ class Service implements InjectionAwareInterface ); } - public function toHostingServerApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) + public function toHostingServerApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { list($cpanel_url, $whm_url) = $this->getMangerUrls($model); $result = array( From d9218124ffc097de93e9503d3ae41d73892f233a Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 00:02:08 -0500 Subject: [PATCH 04/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index db8e083a5..e5a3fb625 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -462,7 +462,7 @@ class Service implements InjectionAwareInterface ); } - public function toHostingServerApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) + public function toHostingServerApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) { list($cpanel_url, $whm_url) = $this->getMangerUrls($model); $result = array( From ba6e07d13692b3ec19a6abde4f1aab79106e2312 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 00:03:56 -0500 Subject: [PATCH 05/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index e5a3fb625..685e28690 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,7 +444,7 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingServerModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); + $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); From 0dbfbba11a182ef37506fc968a2b398e95bbbfad Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 00:05:34 -0500 Subject: [PATCH 06/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 685e28690..6fa98dc71 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -442,9 +442,9 @@ class Service implements InjectionAwareInterface return array($adapter, $a); } - public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) + public function toApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) { - $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); + $serviceHostingServerModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); From 23634956a0d9453c1a320d367cdab95eb559a866 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 00:07:19 -0500 Subject: [PATCH 07/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 6fa98dc71..b6fbead3e 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,7 +444,7 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) { - $serviceHostingServerModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); + $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); From 1fc189ec7bb93bd2983d1250e9350db503057899 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 00:08:47 -0500 Subject: [PATCH 08/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index b6fbead3e..685e28690 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -442,7 +442,7 @@ class Service implements InjectionAwareInterface return array($adapter, $a); } - public function toApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) + public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); From 00cf59a8342d40b26ed17d3c9ed42cafa9c167f7 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 00:11:21 -0500 Subject: [PATCH 09/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 685e28690..e5a3fb625 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,7 +444,7 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); + $serviceHostingServerModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); From 2e48f1bb9d914df8c280de672dca8f473bfe3e6f Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 00:14:50 -0500 Subject: [PATCH 10/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index e5a3fb625..685e28690 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,7 +444,7 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingServerModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); + $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); From f116addba65e807c80c2fcea87958875c55709ef Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 00:17:46 -0500 Subject: [PATCH 11/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 685e28690..e5a3fb625 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,7 +444,7 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); + $serviceHostingServerModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); From af8424d48636f39d8901e41e4cf9418e59c6966c Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 00:19:55 -0500 Subject: [PATCH 12/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index e5a3fb625..db8e083a5 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -462,7 +462,7 @@ class Service implements InjectionAwareInterface ); } - public function toHostingServerApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) + public function toHostingServerApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { list($cpanel_url, $whm_url) = $this->getMangerUrls($model); $result = array( From 3e64a9a7dfd959c81f9c55ff2ffba9967a0bb277 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 00:21:46 -0500 Subject: [PATCH 13/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index db8e083a5..e5a3fb625 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -462,7 +462,7 @@ class Service implements InjectionAwareInterface ); } - public function toHostingServerApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) + public function toHostingServerApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) { list($cpanel_url, $whm_url) = $this->getMangerUrls($model); $result = array( From 86da87a2b257c7e9b27102d982be64b08eb38371 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 00:23:07 -0500 Subject: [PATCH 14/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index e5a3fb625..685e28690 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,7 +444,7 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingServerModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); + $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); From f1742fc1e62af6ca6b3df2a595bf257f8b76dcb7 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 00:24:34 -0500 Subject: [PATCH 15/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 685e28690..b6fbead3e 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -442,7 +442,7 @@ class Service implements InjectionAwareInterface return array($adapter, $a); } - public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) + public function toApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) { $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); From d32e6cfd62856318c57acf0e7fc4c61defb23c59 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 00:28:04 -0500 Subject: [PATCH 16/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index b6fbead3e..7f7eb7bf6 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -442,7 +442,7 @@ class Service implements InjectionAwareInterface return array($adapter, $a); } - public function toApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) + public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); @@ -462,7 +462,7 @@ class Service implements InjectionAwareInterface ); } - public function toHostingServerApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) + public function toHostingServerApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { list($cpanel_url, $whm_url) = $this->getMangerUrls($model); $result = array( @@ -871,7 +871,7 @@ class Service implements InjectionAwareInterface return $p; } - public function getServerManagerWithLog(\Model_ServiceHostingServer $model, \Model_ClientOrder $order) + public function getServerManagerWithLog(\Model_ServiceHosting $model, \Model_ClientOrder $order) { $manager = $this->getServerManager($model); @@ -881,7 +881,7 @@ class Service implements InjectionAwareInterface return $manager; } - public function getMangerUrls(\Model_ServiceHostingServer $model) + public function getMangerUrls(\Model_ServiceHosting $model) { try { $m = $this->getServerManager($model); From 5fdcf1af3cbcb21d9b8347ec48f9cba49e263f30 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 00:29:35 -0500 Subject: [PATCH 17/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 7f7eb7bf6..d1084aa52 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,7 +444,7 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); + $serviceHostingServerModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); From c192bc0ef4eb7032ba8d94a2fe025b6334e0d49c Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 00:42:09 -0500 Subject: [PATCH 18/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index d1084aa52..4f852c389 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,7 +444,7 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingServerModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); + $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); @@ -652,7 +652,7 @@ class Service implements InjectionAwareInterface return $newId; } - public function deleteServer(\Model_ServiceHosting $model) + public function deleteServer(\Model_ServiceHostingServer $model) { $id = $model->id; $this->di['db']->trash($model); @@ -660,7 +660,7 @@ class Service implements InjectionAwareInterface return true; } - public function updateServer(\Model_ServiceHosting $model, array $data) + public function updateServer(\Model_ServiceHostingServer $model, array $data) { $model->name = $this->di['array_get']($data, 'name', $model->name); $model->ip = $this->di['array_get']($data, 'ip', $model->ip); @@ -696,7 +696,7 @@ class Service implements InjectionAwareInterface return true; } - public function getServerManager(\Model_ServiceHosting $model) + public function getServerManager(\Model_ServiceHostingServer $model) { if(empty($model->manager)) { throw new \Box_Exception('Invalid server manager. Server was not configured properly.', null, 654); @@ -720,7 +720,7 @@ class Service implements InjectionAwareInterface return $manager; } - public function testConnection(\Model_ServiceHosting $model) + public function testConnection(\Model_ServiceHostingServer $model) { $m = $this->getServerManager($model); return $m->testConnection(); From d674514026894d78aff957474a42b736708a2e4a Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 00:45:07 -0500 Subject: [PATCH 19/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 4f852c389..360c58ff8 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -462,7 +462,7 @@ class Service implements InjectionAwareInterface ); } - public function toHostingServerApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) + public function toHostingServerApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) { list($cpanel_url, $whm_url) = $this->getMangerUrls($model); $result = array( From 5b68b97481891ee447517a0239464636f8f5d32e Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 00:47:26 -0500 Subject: [PATCH 20/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 360c58ff8..82f7f7fd2 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -871,7 +871,7 @@ class Service implements InjectionAwareInterface return $p; } - public function getServerManagerWithLog(\Model_ServiceHosting $model, \Model_ClientOrder $order) + public function getServerManagerWithLog(\Model_ServiceHostingServer $model, \Model_ClientOrder $order) { $manager = $this->getServerManager($model); @@ -881,7 +881,7 @@ class Service implements InjectionAwareInterface return $manager; } - public function getMangerUrls(\Model_ServiceHosting $model) + public function getMangerUrls(\Model_ServiceHostingServer $model) { try { $m = $this->getServerManager($model); From 5e1ccaaef0922d0b4c59721feac5e6319c55668a Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 00:51:20 -0500 Subject: [PATCH 21/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 82f7f7fd2..a324249d3 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -239,7 +239,7 @@ class Service implements InjectionAwareInterface } } - public function changeAccountPlan(\Model_ClientOrder $order, \Model_ServiceHosting $model, \Model_ServiceHostingHp $hp) + public function changeAccountPlan(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, \Model_ServiceHostingHp $hp) { $model->service_hosting_hp_id = $hp->id; if($this->_performOnService($order)){ @@ -254,7 +254,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountUsername(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) + public function changeAccountUsername(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) { if(!isset($data['username']) || empty($data['username'])) { throw new \Box_Exception('Account password is missing or is not valid'); @@ -275,7 +275,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountIp(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) + public function changeAccountIp(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) { if(!isset($data['ip']) || empty($data['ip'])) { throw new \Box_Exception('Account ip is missing or is not valid'); @@ -295,7 +295,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountDomain(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) + public function changeAccountDomain(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) { if(!isset($data['tld']) || empty($data['tld']) || !isset($data['sld']) || empty($data['sld'])) { @@ -318,7 +318,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountPassword(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) + public function changeAccountPassword(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) { if(!isset($data['password']) || !isset($data['password_confirm']) || $data['password'] != $data['password_confirm']) { @@ -339,7 +339,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function sync(\Model_ClientOrder $order, \Model_ServiceHosting $model) + public function sync(\Model_ClientOrder $order, \Model_ServiceHostingServer $model) { list($adapter, $account) = $this->_getAM($model); $updated = $adapter->synchronizeAccount($account); @@ -358,7 +358,7 @@ class Service implements InjectionAwareInterface return TRUE; } - private function _getDomainOrderId(\Model_ServiceHosting $model) + private function _getDomainOrderId(\Model_ServiceHostingServer $model) { $orderService = $this->di['mod_service']('order'); $o = $orderService->getServiceOrder($model); @@ -392,7 +392,7 @@ class Service implements InjectionAwareInterface return $username; } - public function _getAM(\Model_ServiceHosting $model, \Model_ServiceHostingHp $hp = null) + public function _getAM(\Model_ServiceHostingServer $model, \Model_ServiceHostingHp $hp = null) { if(null === $hp) { $hp = $this->di['db']->getExistingModelById('ServiceHostingHp', $model->service_hosting_hp_id, 'Hosting plan not found'); @@ -442,7 +442,7 @@ class Service implements InjectionAwareInterface return array($adapter, $a); } - public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) + public function toApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) { $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); @@ -540,7 +540,7 @@ class Service implements InjectionAwareInterface return array($sld, $tld); } - public function update(\Model_ServiceHosting $model, array $data) + public function update(\Model_ServiceHostingServer $model, array $data) { if(isset($data['username']) && !empty($data['username'])) { $model->username = $data['username']; From f2f0fcda326b63b4799e11ed460a38843e989759 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 00:52:55 -0500 Subject: [PATCH 22/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index a324249d3..1c690312b 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -442,7 +442,7 @@ class Service implements InjectionAwareInterface return array($adapter, $a); } - public function toApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) + public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); From a5d0ee02068feb1c63be8f8e9f3c9be2182f6879 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:00:53 -0500 Subject: [PATCH 23/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 1c690312b..c02905d08 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -358,7 +358,7 @@ class Service implements InjectionAwareInterface return TRUE; } - private function _getDomainOrderId(\Model_ServiceHostingServer $model) + private function _getDomainOrderId(\Model_ServiceHosting $model) { $orderService = $this->di['mod_service']('order'); $o = $orderService->getServiceOrder($model); From 5a41cc995167d78b1fa169102d4f170236418590 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:02:22 -0500 Subject: [PATCH 24/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 30 +++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index c02905d08..7f7eb7bf6 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -239,7 +239,7 @@ class Service implements InjectionAwareInterface } } - public function changeAccountPlan(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, \Model_ServiceHostingHp $hp) + public function changeAccountPlan(\Model_ClientOrder $order, \Model_ServiceHosting $model, \Model_ServiceHostingHp $hp) { $model->service_hosting_hp_id = $hp->id; if($this->_performOnService($order)){ @@ -254,7 +254,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountUsername(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) + public function changeAccountUsername(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) { if(!isset($data['username']) || empty($data['username'])) { throw new \Box_Exception('Account password is missing or is not valid'); @@ -275,7 +275,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountIp(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) + public function changeAccountIp(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) { if(!isset($data['ip']) || empty($data['ip'])) { throw new \Box_Exception('Account ip is missing or is not valid'); @@ -295,7 +295,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountDomain(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) + public function changeAccountDomain(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) { if(!isset($data['tld']) || empty($data['tld']) || !isset($data['sld']) || empty($data['sld'])) { @@ -318,7 +318,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountPassword(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) + public function changeAccountPassword(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) { if(!isset($data['password']) || !isset($data['password_confirm']) || $data['password'] != $data['password_confirm']) { @@ -339,7 +339,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function sync(\Model_ClientOrder $order, \Model_ServiceHostingServer $model) + public function sync(\Model_ClientOrder $order, \Model_ServiceHosting $model) { list($adapter, $account) = $this->_getAM($model); $updated = $adapter->synchronizeAccount($account); @@ -392,7 +392,7 @@ class Service implements InjectionAwareInterface return $username; } - public function _getAM(\Model_ServiceHostingServer $model, \Model_ServiceHostingHp $hp = null) + public function _getAM(\Model_ServiceHosting $model, \Model_ServiceHostingHp $hp = null) { if(null === $hp) { $hp = $this->di['db']->getExistingModelById('ServiceHostingHp', $model->service_hosting_hp_id, 'Hosting plan not found'); @@ -462,7 +462,7 @@ class Service implements InjectionAwareInterface ); } - public function toHostingServerApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) + public function toHostingServerApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { list($cpanel_url, $whm_url) = $this->getMangerUrls($model); $result = array( @@ -540,7 +540,7 @@ class Service implements InjectionAwareInterface return array($sld, $tld); } - public function update(\Model_ServiceHostingServer $model, array $data) + public function update(\Model_ServiceHosting $model, array $data) { if(isset($data['username']) && !empty($data['username'])) { $model->username = $data['username']; @@ -652,7 +652,7 @@ class Service implements InjectionAwareInterface return $newId; } - public function deleteServer(\Model_ServiceHostingServer $model) + public function deleteServer(\Model_ServiceHosting $model) { $id = $model->id; $this->di['db']->trash($model); @@ -660,7 +660,7 @@ class Service implements InjectionAwareInterface return true; } - public function updateServer(\Model_ServiceHostingServer $model, array $data) + public function updateServer(\Model_ServiceHosting $model, array $data) { $model->name = $this->di['array_get']($data, 'name', $model->name); $model->ip = $this->di['array_get']($data, 'ip', $model->ip); @@ -696,7 +696,7 @@ class Service implements InjectionAwareInterface return true; } - public function getServerManager(\Model_ServiceHostingServer $model) + public function getServerManager(\Model_ServiceHosting $model) { if(empty($model->manager)) { throw new \Box_Exception('Invalid server manager. Server was not configured properly.', null, 654); @@ -720,7 +720,7 @@ class Service implements InjectionAwareInterface return $manager; } - public function testConnection(\Model_ServiceHostingServer $model) + public function testConnection(\Model_ServiceHosting $model) { $m = $this->getServerManager($model); return $m->testConnection(); @@ -871,7 +871,7 @@ class Service implements InjectionAwareInterface return $p; } - public function getServerManagerWithLog(\Model_ServiceHostingServer $model, \Model_ClientOrder $order) + public function getServerManagerWithLog(\Model_ServiceHosting $model, \Model_ClientOrder $order) { $manager = $this->getServerManager($model); @@ -881,7 +881,7 @@ class Service implements InjectionAwareInterface return $manager; } - public function getMangerUrls(\Model_ServiceHostingServer $model) + public function getMangerUrls(\Model_ServiceHosting $model) { try { $m = $this->getServerManager($model); From 81c2ca33d5a74143575db78adb9ecb996cdad28e Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:04:13 -0500 Subject: [PATCH 25/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 46 +++++++++++------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 7f7eb7bf6..68d36b6c8 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -99,7 +99,7 @@ class Service implements InjectionAwareInterface { $orderService = $this->di['mod_service']('order'); $model = $orderService->getOrderService($order); - if(!$model instanceof \Model_ServiceHosting) { + if(!$model instanceof \Model_ServiceHostingServer) { throw new \Box_Exception('Could not activate order. Service was not created'); } @@ -230,7 +230,7 @@ class Service implements InjectionAwareInterface { $orderService = $this->di['mod_service']('order'); $service = $orderService->getOrderService($order); - if($service instanceof \Model_ServiceHosting) { + if($service instanceof \Model_ServiceHostingServer) { //cancel if not canceled if($order->status != \Model_ClientOrder::STATUS_CANCELED) { $this->action_cancel($order); @@ -239,7 +239,7 @@ class Service implements InjectionAwareInterface } } - public function changeAccountPlan(\Model_ClientOrder $order, \Model_ServiceHosting $model, \Model_ServiceHostingHp $hp) + public function changeAccountPlan(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, \Model_ServiceHostingServerHp $hp) { $model->service_hosting_hp_id = $hp->id; if($this->_performOnService($order)){ @@ -254,7 +254,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountUsername(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) + public function changeAccountUsername(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) { if(!isset($data['username']) || empty($data['username'])) { throw new \Box_Exception('Account password is missing or is not valid'); @@ -275,7 +275,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountIp(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) + public function changeAccountIp(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) { if(!isset($data['ip']) || empty($data['ip'])) { throw new \Box_Exception('Account ip is missing or is not valid'); @@ -295,7 +295,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountDomain(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) + public function changeAccountDomain(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) { if(!isset($data['tld']) || empty($data['tld']) || !isset($data['sld']) || empty($data['sld'])) { @@ -318,7 +318,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountPassword(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) + public function changeAccountPassword(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) { if(!isset($data['password']) || !isset($data['password_confirm']) || $data['password'] != $data['password_confirm']) { @@ -339,7 +339,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function sync(\Model_ClientOrder $order, \Model_ServiceHosting $model) + public function sync(\Model_ClientOrder $order, \Model_ServiceHostingServer $model) { list($adapter, $account) = $this->_getAM($model); $updated = $adapter->synchronizeAccount($account); @@ -358,7 +358,7 @@ class Service implements InjectionAwareInterface return TRUE; } - private function _getDomainOrderId(\Model_ServiceHosting $model) + private function _getDomainOrderId(\Model_ServiceHostingServer $model) { $orderService = $this->di['mod_service']('order'); $o = $orderService->getServiceOrder($model); @@ -392,7 +392,7 @@ class Service implements InjectionAwareInterface return $username; } - public function _getAM(\Model_ServiceHosting $model, \Model_ServiceHostingHp $hp = null) + public function _getAM(\Model_ServiceHostingServer $model, \Model_ServiceHostingServerHp $hp = null) { if(null === $hp) { $hp = $this->di['db']->getExistingModelById('ServiceHostingHp', $model->service_hosting_hp_id, 'Hosting plan not found'); @@ -442,7 +442,7 @@ class Service implements InjectionAwareInterface return array($adapter, $a); } - public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) + public function toApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) { $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); @@ -462,7 +462,7 @@ class Service implements InjectionAwareInterface ); } - public function toHostingServerApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) + public function toHostingServerApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) { list($cpanel_url, $whm_url) = $this->getMangerUrls($model); $result = array( @@ -540,7 +540,7 @@ class Service implements InjectionAwareInterface return array($sld, $tld); } - public function update(\Model_ServiceHosting $model, array $data) + public function update(\Model_ServiceHostingServer $model, array $data) { if(isset($data['username']) && !empty($data['username'])) { $model->username = $data['username']; @@ -652,7 +652,7 @@ class Service implements InjectionAwareInterface return $newId; } - public function deleteServer(\Model_ServiceHosting $model) + public function deleteServer(\Model_ServiceHostingServer $model) { $id = $model->id; $this->di['db']->trash($model); @@ -660,7 +660,7 @@ class Service implements InjectionAwareInterface return true; } - public function updateServer(\Model_ServiceHosting $model, array $data) + public function updateServer(\Model_ServiceHostingServer $model, array $data) { $model->name = $this->di['array_get']($data, 'name', $model->name); $model->ip = $this->di['array_get']($data, 'ip', $model->ip); @@ -696,7 +696,7 @@ class Service implements InjectionAwareInterface return true; } - public function getServerManager(\Model_ServiceHosting $model) + public function getServerManager(\Model_ServiceHostingServer $model) { if(empty($model->manager)) { throw new \Box_Exception('Invalid server manager. Server was not configured properly.', null, 654); @@ -720,7 +720,7 @@ class Service implements InjectionAwareInterface return $manager; } - public function testConnection(\Model_ServiceHosting $model) + public function testConnection(\Model_ServiceHostingServer $model) { $m = $this->getServerManager($model); return $m->testConnection(); @@ -747,7 +747,7 @@ class Service implements InjectionAwareInterface return array($sql, array()); } - public function deleteHp(\Model_ServiceHostingHp $model) + public function deleteHp(\Model_ServiceHostingServerHp $model) { $id = $model->id; $serviceHosting = $this->di['db']->findOne('ServiceHosting', 'service_hosting_hp_id = ?', array($model->id)); @@ -759,7 +759,7 @@ class Service implements InjectionAwareInterface return true; } - public function toHostingHpApiArray(\Model_ServiceHostingHp $model, $deep = false, $identity = null) + public function toHostingHpApiArray(\Model_ServiceHostingServerHp $model, $deep = false, $identity = null) { $result = array( 'id' => $model->id, @@ -782,7 +782,7 @@ class Service implements InjectionAwareInterface return $result; } - public function updateHp(\Model_ServiceHostingHp $model, array $data) + public function updateHp(\Model_ServiceHostingServerHp $model, array $data) { $model->name = $this->di['array_get']($data, 'name', $model->name); $model->bandwidth = $this->di['array_get']($data, 'bandwidth', $model->bandwidth); @@ -848,7 +848,7 @@ class Service implements InjectionAwareInterface return $newId; } - public function getServerPackage(\Model_ServiceHostingHp $model) + public function getServerPackage(\Model_ServiceHostingServerHp $model) { $config = json_decode($model->config, 1); if (!is_array($config)){ @@ -871,7 +871,7 @@ class Service implements InjectionAwareInterface return $p; } - public function getServerManagerWithLog(\Model_ServiceHosting $model, \Model_ClientOrder $order) + public function getServerManagerWithLog(\Model_ServiceHostingServer $model, \Model_ClientOrder $order) { $manager = $this->getServerManager($model); @@ -881,7 +881,7 @@ class Service implements InjectionAwareInterface return $manager; } - public function getMangerUrls(\Model_ServiceHosting $model) + public function getMangerUrls(\Model_ServiceHostingServer $model) { try { $m = $this->getServerManager($model); From 02aa66b161019a19daef638826d5098ef9a3f124 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:05:27 -0500 Subject: [PATCH 26/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 68d36b6c8..64ad8ca7f 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -442,7 +442,7 @@ class Service implements InjectionAwareInterface return array($adapter, $a); } - public function toApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) + public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); From 7af041b1a2630693969f05390f68abe2750cb424 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:08:13 -0500 Subject: [PATCH 27/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 64ad8ca7f..48a80c72f 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,9 +444,9 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); + $serviceHostingModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); - $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); + $server = $this->toHostingServerApiArray($serviceHostingModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); return array( From 485666a5d787713dd0024a3006bbb5cd4e4f75fb Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:09:34 -0500 Subject: [PATCH 28/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 44 +++++++++++------------ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 48a80c72f..c165c92aa 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -99,7 +99,7 @@ class Service implements InjectionAwareInterface { $orderService = $this->di['mod_service']('order'); $model = $orderService->getOrderService($order); - if(!$model instanceof \Model_ServiceHostingServer) { + if(!$model instanceof \Model_ServiceHosting) { throw new \Box_Exception('Could not activate order. Service was not created'); } @@ -230,7 +230,7 @@ class Service implements InjectionAwareInterface { $orderService = $this->di['mod_service']('order'); $service = $orderService->getOrderService($order); - if($service instanceof \Model_ServiceHostingServer) { + if($service instanceof \Model_ServiceHosting) { //cancel if not canceled if($order->status != \Model_ClientOrder::STATUS_CANCELED) { $this->action_cancel($order); @@ -239,7 +239,7 @@ class Service implements InjectionAwareInterface } } - public function changeAccountPlan(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, \Model_ServiceHostingServerHp $hp) + public function changeAccountPlan(\Model_ClientOrder $order, \Model_ServiceHosting $model, \Model_ServiceHostingHp $hp) { $model->service_hosting_hp_id = $hp->id; if($this->_performOnService($order)){ @@ -254,7 +254,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountUsername(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) + public function changeAccountUsername(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) { if(!isset($data['username']) || empty($data['username'])) { throw new \Box_Exception('Account password is missing or is not valid'); @@ -275,7 +275,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountIp(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) + public function changeAccountIp(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) { if(!isset($data['ip']) || empty($data['ip'])) { throw new \Box_Exception('Account ip is missing or is not valid'); @@ -295,7 +295,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountDomain(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) + public function changeAccountDomain(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) { if(!isset($data['tld']) || empty($data['tld']) || !isset($data['sld']) || empty($data['sld'])) { @@ -318,7 +318,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountPassword(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) + public function changeAccountPassword(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) { if(!isset($data['password']) || !isset($data['password_confirm']) || $data['password'] != $data['password_confirm']) { @@ -339,7 +339,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function sync(\Model_ClientOrder $order, \Model_ServiceHostingServer $model) + public function sync(\Model_ClientOrder $order, \Model_ServiceHosting $model) { list($adapter, $account) = $this->_getAM($model); $updated = $adapter->synchronizeAccount($account); @@ -358,7 +358,7 @@ class Service implements InjectionAwareInterface return TRUE; } - private function _getDomainOrderId(\Model_ServiceHostingServer $model) + private function _getDomainOrderId(\Model_ServiceHosting $model) { $orderService = $this->di['mod_service']('order'); $o = $orderService->getServiceOrder($model); @@ -392,7 +392,7 @@ class Service implements InjectionAwareInterface return $username; } - public function _getAM(\Model_ServiceHostingServer $model, \Model_ServiceHostingServerHp $hp = null) + public function _getAM(\Model_ServiceHosting $model, \Model_ServiceHostingHp $hp = null) { if(null === $hp) { $hp = $this->di['db']->getExistingModelById('ServiceHostingHp', $model->service_hosting_hp_id, 'Hosting plan not found'); @@ -462,7 +462,7 @@ class Service implements InjectionAwareInterface ); } - public function toHostingServerApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) + public function toHostingServerApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { list($cpanel_url, $whm_url) = $this->getMangerUrls($model); $result = array( @@ -540,7 +540,7 @@ class Service implements InjectionAwareInterface return array($sld, $tld); } - public function update(\Model_ServiceHostingServer $model, array $data) + public function update(\Model_ServiceHosting $model, array $data) { if(isset($data['username']) && !empty($data['username'])) { $model->username = $data['username']; @@ -652,7 +652,7 @@ class Service implements InjectionAwareInterface return $newId; } - public function deleteServer(\Model_ServiceHostingServer $model) + public function deleteServer(\Model_ServiceHosting $model) { $id = $model->id; $this->di['db']->trash($model); @@ -660,7 +660,7 @@ class Service implements InjectionAwareInterface return true; } - public function updateServer(\Model_ServiceHostingServer $model, array $data) + public function updateServer(\Model_ServiceHosting $model, array $data) { $model->name = $this->di['array_get']($data, 'name', $model->name); $model->ip = $this->di['array_get']($data, 'ip', $model->ip); @@ -696,7 +696,7 @@ class Service implements InjectionAwareInterface return true; } - public function getServerManager(\Model_ServiceHostingServer $model) + public function getServerManager(\Model_ServiceHosting $model) { if(empty($model->manager)) { throw new \Box_Exception('Invalid server manager. Server was not configured properly.', null, 654); @@ -720,7 +720,7 @@ class Service implements InjectionAwareInterface return $manager; } - public function testConnection(\Model_ServiceHostingServer $model) + public function testConnection(\Model_ServiceHosting $model) { $m = $this->getServerManager($model); return $m->testConnection(); @@ -747,7 +747,7 @@ class Service implements InjectionAwareInterface return array($sql, array()); } - public function deleteHp(\Model_ServiceHostingServerHp $model) + public function deleteHp(\Model_ServiceHostingHp $model) { $id = $model->id; $serviceHosting = $this->di['db']->findOne('ServiceHosting', 'service_hosting_hp_id = ?', array($model->id)); @@ -759,7 +759,7 @@ class Service implements InjectionAwareInterface return true; } - public function toHostingHpApiArray(\Model_ServiceHostingServerHp $model, $deep = false, $identity = null) + public function toHostingHpApiArray(\Model_ServiceHostingHp $model, $deep = false, $identity = null) { $result = array( 'id' => $model->id, @@ -782,7 +782,7 @@ class Service implements InjectionAwareInterface return $result; } - public function updateHp(\Model_ServiceHostingServerHp $model, array $data) + public function updateHp(\Model_ServiceHostingHp $model, array $data) { $model->name = $this->di['array_get']($data, 'name', $model->name); $model->bandwidth = $this->di['array_get']($data, 'bandwidth', $model->bandwidth); @@ -848,7 +848,7 @@ class Service implements InjectionAwareInterface return $newId; } - public function getServerPackage(\Model_ServiceHostingServerHp $model) + public function getServerPackage(\Model_ServiceHostingHp $model) { $config = json_decode($model->config, 1); if (!is_array($config)){ @@ -871,7 +871,7 @@ class Service implements InjectionAwareInterface return $p; } - public function getServerManagerWithLog(\Model_ServiceHostingServer $model, \Model_ClientOrder $order) + public function getServerManagerWithLog(\Model_ServiceHosting $model, \Model_ClientOrder $order) { $manager = $this->getServerManager($model); @@ -881,7 +881,7 @@ class Service implements InjectionAwareInterface return $manager; } - public function getMangerUrls(\Model_ServiceHostingServer $model) + public function getMangerUrls(\Model_ServiceHosting $model) { try { $m = $this->getServerManager($model); From f14eb2cae2fd286e004ac15ee6d7f20332c51184 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:11:14 -0500 Subject: [PATCH 29/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index c165c92aa..59975a415 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -462,7 +462,7 @@ class Service implements InjectionAwareInterface ); } - public function toHostingServerApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) + public function toHostingServerApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) { list($cpanel_url, $whm_url) = $this->getMangerUrls($model); $result = array( From 9b5fb4609bef1608b63f9a55769eb82e6efafc90 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:12:55 -0500 Subject: [PATCH 30/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 59975a415..aa8300434 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,7 +444,7 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); + $serviceHostingModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); From 873f539453b5ac99a78b91a8d144309f8e395ce4 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:14:05 -0500 Subject: [PATCH 31/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index aa8300434..7e2f30d80 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -462,7 +462,7 @@ class Service implements InjectionAwareInterface ); } - public function toHostingServerApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) + public function toHostingServerApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { list($cpanel_url, $whm_url) = $this->getMangerUrls($model); $result = array( From 01f9d0e0c1d41f4d208910c4b823159159c35790 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:21:43 -0500 Subject: [PATCH 32/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 7e2f30d80..75dbafe07 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -76,7 +76,7 @@ class Service implements InjectionAwareInterface $c = $orderService->getConfig($order); $this->validateOrderData($c); - $server = $this->di['db']->getExistingModelById('ServiceHostingServer', $c['server_id'], 'Server from order configuration was not found'); + $server = $this->di['db']->getExistingModelById('ServiceHosting', $c['server_id'], 'Server from order configuration was not found'); $hp = $this->di['db']->getExistingModelById('ServiceHostingHp', $c['hosting_plan_id'], 'Hosting plan from order configuration was not found'); @@ -398,7 +398,7 @@ class Service implements InjectionAwareInterface $hp = $this->di['db']->getExistingModelById('ServiceHostingHp', $model->service_hosting_hp_id, 'Hosting plan not found'); } - $server = $this->di['db']->getExistingModelById('ServiceHostingServer', $model->service_hosting_server_id, 'Server not found'); + $server = $this->di['db']->getExistingModelById('ServiceHosting', $model->service_hosting_server_id, 'Server not found'); $c = $this->di['db']->getExistingModelById('Client', $model->client_id, 'Client not found'); $hp_config = $hp->config; @@ -621,7 +621,7 @@ class Service implements InjectionAwareInterface public function createServer($name, $ip, $manager, $data) { - $model = $this->di['db']->dispense('ServiceHostingServer'); + $model = $this->di['db']->dispense('ServiceHosting'); $model->name = $name; $model->ip = $ip; From 756519ee4688efd5e395c1790e7781ededb5dd03 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:25:46 -0500 Subject: [PATCH 33/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 75dbafe07..9dd15c7f5 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -392,13 +392,13 @@ class Service implements InjectionAwareInterface return $username; } - public function _getAM(\Model_ServiceHosting $model, \Model_ServiceHostingHp $hp = null) + public function _getAM(\Model_ServiceHostingServer $model, \Model_ServiceHostingHp $hp = null) { if(null === $hp) { $hp = $this->di['db']->getExistingModelById('ServiceHostingHp', $model->service_hosting_hp_id, 'Hosting plan not found'); } - $server = $this->di['db']->getExistingModelById('ServiceHosting', $model->service_hosting_server_id, 'Server not found'); + $server = $this->di['db']->getExistingModelById('ServiceHostingServer', $model->service_hosting_server_id, 'Server not found'); $c = $this->di['db']->getExistingModelById('Client', $model->client_id, 'Client not found'); $hp_config = $hp->config; @@ -462,7 +462,7 @@ class Service implements InjectionAwareInterface ); } - public function toHostingServerApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) + public function toHostingServerApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) { list($cpanel_url, $whm_url) = $this->getMangerUrls($model); $result = array( @@ -621,7 +621,7 @@ class Service implements InjectionAwareInterface public function createServer($name, $ip, $manager, $data) { - $model = $this->di['db']->dispense('ServiceHosting'); + $model = $this->di['db']->dispense('ServiceHostingServer'); $model->name = $name; $model->ip = $ip; @@ -660,7 +660,7 @@ class Service implements InjectionAwareInterface return true; } - public function updateServer(\Model_ServiceHosting $model, array $data) + public function updateServer(\Model_ServiceHostingServer $model, array $data) { $model->name = $this->di['array_get']($data, 'name', $model->name); $model->ip = $this->di['array_get']($data, 'ip', $model->ip); From f6b937786785f23719b712cd19db511e272a00d5 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:27:30 -0500 Subject: [PATCH 34/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 9dd15c7f5..f9735418a 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,7 +444,7 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); + $serviceHostingModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); From ece87132754bf19700f5da497f43dc705e1703b9 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:29:27 -0500 Subject: [PATCH 35/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index f9735418a..61ccbf88e 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,9 +444,9 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); + $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); - $server = $this->toHostingServerApiArray($serviceHostingModel, $deep, $identity); + $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); return array( From 9c5ff19ea7942fc8a00c48ed26f7bc6964f5f23a Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:35:06 -0500 Subject: [PATCH 36/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 61ccbf88e..96b788513 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -558,7 +558,7 @@ class Service implements InjectionAwareInterface } - public function getServerManagers() + public function getServerManager($manager) { $d = array(); foreach($this->_getServerManagers() as $p) { @@ -720,7 +720,7 @@ class Service implements InjectionAwareInterface return $manager; } - public function testConnection(\Model_ServiceHosting $model) + public function testConnection(\Model_ServiceHostingServer $model) { $m = $this->getServerManager($model); return $m->testConnection(); @@ -871,7 +871,7 @@ class Service implements InjectionAwareInterface return $p; } - public function getServerManagerWithLog(\Model_ServiceHosting $model, \Model_ClientOrder $order) + public function getServerManagerWithLog(\Model_ServiceHostingServer $model, \Model_ClientOrder $order) { $manager = $this->getServerManager($model); @@ -881,7 +881,7 @@ class Service implements InjectionAwareInterface return $manager; } - public function getMangerUrls(\Model_ServiceHosting $model) + public function getMangerUrls(\Model_ServiceHostingServer $model) { try { $m = $this->getServerManager($model); From fee90ce9b59e6421d785f69377eeae3d64567646 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:38:13 -0500 Subject: [PATCH 37/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 96b788513..58ab60159 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -558,7 +558,7 @@ class Service implements InjectionAwareInterface } - public function getServerManager($manager) + public function getServerManagers() { $d = array(); foreach($this->_getServerManagers() as $p) { From 57beb2c8607eb2937b719c05620037125988d935 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:40:11 -0500 Subject: [PATCH 38/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 58ab60159..bb54aa7e5 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,7 +444,7 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); + $serviceHostingServerModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); From 71fe5dd4bbac3c6c3228c106840ccef879b2f409 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:43:26 -0500 Subject: [PATCH 39/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index bb54aa7e5..30cca0767 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -462,7 +462,7 @@ class Service implements InjectionAwareInterface ); } - public function toHostingServerApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) + public function toHostingServerApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { list($cpanel_url, $whm_url) = $this->getMangerUrls($model); $result = array( From 88834b7d47eab39a1be126009b0cdf4233e7bf8b Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:45:54 -0500 Subject: [PATCH 40/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 30cca0767..bb54aa7e5 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -462,7 +462,7 @@ class Service implements InjectionAwareInterface ); } - public function toHostingServerApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) + public function toHostingServerApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) { list($cpanel_url, $whm_url) = $this->getMangerUrls($model); $result = array( From 45f5b2132a77fb48363af924a2db2c5fbb65aea3 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:47:25 -0500 Subject: [PATCH 41/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index bb54aa7e5..58ab60159 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,7 +444,7 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingServerModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); + $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); From 76ef473b9db8e8e9af37ddf286dd890bd10404ea Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:54:15 -0500 Subject: [PATCH 42/58] Revert Service.php --- src/bb-modules/Servicehosting/Service.php | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 58ab60159..632e26e08 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -47,7 +47,7 @@ class Service implements InjectionAwareInterface return $product->title; } - + public function validateOrderData(array &$data) { if(!isset($data['server_id'])) { @@ -76,7 +76,7 @@ class Service implements InjectionAwareInterface $c = $orderService->getConfig($order); $this->validateOrderData($c); - $server = $this->di['db']->getExistingModelById('ServiceHosting', $c['server_id'], 'Server from order configuration was not found'); + $server = $this->di['db']->getExistingModelById('ServiceHostingServer', $c['server_id'], 'Server from order configuration was not found'); $hp = $this->di['db']->getExistingModelById('ServiceHostingHp', $c['hosting_plan_id'], 'Hosting plan from order configuration was not found'); @@ -108,13 +108,13 @@ class Service implements InjectionAwareInterface if(isset($c['password']) && !empty($c['password'])) { $pass = $c['password']; } - + if(isset($c['username']) && !empty($c['username'])) { $username = $c['username']; } else { $username = $this->_generateUsername($model->sld.$model->tld); - } - + } + $model->username = $username; $model->pass = $pass; $this->di['db']->store($model); @@ -123,7 +123,7 @@ class Service implements InjectionAwareInterface list($adapter, $account) = $this->_getAM($model); $adapter->createAccount($account); } - + return array( 'username' => $username, 'password' => $pass, @@ -266,7 +266,7 @@ class Service implements InjectionAwareInterface list($adapter, $account) = $this->_getAM($model); $adapter->changeAccountUsername($account, $u); } - + $model->username = $u; $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); @@ -287,7 +287,7 @@ class Service implements InjectionAwareInterface list($adapter, $account) = $this->_getAM($model); $adapter->changeAccountIp($account, $ip); } - + $model->ip = $ip; $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); @@ -309,7 +309,7 @@ class Service implements InjectionAwareInterface list($adapter, $account) = $this->_getAM($model); $adapter->changeAccountDomain($account, $sld.$tld); } - + $model->sld = $sld; $model->tld = $tld; $model->updated_at = date('Y-m-d H:i:s'); @@ -351,7 +351,7 @@ class Service implements InjectionAwareInterface if($account->getIp() != $updated->getIp()) { $model->ip = $updated->getIp(); } - + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Synchronizing hosting account %s with server', $model->id); @@ -378,7 +378,7 @@ class Service implements InjectionAwareInterface { return ($order->status != \Model_ClientOrder::STATUS_FAILED_SETUP); } - + /** * Generate username by domain * @@ -392,7 +392,7 @@ class Service implements InjectionAwareInterface return $username; } - public function _getAM(\Model_ServiceHostingServer $model, \Model_ServiceHostingHp $hp = null) + public function _getAM(\Model_ServiceHosting $model, \Model_ServiceHostingHp $hp = null) { if(null === $hp) { $hp = $this->di['db']->getExistingModelById('ServiceHostingHp', $model->service_hosting_hp_id, 'Hosting plan not found'); @@ -652,7 +652,7 @@ class Service implements InjectionAwareInterface return $newId; } - public function deleteServer(\Model_ServiceHosting $model) + public function deleteServer(\Model_ServiceHostingServer $model) { $id = $model->id; $this->di['db']->trash($model); @@ -696,7 +696,7 @@ class Service implements InjectionAwareInterface return true; } - public function getServerManager(\Model_ServiceHosting $model) + public function getServerManager(\Model_ServiceHostingServer $model) { if(empty($model->manager)) { throw new \Box_Exception('Invalid server manager. Server was not configured properly.', null, 654); From 9b8f136bb9c3df76794efd79669c9395801d10c7 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:56:46 -0500 Subject: [PATCH 43/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 632e26e08..4f0efc9b1 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -47,7 +47,7 @@ class Service implements InjectionAwareInterface return $product->title; } - + public function validateOrderData(array &$data) { if(!isset($data['server_id'])) { @@ -108,13 +108,13 @@ class Service implements InjectionAwareInterface if(isset($c['password']) && !empty($c['password'])) { $pass = $c['password']; } - + if(isset($c['username']) && !empty($c['username'])) { $username = $c['username']; } else { $username = $this->_generateUsername($model->sld.$model->tld); - } - + } + $model->username = $username; $model->pass = $pass; $this->di['db']->store($model); @@ -123,7 +123,7 @@ class Service implements InjectionAwareInterface list($adapter, $account) = $this->_getAM($model); $adapter->createAccount($account); } - + return array( 'username' => $username, 'password' => $pass, @@ -266,7 +266,7 @@ class Service implements InjectionAwareInterface list($adapter, $account) = $this->_getAM($model); $adapter->changeAccountUsername($account, $u); } - + $model->username = $u; $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); @@ -287,7 +287,7 @@ class Service implements InjectionAwareInterface list($adapter, $account) = $this->_getAM($model); $adapter->changeAccountIp($account, $ip); } - + $model->ip = $ip; $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); @@ -309,7 +309,7 @@ class Service implements InjectionAwareInterface list($adapter, $account) = $this->_getAM($model); $adapter->changeAccountDomain($account, $sld.$tld); } - + $model->sld = $sld; $model->tld = $tld; $model->updated_at = date('Y-m-d H:i:s'); @@ -351,7 +351,7 @@ class Service implements InjectionAwareInterface if($account->getIp() != $updated->getIp()) { $model->ip = $updated->getIp(); } - + $model->updated_at = date('Y-m-d H:i:s'); $this->di['db']->store($model); $this->di['logger']->info('Synchronizing hosting account %s with server', $model->id); @@ -378,7 +378,7 @@ class Service implements InjectionAwareInterface { return ($order->status != \Model_ClientOrder::STATUS_FAILED_SETUP); } - + /** * Generate username by domain * @@ -444,7 +444,7 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); + $serviceHostingServerModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); From 915a46e5c166b24954c1dceeb5b50cb0dfa08ee9 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 01:58:04 -0500 Subject: [PATCH 44/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 4f0efc9b1..82f7f7fd2 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,7 +444,7 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingServerModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); + $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); From 3f15803775862559b72d4a96488dcc97b14a60e7 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 02:02:18 -0500 Subject: [PATCH 45/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 82f7f7fd2..61ce4b3d1 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -392,7 +392,7 @@ class Service implements InjectionAwareInterface return $username; } - public function _getAM(\Model_ServiceHosting $model, \Model_ServiceHostingHp $hp = null) + public function _getAM(\Model_ServiceHostingServer $model, \Model_ServiceHostingHp $hp = null) { if(null === $hp) { $hp = $this->di['db']->getExistingModelById('ServiceHostingHp', $model->service_hosting_hp_id, 'Hosting plan not found'); From 102cd9261657648f9522857810e78d1292fad490 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 02:03:28 -0500 Subject: [PATCH 46/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 61ce4b3d1..5ca03d579 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,7 +444,7 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); + $serviceHostingServerModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); @@ -462,7 +462,7 @@ class Service implements InjectionAwareInterface ); } - public function toHostingServerApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) + public function toHostingServerApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { list($cpanel_url, $whm_url) = $this->getMangerUrls($model); $result = array( From afcdaec0d2d90322d3beeda14b7190a1701565a2 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 02:04:34 -0500 Subject: [PATCH 47/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 5ca03d579..fd2484b32 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -881,7 +881,7 @@ class Service implements InjectionAwareInterface return $manager; } - public function getMangerUrls(\Model_ServiceHostingServer $model) + public function getMangerUrls(\Model_ServiceHosting $model) { try { $m = $this->getServerManager($model); From 4935964e625d591032b59dccb331f01692d782ff Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 02:06:46 -0500 Subject: [PATCH 48/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index fd2484b32..458c3236f 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -696,7 +696,7 @@ class Service implements InjectionAwareInterface return true; } - public function getServerManager(\Model_ServiceHostingServer $model) + public function getServerManager(\Model_ServiceHosting $model) { if(empty($model->manager)) { throw new \Box_Exception('Invalid server manager. Server was not configured properly.', null, 654); From f1c00a458a7eb05d5bfa2395679c72c9087ef17b Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 02:16:23 -0500 Subject: [PATCH 49/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 458c3236f..725284a5e 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -239,7 +239,7 @@ class Service implements InjectionAwareInterface } } - public function changeAccountPlan(\Model_ClientOrder $order, \Model_ServiceHosting $model, \Model_ServiceHostingHp $hp) + public function changeAccountPlan(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, \Model_ServiceHostingHp $hp) { $model->service_hosting_hp_id = $hp->id; if($this->_performOnService($order)){ @@ -254,7 +254,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountUsername(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) + public function changeAccountUsername(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) { if(!isset($data['username']) || empty($data['username'])) { throw new \Box_Exception('Account password is missing or is not valid'); @@ -275,7 +275,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountIp(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) + public function changeAccountIp(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) { if(!isset($data['ip']) || empty($data['ip'])) { throw new \Box_Exception('Account ip is missing or is not valid'); @@ -295,7 +295,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountDomain(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) + public function changeAccountDomain(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) { if(!isset($data['tld']) || empty($data['tld']) || !isset($data['sld']) || empty($data['sld'])) { @@ -318,7 +318,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountPassword(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) + public function changeAccountPassword(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) { if(!isset($data['password']) || !isset($data['password_confirm']) || $data['password'] != $data['password_confirm']) { From 8c4bbce661c6ea73f185fcb1e6ce75f4dceb562a Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 02:19:07 -0500 Subject: [PATCH 50/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 725284a5e..d1084aa52 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -239,7 +239,7 @@ class Service implements InjectionAwareInterface } } - public function changeAccountPlan(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, \Model_ServiceHostingHp $hp) + public function changeAccountPlan(\Model_ClientOrder $order, \Model_ServiceHosting $model, \Model_ServiceHostingHp $hp) { $model->service_hosting_hp_id = $hp->id; if($this->_performOnService($order)){ @@ -254,7 +254,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountUsername(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) + public function changeAccountUsername(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) { if(!isset($data['username']) || empty($data['username'])) { throw new \Box_Exception('Account password is missing or is not valid'); @@ -275,7 +275,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountIp(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) + public function changeAccountIp(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) { if(!isset($data['ip']) || empty($data['ip'])) { throw new \Box_Exception('Account ip is missing or is not valid'); @@ -295,7 +295,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountDomain(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) + public function changeAccountDomain(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) { if(!isset($data['tld']) || empty($data['tld']) || !isset($data['sld']) || empty($data['sld'])) { @@ -318,7 +318,7 @@ class Service implements InjectionAwareInterface return TRUE; } - public function changeAccountPassword(\Model_ClientOrder $order, \Model_ServiceHostingServer $model, $data) + public function changeAccountPassword(\Model_ClientOrder $order, \Model_ServiceHosting $model, $data) { if(!isset($data['password']) || !isset($data['password_confirm']) || $data['password'] != $data['password_confirm']) { @@ -392,7 +392,7 @@ class Service implements InjectionAwareInterface return $username; } - public function _getAM(\Model_ServiceHostingServer $model, \Model_ServiceHostingHp $hp = null) + public function _getAM(\Model_ServiceHosting $model, \Model_ServiceHostingHp $hp = null) { if(null === $hp) { $hp = $this->di['db']->getExistingModelById('ServiceHostingHp', $model->service_hosting_hp_id, 'Hosting plan not found'); @@ -652,7 +652,7 @@ class Service implements InjectionAwareInterface return $newId; } - public function deleteServer(\Model_ServiceHostingServer $model) + public function deleteServer(\Model_ServiceHosting $model) { $id = $model->id; $this->di['db']->trash($model); @@ -660,7 +660,7 @@ class Service implements InjectionAwareInterface return true; } - public function updateServer(\Model_ServiceHostingServer $model, array $data) + public function updateServer(\Model_ServiceHosting $model, array $data) { $model->name = $this->di['array_get']($data, 'name', $model->name); $model->ip = $this->di['array_get']($data, 'ip', $model->ip); @@ -720,7 +720,7 @@ class Service implements InjectionAwareInterface return $manager; } - public function testConnection(\Model_ServiceHostingServer $model) + public function testConnection(\Model_ServiceHosting $model) { $m = $this->getServerManager($model); return $m->testConnection(); @@ -871,7 +871,7 @@ class Service implements InjectionAwareInterface return $p; } - public function getServerManagerWithLog(\Model_ServiceHostingServer $model, \Model_ClientOrder $order) + public function getServerManagerWithLog(\Model_ServiceHosting $model, \Model_ClientOrder $order) { $manager = $this->getServerManager($model); From 6b972466c135b2b2763c881f3a5fc1f172eb73a1 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 02:22:52 -0500 Subject: [PATCH 51/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index d1084aa52..dcdaeba3f 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -392,7 +392,7 @@ class Service implements InjectionAwareInterface return $username; } - public function _getAM(\Model_ServiceHosting $model, \Model_ServiceHostingHp $hp = null) + public function _getAM(\Model_ServiceHostingServer $model, \Model_ServiceHostingHp $hp = null) { if(null === $hp) { $hp = $this->di['db']->getExistingModelById('ServiceHostingHp', $model->service_hosting_hp_id, 'Hosting plan not found'); @@ -462,7 +462,7 @@ class Service implements InjectionAwareInterface ); } - public function toHostingServerApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) + public function toHostingServerApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) { list($cpanel_url, $whm_url) = $this->getMangerUrls($model); $result = array( @@ -660,7 +660,7 @@ class Service implements InjectionAwareInterface return true; } - public function updateServer(\Model_ServiceHosting $model, array $data) + public function updateServer(\Model_ServiceHostingServer $model, array $data) { $model->name = $this->di['array_get']($data, 'name', $model->name); $model->ip = $this->di['array_get']($data, 'ip', $model->ip); From 6dad77da1b754f69df05111cec0ade0e6c91135b Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 02:26:28 -0500 Subject: [PATCH 52/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index dcdaeba3f..96cc71851 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -392,7 +392,7 @@ class Service implements InjectionAwareInterface return $username; } - public function _getAM(\Model_ServiceHostingServer $model, \Model_ServiceHostingHp $hp = null) + public function _getAM(\Model_ServiceHosting $model, \Model_ServiceHostingHp $hp = null) { if(null === $hp) { $hp = $this->di['db']->getExistingModelById('ServiceHostingHp', $model->service_hosting_hp_id, 'Hosting plan not found'); From 6a8bfa948ad5b2e98eb6bb5697963cd3a226b064 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 02:28:27 -0500 Subject: [PATCH 53/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 96cc71851..b104b19ac 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,7 +444,7 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingServerModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); + $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); From 1d3956229ed1a393a38aa1af272b524aa5dbd0ed Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 02:36:44 -0500 Subject: [PATCH 54/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index b104b19ac..d1084aa52 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,7 +444,7 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); + $serviceHostingServerModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); @@ -462,7 +462,7 @@ class Service implements InjectionAwareInterface ); } - public function toHostingServerApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) + public function toHostingServerApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { list($cpanel_url, $whm_url) = $this->getMangerUrls($model); $result = array( @@ -660,7 +660,7 @@ class Service implements InjectionAwareInterface return true; } - public function updateServer(\Model_ServiceHostingServer $model, array $data) + public function updateServer(\Model_ServiceHosting $model, array $data) { $model->name = $this->di['array_get']($data, 'name', $model->name); $model->ip = $this->di['array_get']($data, 'ip', $model->ip); From 04fcce7c63df75455ce43f9f863989ebb085f71f Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 03:12:45 -0500 Subject: [PATCH 55/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index d1084aa52..82f7f7fd2 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -444,7 +444,7 @@ class Service implements InjectionAwareInterface public function toApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) { - $serviceHostingServerModel = $this->di['db']->load('ServiceHosting', $model->service_hosting_server_id); + $serviceHostingServerModel = $this->di['db']->load('ServiceHostingServer', $model->service_hosting_server_id); $serviceHostingHpModel = $this->di['db']->load('ServiceHostingHp', $model->service_hosting_hp_id); $server = $this->toHostingServerApiArray($serviceHostingServerModel, $deep, $identity); $hp = $this->toHostingHpApiArray($serviceHostingHpModel, $deep, $identity); @@ -462,7 +462,7 @@ class Service implements InjectionAwareInterface ); } - public function toHostingServerApiArray(\Model_ServiceHosting $model, $deep = false, $identity = null) + public function toHostingServerApiArray(\Model_ServiceHostingServer $model, $deep = false, $identity = null) { list($cpanel_url, $whm_url) = $this->getMangerUrls($model); $result = array( @@ -652,7 +652,7 @@ class Service implements InjectionAwareInterface return $newId; } - public function deleteServer(\Model_ServiceHosting $model) + public function deleteServer(\Model_ServiceHostingServer $model) { $id = $model->id; $this->di['db']->trash($model); @@ -660,7 +660,7 @@ class Service implements InjectionAwareInterface return true; } - public function updateServer(\Model_ServiceHosting $model, array $data) + public function updateServer(\Model_ServiceHostingServer $model, array $data) { $model->name = $this->di['array_get']($data, 'name', $model->name); $model->ip = $this->di['array_get']($data, 'ip', $model->ip); @@ -696,7 +696,7 @@ class Service implements InjectionAwareInterface return true; } - public function getServerManager(\Model_ServiceHosting $model) + public function getServerManager(\Model_ServiceHostingServer $model) { if(empty($model->manager)) { throw new \Box_Exception('Invalid server manager. Server was not configured properly.', null, 654); @@ -720,7 +720,7 @@ class Service implements InjectionAwareInterface return $manager; } - public function testConnection(\Model_ServiceHosting $model) + public function testConnection(\Model_ServiceHostingServer $model) { $m = $this->getServerManager($model); return $m->testConnection(); @@ -871,7 +871,7 @@ class Service implements InjectionAwareInterface return $p; } - public function getServerManagerWithLog(\Model_ServiceHosting $model, \Model_ClientOrder $order) + public function getServerManagerWithLog(\Model_ServiceHostingServer $model, \Model_ClientOrder $order) { $manager = $this->getServerManager($model); @@ -881,7 +881,7 @@ class Service implements InjectionAwareInterface return $manager; } - public function getMangerUrls(\Model_ServiceHosting $model) + public function getMangerUrls(\Model_ServiceHostingServer $model) { try { $m = $this->getServerManager($model); From 99066fc90874b60ed7c1374eb5c3dceb182ce404 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 03:55:43 -0500 Subject: [PATCH 56/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 82f7f7fd2..8e8d56c95 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -99,7 +99,7 @@ class Service implements InjectionAwareInterface { $orderService = $this->di['mod_service']('order'); $model = $orderService->getOrderService($order); - if(!$model instanceof \Model_ServiceHosting) { + if(!$model instanceof \RedBean_SimpleModel) { throw new \Box_Exception('Could not activate order. Service was not created'); } From 8dce1b1e8e1bbaa2bd9c6332c882ac15a922e3d4 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 23:37:58 -0500 Subject: [PATCH 57/58] Update .htaccess Added SymLinksIfOwnerMatch --- src/.htaccess | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/.htaccess b/src/.htaccess index 7404debb8..79070e342 100644 --- a/src/.htaccess +++ b/src/.htaccess @@ -1,8 +1,7 @@ # Read documentation http://docs.boxbilling.com/ for more information # If you are receiving "Internal Server Error" message, make sure mod_rewrite is enabled in apache -Options -Indexes -# Options +FollowSymLinks +Options -Indexes +SymLinksIfOwnerMatch RewriteEngine On From 307c16cebf8301cf3891cb63d1fe4f7007651d58 Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 27 Nov 2020 23:46:47 -0500 Subject: [PATCH 58/58] Update Service.php --- src/bb-modules/Servicehosting/Service.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-modules/Servicehosting/Service.php b/src/bb-modules/Servicehosting/Service.php index 8e8d56c95..922b10787 100644 --- a/src/bb-modules/Servicehosting/Service.php +++ b/src/bb-modules/Servicehosting/Service.php @@ -100,7 +100,7 @@ class Service implements InjectionAwareInterface $orderService = $this->di['mod_service']('order'); $model = $orderService->getOrderService($order); if(!$model instanceof \RedBean_SimpleModel) { - throw new \Box_Exception('Could not activate order. Service was not created'); + throw new \Box_Exception('Order :id has no active service', array(':id'=>$order->id)); } $pass = $this->di['tools']->generatePassword(10, 4);