1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-14 18:55:56 +02:00
This commit is contained in:
Ryan Cramer
2022-01-07 09:49:58 -05:00
parent 6b66fac0cf
commit fff53a694d

View File

@@ -1907,7 +1907,8 @@ class PagesPathFinder extends Wire {
if(strpos($path, '/') !== 0) $path = "/$path";
$segment = $this->languageSegment($language);
if(!strlen($segment)) return $path;
if($path === "/$segment" || strpos($path, "/$segment/") === 0) return $path;
if($path === "/$segment" && $this->result['page']['id'] < 2) return $path;
if(strpos($path, "/$segment/") === 0) return $path;
return "/$segment$path";
}