Explorar o código

fix the subpages url resolution on dev mode

Olivier Massot %!s(int64=4) %!d(string=hai) anos
pai
achega
8b76eea02d
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      ot_core/Classes/Website/OtWebsiteRepository.php

+ 1 - 2
ot_core/Classes/Website/OtWebsiteRepository.php

@@ -349,8 +349,7 @@ class OtWebsiteRepository
 
         $tail = $uri->getPath();
         if ($devMode) {
-            $tail = rtrim($tail, '/') . '/';
-            $tail = preg_replace("/\/?[\w\-]+\/(.*)/", "/$1", $tail);
+            $tail = preg_replace("/\/?[\w\-]+\/?(.*)/", "/$1", $tail);
         }
 
         $q = $this->connectionPool->getQueryBuilderForTable('pages');