From 86552cb4b6a83dc218ea0164ddb7c9670f224ddb Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Sat, 11 May 2002 16:21:48 +0000 Subject: - changed block, module and theme config pages to use checkboxes. - coding style clean ups. - fixed taxonomy causing errors. --- modules/node/node.module | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'modules/node/node.module') diff --git a/modules/node/node.module b/modules/node/node.module index 92b882f76..5521cd43a 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -416,7 +416,7 @@ function node_admin_settings($edit = array()) { ** Reset the configuration options to their default value: */ - foreach ($edit as $name=>$value) { + foreach ($edit as $name => $value) { variable_del($name); } } @@ -460,7 +460,7 @@ function node_admin_edit($node) { $output .= ""; $output .= " "; foreach ($node->revisions as $key => $revision) { - $output .= " "; + $output .= " "; } $output .= "
older revisionsoperations
". t("revision #%r revised by %u on %d", array("%r" => $key, "%u" => format_name(user_load(array("uid" => $revision["uid"]))), "%d" => format_date($revision["timestamp"], "small"))) . ($revision["history"] ? "
". $revision["history"] ."" : "") ."
". l(t("view revision"), array("id" => $node->nid, "revision" =>$key)) ."". la(t("rollback revision"), array("mod" => "node", "op" => "rollback+revision", "id" => $node->nid, "revision" => $key)) ."". la(t("delete revision"), array("mod" => "node", "op" => "delete+revision", "id" => $node->nid, "revision" => $key)) ."
". t("revision #%r revised by %u on %d", array("%r" => $key, "%u" => format_name(user_load(array("uid" => $revision["uid"]))), "%d" => format_date($revision["timestamp"], "small"))) . ($revision["history"] ? "
". $revision["history"] ."" : "") ."
". l(t("view revision"), array("id" => $node->nid, "revision" => $key)) ."". la(t("rollback revision"), array("mod" => "node", "op" => "rollback+revision", "id" => $node->nid, "revision" => $key)) ."". la(t("delete revision"), array("mod" => "node", "op" => "delete+revision", "id" => $node->nid, "revision" => $key)) ."
"; } @@ -1031,7 +1031,9 @@ function node_submit($node) { ** Update terms of the node */ - taxonomy_node_save($nid, $node->taxonomy); + if (function_exists("taxonomy_node_save")) { + taxonomy_node_save($nid, $node->taxonomy); + } watchdog("special", "$node->type: updated '$node->title'"); $output = t("The node has been updated."); @@ -1076,7 +1078,9 @@ function node_submit($node) { ** Insert terms of the node */ - taxonomy_node_save($nid, $node->taxonomy); + if (function_exists("taxonomy_node_save")) { + taxonomy_node_save($nid, $node->taxonomy); + } watchdog("special", "$node->type: added '$node->title'"); $output = t("Thanks for your submission."); @@ -1138,7 +1142,9 @@ function node_delete($edit) { ** Delete any taxonomy terms */ - taxonomy_node_delete($node->nid); + if (function_exists("taxonomy_node_delete")) { + taxonomy_node_delete($nid, $node->taxonomy); + } /* ** Call the node specific callback (if any): -- cgit v1.2.3