r108673 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108672‎ | r108673 | r108674 >
Date:20:23, 11 January 2012
Author:catrope
Status:ok
Tags:
Comment:
1.18wmf1: Merge MarkAsHelpful to trunk state
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/MarkAsHelpful (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MarkAsHelpful/MarkAsHelpful.hooks.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MarkAsHelpful/MarkAsHelpful.i18n.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MarkAsHelpful/MarkAsHelpful.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MarkAsHelpful/modules/ext.markAsHelpful/ext.markAsHelpful.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/extensions/MarkAsHelpful/MarkAsHelpful.i18n.php
@@ -43,6 +43,18 @@
4444 'mah-undo-mark-text' => 'maak ongedaan',
4545 );
4646
 47+/** Belarusian (Taraškievica orthography) (‪Беларуская (тарашкевіца)‬)
 48+ * @author Wizardist
 49+ */
 50+$messages['be-tarask'] = array(
 51+ 'markashelpful-desc' => 'Надае магчымасьць пазначэньня карысных камэнтараў',
 52+ 'mah-mark-text' => 'Пазначыць як карыснае',
 53+ 'mah-you-marked-text' => 'Вы пазначылі гэта карысным',
 54+ 'mah-someone-marked-text' => '{{GENDER:$1|$1 мяркуе, што гэта карысна}}',
 55+ 'mah-undo-mark-text' => 'скасаваць',
 56+ 'mah-action-error' => 'У час выкананьня дзеяньня адбылася памылка',
 57+);
 58+
4759 /** Breton (Brezhoneg)
4860 * @author Y-M D
4961 */
@@ -334,11 +346,16 @@
335347 );
336348
337349 /** Ukrainian (Українська)
 350+ * @author A1
338351 * @author Тест
339352 */
340353 $messages['uk'] = array(
341354 'markashelpful-desc' => 'Надає інтерфейс користувача для позначання корисних коментарів',
 355+ 'mah-mark-text' => 'Позначити як корисне',
 356+ 'mah-you-marked-text' => 'Ви вважаєте, що це корисне',
 357+ 'mah-someone-marked-text' => '{{GENDER:$1|$1 вважають це корисним}}',
342358 'mah-undo-mark-text' => 'скасувати',
 359+ 'mah-action-error' => 'Не вдалося виконати дію',
343360 );
344361
345362 /** Vietnamese (Tiếng Việt)
Index: branches/wmf/1.18wmf1/extensions/MarkAsHelpful/MarkAsHelpful.php
@@ -45,7 +45,6 @@
4646
4747 $wgHooks['BeforePageDisplay'][] = 'MarkAsHelpfulHooks::onPageDisplay';
4848 $wgHooks['LoadExtensionSchemaUpdates'][] = 'MarkAsHelpfulHooks::onLoadExtensionSchemaUpdates';
49 -$wgHooks['MakeGlobalVariablesScript'][] = 'MarkAsHelpfulHooks::makeGlobalVariablesScript';
5049
5150 // Special pages
5251
Index: branches/wmf/1.18wmf1/extensions/MarkAsHelpful/MarkAsHelpful.hooks.php
@@ -37,10 +37,4 @@
3838 return true;
3939 }
4040
41 - public static function makeGlobalVariablesScript( &$vars ) {
42 - global $wgUser;
43 - $vars['mahEditToken'] = $wgUser->editToken();
44 - return true;
45 - }
46 -
4741 }
Index: branches/wmf/1.18wmf1/extensions/MarkAsHelpful/modules/ext.markAsHelpful/ext.markAsHelpful.js
@@ -23,7 +23,6 @@
2424 }
2525 });
2626 },
27 -
2827 /*
2928 * Return object of item properties
3029 */
@@ -37,7 +36,6 @@
3837 };
3938 return properties;
4039 },
41 -
4240 /*
4341 * Load the current state of the MarkAsHelpful item
4442 */
@@ -58,7 +56,8 @@
5957 data: request,
6058 success: function( data ) {
6159
62 - if ( data && data.getmarkashelpfulitem.result == 'success' &&
 60+ if ( data.getmarkashelpfulitem &&
 61+ data.getmarkashelpfulitem.result == 'success' &&
6362 data.getmarkashelpfulitem.formatted
6463 ) {
6564 var $content = $( data.getmarkashelpfulitem.formatted );
@@ -88,7 +87,7 @@
8988 'page': mw.config.get( 'wgPageName' ),
9089 'useragent': clientData.name + '/' + clientData.versionNumber,
9190 'system': clientData.platform,
92 - 'token': mw.config.get( 'mahEditToken' ),
 91+ 'token': mw.user.tokens.get( 'editToken' ),
9392 'format': 'json'
9493 }, props );
9594
@@ -101,7 +100,6 @@
102101 },
103102 dataType: 'json'
104103 } );
105 -
106104 }
107105 };
108106
Property changes on: branches/wmf/1.18wmf1/extensions/MarkAsHelpful
___________________________________________________________________
Modified: svn:mergeinfo
109107 Merged /trunk/extensions/MarkAsHelpful:r108085-108659

Status & tagging log