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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T10934, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8934 - Requesting hook for search misses
Requesting hook for search misses
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Search (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy, patch, patch-need-review
Depends on:
Blocks:
  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: ---


Attachments

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:

<code>
$title = Title::newFromText( $searchterm );
</code>

Adding this code:

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

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.


Navigation
Links