This hook lets you change the revision ID used for a page (a Title
object), when displaying that page in search results. It's useful for
the Approved Revs extension, so that pages whose approved revision is
not their latest can have their approved revision, not the latest one,
show up when doing a search text. It's also potentially useful for
other, similar extensions, like FlaggedRevs.
Change-Id: Ic4bad8dfaa83de131db9c8e7667d7f5767d8d5f5
* Replaced WikiPage::DATA_FROM_* constants with IDBAccessObject ones.
* Renamed IDBAccessObject constants a bit for visual consistency.
* Removed AVOID_MASTER parameter and replaced calling instances with READ_NORMAL.
Instead of getting page_latest from the master and the revision from a
slave, just get it all from the master in one RTT. Most callers used
AVOID_MASTER (and now READ_NORMAL), so this case is barely hit anymore.
Change-Id: Ifbefdcd4490094b38e49bbb46c95fdb71b5c9e1a
* The main Revision functions now allow various QoS and locking flags.
* Added tiny DBAO interface add made Revision implement it.
Since a lot of objects will need (or have) the same functionality.
* Use "self" keyword in Revision class consistently.
* Made Revisison::newFromConds() private.
Change-Id: I3139956999218a2bb44b5c845b8079e33b2328bb
<ialex> Reedy: that rev is breaking usage of {{PAGENAME}} in messages, such as in MediaWiki:Noarticles
Allowing optional passing in of a Title object (like it may be set in Message), but if it's not set, or not a title object, fall back and use $wgTitle (I'm sorry!)
Should be fully backwards compatible. Lightly tested, but only with MySQL search backend.
Introduces concept of search profiles, which replace long list of namespaces in the url.
The length of this message varries by localization, so the previous solution of telling truncate to truncate 5 bytes
less than needed is not good since this will be too little or too much.
Updated places where its used. Some places I left as is, as it looked like the new behaviour would work fine for them to.
(for example, the autosummary feature - it was cutting off at 200 bytes, which is no where near 250 limit, so I presume that
was for asethic reasons rather then to fit as much in before the db limit).
Will do another commit for extension callers in a moment.
Refactored SearchResult constructor to accept Titles. New static function newFromRow and newFromTitle can be used.
Added SearchNearMatchResultSet to wrap the output of SearchEngine::getNearMatch.