mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 09:56:38 +02:00
MDL-72670 session: Correct read only debugging logic
Prior to this patch the debugging mode (when enabled) would trigger on everywhere, regardless of whether or not READ_ONLY_SESSION is defined. This patch modifies that behaviour so that the debugging only kicks in if READ_ONLY_SESSION is defined and set to true.
This commit is contained in:
parent
70073fdc74
commit
d5eaa5224e
3 changed files with 34 additions and 5 deletions
|
@ -198,7 +198,7 @@ class external_api {
|
|||
// Eventually this should shift into the various handlers and not be handled via config.
|
||||
$readonlysession = $externalfunctioninfo->readonlysession ?? false;
|
||||
if (!$readonlysession || empty($CFG->enable_read_only_sessions)) {
|
||||
\core\session\manager::restart_with_write_lock();
|
||||
\core\session\manager::restart_with_write_lock($readonlysession);
|
||||
}
|
||||
|
||||
$currentpage = $PAGE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue