Index: trunk/extensions/UsabilityInitiative/PrefStats/PrefStats.i18n.php |
— | — | @@ -17,7 +17,6 @@ |
18 | 18 | 'prefstats-title' => 'Preference statistics', |
19 | 19 | 'prefstats-list-intro' => 'Currently, the following preferences are being tracked. Click on one to view statistics about it.', |
20 | 20 | 'prefstats-list-elem' => '$1 = $2', |
21 | | - 'prefstats-stat-line' => '$1 users have had the preference enabled for between $2 and $3 seconds', |
22 | 21 | ); |
23 | 22 | |
24 | 23 | /** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
Index: trunk/extensions/UsabilityInitiative/PrefStats/PrefStats.php |
— | — | @@ -25,8 +25,10 @@ |
26 | 26 | // Tracking multiple values of the same preference is not possible |
27 | 27 | $wgPrefStatsTrackPrefs = array(); |
28 | 28 | |
| 29 | +// Dimensions of the chart on Special:PrefStats |
29 | 30 | $wgPrefStatsChartDimensions = '1000x300'; |
30 | 31 | |
| 32 | +// Time unit to use for the graph on Special:PrefStats |
31 | 33 | $wgPrefStatsTimeUnit = 60*60*24; // one day |
32 | 34 | |
33 | 35 | /* Setup */ |
Index: trunk/extensions/UsabilityInitiative/PrefStats/SpecialPrefStats.php |
— | — | @@ -47,18 +47,10 @@ |
48 | 48 | } |
49 | 49 | |
50 | 50 | function displayPrefStats( $pref ) { |
51 | | - global $wgOut, $wgUser, $wgRequest, $wgPrefStatsTrackPrefs; |
| 51 | + global $wgOut, $wgRequest, $wgPrefStatsTrackPrefs; |
52 | 52 | $max = $this->getMaxDuration( $pref ); |
53 | | - $wgOut->addHTML( Xml::openElement( 'ul' ) ); |
54 | 53 | $stats = $this->getPrefStats( $pref, |
55 | 54 | $wgRequest->getIntOrNull( 'inc' ) ); |
56 | | - foreach ( $stats as $key => $val ) { |
57 | | - list( $from, $to ) = explode( '-', $key ); |
58 | | - $wgOut->addHTML( Xml::element( 'li', array(), |
59 | | - wfMsg( 'prefstats-stat-line', $val, $from, $to ) |
60 | | - ) ); |
61 | | - } |
62 | | - $wgOut->addHTML( Xml::closeElement( 'ul' ) ); |
63 | 55 | $wgOut->addHTML( Xml::element( 'img', array( 'src' => |
64 | 56 | $this->getGoogleChartParams( $stats ) ) ) ); |
65 | 57 | } |