r50817 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50816‎ | r50817 | r50818 >
Date:09:13, 20 May 2009
Author:siebrand
Status:deferred
Tags:
Comment:
* tweaks for UserOptionStats
* add UserOptionStats to Translate
Modified paths:
  • /trunk/extensions/Translate/aliases.txt (modified) (history)
  • /trunk/extensions/Translate/groups/mediawiki-defines.txt (modified) (history)
  • /trunk/extensions/UserOptionStats/SpecialUserOptionStats.php (modified) (history)
  • /trunk/extensions/UserOptionStats/UserOptionStats.alias.php (modified) (history)
  • /trunk/extensions/UserOptionStats/UserOptionStats.i18n.php (modified) (history)
  • /trunk/extensions/UserOptionStats/UserOptionStats.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UserOptionStats/UserOptionStats.alias.php
@@ -12,4 +12,4 @@
1313 */
1414 $aliases['en'] = array(
1515 'UserOptionStats' => array( 'UserOptionStats' ),
16 -);
\ No newline at end of file
 16+);
Index: trunk/extensions/UserOptionStats/UserOptionStats.i18n.php
@@ -12,9 +12,10 @@
1313 */
1414 $messages['en'] = array(
1515 'useroptionstats' => 'User option statistics',
 16+ 'useroptionstats-desc' => '[[Special:UserOptionStats|Special page]] for reporting on Mediawiki user option usage',
1617 'uos-warn' => 'PHPlot is not installed!',
1718 'uos-choose' => 'Choose one of the following user options: $1',
1819 'uos-unknown' => '*Default',
1920 'uos-other' => '*Other',
2021 'uos-title' => 'Distribution of values of user option $1',
21 -);
\ No newline at end of file
 22+);
Index: trunk/extensions/UserOptionStats/UserOptionStats.php
@@ -6,7 +6,7 @@
77 * Requirements: PHPlot and FCFontFinder (for i18n fonts, optional).
88 * FCFontFinder can be found with extension Translate at utils/Font.php.
99 * Also need to install fonts for all languages!
10 - *
 10+ *
1111 * PHPlot needs to be in $wgAutoloadClasses:
1212 * $wgAutoloadClasses['PHPlot'] = '/path/to/phplot/phplot.php'
1313 *
@@ -23,9 +23,19 @@
2424 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
2525 */
2626
 27+$wgExtensionCredits['specialpage'][] = array(
 28+ 'path' => __FILE__,
 29+ 'name' => 'User Option Statistics',
 30+ 'version' => '1.0',
 31+ 'author' => 'Niklas Laxström',
 32+ 'description' => '[[Special:UserOptionStats|Special page]] for reporting on Mediawiki user option usage',
 33+ 'descriptionmsg' => 'useroptionstats-desc',
 34+ 'url' => 'http://www.mediawiki.org/wiki/Extension:UserOptionStats',
 35+);
 36+
2737 $dir = dirname( __FILE__ );
2838 $wgAutoloadClasses['SpecialUserOptionStats'] = "$dir/SpecialUserOptionStats.php";
2939 $wgExtensionMessagesFiles['UserOptionStats'] = "$dir/UserOptionStats.i18n.php";
3040 $wgExtensionAliasesFiles['UserOptionStats'] = "$dir/UserOptionStats.alias.php";
3141 $wgSpecialPages['UserOptionStats'] = 'SpecialUserOptionStats';
32 -$wgSpecialPageGroups['UserOptionStats'] = 'wiki';
\ No newline at end of file
 42+$wgSpecialPageGroups['UserOptionStats'] = 'wiki';
Index: trunk/extensions/UserOptionStats/SpecialUserOptionStats.php
@@ -16,7 +16,6 @@
1717 }
1818
1919 public $blacklist = array( 'nickname' );
20 -
2120
2221 public function execute( $par ) {
2322 global $wgRequest, $wgUser, $wgOut, $wgLang, $wgAutoloadClasses;
@@ -46,9 +45,6 @@
4746 return;
4847 }
4948
50 -
51 -
52 -
5349 $dbr = wfGetDB( DB_SLAVE );
5450
5551 $users = $dbr->select( 'user', '*', '', __METHOD__ );
@@ -118,7 +114,7 @@
119115
120116 public function getOptions() {
121117 global $wgDefaultUserOptions;
122 -
 118+
123119 $opts = array();
124120 foreach ( $wgDefaultUserOptions as $k => $v ) $opts[$k] = true;
125121
Index: trunk/extensions/Translate/groups/mediawiki-defines.txt
@@ -941,6 +941,8 @@
942942
943943 User Merge
944944
 945+User Option Stats
 946+
945947 User Rights Notification
946948 id = ext-userrightsnotif
947949 file = UserRightsNotif/UserRightsNotif.i18n.php
Index: trunk/extensions/Translate/aliases.txt
@@ -286,6 +286,9 @@
287287 User merge
288288 file = UserMerge/UserMerge.alias.php
289289
 290+User option stats
 291+file = UserOptionStats/UserOptionStats.alias.php
 292+
290293 Vote
291294 file = Vote/Vote.alias.php
292295

Status & tagging log