Samuel Georges a9a3336d11 * Build 199 *** NB: /uploads -> /storage/app/uploads
The /uploads directory has been moved to /storage/app/uploads to make way for CDN support. This directory should be moved on the file system and the config (cms.uploadsPath) updated.
2015-02-19 19:12:36 +11:00

51 lines
1.6 KiB
HTML

<?php
$warnings = [];
$writablePaths = [
temp_path(),
themes_path(),
base_path().'/storage',
base_path().'/storage/app',
base_path().'/storage/logs',
base_path().'/storage/framework',
base_path().'/storage/cms',
base_path().'/storage/cms/cache',
base_path().'/storage/cms/twig',
base_path().'/storage/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 ?>