* stop using global $cache variable, use Singleton pattern instead

This commit is contained in:
slawkens
2018-06-03 17:09:21 +02:00
parent 45a387000d
commit fb1b9fea09
10 changed files with 99 additions and 61 deletions

View File

@@ -516,7 +516,9 @@ function template_ga_code()
function template_form()
{
global $cache, $template_name;
global $template_name;
$cache = Cache::getInstance();
if($cache->enabled())
{
$tmp = '';
@@ -963,8 +965,9 @@ function unsetSession($key) {
}
function getTopPlayers($limit = 5) {
global $cache, $config, $db;
global $config, $db;
$cache = Cache::getInstance();
$fetch_from_db = true;
if($cache->enabled())
{