HOR-1663
This commit is contained in:
@@ -264,13 +264,14 @@ class Configurations // extends Configuration
|
|||||||
* @param string $app
|
* @param string $app
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function getConfiguration($cfg, $obj, $pro = '', $usr = '', $app = '')
|
public function getConfiguration($cfg, $obj, $pro = '', $usr = '', $app = '', &$outResult = array())
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$oCfg = ConfigurationPeer::retrieveByPK($cfg, $obj, $pro, $usr, $app);
|
$oCfg = ConfigurationPeer::retrieveByPK($cfg, $obj, $pro, $usr, $app);
|
||||||
if (!is_null($oCfg)) {
|
if (!is_null($oCfg)) {
|
||||||
$row = $oCfg->toArray(BasePeer::TYPE_FIELDNAME);
|
$row = $oCfg->toArray(BasePeer::TYPE_FIELDNAME);
|
||||||
$result = unserialize($row['CFG_VALUE']);
|
$result = unserialize($row['CFG_VALUE']);
|
||||||
|
$outResult = $result;
|
||||||
if (is_array($result) && sizeof($result) == 1) {
|
if (is_array($result) && sizeof($result) == 1) {
|
||||||
$arrayKeys = Array_keys($result);
|
$arrayKeys = Array_keys($result);
|
||||||
return $result[$arrayKeys[0]];
|
return $result[$arrayKeys[0]];
|
||||||
|
|||||||
@@ -34,10 +34,13 @@ switch ($request) {
|
|||||||
break;
|
break;
|
||||||
case "save":
|
case "save":
|
||||||
$conf = new Configurations();
|
$conf = new Configurations();
|
||||||
$config = $conf->getConfiguration("ENVIRONMENT_SETTINGS", "" );
|
$config = $conf->getConfiguration("ENVIRONMENT_SETTINGS", "", "", "", "", $outResult);
|
||||||
if (is_numeric($config)) {
|
if (is_numeric($config)) {
|
||||||
$config = array();
|
$config = array();
|
||||||
}
|
}
|
||||||
|
if (is_array($outResult) && isset($outResult["directoryStructure"])) {
|
||||||
|
$config["directoryStructure"] = $outResult["directoryStructure"];
|
||||||
|
}
|
||||||
if (isset($_POST["userFormat"])) {
|
if (isset($_POST["userFormat"])) {
|
||||||
$config['format'] = $_POST["userFormat"];
|
$config['format'] = $_POST["userFormat"];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user