Improve status check

Only check for a writable themes directory if the Cms module is loaded.
This commit is contained in:
Luke Towers 2018-02-02 13:23:53 -06:00 committed by GitHub
parent 678916854e
commit 2f7cc96b6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
<?php namespace System\ReportWidgets;
use Lang;
use Config;
use BackendAuth;
use System\Models\Parameter;
use System\Classes\UpdateManager;
@ -78,7 +79,6 @@ class Status extends ReportWidgetBase
$writablePaths = [
temp_path(),
themes_path(),
storage_path(),
storage_path('app'),
storage_path('logs'),
@ -88,6 +88,10 @@ 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'),