Index: trunk/extensions/MoodBar/modules/jquery.moodBar/jquery.moodBar.js |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | 'system': clientData.platform, |
35 | 35 | 'bucket': fbProps.bucket, |
36 | 36 | 'type': fbProps.type, |
37 | | - 'token': mw.user.tokens.get( 'editToken' ), |
| 37 | + 'token': mw.config.get('mbConfig').editToken, |
38 | 38 | 'format': 'json' |
39 | 39 | }; |
40 | 40 | |
Index: trunk/extensions/MoodBar/MoodBar.php |
— | — | @@ -63,6 +63,10 @@ |
64 | 64 | ), |
65 | 65 | ); |
66 | 66 | |
| 67 | +if ( !$oldVersion ) { |
| 68 | + $wgResourceModules['ext.moodBar.init']['dependencies'][] = 'mediawiki.user'; |
| 69 | +} |
| 70 | + |
67 | 71 | $wgResourceModules['ext.moodBar.core'] = $mbResourceTemplate + array( |
68 | 72 | 'styles' => 'ext.moodBar/ext.moodBar.core.css', |
69 | 73 | 'scripts' => 'ext.moodBar/ext.moodBar.core.js', |
Index: trunk/extensions/MoodBar/MoodBar.hooks.php |
— | — | @@ -54,6 +54,7 @@ |
55 | 55 | $vars['mbConfig'] = array( |
56 | 56 | 'validTypes' => MBFeedbackItem::getValidTypes(), |
57 | 57 | 'userBuckets' => MoodBarHooks::getUserBuckets( $wgUser ), |
| 58 | + 'editToken' => $wgUser->editToken(), |
58 | 59 | ) + $wgMoodBarConfig; |
59 | 60 | return true; |
60 | 61 | } |