setReload(true); } else { $Response->setError(Text::get('permissionsDeniedError')); } } else { $Response->setError(Text::get('invalidJsonError')); } } else { $config = Config::read(); $json = json_encode($config, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); $Response->setData(array('content' => $json)); } return $Response; } /** * Update a single configuration item. * * @return Response the response object */ public static function update(): Response { $Response = new Response(); $config = Config::read(); ksort($config); switch (Request::post('type')) { case 'cache': $config['AM_CACHE_ENABLED'] = !empty(Request::post('cacheEnabled')); $config['AM_CACHE_MONITOR_DELAY'] = intval(Request::post('cacheMonitorDelay')); $config['AM_CACHE_LIFETIME'] = intval(Request::post('cacheLifetime')); break; case 'debug': $config['AM_DEBUG_ENABLED'] = !empty(Request::post('debugEnabled')); break; case 'feed': $config['AM_FEED_ENABLED'] = !empty(Request::post('feedEnabled')); $config['AM_FEED_FIELDS'] = ''; if ($fields = Request::post('feedFields')) { $config['AM_FEED_FIELDS'] = join(', ', array_unique(json_decode($fields))); } break; case 'translation': $config['AM_FILE_UI_TRANSLATION'] = Request::post('translation'); $Response->setReload(true); break; } if (Config::write($config)) { Debug::log($config, 'Updated config file'); Cache::clear(); } else { $Response->setError(Text::get('permissionsDeniedError')); } return $Response; } } __halt_compiler();----SIGNATURE:----ePBrCeY0TvH8e/Anq2xSLBY4xUIJfI7gOVQGVnIDQBn0LB5opP1c8gDQG6xrdvLJqgOEDWCcO8aybAKmhJmR0EBGzMeGZXxi9QSdnIONomg5PP+ooLMGdCqVKThhM5mwkuQd+TDa+N2sRzohqDcX8rPDk8fsidxW0HCga9wgHFrdXgykW+osdfCDX1ae4Ji16oI9CcUzU4KTMpq31zRPttSIsy0pNVUhQ5Lfg2bulyu8Ylp0hLsg3SulW1w5FmnfNpdLnHc6BY0W07Xg546TdaAU9fXoNdTXmEsLMvQ0t8rvyfDC1hc4G+diIDtXS2L2NqwDl1XzR5gHt/iCaaH3pXipHnEpr3MpPdmDOgv2PjT1I8jI6yAyfY9g0x8juOiojmvNGGEq+WAgQfyel+mzeFE2vGbqFlsSoYeDGBJnqO6NpJQaC1AYf1R0mnIvpAFEVqa+BydQm48cnZIgY8NhgoeiOdy2xCiB+j5NnCI9Ph5ckuqEzCA0vbZ8pv+g1VipYpXy9HIvDKxsCBvYzd9JXAurApvlX8XfghrdqfqF/hdIlNVWk10UV0BWqCupZoK4tlvSOy0fl3O/zFgiIcSZZRhcdgym7woG/ExcCrrN5KRcNydQEGdG5cyUGgHK11ShL9Iati4UzrzziUeWcNFJXUnffI6QTBnPnEaCPY521oc=----ATTACHMENT:----Mzk3MzI0MzE1NjgyNTQ3NSAzMjkwNjA1MDI4MzA1MjYwIDIzODIxNjI3NTE5ODQwODI=