summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/comment.inc2
-rw-r--r--modules/blog.module6
-rw-r--r--modules/blog/blog.module6
3 files changed, 9 insertions, 5 deletions
diff --git a/includes/comment.inc b/includes/comment.inc
index cea35102f..274c6e7be 100644
--- a/includes/comment.inc
+++ b/includes/comment.inc
@@ -78,7 +78,7 @@ function comment_reply($pid, $id) {
global $theme;
if ($pid) {
- $item = db_fetch_object(db_query("SELECT c.*, u.name FROM comments c LEFT JOIN user u ON c.author = u.uid WHERE c.cid = '$pid'"));
+ $item = db_fetch_object(db_query("SELECT c.*, u.uid, u.name FROM comments c LEFT JOIN user u ON c.author = u.uid WHERE c.cid = '$pid'"));
comment_view(new Comment($item->uid, $item->name, $item->subject, $item->comment, $item->timestamp, $item->url, $item->cid, $item->lid), t("reply to this comment"));
}
else {
diff --git a/modules/blog.module b/modules/blog.module
index 8688ee5ac..b95088c57 100644
--- a/modules/blog.module
+++ b/modules/blog.module
@@ -68,7 +68,7 @@ function blog_feed_user($uid = 0, $date = 0) {
function blog_feed_last() {
$result = db_query("SELECT n.nid, n.title, n.timestamp, b.body, u.name, u.uid FROM blog b LEFT JOIN node n ON b.nid = n.nid LEFT JOIN user u ON n.author = u.uid ORDER BY b.lid DESC LIMIT 15");
while ($blog = db_fetch_object($result)) {
- $items .= format_rss_item($blog->title, path_uri() ."module.php?mod=blog&op=view&id=". urlencode($blog->uid), $blog->body);
+ $items .= format_rss_item($blog->title, path_uri() ."module.php?mod=blog&op=view&id=$blog->uid", $blog->body);
}
$output .= "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n";
@@ -118,6 +118,7 @@ function blog_page_user($uid = 0, $date = 0) {
}
if ($blog->comment) {
+ $links[] = "<a href=\"node.php?id=$blog->nid\">". t("moderate") ."</a>";
$links[] = "<a href=\"node.php?id=$blog->nid\">". format_plural($blog->comments, t("comment"), t("comments")) ."</a>";
}
@@ -154,6 +155,7 @@ function blog_page_last() {
}
if ($blog->comment) {
+ $links[] = "<a href=\"node.php?id=$blog->nid\">". t("moderate") ."</a>";
$links[] = "<a href=\"node.php?id=$blog->nid\">". format_plural($blog->comments, t("comment"), t("comments")) ."</a>";
}
@@ -350,7 +352,7 @@ function blog_block() {
$result = db_query("SELECT u.uid, u.name, n.timestamp, n.title, n.nid FROM node n LEFT JOIN user u ON n.author = u.uid WHERE n.type = 'blog' ORDER BY n.nid DESC LIMIT 10");
while ($node = db_fetch_object($result)) {
- $output .= "<a href=\"module.php?mod=blog&op=view&id=$node->nid\">". check_output($node->title) ."</a><br />\n";
+ $output .= "<a href=\"module.php?mod=blog&op=view&id=$node->uid\">". check_output($node->title) ."</a><br />\n";
}
$block[0]["subject"] = "<a href=\"module.php?mod=blog\">". t("User blogs") ."</a>";
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index 8688ee5ac..b95088c57 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -68,7 +68,7 @@ function blog_feed_user($uid = 0, $date = 0) {
function blog_feed_last() {
$result = db_query("SELECT n.nid, n.title, n.timestamp, b.body, u.name, u.uid FROM blog b LEFT JOIN node n ON b.nid = n.nid LEFT JOIN user u ON n.author = u.uid ORDER BY b.lid DESC LIMIT 15");
while ($blog = db_fetch_object($result)) {
- $items .= format_rss_item($blog->title, path_uri() ."module.php?mod=blog&op=view&id=". urlencode($blog->uid), $blog->body);
+ $items .= format_rss_item($blog->title, path_uri() ."module.php?mod=blog&op=view&id=$blog->uid", $blog->body);
}
$output .= "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n";
@@ -118,6 +118,7 @@ function blog_page_user($uid = 0, $date = 0) {
}
if ($blog->comment) {
+ $links[] = "<a href=\"node.php?id=$blog->nid\">". t("moderate") ."</a>";
$links[] = "<a href=\"node.php?id=$blog->nid\">". format_plural($blog->comments, t("comment"), t("comments")) ."</a>";
}
@@ -154,6 +155,7 @@ function blog_page_last() {
}
if ($blog->comment) {
+ $links[] = "<a href=\"node.php?id=$blog->nid\">". t("moderate") ."</a>";
$links[] = "<a href=\"node.php?id=$blog->nid\">". format_plural($blog->comments, t("comment"), t("comments")) ."</a>";
}
@@ -350,7 +352,7 @@ function blog_block() {
$result = db_query("SELECT u.uid, u.name, n.timestamp, n.title, n.nid FROM node n LEFT JOIN user u ON n.author = u.uid WHERE n.type = 'blog' ORDER BY n.nid DESC LIMIT 10");
while ($node = db_fetch_object($result)) {
- $output .= "<a href=\"module.php?mod=blog&op=view&id=$node->nid\">". check_output($node->title) ."</a><br />\n";
+ $output .= "<a href=\"module.php?mod=blog&op=view&id=$node->uid\">". check_output($node->title) ."</a><br />\n";
}
$block[0]["subject"] = "<a href=\"module.php?mod=blog\">". t("User blogs") ."</a>";