update setting value if default changed
This commit is contained in:
parent
88f5239965
commit
c5bedf89dc
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user