summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-10-20 00:28:16 +0000
committerDries Buytaert <dries@buytaert.net>2009-10-20 00:28:16 +0000
commiteeb7b53ef6c2098a0e428f98dd578eaa78a1ed89 (patch)
tree00f073f3affe4fb1f1877ccaf2d9de027da860a7
parent07eee25abec9846b0f181ab07514a7b4e56020ac (diff)
downloadbrdo-eeb7b53ef6c2098a0e428f98dd578eaa78a1ed89.tar.gz
brdo-eeb7b53ef6c2098a0e428f98dd578eaa78a1ed89.tar.bz2
- Patch #601938 by mfb: fixed some forum exceptions and added tests.
-rw-r--r--includes/database/select.inc2
-rw-r--r--modules/forum/forum.install4
-rw-r--r--modules/forum/forum.test7
3 files changed, 9 insertions, 4 deletions
diff --git a/includes/database/select.inc b/includes/database/select.inc
index 3eddd3ad7..f4094a26e 100644
--- a/includes/database/select.inc
+++ b/includes/database/select.inc
@@ -902,7 +902,7 @@ class SelectQuery extends Query implements SelectQueryInterface {
/* Implementations of QueryConditionInterface for the WHERE clause. */
- public function condition($field, $value = NULL, $operator = '=') {
+ public function condition($field, $value = NULL, $operator = NULL) {
if (!isset($num_args)) {
$num_args = func_num_args();
}
diff --git a/modules/forum/forum.install b/modules/forum/forum.install
index 1f4c72ba2..a11795ea1 100644
--- a/modules/forum/forum.install
+++ b/modules/forum/forum.install
@@ -254,9 +254,7 @@ function forum_update_7001() {
'taxonomy_term_data' => 'tid',
),
);
- db_create_table($ret, 'forum_index', $forum_index);
+ db_create_table('forum_index', $forum_index);
db_query('INSERT INTO {forum_index} (SELECT n.nid, n.title, f.tid, n.sticky, n.created, ncs.last_comment_timestamp, ncs.comment_count FROM {node} n INNER JOIN {forum} f on n.vid = f.vid INNER JOIN {node_comment_statistics} ncs ON n.nid = ncs.nid)');
-
- return $ret;
}
diff --git a/modules/forum/forum.test b/modules/forum/forum.test
index 28995361f..5bf8501cc 100644
--- a/modules/forum/forum.test
+++ b/modules/forum/forum.test
@@ -68,6 +68,13 @@ class ForumTestCase extends DrupalWebTestCase {
$this->drupalGet('forum');
$this->assertRaw("<td class=\"topics\">\n 6 </td>");
$this->assertRaw('<td class="posts">6</td>');
+
+ // Test loading multiple forum nodes on the front page.
+ $this->drupalLogin($this->drupalCreateUser(array('administer content types', 'create forum content')));
+ $this->drupalPost('admin/structure/types/manage/forum', array('node_options[promote]' => 'promote'), t('Save content type'));
+ $this->createForumTopic($this->forum, FALSE);
+ $this->createForumTopic($this->forum, FALSE);
+ $this->drupalGet('node');
}
/**