From 57f798e2cb144dc78635bac7cf0081b69d237bbf Mon Sep 17 00:00:00 2001 From: ravilrrr Date: Mon, 4 Aug 2014 12:25:27 +0400 Subject: [PATCH 1/8] =?UTF-8?q?=D1=8F=D0=B7=D1=8B=D0=BA=D0=BE=D0=B7=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D1=81=D0=B8=D0=BC=D0=B0=D1=8F=20=D1=81=D1=81=D1=8B?= =?UTF-8?q?=D0=BB=D0=BA=D0=B0=20=D0=BD=D0=B0=20=D1=84=D0=BE=D1=80=D1=83?= =?UTF-8?q?=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/box/dashboard/views/backend/index.view.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/box/dashboard/views/backend/index.view.php b/plugins/box/dashboard/views/backend/index.view.php index 223976f0..f5763726 100644 --- a/plugins/box/dashboard/views/backend/index.view.php +++ b/plugins/box/dashboard/views/backend/index.view.php @@ -44,8 +44,14 @@

From 79f42c2f01cc0d83882a85570021045988cf332b Mon Sep 17 00:00:00 2001 From: Awilum Date: Fri, 8 Aug 2014 23:31:01 +0400 Subject: [PATCH 2/8] Minimum php is 5.3 #333 --- README.md | 2 +- engine/_init.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 072f6cde..1c7e8c20 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Monstra is a modern and lightweight Content Management System. ## System Requirements Operation system: Unix, Linux, Windows, Mac OS -Middleware: PHP 5.2.3 or higher with PHP's [SimpleXML module](http://php.net/simplexml) and [Multibyte String module](http://php.net/mbstring) +Middleware: PHP 5.3.0 or higher with PHP's [SimpleXML module](http://php.net/simplexml) and [Multibyte String module](http://php.net/mbstring) Webserver: Apache with [Mod Rewrite](http://httpd.apache.org/docs/current/mod/mod_rewrite.html) or Ngnix with [Rewrite Module](http://wiki.nginx.org/HttpRewriteModule) ## Steps to Install diff --git a/engine/_init.php b/engine/_init.php index e551bd10..ea87f825 100644 --- a/engine/_init.php +++ b/engine/_init.php @@ -1,10 +1,10 @@ Date: Fri, 8 Aug 2014 23:52:43 +0400 Subject: [PATCH 3/8] Error in Monstra Notifications #339 --- plugins/box/users/views/frontend/login.view.php | 4 ++-- plugins/box/users/views/frontend/password_reset.view.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/box/users/views/frontend/login.view.php b/plugins/box/users/views/frontend/login.view.php index 5590c62f..f9ad19d6 100644 --- a/plugins/box/users/views/frontend/login.view.php +++ b/plugins/box/users/views/frontend/login.view.php @@ -2,8 +2,8 @@
'.$error."
"; + $error = Notification::get('error') ?: ''; + ($error != '') AND print('
'.$error.'
'); ?> diff --git a/plugins/box/users/views/frontend/password_reset.view.php b/plugins/box/users/views/frontend/password_reset.view.php index 97d5e619..8c15e694 100644 --- a/plugins/box/users/views/frontend/password_reset.view.php +++ b/plugins/box/users/views/frontend/password_reset.view.php @@ -2,8 +2,8 @@
'.$success."
"; + $success = Notification::get('success') ?: ''; + ($success != '') AND print('
'.$success.'
'); ?> From a39d78d72595a550bd430c8bac65a01e3f14ff28 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sat, 9 Aug 2014 00:14:06 +0400 Subject: [PATCH 4/8] Themes Plugin: Imposible to create new CSS #335 --- plugins/box/themes/themes.admin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/box/themes/themes.admin.php b/plugins/box/themes/themes.admin.php index 2befac7e..3783d3a7 100755 --- a/plugins/box/themes/themes.admin.php +++ b/plugins/box/themes/themes.admin.php @@ -119,7 +119,7 @@ public static function main() if (Security::check(Request::post('csrf'))) { if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes'); - if (file_exists($template_path.Security::safeName(Request::post('name', null, false))).'.template.php') $errors['file_exists'] = __('This template already exists', 'themes'); + if (file_exists($template_path.Security::safeName(Request::post('name', null, false)).'.template.php')) $errors['file_exists'] = __('This template already exists', 'themes'); if (count($errors) == 0) { @@ -159,7 +159,7 @@ public static function main() if (Security::check(Request::post('csrf'))) { if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes'); - if (file_exists($style_path.Security::safeName(Request::post('name'), null, false)).'.css') $errors['file_exists'] = __('This styles already exists', 'themes'); + if (file_exists($style_path.Security::safeName(Request::post('name'), null, false).'.css')) $errors['file_exists'] = __('This styles already exists', 'themes'); if (count($errors) == 0) { @@ -199,7 +199,7 @@ public static function main() if (Security::check(Request::post('csrf'))) { if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes'); - if (file_exists($script_path.Security::safeName(Request::post('name'), null, false)).'.js') $errors['file_exists'] = __('This script already exists', 'themes'); + if (file_exists($script_path.Security::safeName(Request::post('name'), null, false).'.js')) $errors['file_exists'] = __('This script already exists', 'themes'); if (count($errors) == 0) { From d6221b3f50cf4a6dd089b6dadb7faf08aa7e7f50 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sat, 9 Aug 2014 00:18:49 +0400 Subject: [PATCH 5/8] Themes Plugin: Imposible to create new CSS #335 --- plugins/box/themes/themes.admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/box/themes/themes.admin.php b/plugins/box/themes/themes.admin.php index 3783d3a7..2786e168 100755 --- a/plugins/box/themes/themes.admin.php +++ b/plugins/box/themes/themes.admin.php @@ -119,7 +119,7 @@ public static function main() if (Security::check(Request::post('csrf'))) { if (trim(Request::post('name')) == '') $errors['file_empty_name'] = __('Required field', 'themes'); - if (file_exists($template_path.Security::safeName(Request::post('name', null, false)).'.template.php')) $errors['file_exists'] = __('This template already exists', 'themes'); + if (file_exists($template_path.Security::safeName(Request::post('name'), null, false).'.template.php')) $errors['file_exists'] = __('This template already exists', 'themes'); if (count($errors) == 0) { From a088fd97722465659f753fe6d4e5aa8ab43f1b1d Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 10 Aug 2014 16:06:06 +0400 Subject: [PATCH 6/8] Themes Plugin: js and css counter does not recalculate #336 --- plugins/box/plugins/plugins.admin.php | 1 + plugins/box/themes/themes.admin.php | 67 +++++++++++++++++++++++++-- 2 files changed, 64 insertions(+), 4 deletions(-) diff --git a/plugins/box/plugins/plugins.admin.php b/plugins/box/plugins/plugins.admin.php index 61ca7ce5..74164669 100755 --- a/plugins/box/plugins/plugins.admin.php +++ b/plugins/box/plugins/plugins.admin.php @@ -54,6 +54,7 @@ public static function main() // Clean Monstra TMP folder. Monstra::cleanTmp(); + // Increment Styles and Javascript version Stylesheet::stylesVersionIncrement(); Javascript::javascriptVersionIncrement(); diff --git a/plugins/box/themes/themes.admin.php b/plugins/box/themes/themes.admin.php index 2786e168..a13cba4c 100755 --- a/plugins/box/themes/themes.admin.php +++ b/plugins/box/themes/themes.admin.php @@ -37,8 +37,12 @@ public static function main() Option::update('theme_site_name', Request::post('themes')); - // Cleanup minify - if (count($files = File::scan(MINIFY, array('css', 'js', 'php'))) > 0) foreach ($files as $file) File::delete(MINIFY . DS . $file); + // Clean Monstra TMP folder. + Monstra::cleanTmp(); + + // Increment Styles and Javascript version + Stylesheet::stylesVersionIncrement(); + Javascript::javascriptVersionIncrement(); Request::redirect('index.php?id=themes'); @@ -52,8 +56,8 @@ public static function main() Option::update('theme_admin_name', Request::post('themes')); - // Cleanup minify - if (count($files = File::scan(MINIFY, array('css', 'js', 'php'))) > 0) foreach ($files as $file) File::delete(MINIFY . DS . $file); + // Clean Monstra TMP folder. + Monstra::cleanTmp(); Request::redirect('index.php?id=themes'); @@ -168,11 +172,18 @@ public static function main() Notification::set('success', __('Your changes to the styles :name have been saved.', 'themes', array(':name' => Security::safeName(Request::post('name'), null, false)))); + // Clean Monstra TMP folder. + Monstra::cleanTmp(); + + // Increment Styles version + Stylesheet::stylesVersionIncrement(); + if (Request::post('add_file_and_exit')) { Request::redirect('index.php?id=themes'); } else { Request::redirect('index.php?id=themes&action=edit_styles&filename='.Security::safeName(Request::post('name'), null, false)); } + } } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } @@ -208,11 +219,20 @@ public static function main() Notification::set('success', __('Your changes to the script :name have been saved.', 'themes', array(':name' => Security::safeName(Request::post('name'), null, false)))); + + // Clean Monstra TMP folder. + Monstra::cleanTmp(); + + // Increment Javascript version + Javascript::javascriptVersionIncrement(); + + if (Request::post('add_file_and_exit')) { Request::redirect('index.php?id=themes'); } else { Request::redirect('index.php?id=themes&action=edit_script&filename='.Security::safeName(Request::post('name'), null, false)); } + } } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } @@ -377,6 +397,12 @@ public static function main() Notification::set('success', __('Your changes to the styles :name have been saved.', 'themes', array(':name' => basename($save_filename, '.css')))); + // Clean Monstra TMP folder. + Monstra::cleanTmp(); + + // Increment Styles version + Stylesheet::stylesVersionIncrement(); + if (Request::post('edit_file_and_exit')) { Request::redirect('index.php?id=themes'); } else { @@ -433,6 +459,12 @@ public static function main() Notification::set('success', __('Your changes to the script :name have been saved.', 'themes', array(':name' => basename($save_filename, '.js')))); + // Clean Monstra TMP folder. + Monstra::cleanTmp(); + + // Increment Javascript version + Javascript::javascriptVersionIncrement(); + if (Request::post('edit_file_and_exit')) { Request::redirect('index.php?id=themes'); } else { @@ -477,6 +509,13 @@ public static function main() File::delete($style_path.Request::get('filename').'.css'); Notification::set('success', __('Styles :name deleted', 'themes', array(':name' => File::name(Request::get('filename'))))); + + // Clean Monstra TMP folder. + Monstra::cleanTmp(); + + // Increment Styles version + Stylesheet::stylesVersionIncrement(); + Request::redirect('index.php?id=themes'); } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } @@ -491,6 +530,13 @@ public static function main() File::delete($script_path.Request::get('filename').'.js'); Notification::set('success', __('Script :name deleted', 'themes', array(':name' => File::name(Request::get('filename'))))); + + // Clean Monstra TMP folder. + Monstra::cleanTmp(); + + // Increment Javascript version + Javascript::javascriptVersionIncrement(); + Request::redirect('index.php?id=themes'); } else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); } @@ -519,6 +565,12 @@ public static function main() File::setContent(THEMES_SITE . DS . $current_site_theme . DS . 'css' . DS . Request::get('filename') .'_clone_'.date("Ymd_His").'.css', File::getContent(THEMES_SITE . DS . $current_site_theme . DS . 'css' . DS . Request::get('filename') . '.css')); + // Clean Monstra TMP folder. + Monstra::cleanTmp(); + + // Increment Styles version + Stylesheet::stylesVersionIncrement(); + Request::redirect('index.php?id=themes'); } @@ -533,6 +585,13 @@ public static function main() File::setContent(THEMES_SITE . DS . $current_site_theme . DS . 'js' . DS . Request::get('filename') .'_clone_'.date("Ymd_His").'.js', File::getContent(THEMES_SITE . DS . $current_site_theme . DS . 'js' . DS . Request::get('filename') . '.js')); + + // Clean Monstra TMP folder. + Monstra::cleanTmp(); + + // Increment Javascript version + Javascript::javascriptVersionIncrement(); + Request::redirect('index.php?id=themes'); } From 9c48c41e55e1f3fc07659a8593c1fdd5c082c8a3 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 10 Aug 2014 16:07:59 +0400 Subject: [PATCH 7/8] Update plugins url #340 --- plugins/box/plugins/views/backend/index.view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/box/plugins/views/backend/index.view.php b/plugins/box/plugins/views/backend/index.view.php index ae540a3f..2c7bddc3 100755 --- a/plugins/box/plugins/views/backend/index.view.php +++ b/plugins/box/plugins/views/backend/index.view.php @@ -6,7 +6,7 @@ From 5f1746d62e812a3f6663c78dd28f474e3ab7faa8 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 10 Aug 2014 21:04:32 +0400 Subject: [PATCH 8/8] Monstra 3.0.1 --- CHANGELOG.md | 8 ++++++++ engine/Monstra.php | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93cc3aae..68890661 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +Monstra 3.0.1, 2014-08-10 +------------------------ +- Minimum php is 5.3 +- Themes Plugin: Imposible to create new CSS - fixed +- Themes Plugin: js and css counter does not recalculate - fixed +- Error in Monstra Notifications - fixed +- Updated plugins url from plugins.monstra.org to monstra.org/download/plugins + Monstra 3.0.0, 2014-08-01 ------------------------ - Mobile Ready! Monstra fully responsive for mobile devices, tablets, and normal computer screens. diff --git a/engine/Monstra.php b/engine/Monstra.php index 0fe5913a..80d8127b 100644 --- a/engine/Monstra.php +++ b/engine/Monstra.php @@ -39,7 +39,7 @@ class Monstra /** * The version of Monstra */ - const VERSION = '3.0.0'; + const VERSION = '3.0.1'; /**