Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Aug 10, 2014
2 parents 01a9112 + 5f1746d commit 36a69bd
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 19 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion engine/Monstra.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Monstra
/**
* The version of Monstra
*/
const VERSION = '3.0.0';
const VERSION = '3.0.1';


/**
Expand Down
6 changes: 3 additions & 3 deletions engine/_init.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php defined('MONSTRA_ACCESS') or die('No direct script access.');

/**
* Monstra requires PHP 5.2.3 or greater
* Monstra requires PHP 5.3.0 or greater
*/
if (version_compare(PHP_VERSION, "5.2.3", "<")) {
exit("Monstra requires PHP 5.2.3 or greater.");
if (version_compare(PHP_VERSION, "5.3.0", "<")) {
exit("Monstra requires PHP 5.3.0 or greater.");
}

/**
Expand Down
10 changes: 8 additions & 2 deletions plugins/box/dashboard/views/backend/index.view.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,14 @@
<div class="col-md-3">
<h3><?php echo __('Help', 'system'); ?></h3>
<ul class="list-unstyled">
<li><a href="http://monstra.org/documentation" target="_blank"><?php echo __('Documentation', 'system'); ?></a></li>
<li><a href="http://forum.monstra.org" target="_blank"><?php echo __('Official Support Forum', 'system'); ?></a></li>
<li><a href="http://monstra.org/documentation" target="_blank"><?php echo __('Documentation', 'system'); ?></a></li>
<li>
<?php if (Option::get('language') == 'ru') { ?>
<a href="http://ru.forum.monstra.org" target="_blank"><?php echo __('Official Support Forum', 'system'); ?></a>
<?php } else { ?>
<a href="http://forum.monstra.org" target="_blank"><?php echo __('Official Support Forum', 'system'); ?></a>
<?php } ?>
</li>
</ul>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions plugins/box/plugins/plugins.admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public static function main()
// Clean Monstra TMP folder.
Monstra::cleanTmp();

// Increment Styles and Javascript version
Stylesheet::stylesVersionIncrement();
Javascript::javascriptVersionIncrement();

Expand Down
2 changes: 1 addition & 1 deletion plugins/box/plugins/views/backend/index.view.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ul class="nav nav-tabs">
<li class="active"><a href="#installed" data-toggle="tab"><?php echo __('Installed', 'plugins'); ?></a></li>
<li><a href="#installnew" data-toggle="tab"><?php echo __('Install New', 'plugins'); ?> <?php if (count($plugins_to_intall) > 0) { ?><span class="badge"><?php echo count($plugins_to_intall); ?></span><?php } ?></a></li>
<li><a href="http://plugins.monstra.org" target="_blank"><?php echo __('Get More Plugins', 'plugins'); ?></a></li>
<li><a href="http://monstra.org/download/plugins" target="_blank"><?php echo __('Get More Plugins', 'plugins'); ?></a></li>
</ul>
<!-- /Plugins_tabs -->

Expand Down
73 changes: 66 additions & 7 deletions plugins/box/themes/themes.admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -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');

Expand Down Expand Up @@ -119,7 +123,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) {

Expand Down Expand Up @@ -159,7 +163,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) {

Expand All @@ -168,11 +172,18 @@ public static function main()

Notification::set('success', __('Your changes to the styles <i>:name</i> 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.'); }
Expand All @@ -199,7 +210,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) {

Expand All @@ -208,11 +219,20 @@ public static function main()

Notification::set('success', __('Your changes to the script <i>:name</i> 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.'); }
Expand Down Expand Up @@ -377,6 +397,12 @@ public static function main()

Notification::set('success', __('Your changes to the styles <i>:name</i> 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 {
Expand Down Expand Up @@ -433,6 +459,12 @@ public static function main()

Notification::set('success', __('Your changes to the script <i>:name</i> 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 {
Expand Down Expand Up @@ -477,6 +509,13 @@ public static function main()

File::delete($style_path.Request::get('filename').'.css');
Notification::set('success', __('Styles <i>:name</i> 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.'); }
Expand All @@ -491,6 +530,13 @@ public static function main()

File::delete($script_path.Request::get('filename').'.js');
Notification::set('success', __('Script <i>:name</i> 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.'); }
Expand Down Expand Up @@ -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');
}

Expand All @@ -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');
}

Expand Down
4 changes: 2 additions & 2 deletions plugins/box/users/views/frontend/login.view.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<div class="col-md-12">
<?php
// Monstra Notifications
Notification::get('error') AND $error = Notification::get('error');
echo '<div class="error margin-bottom-1">'.$error."</div>";
$error = Notification::get('error') ?: '';
($error != '') AND print('<div class="error margin-bottom-1">'.$error.'</div>');
?>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions plugins/box/users/views/frontend/password_reset.view.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<div class="col-md-12">
<?php
// Monstra Notifications
Notification::get('success') AND $success = Notification::get('success');
echo '<div class="success margin-bottom-1">'.$success."</div>";
$success = Notification::get('success') ?: '';
($success != '') AND print('<div class="success margin-bottom-1">'.$success.'</div>');
?>
</div>
</div>
Expand Down

0 comments on commit 36a69bd

Please sign in to comment.