Skip to content

Commit

Permalink
fix bug where when linking to the homepage of site access results in …
Browse files Browse the repository at this point in the history
…the wrong path prefix being used
  • Loading branch information
Michael committed Sep 19, 2011
1 parent 2de84a4 commit 48f6cf4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions classes/sitelink.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ static function URLComponents($value){
$URI=eZURI::instance($ParsedURL['path']);
$ParsedURL['path']=$URI->uriString();
$ParsedURL['user_parameters']=count($URI->userParameters())?$URI->userParameters():false;
if(strpos($ParsedURL['path'],'/')===false){
$ParsedURL['path'].='/';
}
// Fixes bug where when no scheme is specified the host is retured as a path.
if(!$ParsedURL['host'] && $MatchValue=preg_match_all(self::HOST_REGEXP,$ParsedURL['path'],$Matches)){
return array_merge($DefaultURL,parse_url('http:https://'.$ParsedURL['path']));
Expand Down

0 comments on commit 48f6cf4

Please sign in to comment.