diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-11-17 22:22:18 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-11-17 22:22:18 +0000 |
commit | cc4d9fbe3fb832646bbac3c805938e01916ae225 (patch) | |
tree | d2eb5f4257596fe977e5d7b3b0b03614abb217d6 | |
parent | e596301b3977ae67a8884923e4d1f2580203219d (diff) | |
download | brdo-cc4d9fbe3fb832646bbac3c805938e01916ae225.tar.gz brdo-cc4d9fbe3fb832646bbac3c805938e01916ae225.tar.bz2 |
Experimental change:
- Blog entries get queued in the moderation queue for promotion.
-rw-r--r-- | modules/blog.module | 20 | ||||
-rw-r--r-- | modules/blog/blog.module | 20 | ||||
-rw-r--r-- | modules/queue.module | 8 |
3 files changed, 42 insertions, 6 deletions
diff --git a/modules/blog.module b/modules/blog.module index 024661db0..9f345c1d7 100644 --- a/modules/blog.module +++ b/modules/blog.module @@ -40,13 +40,14 @@ function blog_access($op, $node) { } function blog_save($op, $node) { + global $user; if ($op == "approve") { return array("promote" => 1); } if ($op == "create") { - return array("promote" => 0, "moderate" => 0, "status" => 1); + return array("promote" => 0, "moderate" => 1, "status" => 1); } if ($op == "decline") { @@ -54,7 +55,22 @@ function blog_save($op, $node) { } if ($op == "update") { - return array("promote"); + if ($user->uid == $node->uid) { + /* + ** Updating your own blog entry will demote it (if promoted), + ** and will queue it in the moderation queue for promotion. + */ + + return array("promote" => 0, "moderate" => 1, "score" => 0, "votes" => 0, "users" => 0); + } + else { + /* + ** When an administrator updates someone else' blog entry, it + ** will not be changed unless explicitly specified. + */ + + return array(); + } } } diff --git a/modules/blog/blog.module b/modules/blog/blog.module index 024661db0..9f345c1d7 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -40,13 +40,14 @@ function blog_access($op, $node) { } function blog_save($op, $node) { + global $user; if ($op == "approve") { return array("promote" => 1); } if ($op == "create") { - return array("promote" => 0, "moderate" => 0, "status" => 1); + return array("promote" => 0, "moderate" => 1, "status" => 1); } if ($op == "decline") { @@ -54,7 +55,22 @@ function blog_save($op, $node) { } if ($op == "update") { - return array("promote"); + if ($user->uid == $node->uid) { + /* + ** Updating your own blog entry will demote it (if promoted), + ** and will queue it in the moderation queue for promotion. + */ + + return array("promote" => 0, "moderate" => 1, "score" => 0, "votes" => 0, "users" => 0); + } + else { + /* + ** When an administrator updates someone else' blog entry, it + ** will not be changed unless explicitly specified. + */ + + return array(); + } } } diff --git a/modules/queue.module b/modules/queue.module index f5247bc32..2ec8bdb4a 100644 --- a/modules/queue.module +++ b/modules/queue.module @@ -83,10 +83,14 @@ function queue_overview() { $output .= " <tr><th>". t("Subject") ."</th><th>". t("Author") ."</th><th>". t("Type") ."</TH><TH>". t("Score") ."</th></tr>"; while ($node = db_fetch_object($result)) { if ($user->uid == $node->uid || field_get($node->users, $user->uid)) { - $output .= " <tr><td><a href=\"module.php?mod=queue&op=view&id=$node->nid\">". check_output($node->title) ."</a></td><td align=\"center\">". format_name($node) ."</td><td align=\"center\">". check_output($node->type) ."</td><td align=\"center\">". queue_score($node->nid) ."</td></tr>"; + $output .= " <tr><td><a href=\"module.php?mod=queue&op=view&id=$node->nid\">". check_output($node->title) ."</a></td><td align=\"center\">". format_name($node) ."</td><td align=\"center\">". module_invoke($node->type, "node", "name") ."</td><td align=\"center\">". queue_score($node->nid) ."</td></tr>"; } else { - $output .= " <tr><td><a href=\"module.php?mod=queue&op=view&id=$node->nid\">". check_output($node->title) ."</a></td><td align=\"center\">". format_name($node) ."</td><td align=\"center\">". check_output($node->type) ."</td><td align=\"center\"><a href=\"module.php?mod=queue&op=view&id=$node->nid\">". t("vote") ."</a></td></tr>"; + $output .= " <tr><td><a href=\"module.php?mod=queue&op=view&id=$node->nid\">". check_output($node->title) ."</a></td><td align=\"center\">". format_name($node) ."</td><td align=\"center\">". module_invoke($node->type, "node", "name") ."</td><td align=\"center\"><a href=\"module.php?mod=queue&op=view&id=$node->nid\">". t("vote") ."</a></td></tr>"; + } + + if ($node->teaser) { + $output .= " <tr><td colspan=\"4\"><div style=\"margin-left: 40px; margin-bottom: 20px; font-size: 10px;\">$node->teaser</div></td></tr>"; } } $output .= "</table>"; |