Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Show file not writable message if editor can't save html because of file permissions

givanz3e8644d27279
diff --git a/admin/controller/editor/editor.php b/admin/controller/editor/editor.php
index 373d973..0a85fb1 100755
--- a/admin/controller/editor/editor.php
+++ b/admin/controller/editor/editor.php
@@ -583,6 +583,10 @@ class Editor extends Base {
if (file_put_contents($fileName, $content)) {
$success = true;
$text .= __('File saved!');
+ } else {
+ if (!is_writable($fileName)) {
+ $text .= sprintf(__('%s is not writable!'), $fileName);
+ }
}
$cssFile = DS . 'css' . DS . 'custom.css';