SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402619 )

Change subject: Replace deprecated Parser::disableCache() function
......................................................................

Replace deprecated Parser::disableCache() function

Deprecated in 1.28 in favor of CacheTime::updateCacheExpiry().

Change-Id: Ib40b4007b7c31f53fcae783f174bb67836819606
---
M UserActivity/SiteActivityHook.php
M UserProfile/UserProfileHooks.php
M UserWelcome/UserWelcomeClass.php
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SocialProfile 
refs/changes/19/402619/1

diff --git a/UserActivity/SiteActivityHook.php 
b/UserActivity/SiteActivityHook.php
index 3813154..049e6f2 100644
--- a/UserActivity/SiteActivityHook.php
+++ b/UserActivity/SiteActivityHook.php
@@ -16,7 +16,7 @@
        public static function getSiteActivity( $input, $args, $parser ) {
                global $wgMemc, $wgExtensionAssetsPath;
 
-               $parser->disableCache();
+               $parser->getOutput()->updateCacheExpiry( 0 );
 
                $limit = ( isset( $args['limit'] ) && is_numeric( 
$args['limit'] ) ) ? $args['limit'] : 10;
 
diff --git a/UserProfile/UserProfileHooks.php b/UserProfile/UserProfileHooks.php
index 702dcd1..5c2d458 100644
--- a/UserProfile/UserProfileHooks.php
+++ b/UserProfile/UserProfileHooks.php
@@ -90,7 +90,7 @@
         * @return bool true
         */
        public static function onParserLimitReportPrepare( $parser, $output ) {
-               $parser->disableCache();
+               $parser->getOutput()->updateCacheExpiry( 0 );
                return true;
        }
 
diff --git a/UserWelcome/UserWelcomeClass.php b/UserWelcome/UserWelcomeClass.php
index 1d0c3a4..e8d7fc4 100644
--- a/UserWelcome/UserWelcomeClass.php
+++ b/UserWelcome/UserWelcomeClass.php
@@ -24,7 +24,7 @@
        }
 
        public static function getWelcomeUser( $input, $args, $parser ) {
-               $parser->disableCache();
+               $parser->getOutput()->updateCacheExpiry( 0 );
                $parser->getOutput()->addModuleStyles( 
'ext.socialprofile.userwelcome.css' );
                // This is so stupid. The callback to onParserFirstCallInit() is
                // *always* (assumed to be) static even if you don't declare it 
as such.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib40b4007b7c31f53fcae783f174bb67836819606
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen <samanthanguyen1...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to