summaryrefslogtreecommitdiff
path: root/modules/forum
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-04-09 12:12:30 +0000
committerDries Buytaert <dries@buytaert.net>2010-04-09 12:12:30 +0000
commitdcda1fcdb5d37f7f8e13b576e1c4221553c7cc0d (patch)
tree796f3731b11f1699d7c995b6195c118a3d72861f /modules/forum
parent4eefb5172b7ac95d0ac2eb362537748e8a0c6f92 (diff)
downloadbrdo-dcda1fcdb5d37f7f8e13b576e1c4221553c7cc0d.tar.gz
brdo-dcda1fcdb5d37f7f8e13b576e1c4221553c7cc0d.tar.bz2
- Patch #762300 by jpmckinney: fixed undefined property notice.
Diffstat (limited to 'modules/forum')
-rw-r--r--modules/forum/forum.module4
-rw-r--r--modules/forum/forum.test1
2 files changed, 3 insertions, 2 deletions
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 4811750fd..439b6b7e5 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -853,7 +853,7 @@ function forum_get_topics($tid, $sortby, $forum_per_page) {
$nids[] = $record->nid;
}
if ($nids) {
- $result = db_query("SELECT n.title, n.nid, n.sticky, n.created, n.uid, n.comment AS comment_mode, ncs.*, f.tid AS forum_tid, u.name, IF (ncs.last_comment_uid != 0, u2.name, ncs.last_comment_name) AS last_comment_name FROM {node} n INNER JOIN {node_comment_statistics} ncs ON n.nid = ncs.nid INNER JOIN {forum} f ON n.vid = f.vid INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {users} u2 ON ncs.last_comment_uid = u2.uid WHERE n.nid IN (:nids)", array(':nids' => $nids));
+ $result = db_query("SELECT n.title, n.nid, n.type, n.sticky, n.created, n.uid, n.comment AS comment_mode, ncs.*, f.tid AS forum_tid, u.name, IF (ncs.last_comment_uid != 0, u2.name, ncs.last_comment_name) AS last_comment_name FROM {node} n INNER JOIN {node_comment_statistics} ncs ON n.nid = ncs.nid INNER JOIN {forum} f ON n.vid = f.vid INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {users} u2 ON ncs.last_comment_uid = u2.uid WHERE n.nid IN (:nids)", array(':nids' => $nids));
}
else {
$result = array();
@@ -1064,7 +1064,7 @@ function template_preprocess_forum_topic_list(&$variables) {
$variables['topics'][$id]->new_url = '';
if ($topic->new_replies) {
$variables['topics'][$id]->new_text = format_plural($topic->new_replies, '1 new', '@count new');
- $variables['topics'][$id]->new_url = url("node/$topic->nid", array('query' => comment_new_page_count($topic->num_comments, $topic->new_replies, $topic), 'fragment' => 'new'));
+ $variables['topics'][$id]->new_url = url("node/$topic->nid", array('query' => comment_new_page_count($topic->comment_count, $topic->new_replies, $topic), 'fragment' => 'new'));
}
}
diff --git a/modules/forum/forum.test b/modules/forum/forum.test
index 80fe69d2f..f485e48d4 100644
--- a/modules/forum/forum.test
+++ b/modules/forum/forum.test
@@ -85,6 +85,7 @@ class ForumTestCase extends DrupalWebTestCase {
// Test editing a forum topic that has a comment.
$this->drupalLogin($this->any_user);
+ $this->drupalGet('forum/' . $this->forum['tid']);
$this->drupalPost("node/$node->nid/edit", array(), t('Save'));
$this->assertResponse(200);
}