Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH Use class name instead of self #111

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading