Merge branch 'MDL-83746-405' of https://github.com/srobotta/moodle into MOODLE_405_STABLE

This commit is contained in:
sarjona 2025-01-07 14:50:06 +01:00
commit e0d33cdf64

View File

@ -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'] ?? '/';