Commit 2e25565b authored by Steven Wittens's avatar Steven Wittens

- Fixed bug when node-navigation-combobox wouldn't select the correct item if...

- Fixed bug when node-navigation-combobox wouldn't select the correct item if drupal was run from a sub-directory.
parent 323c30e1
......@@ -182,8 +182,9 @@ function visit(site) {
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";
......
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