Commit 0d384c8e authored by Dries's avatar Dries

- Fixed "clean URL" glitch in queue module.  Patch by Ax.

- Small improvement to url().  Patch by Ax.
parent ba3eead0
......@@ -719,7 +719,7 @@ function form_weight($title = NULL, $name = "weight", $value = 0, $delta = 10, $
return form_select($title, $name, $value, $weights, $description, $extra);
}
function url($url, $query = NULL) {
function url($url = NULL, $query = NULL) {
if (isset($url)) {
if (isset($query)) {
......@@ -733,6 +733,9 @@ function url($url, $query = NULL) {
if (isset($query)) {
return "?$query";
}
else {
return "";
}
}
}
......
......@@ -184,7 +184,7 @@ function queue_block($op = "list", $delta = 0) {
return $blocks;
}
else {
if (user_access("access submission queue") && (substr_count(request_uri(), url("queue")) || substr_count(request_uri(), url()))) {
if (user_access("access submission queue") && (substr_count(request_uri(), url("queue")) || substr_count(request_uri(), url("node")))) {
global $user, $id;
if ($user->uid) {
$node = node_load(array("nid" => $id));
......
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