From b74c9a9fec07ee9a9c4d0b43d928f16e0d07accb Mon Sep 17 00:00:00 2001 From: Mark Johnson Date: Thu, 21 Feb 2013 12:55:45 +0000 Subject: [PATCH 1/2] MDL-33996 Forum search. Stop displaying raw search strings to users --- mod/forum/search.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/forum/search.php b/mod/forum/search.php index e4a59414a34a3..d7dd8b77793bf 100644 --- a/mod/forum/search.php +++ b/mod/forum/search.php @@ -141,12 +141,12 @@ $searchform = forum_search_form($course, $search); $PAGE->navbar->add($strsearch, new moodle_url('/mod/forum/search.php', array('id'=>$course->id))); -$PAGE->navbar->add(s($search, true)); +$PAGE->navbar->add($strsearchresults); if (!$posts = forum_search_posts($searchterms, $course->id, $page*$perpage, $perpage, $totalcount)) { $PAGE->set_title($strsearchresults); $PAGE->set_heading($course->fullname); echo $OUTPUT->header(); - echo $OUTPUT->heading(get_string("nopostscontaining", "forum", $search)); + echo $OUTPUT->heading(get_string("noposts", "forum")); if (!$individualparams) { $words = $search; From 15f83171f5d5a32c2372513cb0d10145bc8a88c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mudr=C3=A1k?= Date: Thu, 21 Feb 2013 14:50:15 +0100 Subject: [PATCH 2/2] MDL-33996 Remove the nopostscontaining string from the forum module After Mark's improvements at the search results display page, the string is not needed any more. --- mod/forum/lang/en/forum.php | 1 - 1 file changed, 1 deletion(-) diff --git a/mod/forum/lang/en/forum.php b/mod/forum/lang/en/forum.php index 8dd26b10abbc5..8ac31f08971d5 100644 --- a/mod/forum/lang/en/forum.php +++ b/mod/forum/lang/en/forum.php @@ -281,7 +281,6 @@ $string['noposts'] = 'No posts'; $string['nopostsmadebyuser'] = '{$a} has made no posts'; $string['nopostsmadebyyou'] = 'You haven\'t made any posts'; -$string['nopostscontaining'] = 'No posts containing \'{$a}\' were found'; $string['noquestions'] = 'There are no questions yet in this forum'; $string['nosubscribers'] = 'There are no subscribers yet for this forum'; $string['notexists'] = 'Discussion no longer exists';