Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/166362

Change subject: Fix $wgGadgetsCaching = false;
......................................................................

Fix $wgGadgetsCaching = false;

Bug: 71988
Change-Id: Ib1012b4d0b0eeabb62812f35b61882bbf9733f3d
---
M Gadgets_body.php
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gadgets 
refs/changes/62/166362/1

diff --git a/Gadgets_body.php b/Gadgets_body.php
index 24196dd..e0d0d17 100644
--- a/Gadgets_body.php
+++ b/Gadgets_body.php
@@ -374,13 +374,17 @@
 
                $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;
+               }
+
                // cache for a while. gets purged automatically when 
MediaWiki:Gadgets-definition is edited
                $wgMemc->set( $key, $gadgets, 60 * 60 * 24 );
                $source = $forceNewText !== null ? 'input text' : 
'MediaWiki:Gadgets-definition';

-- 
To view, visit https://gerrit.wikimedia.org/r/166362
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib1012b4d0b0eeabb62812f35b61882bbf9733f3d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gadgets
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to