Index: branches/wmf/1.17wmf1/extensions/WikiLove/WikiLove.hooks.php |
— | — | @@ -64,10 +64,12 @@ |
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
68 | | - * Exports wikilove-recipient variable to JS |
| 68 | + * Exports wikilove-recipient and edittoken variables to JS |
69 | 69 | */ |
70 | 70 | public static function makeGlobalVariablesScript( &$vars ) { |
| 71 | + global $wgUser; |
71 | 72 | $vars['wikilove-recipient'] = self::$recipient; |
| 73 | + $vars['wikilove-edittoken'] = $wgUser->edittoken(); |
72 | 74 | return true; |
73 | 75 | } |
74 | 76 | |
Index: branches/wmf/1.17wmf1/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js |
— | — | @@ -384,7 +384,7 @@ |
385 | 385 | 'text': wikitext, |
386 | 386 | 'message': message, |
387 | 387 | 'subject': subject, |
388 | | - 'token': mw.user.tokens.get( 'editToken' ) |
| 388 | + 'token': mw.config.get( 'wikilove-edittoken' ) // after 1.17 this can become mw.user.tokens.get( 'editToken' ) |
389 | 389 | }; |
390 | 390 | |
391 | 391 | if ( email ) { |
Property changes on: branches/wmf/1.17wmf1/extensions/WikiLove |
___________________________________________________________________ |
Added: svn:mergeinfo |
392 | 392 | Merged /branches/new-installer/phase3/extensions/WikiLove:r43664-66004 |
393 | 393 | Merged /branches/wmf-deployment/extensions/WikiLove:r60970 |
394 | 394 | Merged /branches/REL1_15/phase3/extensions/WikiLove:r51646 |
395 | 395 | Merged /branches/wmf/1.16wmf4/extensions/WikiLove:r67177,69199,76243,77266 |
396 | 396 | Merged /trunk/extensions/WikiLove:r90133-90134 |
397 | 397 | Merged /branches/sqlite/extensions/WikiLove:r58211-58321 |
398 | 398 | Merged /trunk/phase3/extensions/WikiLove:r79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,80406,81833,83212,83590 |