* (bug 23276) Add hook to Special:NewPages to modify query
Patch by Dan Barrett
This commit is contained in:
parent
10f4ac0873
commit
7c0aecb42b
3 changed files with 9 additions and 0 deletions
|
|
@ -52,6 +52,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
|
|||
* When visiting a "red link" of a deleted file, a deletion and move log excerpt
|
||||
is provided on the Upload form.
|
||||
* (bug 22647) Add category details in search results.
|
||||
* (bug 23276) Add hook to Special:NewPages to modify query
|
||||
|
||||
=== Bug fixes in 1.17 ===
|
||||
* (bug 17560) Half-broken deletion moved image files to deletion archive
|
||||
|
|
|
|||
|
|
@ -1472,6 +1472,11 @@ $movePage: MovePageForm object
|
|||
$oldTitle: old title (object)
|
||||
$newTitle: new title (object)
|
||||
|
||||
'SpecialNewpagesConditions': called when building sql query for Special:NewPages
|
||||
&$special: NewPagesPager object (subclass of ReverseChronologicalPager)
|
||||
&opts: FormOptions object containing special page options
|
||||
&$conds: array of WHERE conditionals for query
|
||||
|
||||
'SpecialPage_initList': called when setting up SpecialPage::$mList, use this
|
||||
hook to remove a core special page
|
||||
$list: list (array) of core special pages
|
||||
|
|
|
|||
|
|
@ -435,6 +435,9 @@ class NewPagesPager extends ReverseChronologicalPager {
|
|||
if ( $this->opts->getValue( 'hideredirs' ) ) {
|
||||
$conds['page_is_redirect'] = 0;
|
||||
}
|
||||
|
||||
// Allow changes to the New Pages query
|
||||
wfRunHooks('SpecialNewpagesConditions', array(&$this, $this->opts, &$conds));
|
||||
|
||||
$info = array(
|
||||
'tables' => array( 'recentchanges', 'page' ),
|
||||
|
|
|
|||
Loading…
Reference in a new issue