r92763 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92762‎ | r92763 | r92764 >
Date:18:06, 21 July 2011
Author:werdna
Status:deferred
Tags:
Comment:
Move Bucket configuration into PHP
Modified paths:
  • /trunk/extensions/MoodBar/MoodBar.hooks.php (modified) (history)
  • /trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.init.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.init.js
@@ -20,15 +20,8 @@
2121 var ui = mb.ui;
2222
2323 mb.conf.bucketKey = mw.user.bucket(
24 - 'moodbar-trigger', {
25 - 'buckets': {
26 - 'feedback': 80,
27 - 'using': 10,
28 - 'share': 10
29 - },
30 - 'version': 1,
31 - 'expires': 30
32 - }
 24+ 'moodbar-trigger',
 25+ mw.config.get('mbConfig').bucketConfig
3326 );
3427
3528 // Create portlet
Index: trunk/extensions/MoodBar/MoodBar.hooks.php
@@ -53,6 +53,17 @@
5454 $vars['mbConfig'] = array(
5555 'validTypes' => MBFeedbackItem::getValidTypes(),
5656 'userBuckets' => MoodBarHooks::getUserBuckets( $wgUser ),
 57+ 'bucketConfig' =>
 58+ array(
 59+ 'buckets' =>
 60+ array(
 61+ 'feedback' => 80,
 62+ 'using' => 10,
 63+ 'share' => 10,
 64+ ),
 65+ 'version' => 1,
 66+ 'expires' => 30,
 67+ ),
5768 );
5869 return true;
5970 }

Status & tagging log