PluginProbe
WPIDE – File Manager & Code Editor / trunk
WPIDE – File Manager & Code Editor vtrunk
3.5.8 3.5.7 2.0.14 2.0.15 2.0.16 2.0.2 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1 2.2 2.3 2.3.1 2.3.2 2.4.0 2.5 2.6 3.0 3.1 3.2 3.3 3.4 All 54 releases
← All changes | App/Controllers/ConfigController.php +7 -2 3.2trunk View file →
@@ -20,13 +20,18 @@
20 20
21 21 public function updateConfig(Request $request, Response $response, Config $config)
22 22 {
23 23
24 - if(!$config->updateConfig($request->input('config'))) {
24 + $key = $request->input('key');
25 + $value = $request->input('value');
25 26
27 + $config = $config->update($key, $value);
28 +
29 + if($config === false) {
30 +
26 31 return $response->json('Cannot save settings!', 422);
27 32 }
28 33
29 - return $response->json('Done');
34 + return $response->json($config);
30 35 }
31 36
32 37 }