diff --git a/src/bans.php b/src/bans.php index 990f8a1..e77777a 100644 --- a/src/bans.php +++ b/src/bans.php @@ -1,15 +1,12 @@ getBanList(); $data = null; $ipbanned = false; diff --git a/src/css/style.css b/src/css/style.css index fbb9a29..f33af8a 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -89,10 +89,10 @@ body { /* Reimplement the btn-xs that was removed in Bootstrap 4 */ /* https://github.com/twbs/bootstrap/issues/21881#issuecomment-341972830 */ .btn-group-xs > .btn, .btn-xs { - padding : .25rem .4rem; - font-size : .875rem; - line-height : .5; - border-radius : .2rem; + padding: .25rem .4rem; + font-size: .875rem; + line-height: .5; + border-radius: .2rem; } /* ACCORDION */ diff --git a/src/private/php/CacheManager.php b/src/private/php/CacheManager.php index 4988bae..fa5b9b4 100644 --- a/src/private/php/CacheManager.php +++ b/src/private/php/CacheManager.php @@ -18,7 +18,7 @@ class CacheManager { private $serverGroupList; private $channelGroupList; - public function __construct() { + private function __construct() { $this->cache = new PhpFileCache(__CACHE_DIR, "cachemanager"); } @@ -53,6 +53,10 @@ class CacheManager { }, Config::get("cache_serverinfo"), $meta); } + public function clearServerInfo() { + $this->cache->eraseKey("serverinfo"); + } + public function getBanList($meta = false) { if ($this->banList) { return $this->banList; @@ -74,6 +78,10 @@ class CacheManager { }, Config::get("cache_banlist"), $meta); } + public function clearBanList() { + $this->cache->eraseKey("banlist"); + } + public function getClientList($meta = false) { if ($this->clientList) { return $this->clientList; @@ -90,7 +98,11 @@ class CacheManager { return null; }, Config::get("cache_clientlist"), $meta); // Lower cache time because of login system } - + + public function clearClientList() { + $this->cache->eraseKey("clientlist"); + } + public function getClient($cldbid) { $clients = $this->getClientList(); @@ -124,6 +136,10 @@ class CacheManager { }, Config::get("cache_channelist"), $meta); } + public function clearChannelList() { + $this->cache->eraseKey("channellist"); + } + public function getServerGroupList($meta = false) { if ($this->serverGroupList) { return $this->serverGroupList; @@ -141,6 +157,10 @@ class CacheManager { }, Config::get("cache_servergroups"), $meta); } + public function clearServerGroupList() { + $this->cache->eraseKey("servergrouplist"); + } + public function getChannelGroupList($meta = false) { if ($this->channelGroupList) { return $this->channelGroupList; @@ -157,4 +177,8 @@ class CacheManager { return null; }, Config::get("cache_channelgroups"), $meta); } + + public function clearChannelGroupList() { + $this->cache->eraseKey("channelgrouplist"); + } }