Skip to content

Commit

Permalink
Merge pull request #111 from creative-commoners/pulls/3.2/remove-self
Browse files Browse the repository at this point in the history
ENH Use class name instead of self
  • Loading branch information
GuySartorelli authored Jun 17, 2024
2 parents fe86df7 + b2dd034 commit 2c4187c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Filters/CachedContentFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function getContent($key, $callback)
$cache = $this->getCache();

// 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)
? null
: $cache->get($key);
Expand Down
2 changes: 1 addition & 1 deletion src/Filters/RateLimitFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class RateLimitFilter extends ContentFilter
*/
protected function getCacheKey($itemkey)
{
$key = self::CACHE_PREFIX;
$key = RateLimitFilter::CACHE_PREFIX;

// Add global identifier
if ($this->config()->get('lock_bypage')) {
Expand Down
4 changes: 2 additions & 2 deletions src/VersionFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public function updateSettingsFields(FieldList $fields)

public function getSiteRSSLink()
{
if (Config::inst()->get(self::class, 'allchanges_enabled')
if (Config::inst()->get(VersionFeed::class, 'allchanges_enabled')
&& SiteConfig::current_site_config()->AllChangesEnabled
) {
return $this->owner->Link('allchanges');
Expand All @@ -215,7 +215,7 @@ public function getSiteRSSLink()

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');
}
}
Expand Down

0 comments on commit 2c4187c

Please sign in to comment.