Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2149,15 +2149,15 @@ function hsuforum_get_readable_forums($userid, $courseid=0, $excludeanonymous =
* @global object
* @global object
* @param array $searchterms array of search terms, e.g. word +word -word
* @param int &$totalcount
* @param int $courseid if 0, we search through the whole site
* @param int $limitfrom
* @param int $limitnum
* @param int &$totalcount
* @param string $extrasql
* @return array|bool Array of posts found or false
*/
function hsuforum_search_posts($searchterms, $courseid=0, $limitfrom=0, $limitnum=50,
&$totalcount, $extrasql='') {
function hsuforum_search_posts($searchterms, &$totalcount, $courseid=0, $limitfrom=0, $limitnum=50,
$extrasql='') {
global $CFG, $DB, $USER;
require_once($CFG->libdir.'/searchlib.php');

Expand Down
2 changes: 1 addition & 1 deletion search.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@

$PAGE->navbar->add($strsearch, new moodle_url('/mod/hsuforum/search.php', array('id'=>$course->id)));
$PAGE->navbar->add($strsearchresults);
if (!$posts = hsuforum_search_posts($searchterms, $course->id, $page*$perpage, $perpage, $totalcount)) {
if (!$posts = hsuforum_search_posts($searchterms, $totalcount, $course->id, $page*$perpage, $perpage)) {
$PAGE->set_title($strsearchresults);
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
Expand Down