diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-06-04 07:31:04 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-06-04 07:58:39 +0200 |
commit | f6d65e533c62f6deb21342d4901ece24497b433e (patch) | |
tree | f28adf0362d14bcd448f7b65a7aaf38650f923aa /extensions/Gadgets/Gadgets_body.php | |
parent | c27b2e832fe25651ef2410fae85b41072aae7519 (diff) |
Update to MediaWiki 1.25.1
Diffstat (limited to 'extensions/Gadgets/Gadgets_body.php')
-rw-r--r-- | extensions/Gadgets/Gadgets_body.php | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/extensions/Gadgets/Gadgets_body.php b/extensions/Gadgets/Gadgets_body.php index 24196dd3..d07a0859 100644 --- a/extensions/Gadgets/Gadgets_body.php +++ b/extensions/Gadgets/Gadgets_body.php @@ -291,12 +291,10 @@ class Gadget { return $gadgets; } - wfProfileIn( __METHOD__ ); $struct = self::loadStructuredList(); if ( !$struct ) { $gadgets = $struct; - wfProfileOut( __METHOD__ ); return $gadgets; } @@ -304,7 +302,6 @@ class Gadget { foreach ( $struct as $entries ) { $gadgets = array_merge( $gadgets, $entries ); } - wfProfileOut( __METHOD__ ); return $gadgets; } @@ -348,7 +345,6 @@ class Gadget { return $gadgets; } - wfProfileIn( __METHOD__ ); $key = wfMemcKey( 'gadgets-definition', self::GADGET_CLASS_VERSION ); if ( $forceNewText === null ) { @@ -356,7 +352,6 @@ class Gadget { // cached? $gadgets = $wgMemc->get( $key ); if ( self::isValidList( $gadgets ) ) { - wfProfileOut( __METHOD__ ); return $gadgets; } } @@ -364,7 +359,6 @@ class Gadget { $g = wfMessage( "gadgets-definition" )->inContentLanguage(); if ( !$g->exists() ) { $gadgets = false; - wfProfileOut( __METHOD__ ); return $gadgets; } $g = $g->plain(); @@ -374,10 +368,13 @@ class Gadget { $gadgets = self::listFromDefinition( $g ); - if ( !count( $gadgets ) || !$wgGadgetsCaching ) { + if ( !count( $gadgets ) ) { // Don't cache in case we couldn't find any gadgets. Bug 37228 $gadgets = false; - wfProfileOut( __METHOD__ ); + return $gadgets; + } + + if ( !$wgGadgetsCaching ) { return $gadgets; } @@ -385,7 +382,6 @@ class Gadget { $wgMemc->set( $key, $gadgets, 60 * 60 * 24 ); $source = $forceNewText !== null ? 'input text' : 'MediaWiki:Gadgets-definition'; wfDebug( __METHOD__ . ": $source parsed, cache entry $key updated\n" ); - wfProfileOut( __METHOD__ ); return $gadgets; } |