summaryrefslogtreecommitdiff
path: root/extensions/Gadgets/Gadgets_body.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-01-18 16:46:04 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-01-18 16:46:04 +0100
commit63601400e476c6cf43d985f3e7b9864681695ed4 (patch)
treef7846203a952e38aaf66989d0a4702779f549962 /extensions/Gadgets/Gadgets_body.php
parent8ff01378c9e0207f9169b81966a51def645b6a51 (diff)
Update to MediaWiki 1.20.2
this update includes: * adjusted Arch Linux skin * updated FluxBBAuthPlugin * patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
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' => '&#160;',
'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() );