Skip to content

Commit 49cc581

Browse files
FIX Don't use deprecated usage of get_class() (#103)
1 parent bb0c48d commit 49cc581

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Filters/CachedContentFilter.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,28 @@
99
*/
1010
class CachedContentFilter extends ContentFilter
1111
{
12-
12+
1313
/**
1414
* Enable caching
1515
*
1616
* @config
1717
* @var boolean
1818
*/
1919
private static $cache_enabled = true;
20-
20+
2121
public function getContent($key, $callback)
2222
{
2323
$cache = $this->getCache();
24-
24+
2525
// Return cached value if available
26-
$cacheEnabled = Config::inst()->get(get_class(), 'cache_enabled');
26+
$cacheEnabled = Config::inst()->get(self::class, 'cache_enabled');
2727
$result = (isset($_GET['flush']) || !$cacheEnabled)
2828
? null
2929
: $cache->get($key);
3030
if ($result) {
3131
return $result;
3232
}
33-
33+
3434
// Fallback to generate result
3535
$result = parent::getContent($key, $callback);
3636
$lifetime = Config::inst()->get(ContentFilter::class, 'cache_lifetime') ?: null;

src/VersionFeed.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public function updateSettingsFields(FieldList $fields)
206206

207207
public function getSiteRSSLink()
208208
{
209-
if (Config::inst()->get(get_class(), 'allchanges_enabled')
209+
if (Config::inst()->get(self::class, 'allchanges_enabled')
210210
&& SiteConfig::current_site_config()->AllChangesEnabled
211211
) {
212212
return $this->owner->Link('allchanges');
@@ -215,7 +215,7 @@ public function getSiteRSSLink()
215215

216216
public function getDefaultRSSLink()
217217
{
218-
if (Config::inst()->get(get_class(), 'changes_enabled') && $this->owner->PublicHistory) {
218+
if (Config::inst()->get(self::class, 'changes_enabled') && $this->owner->PublicHistory) {
219219
return $this->owner->Link('changes');
220220
}
221221
}

0 commit comments

Comments
 (0)