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
) ON DUPLICATE KEY UPDATE
`type` = VALUES(`type`),
`value` = IF(`default` = VALUES(`default`), `value`, VALUES(`default`)),
`default` = VALUES(`default`);";
$settingStatement = $mysqli->prepare($settingQuery);
if ($mysqli->error) {