]> git.mjollnir.org Git - moodle.git/commitdiff
Minor formatting tidyup
authorvyshane <vyshane>
Thu, 14 Sep 2006 08:57:41 +0000 (08:57 +0000)
committervyshane <vyshane>
Thu, 14 Sep 2006 08:57:41 +0000 (08:57 +0000)
mod/forum/lib.php

index b854df2b5473fd5f801ee595ef26a6fcd77c41fc..30fc460c211f93f7c9c023f18782d9451951dbda 100644 (file)
@@ -1200,7 +1200,6 @@ function forum_get_readable_forums($userid, $courseid=0) {
 
 /**
  * Returns a list of posts found using an array of search terms.
- * e.g.  word  +word -word
  * @param $searchterms - array of search terms, e.g. word +word -word
  * @param $courseid - if 0, we search through the whole site
  * @param $page
@@ -1295,8 +1294,6 @@ function forum_search_posts($searchterms, $courseid=0, $page=0, $recordsperpage=
                    FROM $fromsql
                   WHERE $selectsql";
 
-    $totalcount = count_records_sql($countsql);
-
     $searchsql = "SELECT p.*,
                          d.forum,
                          u.firstname,
@@ -1307,9 +1304,9 @@ function forum_search_posts($searchterms, $courseid=0, $page=0, $recordsperpage=
                    WHERE $selectsql
                 ORDER BY p.modified DESC";
 
-    //print_object($countsql);  // Debug.
-    //print_object($searchsql);
+    //print_object($searchsql);  // Debug.
 
+    $totalcount = count_records_sql($countsql);
     return get_records_sql($searchsql, $page, $recordsperpage);
 }