Permalink
Browse files

improve support for $config['url_prefix']

  • Loading branch information...
1 parent b884e0d commit 13d4e8daa7b26bfddb747fe05426154f3c7a1afe @romaninsh romaninsh committed Mar 26, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/URL.php
View
@@ -167,19 +167,21 @@ function getURL(){
$url=$this->getBaseURL();
$url.=$this->page;
$url.=$this->getExtension();
- $url.=$this->getArguments();
+
+
+ $url.=$this->getArguments(strpos($url,'?')!==null);
return $url;
}
- function getArguments(){
+ function getArguments($ampersand=false){
$tmp=array();
foreach($this->arguments as $key=>$value){
if($value===false)continue;
$tmp[]=$key.'='.urlencode($value);
}
- if($tmp)return '?'.join('&',$tmp);
+ if($tmp)return ($ampersand?'&':'?').join('&',$tmp);
return '';
}
function getHTMLURL(){

0 comments on commit 13d4e8d

Please sign in to comment.