r104478 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104477‎ | r104478 | r104479 >
Date:20:21, 28 November 2011
Author:kaldari
Status:ok
Tags:
Comment:
temporarily display disabled notice for all contribution reporting pages
Modified paths:
  • /trunk/extensions/ContributionReporting/ContributionReporting.i18n.php (modified) (history)
  • /trunk/extensions/ContributionReporting/ContributionReporting.php (modified) (history)
  • /trunk/extensions/ContributionReporting/DisabledNotice_body.php (added) (history)
  • /trunk/extensions/ContributionReporting/arrow.png (deleted) (history)
  • /trunk/extensions/ContributionReporting/modules/arrow.png (added) (history)
  • /trunk/extensions/ContributionReporting/modules/ext.disablednotice.css (added) (history)
  • /trunk/extensions/ContributionReporting/modules/warning-icon.png (added) (history)

Diff [purge]

Index: trunk/extensions/ContributionReporting/arrow.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Index: trunk/extensions/ContributionReporting/ContributionReporting.php
@@ -43,7 +43,9 @@
4444 $wgAutoloadClasses['SpecialContributionTrackingStatistics'] = $dir . 'ContributionTrackingStatistics_body.php';
4545 $wgAutoloadClasses['SpecialDailyTotal'] = $dir . 'DailyTotal_body.php';
4646 $wgAutoloadClasses['SpecialYearlyTotal'] = $dir . 'YearlyTotal_body.php';
 47+$wgAutoloadClasses['DisabledNotice'] = $dir . 'DisabledNotice_body.php';
4748
 49+/*
4850 $wgSpecialPages['ContributionHistory'] = 'ContributionHistory';
4951 $wgSpecialPages['ContributionTotal'] = 'ContributionTotal';
5052 $wgSpecialPages['ContributionStatistics'] = 'SpecialContributionStatistics';
@@ -51,6 +53,18 @@
5254 $wgSpecialPages['ContributionTrackingStatistics'] = 'SpecialContributionTrackingStatistics';
5355 $wgSpecialPages['DailyTotal'] = 'SpecialDailyTotal';
5456 $wgSpecialPages['YearlyTotal'] = 'SpecialYearlyTotal';
 57+*/
 58+
 59+// Temporarily redirect all pages to DisabledNotice
 60+$wgSpecialPages['DisabledNotice'] = 'DisabledNotice';
 61+$wgSpecialPages['ContributionHistory'] = 'DisabledNotice';
 62+$wgSpecialPages['ContributionTotal'] = 'DisabledNotice';
 63+$wgSpecialPages['ContributionStatistics'] = 'DisabledNotice';
 64+$wgSpecialPages['FundraiserStatistics'] = 'DisabledNotice';
 65+$wgSpecialPages['ContributionTrackingStatistics'] = 'DisabledNotice';
 66+$wgSpecialPages['DailyTotal'] = 'DisabledNotice';
 67+$wgSpecialPages['YearlyTotal'] = 'DisabledNotice';
 68+
5569 $wgSpecialPageGroups['ContributionHistory'] = 'contribution';
5670 $wgSpecialPageGroups['ContributionTotal'] = 'contribution';
5771 $wgSpecialPageGroups['ContributionStatistics'] = 'contribution';
@@ -124,6 +138,10 @@
125139 'styles' => 'ext.fundraiserstatistics.css',
126140 ) + $commonModuleInfo;
127141
 142+$wgResourceModules['ext.disablednotice'] = array(
 143+ 'styles' => 'ext.disablednotice.css',
 144+) + $commonModuleInfo;
 145+
128146 $wgHooks['ParserFirstCallInit'][] = 'efContributionReportingSetup';
129147 $wgHooks['LanguageGetMagic'][] = 'efContributionReportingTotal_Magic';
130148
Index: trunk/extensions/ContributionReporting/modules/ext.disablednotice.css
@@ -0,0 +1,10 @@
 2+div#cr-disablednotice {
 3+ font-size: 1.2em;
 4+ line-height: 1.3em;
 5+ background-image: url("warning-icon.png");
 6+ background-repeat: no-repeat;
 7+ background-position: 1.1em 50%;
 8+ background-color: #ffffd9;
 9+ border: 1px solid orange;
 10+ padding: 1.1em 1em 1em 4em;
 11+}
