diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-01-21 17:31:13 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-01-21 17:31:13 +0000 |
commit | 8c672011a267d193fa47cd7cbb523e90a643ee32 (patch) | |
tree | 79ad86b90c5748f10eaf7edafd0a64dd693c05c9 /modules/queue.module | |
parent | 0683331acd0ee1ddb07bec2e68cece64e3ddbbc5 (diff) | |
download | brdo-8c672011a267d193fa47cd7cbb523e90a643ee32.tar.gz brdo-8c672011a267d193fa47cd7cbb523e90a643ee32.tar.bz2 |
- moved user block from theme.inc to user.module.
* only problem is that the admin.php link is not available until the
admin enables the block.
* $theme->user is obsolete, will patch the themes properly in a
later patch.
- moved moderation block from theme.inc to queue.module.
* removed theme_moderation_results().
- updated database/database.mysql.
Diffstat (limited to 'modules/queue.module')
-rw-r--r-- | modules/queue.module | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/queue.module b/modules/queue.module index 11790447e..c301051d1 100644 --- a/modules/queue.module +++ b/modules/queue.module @@ -170,4 +170,33 @@ function queue_page() { } } +function queue_block() { + global $PHP_SELF; + if (strrchr($PHP_SELF, "/") == "/node.php") { + global $user, $id; + if ($user->uid) { + $node = db_fetch_object(db_query("SELECT * FROM node WHERE nid = '$id'")); + } + if ($node->moderate == 1) { + foreach (explode(",", $node->users) as $vote) { + if ($vote) { + $data = explode("=", $vote); + $account = user_load(array("uid" => $data[0])); + $output .= format_name($account) ." voted '$data[1]'.<br />"; + } + } + + $block[0]["subject"] = t("Moderation results"); + $block[0]["content"] = $output ? $output : t("This node has not been moderated yet."); + $block[0]["info"] = t("Moderation results"); + } + } + elseif (strrchr($PHP_SELF, "/") == "/admin.php") { + $block[0]["subject"] = t("Moderation results"); + $block[0]["info"] = t("Moderation results"); + } + + return $block; +} + ?> |