diff --git a/admin/themes/default/css/default.css b/admin/themes/default/css/default.css
index 378232e9..7ab788c0 100644
--- a/admin/themes/default/css/default.css
+++ b/admin/themes/default/css/default.css
@@ -103,6 +103,7 @@ button.delete-button:hover {
height: 400px;
}
+
/* ----------- ALERT ----------- */
#alert {
diff --git a/admin/themes/default/init.php b/admin/themes/default/init.php
index 58f1cce4..1f3db143 100644
--- a/admin/themes/default/init.php
+++ b/admin/themes/default/init.php
@@ -159,6 +159,9 @@ class HTML {
$("#jsaddImage").on("click", function() {
var filename = $("#jsimageList option:selected").text();
+ if(!filename.trim()) {
+ return false;
+ }
var textareaValue = $("#jscontent").val();
$("#jscontent").val(textareaValue + "" + "\n");
});
@@ -187,6 +190,10 @@ class HTML {
bar.css("width", "100%").text("100%");
setTimeout(function() { progressbar.addClass("uk-hidden"); }, 250);
$("#jsimageList").prepend("");
+ },
+
+ notallowed: function(file, settings) {
+ alert("'.$L->g('Supported image file types').' "+settings.allow);
}
};
diff --git a/install.php b/install.php
index 7da52d20..f2bc046d 100644
--- a/install.php
+++ b/install.php
@@ -7,6 +7,11 @@
* Bludit is opensource software licensed under the MIT license.
*/
+// Check PHP version
+if(version_compare(phpversion(), '5.3', '<')) {
+ exit('Current PHP version '.phpversion().', you need > 5.3. (ERR_202)');
+}
+
// Security constant
define('BLUDIT', true);
@@ -139,19 +144,6 @@ function checkSystem()
$phpModules = get_loaded_extensions();
}
- // If the php version is less than 5.3, then don't check others requirements.
- if(!version_compare(phpversion(), '5.3', '>='))
- {
- $errorText = 'Current PHP version '.phpversion().', you need > 5.3. (ERR_202)';
- error_log($errorText, 0);
-
- $tmp['title'] = 'PHP version';
- $tmp['errorText'] = $errorText;
- array_push($stdOut, $tmp);
-
- return $stdOut;
- }
-
if(!file_exists(PATH_ROOT.'.htaccess'))
{
$errorText = 'Missing file, upload the file .htaccess (ERR_201)';
@@ -202,9 +194,8 @@ function install($adminPassword, $email, $timezoneOffset)
$stdOut = array();
- $timezone = timezone_name_from_abbr('', $timezoneOffset, 1);
+ $timezone = timezone_name_from_abbr('', $timezoneOffset, 0);
if($timezone === false) { $timezone = timezone_name_from_abbr('', $timezoneOffset, 0); } // Workaround bug #44780
-
date_default_timezone_set($timezone);
$currentDate = Date::current(DB_DATE_FORMAT);
diff --git a/languages/en_US.json b/languages/en_US.json
index 405f1f45..e308c6f4 100644
--- a/languages/en_US.json
+++ b/languages/en_US.json
@@ -203,5 +203,6 @@
"images": "Images",
"upload-image": "Upload image",
"drag-and-drop-or-click-here": "Drag and drop or click here",
- "insert-image": "Insert image"
+ "insert-image": "Insert image",
+ "supported-image-file-types": "Supported image file types"
}
\ No newline at end of file
diff --git a/plugins/simplemde/plugin.php b/plugins/simplemde/plugin.php
index 78be158e..f362c0a7 100644
--- a/plugins/simplemde/plugin.php
+++ b/plugins/simplemde/plugin.php
@@ -97,6 +97,9 @@ class pluginsimpleMDE extends Plugin {
$html .= '$("#jsaddImage").on("click", function() {
var filename = $("#jsimageList option:selected" ).text();
+ if(!filename.trim()) {
+ return false;
+ }
var text = simplemde.value();
simplemde.value(text + "![alt text]("+filename+")" + "\n");
});';