1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-07-31 18:30:20 +02:00

Merge branch 'dev'

This commit is contained in:
Awilum
2014-08-10 21:34:18 +04:00
10 changed files with 93 additions and 19 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -39,7 +39,7 @@ class Monstra
/**
* The version of Monstra
*/
const VERSION = '3.0.0';
const VERSION = '3.0.1';
/**

View File

@@ -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.");
}
/**

View File

@@ -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>

View File

@@ -54,6 +54,7 @@ class PluginsAdmin extends Backend
// Clean Monstra TMP folder.
Monstra::cleanTmp();
// Increment Styles and Javascript version
Stylesheet::stylesVersionIncrement();
Javascript::javascriptVersionIncrement();

View File

@@ -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 -->

View File

@@ -37,8 +37,12 @@ class ThemesAdmin extends Backend
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 @@ class ThemesAdmin extends Backend
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');
@@ -119,7 +123,7 @@ class ThemesAdmin extends Backend
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 +163,7 @@ class ThemesAdmin extends Backend
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) {
@@ -168,11 +172,18 @@ class ThemesAdmin extends Backend
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.'); }
@@ -199,7 +210,7 @@ class ThemesAdmin extends Backend
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) {
@@ -208,11 +219,20 @@ class ThemesAdmin extends Backend
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.'); }
@@ -377,6 +397,12 @@ class ThemesAdmin extends Backend
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 {
@@ -433,6 +459,12 @@ class ThemesAdmin extends Backend
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 {
@@ -477,6 +509,13 @@ class ThemesAdmin extends Backend
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.'); }
@@ -491,6 +530,13 @@ class ThemesAdmin extends Backend
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.'); }
@@ -519,6 +565,12 @@ class ThemesAdmin extends Backend
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 @@ class ThemesAdmin extends Backend
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');
}

View File

@@ -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>

View File

@@ -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>