Last modified: 2008-03-22 07:47:28 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 8934 - Requesting hook for search misses
Requesting hook for search misses
Product: MediaWiki
Classification: Unclassified
Search (Other open bugs)
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy, patch, patch-need-review
Depends on:
  Show dependency treegraph
Reported: 2007-02-09 19:28 UTC by Jim R. Wilson
Modified: 2008-03-22 07:47 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Jim R. Wilson 2007-02-09 19:28:18 UTC
Requesting a small enhancement permitting extension developers to perform an
action when a search term fails.

Specifically, in SearchEngine.php, near line 115, in the 'getNearMatches'
method, right after:

$title = Title::newFromText( $searchterm );

Adding this code:

wfRunHooks('SearchEngineNoNearMatchFound', array(&$title) );
if ( $title->exists() ) {
    return $title;

Would be very helpful.

I'll be happy to answer any questions about this.

-- Jim R. Wilson
Comment 1 Brion Vibber 2008-03-21 21:04:57 UTC
Sounds like the SearchGetNearMatch hook satisfies this.
Comment 2 Jim R. Wilson 2008-03-22 07:47:28 UTC
Yep, I think so. Thanks Brion :)

Note You need to log in before you can comment on or make changes to this bug.