mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-58018 core: add support to database for read-only sessions
This commit is contained in:
parent
4400ed3e1c
commit
7daa126d1d
@ -172,7 +172,9 @@ class database extends handler {
|
||||
}
|
||||
if (!$this->recordid) {
|
||||
// Lock session if exists and not already locked.
|
||||
$this->database->get_session_lock($record->id, $this->acquiretimeout);
|
||||
if ($this->requires_write_lock()) {
|
||||
$this->database->get_session_lock($record->id, $this->acquiretimeout);
|
||||
}
|
||||
$this->recordid = $record->id;
|
||||
}
|
||||
} catch (\dml_sessionwait_exception $ex) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user