Skip to content

Commit

Permalink
Merge pull request #1 from tniebergall/patch-1
Browse files Browse the repository at this point in the history
Changed function getAlias
  • Loading branch information
Tobias Niebergall committed May 24, 2015
2 parents feaa292 + 74b4736 commit f7c5cf7
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions TL_ROOT/system/modules/metamodels_index/MetaModels/Index/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,10 @@ public function getSearchablePagesModel($arrData)
*/
protected function getAlias($strLink)
{

if ($GLOBALS['TL_CONFIG']['rewriteURL'] == false) {
$strLink = str_replace('index.php/', '', $strLink);
}

if ($GLOBALS['TL_CONFIG']['urlSuffix']) {
$strLink = str_replace(
$GLOBALS['TL_CONFIG']['urlSuffix'],
'',
$strLink
);
}

$strLink = str_replace(\Environment::get('base'), '', $strLink);

$strLang = '';
Expand All @@ -123,9 +114,17 @@ protected function getAlias($strLink)

$strLink = implode('/', $strLink);
}

if ($GLOBALS['TL_CONFIG']['urlSuffix']) {
$strLink = str_replace(
$GLOBALS['TL_CONFIG']['urlSuffix'],
'',
$strLink
);
}

$arrLink = array('alias' => $strLink, 'language' => $strLang);

return $arrLink;
}

Expand Down

0 comments on commit f7c5cf7

Please sign in to comment.