瀏覽代碼

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