Powerful and easy to use cms to build websites, blogs or ecommerce stores.
HTML backendblogblog-engineblog-platformbloggingcmscontent-managementcontent-management-systemecommerceecommerce-platformno-codepage-builderphpphp-cmsphp7php8self-hostedshopping-cartweb-applicationwebsite-builder
Check if cache folders are writable and display warning
givanz3161992a5aa4
diff --git a/admin/controller/tools/cache.php b/admin/controller/tools/cache.phpindex fe2e0f6..0974d70 100755--- a/admin/controller/tools/cache.php+++ b/admin/controller/tools/cache.php@@ -70,6 +70,18 @@ class Cache extends Base {}function index() {- $this->view->isPageCacheDirWritable = is_writable(DIR_PUBLIC . PAGE_CACHE_DIR);+ $folders = [+ '/public/page-cache' => DIR_PUBLIC . PAGE_CACHE_DIR,+ '/public/image-cache' => DIR_PUBLIC . DS . 'image-cache',+ '/storage/model/app' => DIR_STORAGE . 'model' . DS . 'app',+ '/storage/model/admin' => DIR_STORAGE . 'model' . DS . 'admin',+ '/storage/compiled_templates' => DIR_COMPILED_TEMPLATES,+ ];++ foreach ($folders as $folder => $path) {+ if (! is_writable($path)) {+ $this->view->info[] = sprintf('Folder is not writable, clear cache might not work for this layer, make sure that <b>%s</b> is writable by php', $folder);+ }+ }}}diff --git a/system/cache-manager.php b/system/cache-manager.phpindex 550ae4c..44f5f46 100755--- a/system/cache-manager.php+++ b/system/cache-manager.php@@ -68,7 +68,7 @@ class CacheManager {}if ($site_id) {- $name .= "{$site}_id_";+ $name .= "{$site_id}_";}if ($theme) {