Skip to content

Commit

Permalink
better fix than the last one
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Jan 3, 2012
1 parent 803167e commit 596ed4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 0 additions & 3 deletions classes/sitelink.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,6 @@ static function hostMatchMapItems($object=false){
if(!array_key_exists($HostItemArray[1],$HostMatchMapItems) || ($object && $object->currentHost==$HostItemArray[0] && $object->siteAccess['name']==$HostItemArray[1])){
$HostMatchMapItems[$HostItemArray[1]] = ($SiteAccess && array_key_exists($HostItemArray[1],$SiteAccess)) ? $SiteAccess[$HostItemArray[1]] : $HostItemArray[0];
}
if($object->siteAccess && $HostItemArray[1]==$object->siteAccess['name']){
$HostMatchMapItems[$HostItemArray[1]] = $HostItemArray[0];
}
}
}
return $HostMatchMapItems;
Expand Down
5 changes: 5 additions & 0 deletions operators/sitelinkoperator.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ static function sitelink(&$operatorValue, &$namedParameters){
$Matchup=0;
foreach($Match as $UseMatchItem){
if($UseMatchItem['locale']==$SiteLink->currentLocale){
if ($SiteLink->siteAccess['name'] == $UseMatchItem['siteaccess']) {
$UseMatchItem['host'] = '';
$UseMatch = $UseMatchItem;
break;
}
if(($CheckMatch=similar_text($SiteLink->currentHost, $UseMatchItem['host'])) > $Matchup){
$Matchup = $CheckMatch;
$UseMatch = $UseMatchItem;
Expand Down

0 comments on commit 596ed4a

Please sign in to comment.