public function set($id, $params) {
$config = (array)$params;
if (array_key_exists('config', $config)) {
- $config = unserialize($config['config']);
+ $config = json_decode($config['config'], true);
} else {
$config = array();
}
$resource_type,
$resource_name
);
- $result = $this->Application->getModule('api')->set($params, array('config' => serialize($directives)), $host, false);
+ $result = $this->Application->getModule('api')->set($params, array('config' => json_encode($directives)), $host, false);
if ($result->error === 0) {
$this->SaveDirectiveOk->Display = 'Dynamic';
$this->SaveDirectiveError->Display = 'None';