summaryrefslogtreecommitdiff
path: root/includes/node.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/node.inc')
-rw-r--r--includes/node.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/includes/node.inc b/includes/node.inc
index fcfd26dd7..6d999e25c 100644
--- a/includes/node.inc
+++ b/includes/node.inc
@@ -183,13 +183,20 @@ function node_control($node) {
}
$output .= "<FORM METHOD=\"get\" ACTION=\"\">\n";
- foreach ($choices as $key => $value) $options .= "<OPTION VALUE=\"$key\"". (strstr($REQUEST_URI,"/$key") ? " SELECTED" : "") .">". check_select($value) ."</OPTION>\n";
+ foreach ($choices as $key => $value) $options .= "<OPTION VALUE=\"$key\"". (strstr($REQUEST_URI,"/$key") ? " SELECTED" : "") .">". check_form($value) ."</OPTION>\n";
$output .= " <SELECT NAME=\"op\" ONCHANGE=\"visit(this.options[this.selectedIndex].value)\">$options</SELECT>\n";
$output .= "</FORM>\n";
return $output;
}
+function node_preview($node) {
+ foreach ($node as $key=>$value) {
+ if ($node[$key]) $node[$key] = check_preview($value);
+ }
+ return $node;
+}
+
function node_visible($node) {
global $user, $status;
return ($node->status == $status[posted]) || ($node->status == $status[queued] && $user->id) || user_access($user, $node->type) || user_access($user, "node");