From: Alexander Ebert Date: Tue, 8 Oct 2013 23:09:33 +0000 (+0200) Subject: Enabled debug mode if installed with dev=1 X-Git-Tag: 2.0.0_Beta_11~56 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d43bb3f0dda38c3986c2bd40bddf120d8d86c9ce;p=GitHub%2FWoltLab%2FWCF.git Enabled debug mode if installed with dev=1 --- diff --git a/wcfsetup/install/files/lib/system/WCFSetup.class.php b/wcfsetup/install/files/lib/system/WCFSetup.class.php index 3ec5a6ef77..35ed7fc37e 100644 --- a/wcfsetup/install/files/lib/system/WCFSetup.class.php +++ b/wcfsetup/install/files/lib/system/WCFSetup.class.php @@ -1169,6 +1169,7 @@ class WCFSetup extends WCF { SessionHandler::getInstance()->changeUser($admin); SessionHandler::getInstance()->register('masterPassword', 1); + SessionHandler::getInstance()->register('__wcfSetup_developerMode', (self::debugModeIsEnabled() ? 1 : 0)); SessionHandler::getInstance()->update(); $installPhpDeleted = @unlink('./install.php'); diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php index 0a592d0749..7f03f5e4f3 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php @@ -179,6 +179,17 @@ class PackageInstallationDispatcher { // remove all cache files after WCFSetup if (!PACKAGE_ID) { CacheHandler::getInstance()->flushAll(); + + if (WCF::getSession()->getVar('__wcfSetup_developerMode')) { + $sql = "UPDATE wcf".WCF_N."_option + SET optionValue = ? + WHERE optionName = ?"; + $statement = WCF::getDB()->prepareStatement($sql); + $statement->execute(array( + 1, + 'enable_debug_mode' + )); + } } // rebuild application paths