Merge pull request #111 from creative-commoners/pulls/3.2/remove-self

ENH Use class name instead of self
This commit is contained in:
Guy Sartorelli 2024-06-17 12:50:35 +12:00 committed by GitHub
commit 2c4187ca9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ class CachedContentFilter extends ContentFilter
$cache = $this->getCache(); $cache = $this->getCache();
// Return cached value if available // Return cached value if available
$cacheEnabled = Config::inst()->get(self::class, 'cache_enabled'); $cacheEnabled = Config::inst()->get(CachedContentFilter::class, 'cache_enabled');
$result = (isset($_GET['flush']) || !$cacheEnabled) $result = (isset($_GET['flush']) || !$cacheEnabled)
? null ? null
: $cache->get($key); : $cache->get($key);

View File

@ -64,7 +64,7 @@ class RateLimitFilter extends ContentFilter
*/ */
protected function getCacheKey($itemkey) protected function getCacheKey($itemkey)
{ {
$key = self::CACHE_PREFIX; $key = RateLimitFilter::CACHE_PREFIX;
// Add global identifier // Add global identifier
if ($this->config()->get('lock_bypage')) { if ($this->config()->get('lock_bypage')) {

View File

@ -206,7 +206,7 @@ class VersionFeed extends SiteTreeExtension
public function getSiteRSSLink() public function getSiteRSSLink()
{ {
if (Config::inst()->get(self::class, 'allchanges_enabled') if (Config::inst()->get(VersionFeed::class, 'allchanges_enabled')
&& SiteConfig::current_site_config()->AllChangesEnabled && SiteConfig::current_site_config()->AllChangesEnabled
) { ) {
return $this->owner->Link('allchanges'); return $this->owner->Link('allchanges');
@ -215,7 +215,7 @@ class VersionFeed extends SiteTreeExtension
public function getDefaultRSSLink() public function getDefaultRSSLink()
{ {
if (Config::inst()->get(self::class, 'changes_enabled') && $this->owner->PublicHistory) { if (Config::inst()->get(VersionFeed::class, 'changes_enabled') && $this->owner->PublicHistory) {
return $this->owner->Link('changes'); return $this->owner->Link('changes');
} }
} }