]> git.mjollnir.org Git - moodle.git/commitdiff
Added $forums[$i]->type == 'qanda' check to make things more explicit
authorvyshane <vyshane>
Mon, 25 Sep 2006 08:41:31 +0000 (08:41 +0000)
committervyshane <vyshane>
Mon, 25 Sep 2006 08:41:31 +0000 (08:41 +0000)
mod/forum/lib.php

index dca3531a3ad2b2a8d4eadebf63e758da33277877..a0eff9ab5e91afc0815e1774547edc6523991be8 100644 (file)
@@ -1242,7 +1242,7 @@ function forum_search_posts($searchterms, $courseid=0, $limitfrom=0, $limitnum=5
                                    OR ((d.timestart = 0 OR d.timestart <= $now)
                                    AND (d.timeend = 0 OR d.timeend > $now)) )";
         }
-        if (isset($forums[$i]->onlydiscussions)) {
+        if ($forums[$i]->type == 'qanda' && isset($forums[$i]->onlydiscussions)) {
             // This is a qanda forum.
             if (is_array($forums[$i]->onlydiscussions)) {
                 // Show question posts as well as posts from discussions in