From c1f9b1f7b1b77776192048005dcc66dcf3df2bfb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 27 Dec 2014 15:41:37 +0100 Subject: Update to MediaWiki 1.24.1 --- includes/search/SearchDatabase.php | 57 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 includes/search/SearchDatabase.php (limited to 'includes/search/SearchDatabase.php') diff --git a/includes/search/SearchDatabase.php b/includes/search/SearchDatabase.php new file mode 100644 index 00000000..82d09073 --- /dev/null +++ b/includes/search/SearchDatabase.php @@ -0,0 +1,57 @@ +db = $db; + } else { + $this->db = wfGetDB( DB_SLAVE ); + } + } + + /** + * Return a 'cleaned up' search string + * + * @param string $text + * @return string + */ + protected function filter( $text ) { + $lc = $this->legalSearchChars(); + return trim( preg_replace( "/[^{$lc}]/", " ", $text ) ); + } +} -- cgit v1.2.2