diff --git a/modules/system/reportwidgets/Status.php b/modules/system/reportwidgets/Status.php index 20dd7bb6d..7a4089709 100644 --- a/modules/system/reportwidgets/Status.php +++ b/modules/system/reportwidgets/Status.php @@ -4,6 +4,7 @@ use Lang; use Config; use BackendAuth; use System\Models\Parameter; +use System\Models\LogSetting; use System\Classes\UpdateManager; use System\Classes\PluginManager; use Backend\Classes\ReportWidgetBase; @@ -56,12 +57,17 @@ class Status extends ReportWidgetBase protected function loadData() { $manager = UpdateManager::instance(); + $this->vars['canUpdate'] = BackendAuth::getUser()->hasAccess('system.manage_updates'); - $this->vars['updates'] = $manager->check(); - $this->vars['warnings'] = $this->getSystemWarnings(); + $this->vars['updates'] = $manager->check(); + $this->vars['warnings'] = $this->getSystemWarnings(); $this->vars['coreBuild'] = Parameter::get('system::core.build'); - $this->vars['eventLog'] = EventLog::count(); - $this->vars['requestLog'] = RequestLog::count(); + + $this->vars['eventLog'] = EventLog::count(); + $this->vars['eventLogMsg'] = LogSetting::get('log_events', false) ? false : true; + $this->vars['requestLog'] = RequestLog::count(); + $this->vars['requestLogMsg'] = LogSetting::get('log_requests', false) ? false : true; + $this->vars['appBirthday'] = PluginVersion::orderBy('created_at')->value('created_at'); } @@ -88,17 +94,17 @@ class Status extends ReportWidgetBase storage_path('cms/twig'), storage_path('cms/combiner'), ]; - + if (in_array('Cms', Config::get('cms.loadModules', []))) { $writablePaths[] = themes_path(); } $requiredExtensions = [ - 'GD' => extension_loaded('gd'), + 'GD' => extension_loaded('gd'), 'fileinfo' => extension_loaded('fileinfo'), - 'Zip' => class_exists('ZipArchive'), - 'cURL' => function_exists('curl_init') && defined('CURLOPT_FOLLOWLOCATION'), - 'OpenSSL' => function_exists('openssl_random_pseudo_bytes'), + 'Zip' => class_exists('ZipArchive'), + 'cURL' => function_exists('curl_init') && defined('CURLOPT_FOLLOWLOCATION'), + 'OpenSSL' => function_exists('openssl_random_pseudo_bytes'), ]; foreach ($writablePaths as $path) { diff --git a/modules/system/reportwidgets/status/partials/_widget.htm b/modules/system/reportwidgets/status/partials/_widget.htm index 41b8974c2..855e103e3 100644 --- a/modules/system/reportwidgets/status/partials/_widget.htm +++ b/modules/system/reportwidgets/status/partials/_widget.htm @@ -52,6 +52,7 @@ +   @@ -59,6 +60,7 @@ +