summaryrefslogtreecommitdiff
path: root/modules/queue.module
diff options
context:
space:
mode:
authorKjartan Mannes <kjartan@2.no-reply.drupal.org>2003-02-16 14:57:35 +0000
committerKjartan Mannes <kjartan@2.no-reply.drupal.org>2003-02-16 14:57:35 +0000
commitdd329e1d95dcc0e02841482b660091945f433d13 (patch)
tree4ab177a5825704acd68741389f8659718646e2b0 /modules/queue.module
parentb29f1bff7fa95270644d4d4db42bbe3d92cbb0d6 (diff)
downloadbrdo-dd329e1d95dcc0e02841482b660091945f433d13.tar.gz
brdo-dd329e1d95dcc0e02841482b660091945f433d13.tar.bz2
- Added function node_invoke_all($hook, &$node, $op, $arg = 0).
- Added a _nodeapi hook that in time will replace the _node hook. Trying to make as few changes to existing code as possible until the new api is stabilized. - Modified node_form() to add administration options from other modules using the _nodeapi hook. - Modified node_save() to fetch which fields should be saved to the node table from the _nodeapi hook. - Moved comment and queue options from node_form() and node_save() to the modules _nodeapi hooks.
Diffstat (limited to 'modules/queue.module')
-rw-r--r--modules/queue.module13
1 files changed, 12 insertions, 1 deletions
diff --git a/modules/queue.module b/modules/queue.module
index fbeca356a..825650462 100644
--- a/modules/queue.module
+++ b/modules/queue.module
@@ -210,4 +210,15 @@ function queue_block($op = "list", $delta = 0) {
}
}
-?>
+function queue_nodeapi(&$node, $op, $arg = 0) {
+ switch ($op) {
+ case "form":
+ if ($arg == "admin" && user_access("administer moderation")) {
+ return form_select(t("Moderation status"), "moderate", $node->moderate, array(t("Approved"), t("Awaiting approval")));
+ }
+ break;
+ case "fields":
+ return array("moderate");
+ }
+}
+?> \ No newline at end of file