Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Awilum committed Oct 16, 2015
2 parents 90c27f3 + 1aa2664 commit 4b57135
Show file tree
Hide file tree
Showing 54 changed files with 702 additions and 774 deletions.
12 changes: 6 additions & 6 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Monstra CMS :: php & apache settings
# Monstra :: php & apache settings
#

# Set default charset utf-8
Expand All @@ -19,16 +19,16 @@ Options -Indexes
# Setting rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
# Update code bellow for SEO improvements

# Update code bellow for SEO improvements
# RewriteCond %{HTTP_HOST} ^www.example.org [NC]
# RewriteRule ^(.*)$ http://example.org/$1 [R=301,L]

RewriteBase /%siteurlhere%/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
# Update code bellow for SEO improvements

# Update code bellow for SEO improvements
# Redirect 301 /home http://example.org/
</IfModule>
30 changes: 18 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Monstra 3.0.2, 2015-10-16
------------------------
- Added Monstra MIT LICENSE instead of GNU GENERAL PUBLIC LICENSE v3
- Code standards fixes.
- Localization: Major Fixes for ES and SR

Monstra 3.0.1, 2014-08-10
------------------------
- Minimum php is 5.3
- 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
Expand All @@ -24,7 +30,7 @@ Monstra 3.0.0, 2014-08-01
- Plugins Manager: Uploading new plugins via the admin panel added
- Plugins Manager: Read plugin help(README.MD) ability added.
- Responsive Chocolat Lightbox instead of TB Lightbox
- Blog Plugin as a part of Monstra CMS
- Blog Plugin as a part of Monstra CMS
- CodeMirror Plugin as a part of Monstra CMS
- Markdown Plugin as a part of Monstra CMS
- MarkItUp Color Pallete fixes
Expand Down Expand Up @@ -78,7 +84,7 @@ Monstra 2.3.0, 2013-12-19
- Gelato: Number.php: Undefined offset fix
- XMLDB: error select for empty table fix
- Plugin API: Stylesheet.php updates - sourcecode misses a linebreak after minified css
- Files Manager: jasny bootstrap-fileupload - added #89
- Files Manager: jasny bootstrap-fileupload - added #89
- Users Plugin: login page fixes
- Users Plugin: Deleting users - fixed by Oleg Gatseluk #158
- Pages Plugin: General method getPages() created #123
Expand Down Expand Up @@ -230,7 +236,7 @@ Monstra 2.0.0, 2012-10-09
- Users Plugin: Admin - New User Registration Validation - Fixed
- Users Plugin: Added ability to set "about me" information.
- Improved Password Reset Logic.
- Information Plugin: Added new tab "Server" with common server information.
- Information Plugin: Added new tab "Server" with common server information.
- Box Plugins: CSRF vulnerability resolved.
- Sitemap Plugin: Basic search engine optimization.
- Improved Menu Plugin. Added ability to manage items categories.
Expand All @@ -240,12 +246,12 @@ Monstra 2.0.0, 2012-10-09
- Dir Helper: Fixed size() method.
- New Default Theme: built with best frontend optimization practice.
- Options API: Updated get() method. Return empty string if option value doesnt exists.
- CSS variables: Added - @theme_site_url @theme_admin_url
- CSS variables: Added - @theme_site_url @theme_admin_url
- CSS variables: Deleted - @theme_url
- Themes Plugin: Added ability to create/edit/clone JavaScripts. Added ability to change admin theme in one click.
- Apply filter 'content' to Blocks.
- Apply filter 'content' to Blocks.
- Array Helper: get() method improved. New methods keyExists() isAssoc() set() delete() random() added.
- Plugin API: Fixed Javascript and Stylesheet class.
- Plugin API: Fixed Javascript and Stylesheet class.
- Plugin API: Added ability to set view file from current theme folder.
- New options theme_admin_name, theme_site_name, users_frontend_registration added.
- Form Helper: Custom Macros - added
Expand All @@ -265,22 +271,22 @@ Monstra 1.3.0, 2012-09-01
- Improve Default Monstra theme.
- Security: Fix Script Insertion Vulnerability.
- Blocks and Snippets plugins code fix. Issue #35, Issue #34
- XMLDB: new method updateField()
- Plugin API: path updates.
- XMLDB: new method updateField()
- Plugin API: path updates.
- Dir Helper: new method size()
- Filesmanager: shows directory size.
- Filesmanager: shows directory size.
- Security Helper: update safeName() method.
- Pages Plugin: new method children() Get children pages for a specific parent page.
- Update translates.
- And a lot of general engine improvements.

