summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2001-04-21 15:51:23 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2001-04-21 15:51:23 +0000
commitb24aff1da287eb14a788dec6778dea50cefee830 (patch)
tree58f129ae372d65ce89cecf3b2ad4f717cf4a7fe3 /includes
parent89fb6b6b4e398adcb204b4bcc84d18823472fefd (diff)
downloadbrdo-b24aff1da287eb14a788dec6778dea50cefee830.tar.gz
brdo-b24aff1da287eb14a788dec6778dea50cefee830.tar.bz2
Made the "add" and "update" options in the node-combobox appear only when logged in.
Diffstat (limited to 'includes')
-rw-r--r--includes/node.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/node.inc b/includes/node.inc
index aa401cea8..d5074ce61 100644
--- a/includes/node.inc
+++ b/includes/node.inc
@@ -177,7 +177,10 @@ function node_control($node) {
</SCRIPT>
<?php
- $choices = array("node.php?id=$node->nid" => t("view node"), "submit.php?mod=$node->type" => t("add node"), "submit.php?mod=$node->type&op=update&id=$node->nid" => t("update node"), "node.php?op=history&id=$node->nid" => t("view history"));
+ if ($user->id)
+ $choices = array("node.php?id=$node->nid" => t("view node"), "submit.php?mod=$node->type" => t("add node"), "submit.php?mod=$node->type&op=update&id=$node->nid" => t("update node"), "node.php?op=history&id=$node->nid" => t("view history"));
+ else
+ $choices = array("node.php?id=$node->nid" => t("view node"), "node.php?op=history&id=$node->nid" => t("view history"));
$output .= "<FORM METHOD=\"get\" ACTION=\"\">\n";
foreach ($choices as $key => $value) $options .= "<OPTION VALUE=\"$key\"". ("/$key" == $REQUEST_URI ? " SELECTED" : "") .">". check_select($value) ."</OPTION>\n";