mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 02:16:41 +02:00
MDL-50891 useragent: Move web crawler checks to useragent class
This commit is contained in:
parent
6d392b3027
commit
34c6ec1869
6 changed files with 283 additions and 90 deletions
|
@ -377,7 +377,7 @@ class manager {
|
|||
$user = null;
|
||||
|
||||
if (!empty($CFG->opentogoogle)) {
|
||||
if (is_web_crawler()) {
|
||||
if (\core_useragent::is_web_crawler()) {
|
||||
$user = guest_user();
|
||||
}
|
||||
$referer = get_local_referer(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue