fallback to reading a page for "/tags"

This commit is contained in:
Christian Tietze 2019-08-23 18:02:25 +02:00
parent 4662bde3b9
commit 36716c2d3b
1 changed files with 3 additions and 6 deletions

View File

@ -56,12 +56,6 @@ class Url
$subString = mb_substr($this->uri, 0, $filterFullLenght, CHARSET); $subString = mb_substr($this->uri, 0, $filterFullLenght, CHARSET);
// Check coincidence without the last slash at the end, this case is notfound
if ($subString==$filterURIwoSlash) {
$this->setNotFound();
return false;
}
// Check coincidence with complete filterURI // Check coincidence with complete filterURI
if ($subString==$filterFull) { if ($subString==$filterFull) {
$this->slug = mb_substr($this->uri, $filterFullLenght); $this->slug = mb_substr($this->uri, $filterFullLenght);
@ -77,6 +71,9 @@ class Url
$this->setWhereAmI('home'); $this->setWhereAmI('home');
} elseif (!empty($this->slug) && ($filterURI=='/')) { } elseif (!empty($this->slug) && ($filterURI=='/')) {
$this->setWhereAmI('page'); $this->setWhereAmI('page');
} elseif (empty($this->slug) && ($filterName=='tag')) {
$this->slug = 'tag';
$this->setWhereAmI('page');
} elseif ($filterName=='admin') { } elseif ($filterName=='admin') {
$this->slug = ltrim($this->slug, '/'); $this->slug = ltrim($this->slug, '/');
} }