diff --git a/.htaccess b/.htaccess index 912ffa81..407df643 100644 --- a/.htaccess +++ b/.htaccess @@ -5,6 +5,9 @@ AddDefaultCharset UTF-8 # Enable rewrite rules RewriteEngine on +# Base directory +RewriteBase / + # Deny direct access to .txt files RewriteRule ^bl-content/(.*)\.txt$ - [R=404,L] diff --git a/bl-kernel/helpers/text.class.php b/bl-kernel/helpers/text.class.php index e72cdbc6..6dc76c3c 100644 --- a/bl-kernel/helpers/text.class.php +++ b/bl-kernel/helpers/text.class.php @@ -50,7 +50,6 @@ class Text { 'и'=>'i', 'й'=>'j', 'к'=>'k', 'л'=>'l', 'м'=>'m', 'н'=>'n', 'о'=>'o','п'=>'p', 'р'=>'r', 'с'=>'s', 'т'=>'t', 'у'=>'u', 'ф'=>'f', 'х'=>'h', 'ц'=>'c', 'ч'=>'ch', 'ш'=>'sh', 'щ'=>'sh', 'ъ'=>'', 'ь'=>'j', 'ю'=>'yu', 'я'=>'ya', - // Ukrainian 'Є'=>'Ye', 'І'=>'I', 'Ї'=>'Yi', 'Ґ'=>'G', 'є'=>'ye', 'і'=>'i', 'ї'=>'yi', 'ґ'=>'g', diff --git a/bl-plugins/tinymce/plugin.php b/bl-plugins/tinymce/plugin.php index b28640df..2daf510c 100644 --- a/bl-plugins/tinymce/plugin.php +++ b/bl-plugins/tinymce/plugin.php @@ -44,7 +44,7 @@ class pluginTinymce extends Plugin { paste_as_text: true, document_base_url: "'.DOMAIN_UPLOADS.'", plugins: [ - "autosave", + "autosave, code", "searchreplace autolink directionality", "visualblocks visualchars", "fullscreen image link media template", @@ -52,7 +52,8 @@ class pluginTinymce extends Plugin { "advlist lists textcolor wordcount", "contextmenu colorpicker textpattern" ], - toolbar: "restoredraft | formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat image table | pagebreak code fullscreen" + toolbar1: "restoredraft | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | outdent indent | removeformat image | pagebreak code", + toolbar2: "formatselect | table | numlist bullist | fullscreen" }); '; diff --git a/install.php b/install.php index 582726da..eb31cade 100644 --- a/install.php +++ b/install.php @@ -190,7 +190,7 @@ function checkSystem() $stdOut = array(); $dirpermissions = 0755; - // Try to create .htaccess file if not exists + // Try to create .htaccess $htaccessContent = 'AddDefaultCharset UTF-8 @@ -198,6 +198,9 @@ function checkSystem() # Enable rewrite rules RewriteEngine on +# Base directory +RewriteBase '.HTML_PATH_ROOT.' + # Deny direct access to .txt files RewriteRule ^bl-content/(.*)\.txt$ - [R=404,L] @@ -207,22 +210,21 @@ RewriteRule ^(.*) index.php [PT,L] '; - if ( !file_exists(PATH_ROOT.'.htaccess') || (filesize(PATH_ROOT.'.htaccess')<1) ) { - if (!file_put_contents(PATH_ROOT.'.htaccess', $htaccessContent)) { - if (!empty($_SERVER['SERVER_SOFTWARE'])) { - $webserver = Text::lowercase($_SERVER['SERVER_SOFTWARE']); - if (Text::stringContains($webserver, 'apache') || Text::stringContains($webserver, 'litespeed')) { - $errorText = 'Missing file, upload the file .htaccess (ERROR_204)'; - error_log($errorText, 0); + if (!file_put_contents(PATH_ROOT.'.htaccess', $htaccessContent)) { + if (!empty($_SERVER['SERVER_SOFTWARE'])) { + $webserver = Text::lowercase($_SERVER['SERVER_SOFTWARE']); + if (Text::stringContains($webserver, 'apache') || Text::stringContains($webserver, 'litespeed')) { + $errorText = 'Missing file, upload the file .htaccess (ERROR_204)'; + error_log($errorText, 0); - $tmp['title'] = 'File .htaccess'; - $tmp['errorText'] = $errorText; - array_push($stdOut, $tmp); - } + $tmp['title'] = 'File .htaccess'; + $tmp['errorText'] = $errorText; + array_push($stdOut, $tmp); } } } + // Check mod_rewrite module if (function_exists('apache_get_modules') ) { if (!in_array('mod_rewrite', apache_get_modules())) {