From cb69d6389cb98ccaecb5f886d83574a6e23ea66b Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Tue, 9 Feb 2021 09:32:32 +0800 Subject: [PATCH] MDL-70828 performance: Allow session locking issue to be turned off. If a developer has debugging on then they will recieve all debugging messages for locking whether wanted or not. We already have a setting to display these messages. --- lib/classes/session/manager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/classes/session/manager.php b/lib/classes/session/manager.php index e1a9edcf3f8..d35930daa8b 100644 --- a/lib/classes/session/manager.php +++ b/lib/classes/session/manager.php @@ -138,7 +138,7 @@ class manager { self::$sessionactive = true; // Set here, so the session can be cleared if the security check fails. self::check_security(); - if (!$requireslock || $CFG->debugdeveloper || isset($CFG->enable_read_only_sessions_debug)) { + if (!$requireslock || isset($CFG->enable_read_only_sessions_debug)) { self::$priorsession = (array) $_SESSION['SESSION']; } if (!empty($CFG->enable_read_only_sessions) && isset($_SESSION['SESSION']->cachestore_session)) { @@ -705,7 +705,7 @@ class manager { self::sessionlock_debugging(); $requireslock = self::$handler->requires_write_lock(); - if (!$requireslock || $CFG->debugdeveloper || isset($CFG->enable_read_only_sessions_debug)) { + if (!$requireslock || isset($CFG->enable_read_only_sessions_debug)) { // Compare the array of the earlier session data with the array now, if // there is a difference then a lock is required. $arraydiff = self::array_session_diff(