Deny pages with slug equal to filters

This commit is contained in:
Diego Najar 2018-09-10 18:16:58 +02:00
parent c85f440793
commit bcb656511e

View File

@ -52,7 +52,7 @@ class Url
// $filterFull = '/base_url/category/'
$filterFull = ltrim($filterURI, '/');
$filterFull = HTML_PATH_ROOT.$filterFull;
$filterFullLenght = mb_strlen($filterFull, CHARSET);
$filterFullLenght = Text::length($filterFull);
// $filterFullwoSlash = '/base_url/category'
$filterFullwoSlash = ltrim($filterURIwoSlash, '/');
@ -61,7 +61,7 @@ class Url
$subString = mb_substr($this->uri, 0, $filterFullLenght, CHARSET);
// Check coincidence without the last slash at the end, this case is notfound
if (($subString==$filterURIwoSlash) && ($filterName!='admin')) {
if ($subString==$filterURIwoSlash) {
$this->setNotFound();
return false;
}