update setting value if default changed

This commit is contained in:
Steffen Schröder 2013-12-09 10:05:41 +01:00
parent 88f5239965
commit c5bedf89dc

View File

@ -191,6 +191,7 @@ class SettingManager {
@value @value
) ON DUPLICATE KEY UPDATE ) ON DUPLICATE KEY UPDATE
`type` = VALUES(`type`), `type` = VALUES(`type`),
`value` = IF(`default` = VALUES(`default`), `value`, VALUES(`default`)),
`default` = VALUES(`default`);"; `default` = VALUES(`default`);";
$settingStatement = $mysqli->prepare($settingQuery); $settingStatement = $mysqli->prepare($settingQuery);
if ($mysqli->error) { if ($mysqli->error) {