r53699 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53698‎ | r53699 | r53700 >
Date:21:06, 23 July 2009
Author:ialex
Status:deferred
Tags:
Comment:
(bug 19817) Make Special:CooperationStatistics includable, based on a patch by Alfred Maghi
Modified paths:
  • /trunk/extensions/CooperationStatistics/CooperationStatistics_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CooperationStatistics/CooperationStatistics_body.php
@@ -3,7 +3,7 @@
44 * Special:CooperationStatistics
55 */
66
7 -class CooperationStatistics extends SpecialPage {
 7+class CooperationStatistics extends IncludableSpecialPage {
88 public function __construct() {
99 parent::__construct( 'CooperationStatistics' );
1010 }
@@ -14,7 +14,8 @@
1515 wfLoadExtensionMessages( 'CooperationStatistics' );
1616 $nb_of_revuser = wfMsg( 'cooperationstatistics-limit-few-revisors' );
1717 $nbpages = $this->getNbOfPages( $nb_of_revuser, '<=' );
18 - $this->OutputTableRaw( $nbpages, $nb_of_revuser, 'init' );
 18+ if( !$this->mIncluding )
 19+ $this->OutputTableRaw( $nbpages, $nb_of_revuser, 'init' );
1920
2021 $retval = array();
2122 $retval[$nb_of_revuser] = $this->getNbOfPages( $nb_of_revuser, '=' );
@@ -22,13 +23,15 @@
2324 $range = 1 + wfMsg( 'cooperationstatistics-limit-many-revisors' ) - $nb_of_revuser;
2425 for ( $j = 0; $j < $range; $j++ ) {
2526 $nbpages = $this->getNbOfPages( $nb_of_revuser, '=' );
26 - $this->OutputTableRaw( $nbpages, $nb_of_revuser, '=' );
 27+ if( !$this->mIncluding )
 28+ $this->OutputTableRaw( $nbpages, $nb_of_revuser, '=' );
2729 $retval[$nb_of_revuser] = $nbpages;
2830 $nb_of_revuser++;
2931 }
3032
3133 $nbpages = $this->getNbOfPages( $nb_of_revuser, '>=' );
32 - $this->OutputTableRaw( $nbpages, $nb_of_revuser, 'end' );
 34+ if( !$this->mIncluding )
 35+ $this->OutputTableRaw( $nbpages, $nb_of_revuser, 'end' );
3336 $retval[$nb_of_revuser] = $nbpages;
3437
3538 if ( $wgCooperationStatsGoogleCharts == True ) {

Status & tagging log