public function normalizedHere()
{
$here = $this->here;
if (!BcUtil::isAdminSystem() && $this->params['controller'] == 'pages') {
if (!empty($this->params['pass']) && $this->params['pass'][count($this->params['pass']) - 1] == 'index' && !preg_match('/\\/index$/', $here)) {
if (preg_match('/\\/$/', $here)) {
$here .= 'index';
} else {
$here .= '/index';
}
}
$here = preg_replace('/\\.html$/', '', $here);
} else {
if ($this->action == 'index') {
list($here, ) = explode('?', $here);
if (!empty($this->params['pass'])) {
foreach ($this->params['pass'] as $pass) {
$here = preg_replace('/\\/' . $pass . '$/', '', $here);
}
}
if (!preg_match('/\\/index$/', $here)) {
if (preg_match('/\\/$/', $here)) {
$here .= 'index';
} else {
$here .= '/index';
}
}
}
}
return $here;
}