From bf28f8709b27ba4abeec5d2300e4067125362efd Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 19 May 2003 18:26:49 +0000 Subject: - 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.) --- includes/common.inc | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'includes/common.inc') 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 "
\n$form
\n"; + + if (!$action) { + $action = htmlentities(request_uri()); + } + return "
\n$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 "
";
-  print_r($queries);
-  print "
"; -} - function drupal_page_header() { if (variable_get("dev_timer", 0)) { timer_start(); -- cgit v1.2.3