Exemplo n.º 1
0
 public function saveConfig()
 {
     $R = $this->getAjaxData();
     $Dades = J::loadJsonConfigFile('config.json', true);
     if (!isset($Dades['ENTITATS'])) {
         $Dades['ENTITATS'] = array();
     }
     if (!isset($Dades['PREUS'])) {
         $Dades['PREUS'] = array();
     }
     foreach ($R['Conf'] as $K => $V) {
         if (isset($Dades[$K])) {
             $Dades[$K] = $V;
         }
     }
     J::saveJsonConfigFile('config.json', $Dades, true);
 }