mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-21 20:34:57 +09:00
Update Service.php
This commit is contained in:
1 parent
28cdf6476b
commit
2ebfe6f631
1 file changed
+5
-5
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user