From e3af63bd93743a15c56fcced06b11978e1cb96e4 Mon Sep 17 00:00:00 2001 From: slawkens Date: Thu, 30 May 2019 14:54:46 +0200 Subject: [PATCH] * moved admin_panel_modules to config.php --- config.php | 3 +++ system/pages/admin/dashboard.php | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/config.php b/config.php index e2c5c3a9..0312058d 100644 --- a/config.php +++ b/config.php @@ -255,6 +255,9 @@ $config = array( // when server is offline, it will be checked every time web refreshes, ignoring this variable 'status_interval' => 60, + // admin panel + 'admin_panel_modules' => 'lastlogin,points,coins', + // other 'anonymous_usage_statistics' => true, 'email_lai_sec_interval' => 60, // time in seconds between e-mails to one account from lost account interface, block spam diff --git a/system/pages/admin/dashboard.php b/system/pages/admin/dashboard.php index ac75d822..0fd610d2 100644 --- a/system/pages/admin/dashboard.php +++ b/system/pages/admin/dashboard.php @@ -76,12 +76,13 @@ $twig->display('admin.dashboard.html.twig', array( )); echo '
'; -$config['modules'] = "lastlogin,points,coins"; -if(isset($config['modules'])) - $config['modules'] = explode(",", $config['modules']); + +$configAdminPanelModules = config('admin_panel_modules'); +if(isset($configAdminPanelModules)) + $configAdminPanelModules = explode(',', $configAdminPanelModules); $twig_loader->prependPath(__DIR__ . '/modules/templates'); -foreach($config['modules'] as $box) { +foreach($configAdminPanelModules as $box) { $file = __DIR__ . '/modules/' . $box . '.php'; if(file_exists($file)) { include($file);