|
|
@@ -28,7 +28,7 @@ class Settings extends DataTable implements ClientArea
|
|
|
*/
|
|
|
const STATUS_LABEL = [
|
|
|
'active' => 'success',
|
|
|
- 'closed' => 'default',
|
|
|
+ 'inactive' => 'default',
|
|
|
'default' => 'default'
|
|
|
];
|
|
|
|
|
|
@@ -128,18 +128,6 @@ class Settings extends DataTable implements ClientArea
|
|
|
$aliasList = $domain['aliasList'];
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- $fields = array(
|
|
|
- "id",
|
|
|
- "name",
|
|
|
- "description",
|
|
|
- "type",
|
|
|
- "isEnabled",
|
|
|
- "manager");
|
|
|
- try {
|
|
|
- $Setting = $api->getResources($fields, $domainID);
|
|
|
- } catch (KerioApiException $error) {
|
|
|
logModuleCall(
|
|
|
'kerioEmail',
|
|
|
__FUNCTION__,
|
|
|
@@ -147,27 +135,13 @@ class Settings extends DataTable implements ClientArea
|
|
|
'Debug Error',
|
|
|
$error->getMessage()
|
|
|
);
|
|
|
- return ['error' => $error->getMessage()];
|
|
|
- }
|
|
|
+
|
|
|
$api->logout();
|
|
|
|
|
|
/**
|
|
|
* format model to array
|
|
|
*/
|
|
|
$data = [];
|
|
|
- foreach ($Setting as $setting)
|
|
|
- {
|
|
|
- $settingArray = [
|
|
|
- 'id' => $setting['id'],
|
|
|
- 'setting' => $setting['name'],
|
|
|
- 'description' => $setting['description'],
|
|
|
- 'type' => $setting['type'],
|
|
|
- 'manager' => $setting['manager']['name'] . '@' . $setting['manager']['domainName'],
|
|
|
- 'status' => $setting['isEnabled'] ? 'active' : 'default'
|
|
|
- ];
|
|
|
-
|
|
|
- $data[] = $settingArray;
|
|
|
- }
|
|
|
|
|
|
$dataProv = new ArrayDataProvider();
|
|
|
$dataProv->setDefaultSorting('setting', 'ASC')->setData($data);
|
|
|
@@ -175,9 +149,9 @@ class Settings extends DataTable implements ClientArea
|
|
|
logModuleCall(
|
|
|
'kerioEmail',
|
|
|
__FUNCTION__,
|
|
|
- $this->getWhmcsParamByKey('server'),
|
|
|
- 'Debug',
|
|
|
- $data
|
|
|
+ $domains,
|
|
|
+ 'Debug Settings',
|
|
|
+ 'Debug Settings'
|
|
|
);
|
|
|
|
|
|
$this->setDataProvider($dataProv);
|