* 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

@@ -10,6 +10,7 @@
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Dashboard';
$cache = Cache::getInstance();
if($cache->enabled()) {
if(isset($_GET['clear_cache'])) {
if(clearCache())
@@ -55,7 +56,8 @@ $twig->display('admin.dashboard.html.twig', array(
function clearCache()
{
global $cache, $template_name;
global $template_name;
$cache = Cache::getInstance();
$tmp = '';
if($cache->fetch('status', $tmp))