From 124c5fd45f70740e592c123bb2d227f85dfb0803 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sun, 22 Dec 2013 23:48:55 +0100 Subject: [PATCH] Fixed 'apply changes to existing users' option --- .../form/UserOptionSetDefaultsForm.class.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/form/UserOptionSetDefaultsForm.class.php b/wcfsetup/install/files/lib/acp/form/UserOptionSetDefaultsForm.class.php index 2d593cb10e..6fee15a55f 100644 --- a/wcfsetup/install/files/lib/acp/form/UserOptionSetDefaultsForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserOptionSetDefaultsForm.class.php @@ -77,15 +77,6 @@ class UserOptionSetDefaultsForm extends AbstractForm { // get new values $saveOptions = $this->optionHandler->save(); - // save values - $sql = "UPDATE wcf".WCF_N."_user_option - SET defaultValue = ? - WHERE optionID = ?"; - $statement = WCF::getDB()->prepareStatement($sql); - foreach ($saveOptions as $optionID => $value) { - $statement->execute(array($value, $optionID)); - } - // apply changes if ($this->applyChangesToExistingUsers) { $optionIDs = array_keys($saveOptions); @@ -112,6 +103,15 @@ class UserOptionSetDefaultsForm extends AbstractForm { } } + // save values + $sql = "UPDATE wcf".WCF_N."_user_option + SET defaultValue = ? + WHERE optionID = ?"; + $statement = WCF::getDB()->prepareStatement($sql); + foreach ($saveOptions as $optionID => $value) { + $statement->execute(array($value, $optionID)); + } + // reset cache UserOptionCacheBuilder::getInstance()->reset(); $this->saved(); -- 2.20.1