r39762 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39761‎ | r39762 | r39763 >
Date:12:52, 21 August 2008
Author:gri6507
Status:old
Tags:
Comment:
v1.9
* Corrected an initialization problem with graph data when users don't have anything to display (thannk's to Wolcott)
Modified paths:
  • /trunk/extensions/UsageStatistics/SpecialUserStats.php (modified) (history)
  • /trunk/extensions/UsageStatistics/SpecialUserStats_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsageStatistics/SpecialUserStats_body.php
@@ -83,7 +83,7 @@
8484 $u = array();
8585 $sql = "SELECT rev_user_text,rev_timestamp,page_id FROM " .
8686 $db->tableName('page') . "," . $db->tableName('revision') .
87 - " WHERE rev_page=page_id"; # AND (page_id=3763 OR page_id=9517)
 87+ " WHERE rev_page=page_id";
8888
8989 $res = $db->query($sql, __METHOD__);
9090
@@ -114,7 +114,9 @@
115115 plot '-' using 1:2 t 'edits' with linesp lt 1 lw 3, '-' using 1:2 t 'pages' with linesp lt 2 lw 3 axis x1y2
116116 ";
117117 $gnuplot_pdata = '';
118 - $first = true;
 118+ $first = true;
 119+ $e = 0;
 120+ $p = 0;
119121 foreach ($u[$user] as $d => $v) {
120122 $date = '';
121123 if (preg_match('/^(\d{4})(\d{2})(\d{2})/',$d,$matches))
@@ -161,7 +163,9 @@
162164 plot '-' using 1:2 t 'edits' with linesp lt 1 lw 3, '-' using 1:2 t 'pages' with linesp lt 2 lw 3 axis x1y2
163165 ";
164166 $gnuplot_pdata = '';
165 - $first = true;
 167+ $first = true;
 168+ $pages = 0;
 169+ $edits = 0;
166170 $totals = array();
167171 foreach ($dates as $d => $v) {
168172 if ($type == 'incremental') {
Index: trunk/extensions/UsageStatistics/SpecialUserStats.php
@@ -13,7 +13,7 @@
1414
1515 $wgExtensionCredits['specialpage'][] = array(
1616 'name' => 'UserStats',
17 - 'version' => 'v1.8',
 17+ 'version' => 'v1.9',
1818 'author' => 'Paul Grinberg',
1919 'email' => 'gri6507 at yahoo dot com',
2020 'url' => 'http://www.mediawiki.org/wiki/Extension:Usage_Statistics',

Status & tagging log