r78725 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78724‎ | r78725 | r78726 >
Date:19:48, 21 December 2010
Author:catrope
Status:deferred
Tags:
Comment:
Put $wgQueryPage addition in the wgQueryPage hook so it'll work properly (rather than get overwritten by QueryPage.php) and fix the name of the IndexPages special page class
Modified paths:
  • /branches/querypage-work2/extensions/ProofreadPage/ProofreadPage.php (modified) (history)

Diff [purge]

Index: branches/querypage-work2/extensions/ProofreadPage/ProofreadPage.php
@@ -20,6 +20,7 @@
2121 }
2222
2323 $wgExtensionFunctions[] = 'wfProofreadPage';
 24+$wgRunHooks['wgQueryPages'][] = 'wfProofreadPageAddQueryPages';
2425
2526 $dir = dirname( __FILE__ ) . '/';
2627 $wgExtensionMessagesFiles['ProofreadPage'] = $dir . 'ProofreadPage.i18n.php';
@@ -37,10 +38,9 @@
3839 );
3940
4041 # special page
41 -$wgAutoloadClasses['IndexPagesPage'] = $dir . 'SpecialProofreadPages.php';
42 -$wgSpecialPages['IndexPages'] = 'IndexPagesPage';
43 -$wgSpecialPageGroups['IndexPages'] = 'pages'
44 -$wgQueryPages['IndexPagesPage'] = 'IndexPages';
 42+$wgAutoloadClasses['ProofreadPages'] = $dir . 'SpecialProofreadPages.php';
 43+$wgSpecialPages['IndexPages'] = 'ProofreadPages';
 44+$wgSpecialPageGroups['IndexPages'] = 'pages';
4545
4646 # special page
4747 $wgAutoloadClasses['PagesWithoutScans'] = $dir . 'SpecialPagesWithoutScans.php';
@@ -83,3 +83,9 @@
8484 new ProofreadPage;
8585 return true;
8686 }
 87+
 88+function wfProofreadPageAddQueryPages( &$wgQueryPages ) {
 89+ $wgQueryPages['ProofreadPages'] = 'IndexPages';
 90+ $wgQueryPages['PagesWithoutScans'] = 'PagesWithoutScans';
 91+ return true;
 92+}

Status & tagging log