First attempt at admin settings page with writeable database backend.
Currently broken due to PHP's transparent conversion of "." to "_" in POST variable names!
This commit is contained in:
15
webui/source/pages/ajax/update-settings.php
Normal file
15
webui/source/pages/ajax/update-settings.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
$main = RippingCluster_Main::instance();
|
||||
$config = $main->config();
|
||||
|
||||
// Iterate over the settings and store each one back to the backend
|
||||
foreach($_POST as $key => $value) {
|
||||
if ($config->exists($key)) {
|
||||
$config->set($key, $value);
|
||||
}
|
||||
}
|
||||
|
||||
$this->smarty->assign('messages', $messages);
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user