diff options
Diffstat (limited to 'shared/functions/url.php')
-rw-r--r-- | shared/functions/url.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/shared/functions/url.php b/shared/functions/url.php index f2ff5ba..0234b2b 100644 --- a/shared/functions/url.php +++ b/shared/functions/url.php @@ -1,23 +1,23 @@ <?php // Makes all URLs absolute function url($url='') { - global $conf; + global $S; if (strlen($url) == 0) { - return $conf['url'].($conf['mod_rewrite']?'':'/index.php'); + return $S['conf']['url'].($S['conf']['mod_rewrite']?'':'/index.php'); } elseif (substr($url, 0, 7) == 'http://') { return $url; } - if ($conf['mod_rewrite']) { - return $conf['url'].'/'.$url; + if ($S['conf']['mod_rewrite']) { + return $S['conf']['url'].'/'.$url; } else { if (strpos($url, '?')) { $q=substr($url, strpos($url, '?')+1); $url=substr($url, 0, strpos($url, '?')); } if (strlen($url)) { - return $conf['url'].'/index.php?req='.$url.(isset($q)?'&'.$q:''); + return $S['conf']['url'].'/index.php?req='.$url.(isset($q)?'&'.$q:''); } else { - return $conf['url'].'/index.php?'.$q; + return $S['conf']['url'].'/index.php?'.$q; } } } |