diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2003-02-16 14:57:35 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2003-02-16 14:57:35 +0000 |
commit | dd329e1d95dcc0e02841482b660091945f433d13 (patch) | |
tree | 4ab177a5825704acd68741389f8659718646e2b0 /modules/queue.module | |
parent | b29f1bff7fa95270644d4d4db42bbe3d92cbb0d6 (diff) | |
download | brdo-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.module | 13 |
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 |