summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
authorKjartan Mannes <kjartan@2.no-reply.drupal.org>2002-05-11 16:21:48 +0000
committerKjartan Mannes <kjartan@2.no-reply.drupal.org>2002-05-11 16:21:48 +0000
commit86552cb4b6a83dc218ea0164ddb7c9670f224ddb (patch)
tree65d981eb5f2d5704e6decedef514fcf083361cc7 /modules/node/node.module
parentc72bf4b5f79297eff699bd6207f0acdb3bfc4e30 (diff)
downloadbrdo-86552cb4b6a83dc218ea0164ddb7c9670f224ddb.tar.gz
brdo-86552cb4b6a83dc218ea0164ddb7c9670f224ddb.tar.bz2
- changed block, module and theme config pages to use checkboxes.
- coding style clean ups. - fixed taxonomy causing errors.
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module16
1 files changed, 11 insertions, 5 deletions
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 .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">";
$output .= " <tr><th>older revisions</th><th colspan=\"3\">operations</th></tr>";
foreach ($node->revisions as $key => $revision) {
- $output .= " <tr><td>". 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"] ? "<br /><small>". $revision["history"] ."</small>" : "") ."</td><td>". l(t("view revision"), array("id" => $node->nid, "revision" =>$key)) ."</td><td>". la(t("rollback revision"), array("mod" => "node", "op" => "rollback+revision", "id" => $node->nid, "revision" => $key)) ."</td><td>". la(t("delete revision"), array("mod" => "node", "op" => "delete+revision", "id" => $node->nid, "revision" => $key)) ."</td></tr>";
+ $output .= " <tr><td>". 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"] ? "<br /><small>". $revision["history"] ."</small>" : "") ."</td><td>". l(t("view revision"), array("id" => $node->nid, "revision" => $key)) ."</td><td>". la(t("rollback revision"), array("mod" => "node", "op" => "rollback+revision", "id" => $node->nid, "revision" => $key)) ."</td><td>". la(t("delete revision"), array("mod" => "node", "op" => "delete+revision", "id" => $node->nid, "revision" => $key)) ."</td></tr>";
}
$output .= "</table>";
}
@@ -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):