r65506 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65505‎ | r65506 | r65507 >
Date:11:05, 24 April 2010
Author:reedy
Status:ok
Tags:
Comment:
* (bug 23276) Add hook to Special:NewPages to modify query

Patch by Dan Barrett
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/includes/specials/SpecialNewpages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -1472,6 +1472,11 @@
14731473 $oldTitle: old title (object)
14741474 $newTitle: new title (object)
14751475
 1476+'SpecialNewpagesConditions': called when building sql query for Special:NewPages
 1477+&$special: NewPagesPager object (subclass of ReverseChronologicalPager)
 1478+&opts: FormOptions object containing special page options
 1479+&$conds: array of WHERE conditionals for query
 1480+
14761481 'SpecialPage_initList': called when setting up SpecialPage::$mList, use this
14771482 hook to remove a core special page
14781483 $list: list (array) of core special pages
Index: trunk/phase3/includes/specials/SpecialNewpages.php
@@ -435,6 +435,9 @@
436436 if ( $this->opts->getValue( 'hideredirs' ) ) {
437437 $conds['page_is_redirect'] = 0;
438438 }
 439+
 440+ // Allow changes to the New Pages query
 441+ wfRunHooks('SpecialNewpagesConditions', array(&$this, $this->opts, &$conds));
439442
440443 $info = array(
441444 'tables' => array( 'recentchanges', 'page' ),
Index: trunk/phase3/RELEASE-NOTES
@@ -52,6 +52,7 @@
5353 * When visiting a "red link" of a deleted file, a deletion and move log excerpt
5454 is provided on the Upload form.
5555 * (bug 22647) Add category details in search results.
 56+* (bug 23276) Add hook to Special:NewPages to modify query
5657
5758 === Bug fixes in 1.17 ===
5859 * (bug 17560) Half-broken deletion moved image files to deletion archive

Follow-up revisions

RevisionCommit summaryAuthorDate
r65507Fix hooks.txt to match code, minor followup to r65506reedy11:12, 24 April 2010

Status & tagging log