51 lines
1.5 KiB
HTML
51 lines
1.5 KiB
HTML
<?php
|
|
|
|
$warnings = [];
|
|
$writablePaths = [
|
|
temp_path(),
|
|
themes_path(),
|
|
storage_path(),
|
|
storage_path('app'),
|
|
storage_path('logs'),
|
|
storage_path('framework'),
|
|
storage_path('cms'),
|
|
storage_path('cms/cache'),
|
|
storage_path('cms/twig'),
|
|
storage_path('cms/combiner'),
|
|
];
|
|
$requiredExtensions = [
|
|
'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'),
|
|
];
|
|
|
|
foreach ($writablePaths as $path) {
|
|
if (!is_writable($path))
|
|
$warnings[] = Lang::get('backend::lang.warnings.permissions', ['name' => '<strong>'.$path.'</strong>']);
|
|
}
|
|
foreach ($requiredExtensions as $extension => $installed) {
|
|
if (!$installed)
|
|
$warnings[] = Lang::get('backend::lang.warnings.extension', ['name' => '<strong>'.$extension.'</strong>']);
|
|
}
|
|
|
|
?>
|
|
<?php if (count($warnings)): ?>
|
|
<div class="callout callout-warning">
|
|
<div class="header">
|
|
<i class="icon-warning"></i>
|
|
<h3><?= e(trans('backend::lang.warnings.tips')) ?></h3>
|
|
<p><?= e(trans('backend::lang.warnings.tips_description')) ?></p>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<ul>
|
|
<?php foreach ($warnings as $warning): ?>
|
|
<li><?= $warning ?></li>
|
|
<?php endforeach ?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<?php endif ?>
|