Index: trunk/extensions/ContributionReporting/modules/arrow.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Property changes on: trunk/extensions/ContributionReporting/modules/arrow.png
___________________________________________________________________
Added: svn:mime-type
112 + image/png
Index: trunk/extensions/ContributionReporting/modules/warning-icon.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/ContributionReporting/modules/warning-icon.png
___________________________________________________________________
Added: svn:mime-type
213 + application/octet-stream
Index: trunk/extensions/ContributionReporting/DisabledNotice_body.php
@@ -0,0 +1,36 @@
 2+<?php
 3+/**
 4+ * Special Page for Contribution statistics extension
 5+ *
 6+ * @file
 7+ * @ingroup Extensions
 8+ */
 9+
 10+class DisabledNotice extends SpecialPage {
 11+
 12+ /* Functions */
 13+
 14+ public function __construct() {
 15+ parent::__construct( 'DisabledNotice' );
 16+ }
 17+
 18+ public function execute( $sub ) {
 19+ global $wgOut, $wgScriptPath;
 20+
 21+ /* Setup */
 22+
 23+ $this->setHeaders();
 24+ $wgOut->addModules( 'ext.disablednotice' );
 25+
 26+ /* Display */
 27+
 28+ $wgOut->addWikiMsg( 'contribstats-header' );
 29+
 30+ $wgOut->addHTML( Xml::openElement( 'div', array( 'id' => 'cr-disablednotice' ) ) );
 31+ $wgOut->addWikiMsg( 'disablednotice-disabled' );
 32+ $wgOut->addHTML( Xml::closeElement( 'div' ) );
 33+
 34+ $wgOut->addWikiMsg( 'contribstats-footer' );
 35+ }
 36+
 37+}
Index: trunk/extensions/ContributionReporting/ContributionReporting.i18n.php
@@ -15,17 +15,22 @@
1616 // ContributionReporting and ContributionTotal
1717 'contributionreporting-desc' => 'Live reporting on the Wikimedia fundraiser',
1818 'contributiontotal' => 'Contribution total',
 19+
 20+ 'contribstats-header' => '',
 21+ 'contribstats-footer' => '',
 22+
 23+ // DisabledNotice
 24+ 'disablednotice' => 'Contribution reporting',
 25+ 'disablednotice-disabled' => 'This page has been temporarily disabled. Please try again later.',
 26+
 27+ // ContributionHistory
1928 'contributionhistory' => 'Contribution history',
20 -
2129 'contrib-hist-header' => 'Donor comments from around the world',
22 -
2330 'contrib-hist-name' => 'Name',
2431 'contrib-hist-date' => 'Time and date',
2532 'contrib-hist-amount' => 'Amount',
26 -
2733 'contrib-hist-next' => 'Earlier donations',
2834 'contrib-hist-previous' => 'Newer donations',
29 -
3035 'contrib-hist-anonymous' => 'Anonymous',
3136
3237 // ContributionStatistics
@@ -53,8 +58,6 @@
5459 'contribstats-value-under' => 'Under $1',
5560 'contribstats-value-from' => 'From $1 - $2',
5661 'contribstats-value-over' => 'Over $1',
57 - 'contribstats-header' => '',
58 - 'contribstats-footer' => '',
5962
6063 // Tracking Statistics
6164 'contributiontrackingstatistics' => 'Contribution tracking statistics',

Follow-up revisions

RevisionCommit summaryAuthorDate
r104586MFT r104062, r104247, r104248, r104362, r104370, r104372, r104424, r104425, r...awjrichards20:22, 29 November 2011

Status & tagging log