diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-03-07 06:37:30 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-03-07 06:37:30 +0000 |
commit | d659fedb389a42173d18bfc2aea2628372579a52 (patch) | |
tree | 9a8ae00e584b4915613d876e521250dfc53802ec /includes/common.inc | |
parent | d5fe0cfe2017241094a84e4c4fb6bfdf1928f8eb (diff) | |
download | brdo-d659fedb389a42173d18bfc2aea2628372579a52.tar.gz brdo-d659fedb389a42173d18bfc2aea2628372579a52.tar.bz2 |
- Removed the path_uri() function in favor of the $base_url variable and
fixes a handful of bugs introduced by the clean URL patch.
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/includes/common.inc b/includes/common.inc index 56432d14a..9c6b40bf2 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -98,19 +98,6 @@ function object2array($node) { return $array; } -function path_uri($brief = 0) { - global $HTTP_HOST, $PHP_SELF; - - $uri = $PHP_SELF; - $path = $HTTP_HOST . substr($uri, 0, strrpos($uri, "/")) ."/"; - - if (!$brief) { - $path = "http://". $path; - } - - return $path; -} - function request_uri() { // since request_uri() is only available on apache, we generate equivalent using other environment vars. @@ -786,18 +773,18 @@ function url($url = NULL, $query = NULL) { if (variable_get("clean_url", "0") == "0") { if (isset($url)) { if (isset($query)) { - return "?q=$url&$query"; + return "$base_url/?q=$url&$query"; } else { - return "?q=$url"; + return "$base_url/?q=$url"; } } else { if (isset($query)) { - return "?$query"; + return "$base_url/?$query"; } else { - return ""; + return "$base_url/"; } } } @@ -815,7 +802,7 @@ function url($url = NULL, $query = NULL) { return "$base_url/?$query"; } else { - return "$base_url"; + return "$base_url/"; } } } |