From 3403f6d2c3df21aabc8c7ca29545c48a6700786c Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Mon, 10 Jan 2011 18:08:54 +0000 Subject: [PATCH] * (bug 26650) Remove $wgAPICacheHelp in favour of $wgAPICacheHelpTimeout --- RELEASE-NOTES | 3 +++ includes/DefaultSettings.php | 9 +-------- includes/api/ApiMain.php | 6 +++--- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c107d9562d..b482cf2668 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -33,6 +33,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN Note that this feature should reduce parser cache fragmentation when enabled. * $wgMaxUploadSize may now be set to an array to specify the upload size limit per upload type. +* $wgAPICacheHelp added in 1.16 is now removed. To disable API help caching, set + $wgAPICacheHelpTimeout = 0; === New features in 1.18 === * Added a special page, disabled by default, that allows users with the @@ -93,6 +95,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 26483) add a iwtitles param to prop=iwlinks * (bug 26484) add a lltitles param to prop=langlinks * (bug 26480) add a pppageprops param to prop=pageprops +* (bug 26650) Remove $wgAPICacheHelp in favour of $wgAPICacheHelpTimeout === Languages updated in 1.18 === diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index a7242a7fd0..7913683086 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -5037,14 +5037,7 @@ $wgAPIMaxUncachedDiffs = 1; $wgAPIRequestLog = false; /** - * Cache the API help text for up to an hour. Disable this during API - * debugging and development - */ -$wgAPICacheHelp = true; - -/** - * Set the timeout for the API help text cache. Ignored if $wgAPICacheHelp - * is false. + * Set the timeout for the API help text cache. If set to 0, caching disabled */ $wgAPICacheHelpTimeout = 60*60; diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index eb9f055ea6..e71c5e1fc3 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -811,20 +811,20 @@ class ApiMain extends ApiBase { * Override the parent to generate help messages for all available modules. */ public function makeHelpMsg() { - global $wgMemc, $wgAPICacheHelp, $wgAPICacheHelpTimeout; + global $wgMemc, $wgAPICacheHelpTimeout; $this->setHelp(); // Get help text from cache if present $key = wfMemcKey( 'apihelp', $this->getModuleName(), SpecialVersion::getVersion( 'nodb' ) . $this->getMain()->getShowVersions() ); - if ( $wgAPICacheHelp ) { + if ( $wgAPICacheHelpTimeout > 0 ) { $cached = $wgMemc->get( $key ); if ( $cached ) { return $cached; } } $retval = $this->reallyMakeHelpMsg(); - if ( $wgAPICacheHelp ) { + if ( $wgAPICacheHelpTimeout > 0 ) { $wgMemc->set( $key, $retval, $wgAPICacheHelpTimeout ); } return $retval; -- 2.20.1