summaryrefslogtreecommitdiff
path: root/extensions/Gadgets/Gadgets_body.php
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/Gadgets/Gadgets_body.php')
-rw-r--r--extensions/Gadgets/Gadgets_body.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/extensions/Gadgets/Gadgets_body.php b/extensions/Gadgets/Gadgets_body.php
index 4869d8c2..330a1541 100644
--- a/extensions/Gadgets/Gadgets_body.php
+++ b/extensions/Gadgets/Gadgets_body.php
@@ -87,7 +87,7 @@ class GadgetHooks {
}
if ( $section !== '' ) {
- $section = wfMsgExt( "gadget-section-$section", 'parseinline' );
+ $section = wfMessage( "gadget-section-$section" )->parse();
if ( count ( $available ) ) {
$options[$section] = $available;
@@ -103,7 +103,7 @@ class GadgetHooks {
'label' => ' ',
'default' => Xml::tags( 'tr', array(),
Xml::tags( 'td', array( 'colspan' => 2 ),
- wfMsgExt( 'gadgets-prefstext', 'parse' ) ) ),
+ wfMessage( 'gadgets-prefstext' )->parseAsBlock() ) ),
'section' => 'gadgets',
'raw' => 1,
'rawrow' => 1,
@@ -152,8 +152,6 @@ class GadgetHooks {
* @return bool
*/
public static function beforePageDisplay( $out ) {
- global $wgUser;
-
wfProfileIn( __METHOD__ );
$gadgets = Gadget::loadList();
@@ -169,8 +167,9 @@ class GadgetHooks {
/**
* @var $gadget Gadget
*/
+ $user = $out->getUser();
foreach ( $gadgets as $gadget ) {
- if ( $gadget->isEnabled( $wgUser ) && $gadget->isAllowed( $wgUser ) ) {
+ if ( $gadget->isEnabled( $user ) && $gadget->isAllowed( $user ) ) {
if ( $gadget->hasModule() ) {
$out->addModuleStyles( $gadget->getModuleName() );
$out->addModules( $gadget->getModuleName() );