mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
Merge branch 'MDL-83746-405' of https://github.com/srobotta/moodle into MOODLE_405_STABLE
This commit is contained in:
commit
e0d33cdf64
@ -208,6 +208,12 @@ class primary implements renderable, templatable {
|
||||
|
||||
$pathmatches = false;
|
||||
|
||||
// Check for same host names before comparing the path.
|
||||
$currenthost = array_key_exists('host', $current) ? strtolower($current['host']) : '';
|
||||
$nodehost = array_key_exists('host', $nodeurl) ? strtolower($nodeurl['host']) : '';
|
||||
if ($currenthost !== $nodehost) {
|
||||
return false;
|
||||
}
|
||||
// Exact match of the path of node and current url.
|
||||
$nodepath = $nodeurl['path'] ?? '/';
|
||||
$currentpath = $current['path'] ?? '/';
|
||||
|
Loading…
x
Reference in New Issue
Block a user