Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
b24aff1d
Commit
b24aff1d
authored
Apr 21, 2001
by
Steven Wittens
Browse files
Made the "add" and "update" options in the node-combobox appear only when logged in.
parent
89fb6b6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/node.inc
View file @
b24aff1d
...
...
@@ -177,7 +177,10 @@ function visit(site) {
</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
"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment