Преглед на файлове

handle the trailing slash for subpages

Olivier Massot преди 4 години
родител
ревизия
ee262b950a
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      ot_core/Classes/Website/OtWebsiteRepository.php

+ 3 - 0
ot_core/Classes/Website/OtWebsiteRepository.php

@@ -351,6 +351,9 @@ class OtWebsiteRepository
         if ($devMode) {
             $tail = preg_replace("/\/?[\w\-]+\/?(.*)/", "/$1", $tail);
         }
+        if ($tail != "/") {
+            $tail = rtrim($tail, '/');
+        }
 
         $q = $this->connectionPool->getQueryBuilderForTable('pages');
         return $q