Monstra 1.2.1, 2012-08-09
------------------------
- Admin styles: add .error class
- Admin styles: add .error class
- Fix translates
- Security: fix Cross Site Request Forgery
- Site Module: fix template() function
- Html Helper: fix nbsp() function
- Html Helper: fix nbsp() function
- Site Module: fix template() function

Monstra 1.2.0, 2012-07-03
Expand Down
242 changes: 21 additions & 221 deletions LICENSE.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ Webserver: Apache with [Mod Rewrite](http://httpd.apache.org/docs/current/mod/mo
- [Documentation](http://monstra.org/documentation)
- [Github Repository](https://github.com/monstra-cms/monstra)

Copyright (C) 2012-2015 Romanenko Sergey / Awilum [[email protected]]
## License
See [LICENSE](https://github.com/monstra-cms/monstra/blob/master/LICENSE.md)
35 changes: 14 additions & 21 deletions admin/index.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
<?php

/**
* Monstra Engine
* Monstra
*
* This source file is part of the Monstra Engine. More information,
* documentation and tutorials can be found at http://monstra.org
*
* @package Monstra
*
* @author Romanenko Sergey / Awilum <[email protected]>
* @copyright 2012-2014 Romanenko Sergey / Awilum <[email protected]>
* @package Monstra
* @author Romanenko Sergey / Awilum <[email protected]>
* @link http://monstra.org
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/


// Main engine defines
define('DS', DIRECTORY_SEPARATOR);
define('ROOT', rtrim(str_replace(array('admin'), array(''), dirname(__FILE__)), '\\/'));
Expand All @@ -32,13 +29,9 @@

// Admin login
if (Request::post('login_submit')) {

if (Cookie::get('login_attempts') && Cookie::get('login_attempts') >= 5) {

$login_error = __('You are banned for 10 minutes. Try again later', 'users');

} else {

$user = $users->select("[login='" . trim(Request::post('login')) . "']", null);
if (count($user) !== 0) {
if ($user['login'] == Request::post('login')) {
Expand All @@ -64,7 +57,6 @@
} else {
Cookie::set('login_attempts', 1, 600);
}

}
}
} else {
Expand All @@ -84,7 +76,6 @@
}

Notification::setNow('error', $login_error);

}

// Errors
Expand All @@ -97,10 +88,15 @@

// Reset Password Form Submit
if (Request::post('reset_password_submit')) {

if (Option::get('captcha_installed') == 'true' && ! CryptCaptcha::check(Request::post('answer'))) $errors['users_captcha_wrong'] = __('Captcha code is wrong', 'users');
if ($user_login == '') $errors['users_empty_field'] = __('Required field', 'users');
if ($user_login != '' && ! $users->select("[login='".$user_login."']")) $errors['users_user_doesnt_exists'] = __('This user doesnt exist', 'users');
if (Option::get('captcha_installed') == 'true' && ! CryptCaptcha::check(Request::post('answer'))) {
$errors['users_captcha_wrong'] = __('Captcha code is wrong', 'users');
}
if ($user_login == '') {
$errors['users_empty_field'] = __('Required field', 'users');
}
if ($user_login != '' && ! $users->select("[login='".$user_login."']")) {
$errors['users_user_doesnt_exists'] = __('This user doesnt exist', 'users');
}

if (count($errors) == 0) {

Expand Down Expand Up @@ -136,7 +132,6 @@

// Redirect to password-reset page
Request::redirect(Site::url().'/admin');

}

Notification::setNow('reset_password', 'reset_password');
Expand Down Expand Up @@ -184,12 +179,10 @@

// Backend post render
Action::run('admin_post_render');

} else {

// Display login template
require 'themes'. DS . Option::get('theme_admin_name') . DS . 'login.template.php';

}

// Flush (send) the output buffer and turn off output buffering
Expand Down
Loading

0 comments on commit 4b57135

Please sign in to comment.