r38160 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38159‎ | r38160 | r38161 >
Date:23:47, 28 July 2008
Author:brion
Status:old
Tags:
Comment:
* (bug 14966) Fix SearchEngineDummy class for silently non-functional search
on Sqlite instead of horribly fatal error breaky one.
Modified paths:
  • /branches/REL1_13/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_13/phase3/includes/SearchEngine.php (modified) (history)

Diff [purge]

Index: branches/REL1_13/phase3/includes/SearchEngine.php
@@ -290,6 +290,8 @@
291291 * Load up the appropriate search engine class for the currently
292292 * active database backend, and return a configured instance.
293293 *
 294+ * @fixme Ask the database class for his default search class
 295+ * instead of knowing about every backend here.
294296 * @return SearchEngine
295297 */
296298 public static function create() {
@@ -494,6 +496,9 @@
495497
496498
497499 /**
 500+ * @fixme This class is horribly factored. It would probably be better to have
 501+ * a useful base class to which you pass some standard information, then let
 502+ * the fancy self-highlighters extend that.
498503 * @ingroup Search
499504 */
500505 class SearchResult {
@@ -1139,16 +1144,11 @@
11401145 }
11411146
11421147 /**
 1148+ * Dummy class to be used when non-supported Database engine is present.
 1149+ * @fixme Dummy class should probably try something at least mildly useful,
 1150+ * such as a LIKE search through titles.
11431151 * @ingroup Search
11441152 */
1145 -class SearchEngineDummy {
1146 - function search( $term ) {
1147 - return null;
1148 - }
1149 - function setLimitOffset($l, $o) {}
1150 - function legalSearchChars() {}
1151 - function update() {}
1152 - function setnamespaces() {}
1153 - function searchtitle() {}
1154 - function searchtext() {}
 1153+class SearchEngineDummy extends SearchEngine {
 1154+ // no-op
11551155 }
Index: branches/REL1_13/phase3/RELEASE-NOTES
@@ -454,6 +454,8 @@
455455 * The accesskey to edit a page is now disabled when editing the page, to pre-
456456 vent conflicts with Safari shortcuts.
457457 * (bug 14907) DatabasePostgres::fieldType now defined.
 458+* (bug 14966) Fix SearchEngineDummy class for silently non-functional search
 459+ on Sqlite instead of horribly fatal error breaky one.
458460
459461 === API changes in 1.13 ===
460462

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r38159* (bug 14966) Fix SearchEngineDummy class for silently non-functional search...brion23:42, 28 July 2008

Status & tagging log