Improved metaconsole sync (added centralized management)

This commit is contained in:
fermin831 2018-07-20 14:10:31 +02:00
parent cb0351de99
commit 3c99242508
1 changed files with 15 additions and 0 deletions

View File

@ -2291,4 +2291,19 @@ function config_prepare_session() {
ini_set("post_max_size", $config["max_file_size"]);
ini_set("upload_max_filesize", $config["max_file_size"]);
}
function config_update_value_in_db ($token, $value) {
$inserted_value = db_get_value('value', 'tconfig', '`token`', $token);
if ($inserted_value === false) {
return db_process_sql_insert(
'tconfig',
array('value' => $value, 'token' => $token)
) !== false;
}
else {
return db_process_sql_update(
'tconfig', array('value' => $value), array('token' => $token)
) !== false;
}
}
?>