summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2001-04-21 22:48:28 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2001-04-21 22:48:28 +0000
commit2e25565b86fc98279f4930bbb9cd322f4577a0c9 (patch)
treeefc7c7454bc1323c0dde2471f18c1ed01804e839
parent323c30e1dc6aaf2b42afb5e8fe8b4512af20da2a (diff)
downloadbrdo-2e25565b86fc98279f4930bbb9cd322f4577a0c9.tar.gz
brdo-2e25565b86fc98279f4930bbb9cd322f4577a0c9.tar.bz2
- Fixed bug when node-navigation-combobox wouldn't select the correct item if drupal was run from a sub-directory.
-rw-r--r--includes/node.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/includes/node.inc b/includes/node.inc
index d5074ce61..853e3d8d2 100644
--- a/includes/node.inc
+++ b/includes/node.inc
@@ -182,8 +182,9 @@ function node_control($node) {
else
$choices = array("node.php?id=$node->nid" => t("view node"), "node.php?op=history&id=$node->nid" => t("view history"));
+ $output .= $REQUEST_URI;
$output .= "<FORM METHOD=\"get\" ACTION=\"\">\n";
- foreach ($choices as $key => $value) $options .= "<OPTION VALUE=\"$key\"". ("/$key" == $REQUEST_URI ? " SELECTED" : "") .">". check_select($value) ."</OPTION>\n";
+ foreach ($choices as $key => $value) $options .= "<OPTION VALUE=\"$key\"". (strstr($REQUEST_URI,"/$key") ? " SELECTED" : "") .">". check_select($value) ."</OPTION>\n";
$output .= " <SELECT NAME=\"op\" ONCHANGE=\"visit(this.options[this.selectedIndex].value)\">$options</SELECT>\n";
$output .= "</FORM>\n";