From 4a657d085cf87c31f267f233a0c22e37b9b70814 Mon Sep 17 00:00:00 2001 From: lorenzulrich Date: Mon, 11 Jul 2022 18:42:45 +0200 Subject: [PATCH] TASK: Address PHP deprecation --- lib.php | 6 +++--- search.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib.php b/lib.php index e1e6cae3..27638569 100644 --- a/lib.php +++ b/lib.php @@ -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'); diff --git a/search.php b/search.php index 1615b162..50994932 100644 --- a/search.php +++ b/search.php @@ -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();