r36097 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36096‎ | r36097 | r36098 >
Date:19:18, 9 June 2008
Author:aaron
Status:old
Tags:
Comment:
Disable flaggedrevs for DumpHTML
Modified paths:
  • /trunk/extensions/DumpHTML/dumpHTML.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -1,11 +1,16 @@
22 <?php
33 #(c) Aaron Schulz, Joerg Baach, 2007-2008 GPL
44
5 -if ( !defined( 'MEDIAWIKI' ) ) {
 5+if( !defined('MEDIAWIKI') ) {
66 echo "FlaggedRevs extension\n";
77 exit( 1 );
88 }
99
 10+# This messes with dump HTML...
 11+if( defined('MW_HTML_FOR_DUMP') ) {
 12+ return;
 13+}
 14+
1015 # Quality -> Sighted (default)
1116 if( !defined('FLAGGED_VIS_NORMAL') )
1217 define('FLAGGED_VIS_NORMAL',0);
@@ -269,6 +274,7 @@
270275 ######### Hook attachments #########
271276 # Remove stand-alone patrolling
272277 $wgHooks['UserGetRights'][] = 'FlaggedRevs::stripPatrolRights';
 278+
273279 # Autopromote Editors
274280 $wgHooks['ArticleSaveComplete'][] = 'FlaggedRevs::autoPromoteUser';
275281 # Adds table link references to include ones from the stable version
@@ -314,12 +320,12 @@
315321
316322 # Visibility - experimental
317323 $wgHooks['userCan'][] = 'FlaggedRevs::userCanView';
318 -
319324 # Main hooks, overrides pages content, adds tags, sets tabs and permalink
320325 $wgHooks['SkinTemplateTabs'][] = 'FlaggedRevs::setActionTabs';
321326 # Change last-modified footer
322327 $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'FlaggedRevs::setLastModified';
323 -# Update older, incomplete, page caches (ones that lack template Ids/image timestamps)
 328+
 329+# Override current revision, add patrol links, set cache...
324330 $wgHooks['ArticleViewHeader'][] = 'FlaggedRevs::onArticleViewHeader';
325331 # Add page notice
326332 $wgHooks['SkinTemplateBuildNavUrlsNav_urlsAfterPermalink'][] = 'FlaggedRevs::setPermaLink';
@@ -345,7 +351,6 @@
346352
347353 # Set aliases
348354 $wgHooks['LanguageGetSpecialPageAliases'][] = 'FlaggedRevs::addLocalizedSpecialPageNames';
349 -
350355 #########
351356
352357 function efLoadFlaggedRevs() {
Index: trunk/extensions/DumpHTML/dumpHTML.php
@@ -31,6 +31,8 @@
3232
3333 ENDS;
3434
 35+define( 'MW_HTML_FOR_DUMP', 1 );
 36+
3537 $optionsWithArgs = array( 's', 'd', 'e', 'k', 'checkpoint', 'slice', 'udp-profile' );
3638 $options = array( 'help' );
3739 $profiling = false;

Status & tagging log