Commit bf28f870 authored by Dries's avatar Dries

- 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.)
parent 7c364f89
......@@ -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&amp;$query";
return "$base_url/index.php?q=$url&amp;$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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment