From 4a0e498f52106b29d4adae0aaf7e1a6d55f8fd68 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 27 Sep 2001 20:51:26 +0000 Subject: - a batch of updates, including some experimental changes to the moderation of comments and nodes. --- modules/blog.module | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'modules/blog.module') diff --git a/modules/blog.module b/modules/blog.module index a7ca6cea0..8688ee5ac 100644 --- a/modules/blog.module +++ b/modules/blog.module @@ -14,6 +14,15 @@ function blog_help() { score > 3 && $node->votes > 4) { + db_query("UPDATE node SET promote = '1' WHERE nid = '$node->nid'"); + } + } +} + function blog_perm() { return array("administer blogs", "access blogs", "post blogs"); } @@ -358,7 +367,7 @@ function blog_search($keys) { $result = db_query("SELECT n.*, b.* FROM blog b LEFT JOIN node n ON n.nid = b.nid AND n.lid = b.lid WHERE (n.title LIKE '%$keys%' OR b.body LIKE '%$keys%') ORDER BY n.timestamp DESC LIMIT 20"); while ($blog = db_fetch_object($result)) { - $find[$i++] = array("title" => check_output($blog->title), "link" => ($PHP_SELF == "/admin.php" ? "admin.php?mod=node&type=blog&op=edit&id=$blog->nid" : "node.php?id=$blog->nid"), "user" => $blog->name, "date" => $blog->timestamp); + $find[$i++] = array("title" => check_output($blog->title), "link" => (strstr($PHP_SELF, "admin.php") ? "admin.php?mod=node&type=blog&op=edit&id=$blog->nid" : "node.php?id=$blog->nid"), "user" => $blog->name, "date" => $blog->timestamp); } return $find; } -- cgit v1.2.3