Skip to content

Commit

Permalink
siteaccess in url bug fix - 10542
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Dec 13, 2011
1 parent af19caf commit 25b8c6d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion classes/sitelink.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ function hyperlink(&$operatorValue=false, $host=false){
if($this->useSiteaccessOverride && isset($this->useSiteaccess)){
$urlComponents['path']='/'.$this->useSiteaccess.$urlComponents['path'];
} else if($this->siteAccess && isset($this->siteAccess['uri_part']) && count($this->siteAccess['uri_part']) && !$urlComponents['host']){
if(stripos($urlComponents['path'],implode('/',$this->siteAccess['uri_part']))===false){
$siteaccess_check = str_replace("//", "/", '/'.$urlComponents['path'].'/');
if(stripos($siteaccess_check,'/'.implode('/',$this->siteAccess['uri_part']).'/')!==0){
$urlComponents['path']='/'.implode('/',$this->siteAccess['uri_part']).$urlComponents['path'];
}
}
Expand Down

0 comments on commit 25b8c6d

Please sign in to comment.