Complete settings update including success dialog

This commit is contained in:
2011-08-26 18:41:40 +01:00
parent 91749f7f85
commit f884e93021
8 changed files with 79 additions and 10 deletions

View File

@@ -3,10 +3,17 @@
$main = RippingCluster_Main::instance();
$config = $main->config();
$messages = array();
// Iterate over the settings and store each one back to the backend
foreach($_POST as $key => $value) {
// Convert - to . (to work around the PHP register global backwards compatibility that renames input variables)
$key = str_replace("-", ".", $key);
if ($config->exists($key)) {
$config->set($key, $value);
} else {
$messages[] = "Unknown config key '{$key}', value not updated.";
}
}