From: Alexander Ebert Date: Fri, 28 Feb 2014 17:29:46 +0000 (+0100) Subject: Fixed update script X-Git-Tag: 2.0.3~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=85f179ea770fc56c8ba5197b09d87edcc87413b9;p=GitHub%2FWoltLab%2FWCF.git Fixed update script --- diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_2.0.3.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_2.0.3.php index 937d786032..144f9fd5ed 100644 --- a/wcfsetup/install/files/acp/update_com.woltlab.wcf_2.0.3.php +++ b/wcfsetup/install/files/acp/update_com.woltlab.wcf_2.0.3.php @@ -9,12 +9,18 @@ use wcf\system\WCF; * @category Community Framework */ // enforce new limits for session timeout (prevents misconfiguration) -$sql = "UPDATE wcf".WCF_N."_option - SET optionValue = MIN(MAX(optionValue, ?), ?) +$sql = "SELECT optionID, optionValue + FROM wcf".WCF_N."_option WHERE optionName = ?"; $statement = WCF::getDB()->prepareStatement($sql); +$statement->execute(array('session_timeout')); +$row = $statement->fetchArray(); + +$sql = "UPDATE wcf".WCF_N."_option + SET optionValue = ? + WHERE optionID = ?"; +$statement = WCF::getDB()->prepareStatement($sql); $statement->execute(array( - 600, - 86400, - 'session_timeout' + min(max(600, $row['optionValue']), 86400), + $row['optionID'] ));