fix config

This commit is contained in:
Yuri Kuznetsov
2014-01-22 14:36:37 +02:00
parent d989e6074f
commit 18d366bda0
2 changed files with 4 additions and 7 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ class Settings extends \Espo\Core\Controllers\Base
public function actionRead($params, $data)
{
return $this->getConfig()->getJsonData($this->getUser()->isAdmin());
return $this->getConfig()->getData($this->getUser()->isAdmin());
}
public function actionPatch($params, $data)
+3 -6
View File
@@ -141,7 +141,7 @@ class Config
* @param $isAdmin
* @return object
*/
public function getJsonData($isAdmin=false, $encode=true)
public function getData($isAdmin=false, $encode=true)
{
$configObj = $this->getConfig();
@@ -156,7 +156,6 @@ class Config
return $restrictedConfig;
}
//return Json::encode( Util::objectToArray($restrictedConfig) );
return Util::objectToArray($restrictedConfig);
}
@@ -168,9 +167,8 @@ class Config
* @return bool
*/
//HERE
public function setJsonData($data, $isAdmin=false)
public function setData($data, $isAdmin=false)
{
//$decoded= Json::decode($json, true);
$restrictItems= $this->getRestrictItems($isAdmin);
@@ -196,7 +194,6 @@ class Config
}
if (empty($this->adminItems)) {
//$this->adminItems= array_merge( (array) $this->getConfig()->systemItems, (array) $this->getConfig()->adminItems );
$this->adminItems= Util::merge( (array) $this->getConfig()->systemItems, (array) $this->getConfig()->adminItems );
}
@@ -221,4 +218,4 @@ class Config
}
}
?>
?>