From: Alexander Ebert Date: Sun, 6 Jan 2019 16:46:20 +0000 (+0100) Subject: Prevent the sessions from expiring while the development mode is active X-Git-Tag: 5.2.0_Alpha_1~296^2~59 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=49ad5089da6d9221d95b4dcca7c0d07ad962e094;p=GitHub%2FWoltLab%2FWCF.git Prevent the sessions from expiring while the development mode is active See #2819 --- diff --git a/wcfsetup/install/files/lib/system/cronjob/SessionCleanUpCronjob.class.php b/wcfsetup/install/files/lib/system/cronjob/SessionCleanUpCronjob.class.php index eafb4a1f5f..a72c0496e6 100644 --- a/wcfsetup/install/files/lib/system/cronjob/SessionCleanUpCronjob.class.php +++ b/wcfsetup/install/files/lib/system/cronjob/SessionCleanUpCronjob.class.php @@ -10,7 +10,7 @@ use wcf\data\session\SessionEditor; * Deletes expired sessions. * * @author Marcel Werk - * @copyright 2001-2018 WoltLab GmbH + * @copyright 2001-2019 WoltLab GmbH * @license GNU Lesser General Public License * @package WoltLabSuite\Core\System\Cronjob */ @@ -21,8 +21,12 @@ class SessionCleanUpCronjob extends AbstractCronjob { public function execute(Cronjob $cronjob) { parent::execute($cronjob); - ACPSessionEditor::deleteExpiredSessions(TIME_NOW - SESSION_TIMEOUT); - ACPSessionVirtualEditor::deleteExpiredSessions(TIME_NOW - SESSION_TIMEOUT); + // Prevent the sessions from expiring while the development mode is active. + if (!ENABLE_DEBUG_MODE || !ENABLE_DEVELOPER_TOOLS) { + ACPSessionEditor::deleteExpiredSessions(TIME_NOW - SESSION_TIMEOUT); + ACPSessionVirtualEditor::deleteExpiredSessions(TIME_NOW - SESSION_TIMEOUT); + } + SessionEditor::deleteExpiredSessions(TIME_NOW - SESSION_TIMEOUT); SessionVirtualEditor::deleteExpiredSessions(TIME_NOW - SESSION_TIMEOUT); }