Fixed Service.php when I pulled from master crashed my system due to the passing from Model_ServiceHosting to Model_ServiceHostingServer

This commit is contained in:
Timothy Webb Sr committed 2020-10-26 05:51:45 +00:00
1 parent 0cf413b8c1
commit df141caed4
3 files changed
+36 -75

No files matched your search

+9 -9
View File
@@ -80,7 +80,7 @@ class Service implements InjectionAwareInterface
$hp = $this->di['db']->getExistingModelById('ServiceHostingHp', $c['hosting_plan_id'], 'Hosting plan from order configuration was not found');
$model = $this->di['db']->dispense('ServiceHosting');
$model = $this->di['db']->dispense('ServiceHostingServer');
$model->client_id = $order->client_id;
$model->service_hosting_server_id = $server->id;
$model->service_hosting_hp_id = $hp->id;
@@ -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->getManagerUrls($model);
$result = array(
@@ -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 getManagerUrls(\Model_ServiceHostingServer $model)
public function getManagerUrls(\Model_ServiceHosting $model)
{
try {
$m = $this->getServerManager($model);
-1
View File
@@ -30,7 +30,6 @@
"laminas/laminas-httphandlerrunner": "^1.2.0",
"fpdf/fpdf": "^1.82",
"docnet/tfpdf": "^2.2",
"rev42/tfpdf": "^1.25",
"setasign/fpdf": "^1.8"
},
+27 -65
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "9bd4a9c4b9e5394a8e3055f6c76aba1a",
"content-hash": "ee06f152cdcb50185b2e3f5e8b4c2901",
"packages": [
{
"name": "composer/ca-bundle",
@@ -1165,44 +1165,6 @@
"description": "A polyfill for getallheaders.",
"time": "2019-03-08T08:55:37+00:00"
},
{
"name": "rev42/tfpdf",
"version": "v1.25",
"source": {
"type": "git",
"url": "https://github.com/rev42/tfpdf.git",
"reference": "08689ec41e757dde94db5e7527a98c5788555b61"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/rev42/tfpdf/zipball/08689ec41e757dde94db5e7527a98c5788555b61",
"reference": "08689ec41e757dde94db5e7527a98c5788555b61",
"shasum": ""
},
"type": "library",
"autoload": {
"psr-0": {
"tFPDF": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL"
],
"authors": [
{
"name": "Ian Back",
"email": "ianb@bpm1.com"
}
],
"description": "tFPDF",
"homepage": "http://fpdf.org/fr/script/script92.php",
"keywords": [
"pdf"
],
"abandoned": "docnet/tFPDF",
"time": "2015-10-10T22:37:26+00:00"
},
{
"name": "setasign/fpdf",
"version": "1.8.2",
@@ -1299,20 +1261,20 @@
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.18.1",
"version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "1c302646f6efc070cd46856e600e5e0684d6b454"
"reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454",
"reference": "1c302646f6efc070cd46856e600e5e0684d6b454",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41",
"reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
"php": ">=7.1"
},
"suggest": {
"ext-ctype": "For best performance"
@@ -1320,7 +1282,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.18-dev"
"dev-main": "1.20-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -1371,24 +1333,24 @@
"type": "tidelift"
}
],
"time": "2020-07-14T12:35:20+00:00"
"time": "2020-10-23T14:02:19+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.18.1",
"version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a"
"reference": "39d483bdf39be819deabf04ec872eb0b2410b531"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a",
"reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531",
"reference": "39d483bdf39be819deabf04ec872eb0b2410b531",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
"php": ">=7.1"
},
"suggest": {
"ext-mbstring": "For best performance"
@@ -1396,7 +1358,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.18-dev"
"dev-main": "1.20-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -1448,7 +1410,7 @@
"type": "tidelift"
}
],
"time": "2020-07-14T12:35:20+00:00"
"time": "2020-10-23T14:02:19+00:00"
},
{
"name": "twig/extensions",
@@ -1508,20 +1470,20 @@
},
{
"name": "twig/twig",
"version": "v2.13.1",
"version": "v2.14.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "57e96259776ddcacf1814885fc3950460c8e18ef"
"reference": "d495243dade48c39b6a5261c26cdbd8c5703f6a0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/57e96259776ddcacf1814885fc3950460c8e18ef",
"reference": "57e96259776ddcacf1814885fc3950460c8e18ef",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/d495243dade48c39b6a5261c26cdbd8c5703f6a0",
"reference": "d495243dade48c39b6a5261c26cdbd8c5703f6a0",
"shasum": ""
},
"require": {
"php": ">=7.1.3",
"php": ">=7.2.5",
"symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-mbstring": "^1.3"
},
@@ -1532,7 +1494,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.13-dev"
"dev-master": "2.14-dev"
}
},
"autoload": {
@@ -1579,7 +1541,7 @@
"type": "tidelift"
}
],
"time": "2020-08-05T15:09:04+00:00"
"time": "2020-10-21T12:35:06+00:00"
}
],
"packages-dev": [
@@ -2371,16 +2333,16 @@
},
{
"name": "phpunit/phpunit",
"version": "9.4.1",
"version": "9.4.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "1f09a12726593737e8a228ebb1c8647305d07c41"
"reference": "3866b2eeeed21b1b099c4bc0b7a1690ac6fd5baa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1f09a12726593737e8a228ebb1c8647305d07c41",
"reference": "1f09a12726593737e8a228ebb1c8647305d07c41",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3866b2eeeed21b1b099c4bc0b7a1690ac6fd5baa",
"reference": "3866b2eeeed21b1b099c4bc0b7a1690ac6fd5baa",
"shasum": ""
},
"require": {
@@ -2466,7 +2428,7 @@
"type": "github"
}
],
"time": "2020-10-11T07:41:19+00:00"
"time": "2020-10-19T09:23:29+00:00"
},
{
"name": "sebastian/cli-parser",