r75272 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75271‎ | r75272 | r75273 >
Date:17:04, 23 October 2010
Author:demon
Status:ok (Comments)
Tags:
Comment:
Remove action=raw from Special:Statistics. We wanted to keep it for back-compat (see http://lists.wikimedia.org/pipermail/wikitech-l/2008-August/039202.html), but it's been two years since then. All of this info is available through the API with meta=siteinfo&siprop=statistics. Also a followup to r65059, finalize removal of job queue from Special:Statistics.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialStatistics.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialStatistics.php
@@ -30,7 +30,7 @@
3131 class SpecialStatistics extends SpecialPage {
3232
3333 private $views, $edits, $good, $images, $total, $users,
34 - $activeUsers, $admins, $numJobs = 0;
 34+ $activeUsers, $admins = 0;
3535
3636 public function __construct() {
3737 parent::__construct( 'Statistics' );
@@ -50,7 +50,6 @@
5151 $this->users = SiteStats::users();
5252 $this->activeUsers = SiteStats::activeUsers();
5353 $this->admins = SiteStats::numberingroup('sysop');
54 - $this->numJobs = SiteStats::jobs();
5554 $this->hook = '';
5655
5756 # Staticic - views
@@ -69,11 +68,6 @@
7069 $wgMemc->set( $key, '1', 24*3600 ); // don't update for 1 day
7170 }
7271 }
73 -
74 - # Do raw output
75 - if( $wgRequest->getVal( 'action' ) == 'raw' ) {
76 - $this->doRawOutput();
77 - }
7872
7973 $text = Xml::openElement( 'table', array( 'class' => 'wikitable mw-statistics-table' ) );
8074
@@ -310,20 +304,4 @@
311305
312306 return $return;
313307 }
314 -
315 - /**
316 - * Do the action=raw output for this page. Legacy, but we support
317 - * it for backwards compatibility
318 - * http://lists.wikimedia.org/pipermail/wikitech-l/2008-August/039202.html
319 - */
320 - private function doRawOutput() {
321 - global $wgOut;
322 - $wgOut->disable();
323 - header( 'Pragma: nocache' );
324 - echo "total=" . $this->total . ";good=" . $this->good . ";views=" .
325 - $this->views . ";edits=" . $this->edits . ";users=" . $this->users . ";";
326 - echo "activeusers=" . $this->activeUsers . ";admins=" . $this->admins .
327 - ";images=" . $this->images . ";jobs=" . $this->numJobs . "\n";
328 - return;
329 - }
330 -}
\ No newline at end of file
 308+}

Follow-up revisions

RevisionCommit summaryAuthorDate
r75277Release notes for r75272.demon17:33, 23 October 2010
r75359$wgRequest usage removed in r75272platonides16:06, 25 October 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r65059Remove jobqueue length from the user interface...nikerabbit12:47, 15 April 2010

Comments

#Comment by Nikerabbit (talk | contribs)   17:07, 23 October 2010

http://s23.org/wikistats/wikimedias_html.php still links to it. Might still even use it.

#Comment by Krinkle (talk | contribs)   18:00, 23 October 2010

I've notified http://s23.org/wiki/User:Mutante about it

#Comment by RobiH (talk | contribs)   11:08, 24 October 2010

What will be the new URL to be like? ~~~~

#Comment by Mutante (talk | contribs)   11:40, 24 October 2010

Thanks for the info, i have just checked out api.php?action=query&meta=siteinfo&siprop=statistics , just not sure yet which of all those formats (One value: json, jsonfm, php, phpfm, wddx, wddxfm, xml, xmlfm, yaml, yamlfm, rawfm, txt, txtfm, dbg, dbgfm, dump, dumpfm) to use, but will add a method to the wikistats code to use the API instead of old raw statistics link. ~~~~

#Comment by Platonides (talk | contribs)   16:05, 25 October 2010

I guess several bots will break due to this.

Status & tagging log