@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | public static function update_cache_key(?string $className = '') |
| 88 | 88 | { |
| 89 | 89 | // important - avoid endless loop! |
| 90 | - if(SiteConfig::get()->exists()) { |
|
| 90 | + if (SiteConfig::get()->exists()) { |
|
| 91 | 91 | $howOldIsIt = DB::query('SELECT Created FROM SiteConfig LIMIT 1')->value(); |
| 92 | 92 | if ($howOldIsIt && strtotime((string) $howOldIsIt) > strtotime('-5 minutes')) { |
| 93 | 93 | return; |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | } |
| 113 | 113 | if ($obj && $obj->RecordCacheUpdates) { |
| 114 | 114 | $recordId = Injector::inst() |
| 115 | - ->create(ObjectsUpdated::class, ['ClassNameLastEdited' => $className]) |
|
| 115 | + ->create(ObjectsUpdated::class, [ 'ClassNameLastEdited' => $className ]) |
|
| 116 | 116 | ->write() |
| 117 | 117 | ; |
| 118 | 118 | DB::query('DELETE FROM ObjectsUpdated WHERE ID < ' . (int) ($recordId - self::MAX_OBJECTS_UPDATED)); |
@@ -121,9 +121,9 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | public function requireDefaultRecords() |
| 123 | 123 | { |
| 124 | - if((int) SiteConfig::get()->count() > 100) { |
|
| 124 | + if ((int) SiteConfig::get()->count() > 100) { |
|
| 125 | 125 | $currentSiteConfig = SiteConfig::current_site_config(); |
| 126 | - if($currentSiteConfig) { |
|
| 126 | + if ($currentSiteConfig) { |
|
| 127 | 127 | DB::alteration_message('Deleting all SiteConfig records except for the current one.', 'deleted'); |
| 128 | 128 | DB::query('DELETE FROM "SiteConfig" WHERE ID <> ' . $currentSiteConfig->ID); |
| 129 | 129 | } |