diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-05-19 18:26:49 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-05-19 18:26:49 +0000 |
commit | bf28f8709b27ba4abeec5d2300e4067125362efd (patch) | |
tree | bc03a784504e2466126582cab74004a3ec14f56a | |
parent | 7c364f89351bb861e5ddbf340e7821772943cdb5 (diff) | |
download | brdo-bf28f8709b27ba4abeec5d2300e4067125362efd.tar.gz brdo-bf28f8709b27ba4abeec5d2300e4067125362efd.tar.bz2 |
- Applied Moshe's patch that should make clean URLs work on IIS. I removed
a little hack that sometimes patches the request_uri(); I don't think
this should trigger in first place. If it does, let me know the URL of
the form as well as the referring page. (If this needs fixing after all,
fixing this _inside_ request_uri() might be a better solution.)
-rw-r--r-- | includes/common.inc | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/includes/common.inc b/includes/common.inc index 8143693f2..964e14362 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -762,7 +762,11 @@ function format_name($object) { } function form($form, $method = "post", $action = 0, $options = 0) { - return "<form action=\"". ($action ? $action : htmlentities(request_uri())) ."\" method=\"$method\"". ($options ? " $options" : "") .">\n$form</form>\n"; + + if (!$action) { + $action = htmlentities(request_uri()); + } + return "<form action=\"$action\" method=\"$method\"". ($options ? " $options" : "") .">\n$form</form>\n"; } function form_item($title, $value, $description = 0) { @@ -825,15 +829,15 @@ function url($url = NULL, $query = NULL) { if (variable_get("clean_url", "0") == "0") { if (isset($url)) { if (isset($query)) { - return "$base_url/?q=$url&$query"; + return "$base_url/index.php?q=$url&$query"; } else { - return "$base_url/?q=$url"; + return "$base_url/index.php?q=$url"; } } else { if (isset($query)) { - return "$base_url/?$query"; + return "$base_url/index.php?$query"; } else { return "$base_url/"; @@ -851,7 +855,7 @@ function url($url = NULL, $query = NULL) { } else { if (isset($query)) { - return "$base_url/?$query"; + return "$base_url/$index.php?$query"; } else { return "$base_url/"; @@ -906,13 +910,6 @@ function timer_start() { $timer = (float)$usec + (float)$sec; } -function query_print() { - global $queries; - print "<pre>"; - print_r($queries); - print "</pre>"; -} - function drupal_page_header() { if (variable_get("dev_timer", 0)) { timer_start(); |