mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-05 12:48:00 +02:00
Compare commits
3 Commits
v2.3.0
...
sparky-js-
Author | SHA1 | Date | |
---|---|---|---|
|
4b4b78e554 | ||
|
3f420f2406 | ||
|
b499f2a1da |
12
.htaccess
12
.htaccess
@@ -19,16 +19,8 @@ Options -Indexes
|
||||
# Setting rewrite rules.
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
|
||||
# Update code bellow for SEO improvements
|
||||
# RewriteCond %{HTTP_HOST} ^www.example.org [NC]
|
||||
# RewriteRule ^(.*)$ http://example.org/$1 [R=301,L]
|
||||
|
||||
RewriteBase /%siteurlhere%/
|
||||
RewriteBase /projects/monstra-cms/
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^(.*)$ index.php [QSA,L]
|
||||
|
||||
# Update code bellow for SEO improvements
|
||||
# Redirect 301 /home http://example.org/
|
||||
</IfModule>
|
||||
</IfModule>
|
16
README.md
16
README.md
@@ -1,13 +1,16 @@
|
||||
# Monstra CMS
|
||||
|
||||
Fast and small content management system written in PHP!
|
||||
|
||||
|
||||
## System Requirements
|
||||
- UNIX/Linux host
|
||||
- PHP 5.2.3 or higher
|
||||
- PHP 5.2.0 or higher
|
||||
- SimpleXML Module
|
||||
- Apache Mod Rewrite
|
||||
- Multibyte String
|
||||
|
||||
|
||||
## Steps to Install
|
||||
1. [Download the latest version.](http://monstra.org/download)
|
||||
2. Unzip the contents to a new folder on your local computer.
|
||||
@@ -16,18 +19,21 @@ Fast and small content management system written in PHP!
|
||||
5. Also you may also need to recursively CHMOD the /install.php, /.htaccess and /sitemap.xml to 755(or 777) if your host doesn't set it implicitly.
|
||||
6. Type http://example.org/install.php in the browser.
|
||||
|
||||
|
||||
## Contributing
|
||||
1. Help on the [Forum.](http://forum.monstra.org)
|
||||
2. Donate to keep Monstra free. We will add you to Monstra [Sponsors Page.](http://monstra.org/contribute/sponsors)
|
||||
2. Donate to keep Monstra free. We will add you to Monstra [Sponsors Page.](http://monstra.org/about/sponsors)
|
||||
3. Develop a new plugin.
|
||||
4. Create a new theme.
|
||||
5. Find and [report issues.](https://github.com/Awilum/monstra-cms/issues)
|
||||
5. Find and [report issues.](https://github.com/Monstra/monstra-cms/issues)
|
||||
6. Link back to [Monstra](http://monstra.org).
|
||||
|
||||
|
||||
## Links
|
||||
- [Site](http://monstra.org)
|
||||
- [Forum](http://forum.monstra.org)
|
||||
- [Documentation](http://monstra.org/documentation)
|
||||
- [Github Repository](https://github.com/Awilum/monstra-cms)
|
||||
- [Github Repository](https://github.com/Monstra/monstra-cms)
|
||||
|
||||
Copyright (C) 2012-2014 Romanenko Sergey / Awilum [awilum@msn.com]
|
||||
|
||||
Copyright (C) 2012-2013 Romanenko Sergey / Awilum [awilum@msn.com]
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -33,53 +33,23 @@ $users = new Table('users');
|
||||
// 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')) {
|
||||
if (trim($user['password']) == Security::encryptPassword(Request::post('password'))) {
|
||||
if ($user['role'] == 'admin' || $user['role'] == 'editor') {
|
||||
Session::set('admin', true);
|
||||
Session::set('user_id', (int) $user['id']);
|
||||
Session::set('user_login', (string) $user['login']);
|
||||
Session::set('user_role', (string) $user['role']);
|
||||
Request::redirect('index.php');
|
||||
}
|
||||
} else {
|
||||
$login_error = __('Wrong <b>username</b> or <b>password</b>', 'users');
|
||||
|
||||
if (Cookie::get('login_attempts')) {
|
||||
if (Cookie::get('login_attempts') < 5) {
|
||||
$attempts = Cookie::get('login_attempts') + 1;
|
||||
Cookie::set('login_attempts', $attempts, 600);
|
||||
} else {
|
||||
$login_error = __('You are banned for 10 minutes. Try again later', 'users');
|
||||
}
|
||||
} else {
|
||||
Cookie::set('login_attempts', 1, 600);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$login_error = __('Wrong <b>username</b> or <b>password</b>', 'users');
|
||||
|
||||
if (Cookie::get('login_attempts')) {
|
||||
if (Cookie::get('login_attempts') < 5) {
|
||||
$attempts = Cookie::get('login_attempts') + 1;
|
||||
Cookie::set('login_attempts', $attempts, 600);
|
||||
} else {
|
||||
$login_error = __('You are banned for 10 minutes. Try again later', 'users');
|
||||
$user = $users->select("[login='" . trim(Request::post('login')) . "']", null);
|
||||
if (count($user) !== 0) {
|
||||
if ($user['login'] == Request::post('login')) {
|
||||
if (trim($user['password']) == Security::encryptPassword(Request::post('password'))) {
|
||||
if ($user['role'] == 'admin' || $user['role'] == 'editor') {
|
||||
Session::set('admin', true);
|
||||
Session::set('user_id', (int) $user['id']);
|
||||
Session::set('user_login', (string) $user['login']);
|
||||
Session::set('user_role', (string) $user['role']);
|
||||
Request::redirect('index.php');
|
||||
}
|
||||
} else {
|
||||
Cookie::set('login_attempts', 1, 600);
|
||||
$login_error = __('Wrong <b>username</b> or <b>password</b>', 'users');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$login_error = __('Wrong <b>username</b> or <b>password</b>', 'users');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,22 +79,17 @@ if (Request::post('reset_password_submit')) {
|
||||
// Update user hash
|
||||
$users->updateWhere("[login='" . $user_login . "']", array('hash' => $new_hash));
|
||||
|
||||
$mail = new PHPMailer();
|
||||
$mail->CharSet = 'utf-8';
|
||||
$mail->ContentType = 'text/html';
|
||||
$mail->SetFrom(Option::get('system_email'));
|
||||
$mail->AddReplyTo(Option::get('system_email'));
|
||||
$mail->AddAddress($user['email'], $user['login']);
|
||||
$mail->Subject = __('Your login details for :site_name', 'users', array(':site_name' => $site_name));
|
||||
$mail->MsgHTML(View::factory('box/users/views/emails/layout_email')
|
||||
// Message
|
||||
$message = View::factory('box/users/views/frontend/reset_password_email')
|
||||
->assign('site_url', $site_url)
|
||||
->assign('site_name', $site_name)
|
||||
->assign('user_id', $user['id'])
|
||||
->assign('user_login', $user['login'])
|
||||
->assign('new_hash', $new_hash)
|
||||
->assign('view', 'reset_password_email')
|
||||
->render());
|
||||
$mail->Send();
|
||||
->render();
|
||||
|
||||
// Send
|
||||
@mail($user['email'], __('Your login details for :site_name', 'users', array(':site_name' => $site_name)), $message);
|
||||
|
||||
// Set notification
|
||||
Notification::set('success', __('Your login details for :site_name has been sent', 'users', array(':site_name' => $site_name)));
|
||||
|
@@ -3,17 +3,18 @@
|
||||
styles.css
|
||||
*************************************
|
||||
CONTENTS
|
||||
1. GENERAL
|
||||
2. HEADER
|
||||
3. CONTENT
|
||||
4. LEFT MENU
|
||||
5. AUTHORIZATION
|
||||
6. MEDIA QUERIES
|
||||
1. GENERAL
|
||||
2. HEADER
|
||||
3. CONTENT
|
||||
4. LEFT MENU
|
||||
5. AUTHORIZATION
|
||||
6. MISC
|
||||
|
||||
|
||||
*************************************
|
||||
1. GENERAL
|
||||
*************************************/
|
||||
|
||||
body {
|
||||
padding-top: 60px;
|
||||
margin: 0;
|
||||
@@ -268,46 +269,11 @@ td, th {
|
||||
padding: 20px 10px 10px;
|
||||
}
|
||||
|
||||
.small-grey-text {
|
||||
color:#333;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.small-grey-text:hover {
|
||||
color:#000;
|
||||
}
|
||||
|
||||
.small-white-text {
|
||||
color:#fff;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.small-white-text:hover {
|
||||
color:#fdfdfd;
|
||||
}
|
||||
|
||||
.error-none {display:none;}
|
||||
.error-field {border:1px solid red!important;}
|
||||
.container-fluid {padding-left:0px;}
|
||||
img {max-width:none;}
|
||||
|
||||
a.btn-expand{
|
||||
color: #333;
|
||||
font-weight:bold;
|
||||
font-size:14px;
|
||||
text-decoration: none;
|
||||
padding-left:4px;
|
||||
padding-right:4px;
|
||||
}
|
||||
|
||||
footer a , footer{
|
||||
color:#333;
|
||||
font-size:10px;
|
||||
}
|
||||
|
||||
/**************************************
|
||||
2. HEADER
|
||||
*************************************/
|
||||
|
||||
.monstra-header {
|
||||
top: 0;
|
||||
left: 0;
|
||||
@@ -353,13 +319,16 @@ footer a , footer{
|
||||
/*************************************
|
||||
3. CONTENT
|
||||
*************************************/
|
||||
|
||||
.monstra-content {
|
||||
padding-top:20px;
|
||||
}
|
||||
|
||||
|
||||
/*************************************
|
||||
4. LEFT MENU
|
||||
*************************************/
|
||||
|
||||
.monstra-menu-category-separator {
|
||||
border: 0;
|
||||
border-bottom: 1px solid #ccc;
|
||||
@@ -445,6 +414,8 @@ footer a , footer{
|
||||
background-color: #0088cc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
5. AUTHORIZATION
|
||||
*************************************/
|
||||
@@ -466,65 +437,45 @@ footer a , footer{
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
6. MEDIA QUERIES
|
||||
6. MISC
|
||||
*************************************/
|
||||
|
||||
/* iPhone 4, iPhone5, Small Tablet, Tablet */
|
||||
@media (max-width: 800px) {
|
||||
|
||||
.monstra-header .btn-small {
|
||||
padding: 0px 7px;
|
||||
}
|
||||
|
||||
.monstra-menu-sidebar {
|
||||
background: url('@theme_admin_url/img/noisy_grid.png');
|
||||
background-color:#ccc;
|
||||
max-width: 100%!important;
|
||||
min-width: 100%!important;
|
||||
margin-bottom: 20px;
|
||||
padding: 19px;
|
||||
border:2px solid #ccc;
|
||||
}
|
||||
|
||||
.container-fluid {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.small-grey-text {
|
||||
color:#333;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
/* Small Tablet(Landscape), Tablet(Portrait) */
|
||||
@media (min-width: 768px) and (max-width: 800px) {
|
||||
.row-fluid .span10 {
|
||||
-moz-box-sizing: border-box;
|
||||
display: block;
|
||||
width: 94%;
|
||||
}
|
||||
|
||||
footer a, footer {
|
||||
color: #333333;
|
||||
font-size: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.small-grey-text:hover {
|
||||
color:#000;
|
||||
}
|
||||
|
||||
/* iPhone 4 */
|
||||
@media (max-width: 320px) {
|
||||
.markItUpButton11,
|
||||
.markItUpButton12,
|
||||
.markItUpButton13,
|
||||
.markItUpButton14,
|
||||
.markItUpButton15,
|
||||
.markItUpButton16,
|
||||
.markItUpButton17,
|
||||
.markItUpButton18 {
|
||||
display: none;
|
||||
}
|
||||
.markItUpSeparator{
|
||||
display: none;
|
||||
}
|
||||
.small-white-text {
|
||||
color:#fff;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.small-white-text:hover {
|
||||
color:#fdfdfd;
|
||||
}
|
||||
|
||||
.error-none {display:none;}
|
||||
.error-field {border:1px solid red!important;}
|
||||
.container-fluid {padding-left:0px;}
|
||||
img {max-width:none;}
|
||||
|
||||
a.btn-expand{
|
||||
color: #333;
|
||||
font-weight:bold;
|
||||
font-size:14px;
|
||||
text-decoration: none;
|
||||
padding-left:4px;
|
||||
padding-right:4px;
|
||||
}
|
||||
|
||||
footer a , footer{
|
||||
color:#333;
|
||||
font-size:10px;
|
||||
}
|
||||
|
||||
#showImage {
|
||||
min-width: 298px!important;
|
||||
}
|
||||
}
|
@@ -10,18 +10,14 @@
|
||||
|
||||
<!-- Styles -->
|
||||
<?php Stylesheet::add('public/assets/css/bootstrap.css', 'backend', 1); ?>
|
||||
<?php Stylesheet::add('public/assets/css/bootstrap-lightbox.css', 'backend', 2); ?>
|
||||
<?php Stylesheet::add('public/assets/css/bootstrap-fileupload.css', 'backend', 3); ?>
|
||||
<?php Stylesheet::add('public/assets/css/bootstrap-responsive.css', 'backend', 4); ?>
|
||||
<?php Stylesheet::add('admin/themes/default/css/default.css', 'backend', 5); ?>
|
||||
<?php Stylesheet::add('public/assets/css/bootstrap-responsive.css', 'backend', 2); ?>
|
||||
<?php Stylesheet::add('admin/themes/default/css/default.css', 'backend', 3); ?>
|
||||
<?php Stylesheet::load(); ?>
|
||||
|
||||
<!-- JavaScripts -->
|
||||
<?php Javascript::add('public/assets/js/jquery.js', 'backend', 1); ?>
|
||||
<?php Javascript::add('public/assets/js/bootstrap.js', 'backend', 2); ?>
|
||||
<?php Javascript::add('public/assets/js/bootstrap-lightbox.js', 'backend', 3); ?>
|
||||
<?php Javascript::add('public/assets/js/bootstrap-fileupload.js', 'backend', 4); ?>
|
||||
<?php Javascript::add('admin/themes/default/js/default.js', 'backend', 5); ?>
|
||||
<?php Javascript::add('admin/themes/default/js/default.js', 'backend', 3); ?>
|
||||
<?php Javascript::load(); ?>
|
||||
|
||||
<?php Action::run('admin_header'); ?>
|
||||
@@ -53,40 +49,23 @@
|
||||
<div class="row-fluid">
|
||||
|
||||
<!-- Block_sidebar -->
|
||||
|
||||
<div class="span2 monstra-menu-sidebar">
|
||||
|
||||
<div class="hidden-desktop">
|
||||
<select class="input-block-level" name="sections" id="sections">
|
||||
<?php
|
||||
Navigation::getDropdown('content');
|
||||
Navigation::getDropdown('extends');
|
||||
Navigation::getDropdown('system');
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="hidden-phone hidden-tablet">
|
||||
|
||||
<h3><?php echo __('Content', 'pages'); ?></h3>
|
||||
<ul>
|
||||
<?php Navigation::draw('content'); ?>
|
||||
</ul>
|
||||
<div class="monstra-menu-category-separator"></div>
|
||||
<?php if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) { ?>
|
||||
<h3><?php echo __('Extends', 'system'); ?></h3>
|
||||
<ul>
|
||||
<?php Navigation::draw('extends'); ?>
|
||||
</ul>
|
||||
<div class="monstra-menu-category-separator"></div>
|
||||
<?php } ?>
|
||||
<h3><?php echo __('System', 'system'); ?></h3>
|
||||
<ul>
|
||||
<?php Navigation::draw('system'); ?>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="span2 monstra-menu-sidebar hidden-phone">
|
||||
<h3><?php echo __('Content', 'pages'); ?></h3>
|
||||
<ul>
|
||||
<?php Navigation::draw('content'); ?>
|
||||
</ul>
|
||||
<div class="monstra-menu-category-separator"></div>
|
||||
<?php if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) { ?>
|
||||
<h3><?php echo __('Extends', 'system'); ?></h3>
|
||||
<ul>
|
||||
<?php Navigation::draw('extends'); ?>
|
||||
</ul>
|
||||
<div class="monstra-menu-category-separator"></div>
|
||||
<?php } ?>
|
||||
<h3><?php echo __('System', 'system'); ?></h3>
|
||||
<ul>
|
||||
<?php Navigation::draw('system'); ?>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /Block_sidebar -->
|
||||
|
||||
@@ -117,13 +96,11 @@
|
||||
|
||||
<!-- Block_footer -->
|
||||
<footer>
|
||||
<p class="pull-right">
|
||||
<p align="right">
|
||||
<span style="border-top:1px solid #E0E0E0; padding-top:10px;">
|
||||
<span class="hidden-phone">
|
||||
<a href="http://forum.monstra.org" target="_blank"><?php echo __('Official Support Forum', 'system'); ?></a> /
|
||||
<a href="http://monstra.org/documentation" target="_blank"><?php echo __('Documentation', 'system'); ?></a> /
|
||||
</span>
|
||||
© 2012 - 2014 <a href="http://monstra.org" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?>
|
||||
<a href="http://forum.monstra.org" target="_blank"><?php echo __('Official Support Forum', 'system'); ?></a> /
|
||||
<a href="http://monstra.org/documentation" target="_blank"><?php echo __('Documentation', 'system'); ?></a> /
|
||||
© 2012 - 2013 <a href="http://monstra.org" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?>
|
||||
</span>
|
||||
</p>
|
||||
</footer>
|
||||
|
@@ -17,10 +17,3 @@
|
||||
|
||||
/* Confirm delete */
|
||||
function confirmDelete(msg){var data=confirm(msg+" ?"); return data;}
|
||||
|
||||
$(document).ready(function() {
|
||||
/* DropDown Menu for Mobile Devices */
|
||||
$("#sections").change(function(){
|
||||
window.location = $('#sections option:selected').attr('rel');
|
||||
});
|
||||
});
|
||||
|
@@ -10,16 +10,14 @@
|
||||
|
||||
<!-- Styles -->
|
||||
<?php Stylesheet::add('public/assets/css/bootstrap.css', 'backend', 1); ?>
|
||||
<?php Stylesheet::add('public/assets/css/bootstrap-lightbox.css', 'backend', 2); ?>
|
||||
<?php Stylesheet::add('public/assets/css/bootstrap-responsive.css', 'backend', 3); ?>
|
||||
<?php Stylesheet::add('admin/themes/default/css/default.css', 'backend', 4); ?>
|
||||
<?php Stylesheet::add('public/assets/css/bootstrap-responsive.css', 'backend', 2); ?>
|
||||
<?php Stylesheet::add('admin/themes/default/css/default.css', 'backend', 3); ?>
|
||||
<?php Stylesheet::load(); ?>
|
||||
|
||||
<!-- JavaScripts -->
|
||||
<?php Javascript::add('public/assets/js/jquery.js', 'backend', 1); ?>
|
||||
<?php Javascript::add('public/assets/js/bootstrap.js', 'backend', 2); ?>
|
||||
<?php Javascript::add('public/assets/js/bootstrap-lightbox.js', 'backend', 3); ?>
|
||||
<?php Javascript::add('admin/themes/default/js/default.js', 'backend', 4); ?>
|
||||
<?php Javascript::add('admin/themes/default/js/default.js', 'backend', 3); ?>
|
||||
<?php Javascript::load(); ?>
|
||||
<script type="text/javascript">
|
||||
$().ready(function () {
|
||||
@@ -68,7 +66,7 @@
|
||||
<input class="input-xlarge" name="password" type="password" />
|
||||
<br />
|
||||
<?php if (isset($login_error) && $login_error !== '') { ?><div class="alert alert-error"><?php echo $login_error; ?></div><?php } ?>
|
||||
<input type="submit" name="login_submit" class="btn" value="<?php echo __('Log In', 'users'); ?>" />
|
||||
<input type="submit" name="login_submit" class="btn" value="<?php echo __('Enter', 'users'); ?>" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -83,7 +81,7 @@
|
||||
<input name="login" class="input-xlarge" type="text" value="<?php echo $user_login; ?>" />
|
||||
|
||||
<?php if (Option::get('captcha_installed') == 'true') { ?>
|
||||
<label><?php echo __('Captcha', 'users'); ?></label>
|
||||
<label><?php echo __('Captcha'); ?><label>
|
||||
<input type="text" name="answer" class="input-xlarge">
|
||||
<?php CryptCaptcha::draw(); ?>
|
||||
<?php } ?>
|
||||
|
@@ -1,66 +1,3 @@
|
||||
Monstra 2.3.0, 2013-12-19
|
||||
------------------------
|
||||
- Update Twitter Bootstrap to 2.3.2
|
||||
- Security: Added limits for login attempts #104
|
||||
- Security: Obfuscate users email to prevent spam-bots from sniffing it.
|
||||
- Core: Added ability to map Monstra Engine Directory.
|
||||
- Core: Maintenance Mode Improvements
|
||||
- Core: ORM::configure - driver options added
|
||||
- Gelato: Image.php fix for PNG files
|
||||
- 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
|
||||
- Users Plugin: login page fixes
|
||||
- Users Plugin: Deleting users - fixed by Oleg Gatseluk #158
|
||||
- Pages Plugin: General method getPages() created #123
|
||||
- Pages Plugin: page expand ajax bug #115 - fixed
|
||||
- Pages Plugin: Improved available() method to show only published pages
|
||||
- Pages Plugin: Bug with pages renaming - fixed
|
||||
- Monstra Email Templates #164
|
||||
- Localization: Major Fixes
|
||||
- Localization: PL added
|
||||
- Localization: NL added
|
||||
- .htaccess SEO improvements
|
||||
|
||||
Monstra 2.2.1, 2013-04-06
|
||||
------------------------
|
||||
- Update Gelato to 1.0.3
|
||||
- Error Handler turned off for Production environment
|
||||
- Localization: Farsi(fa) translations fixes.
|
||||
- Pages Manager: fix translates #107
|
||||
- Missing Translation on Login Page - fixed #106
|
||||
- Lithuanian flag and other languages fixes. Thanks to mbarzda
|
||||
|
||||
Monstra 2.2.0, 2013-03-25
|
||||
------------------------
|
||||
- Mobile Ready! Monstra fully responsive for mobile devices, tablets, and normal computer screens.
|
||||
- Improved Monstra Architecture!
|
||||
- New Stand-alone Monstra Library (Gelato) was created! Totally improved old classes and added new classes!
|
||||
- Monstra Library with new useful classes - ClassLoader, ErrorHandler, Log, MinifyJS, MinifyCSS, MinifyHTML, Token, Registry.
|
||||
- Adopted PSR-0 PSR-1 PSR-2
|
||||
- Localization: Farsi(fa), Magyar(hu), Français(fr), Spanish(es), Serbian(sr-yu), Slovakian(sk) translations added. Thanks to Abdulhalim, Lez, Neri, Mapadesign, Hugomano and Nakome.
|
||||
- Idiorm Updated to 1.3.0
|
||||
- jQuery Updated to 1.9.1
|
||||
- Twitter Bootstrap Updated to 2.3.0
|
||||
- Default Theme: Social Meta Tags - added.
|
||||
- Default Theme: Hook "theme_meta" - added.
|
||||
- Admin Default Theme: Added missing meta tags.
|
||||
- Improve Installer Usability. Flags Added.
|
||||
- Default Site Email added.
|
||||
- PHPMailer added.
|
||||
- Pages Manager: added ability to quickly update page status and page access.
|
||||
- Intstaller Layout: Added missing meta tags.
|
||||
- Filesmanager plugin: added ability to view images.
|
||||
- Filesmanager Plugin: forbidden types array - updated.
|
||||
- CSRF detection text - updated.
|
||||
- Engine Uri: code improvements.
|
||||
- XMLDB: Table Class - fixed select method. Thanks to DmitriyMX
|
||||
- Bootstrap CSS: Icons url - fixed.
|
||||
- Plugins Manager: buttons confirm dialog message - fixed.
|
||||
- Pages Manager: page cloning problem - fixed.
|
||||
- Localizations: translations fixes.
|
||||
|
||||
Monstra 2.1.3, 2012-12-09
|
||||
------------------------
|
||||
- Pages Plugin: New shortcodes added - page_author, page_slug, page_url page_available, page_breadcrumbs, page_date, page_content.
|
||||
@@ -274,4 +211,4 @@ Monstra 1.0.1, 2012-04-26
|
||||
|
||||
Monstra 1.0.0, 2012-04-24
|
||||
------------------------
|
||||
- Initial release
|
||||
- Initial release
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* Monstra - Content Management System.
|
||||
* Site: www.mostra.org
|
||||
* Copyright (C) 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* Copyright (C) 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* This source file is part of the Monstra Engine. More information,
|
||||
* documentation and tutorials can be found at http://monstra.org
|
||||
@@ -13,7 +13,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -39,7 +39,7 @@ class Monstra
|
||||
/**
|
||||
* The version of Monstra
|
||||
*/
|
||||
const VERSION = '2.3.0';
|
||||
const VERSION = '2.1.3';
|
||||
|
||||
/**
|
||||
* Monstra environment
|
||||
@@ -113,24 +113,14 @@ class Monstra
|
||||
* Set Gelato Display Errors to False for Production environment.
|
||||
*/
|
||||
if (Monstra::$environment == Monstra::PRODUCTION) {
|
||||
define('GELATO_DEVELOPMENT', false);
|
||||
define('GELATO_DISPLAY_ERRORS', false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Define Monstra Folder for Gelato Logs
|
||||
*/
|
||||
define ('GELATO_LOGS_PATH', LOGS);
|
||||
|
||||
/**
|
||||
* Include Gelato Library
|
||||
*/
|
||||
include ROOT . DS . 'libraries'. DS .'Gelato'. DS .'Gelato.php';
|
||||
|
||||
/**
|
||||
* Map Monstra Engine Directory
|
||||
*/
|
||||
ClassLoader::directory(ROOT . DS . 'engine' . DS);
|
||||
|
||||
/**
|
||||
* Map all Monstra Classes
|
||||
*/
|
||||
@@ -167,9 +157,6 @@ class Monstra
|
||||
|
||||
// Idiorm
|
||||
'ORM' => ROOT . DS .'libraries'. DS . 'Idiorm'. DS .'ORM.php',
|
||||
|
||||
// PHPMailer
|
||||
'PHPMailer' => ROOT . DS .'libraries'. DS . 'PHPMailer'. DS .'PHPMailer.php',
|
||||
));
|
||||
|
||||
/**
|
||||
@@ -184,14 +171,18 @@ class Monstra
|
||||
ORM::configure(MONSTRA_DB_DSN);
|
||||
ORM::configure('username', MONSTRA_DB_USER);
|
||||
ORM::configure('password', MONSTRA_DB_PASSWORD);
|
||||
ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Auto cleanup if MONSTRA_DEBUG is TRUE
|
||||
*/
|
||||
if (Monstra::$environment == Monstra::DEVELOPMENT) {
|
||||
Monstra::cleanTmp();
|
||||
|
||||
// Cleanup minify
|
||||
if (count($files = File::scan(MINIFY, array('css', 'js', 'php'))) > 0) foreach ($files as $file) File::delete(MINIFY . DS . $file);
|
||||
|
||||
// Cleanup cache
|
||||
if (count($namespaces = Dir::scan(CACHE)) > 0) foreach ($namespaces as $namespace) Dir::delete(CACHE . DS . $namespace);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -302,18 +293,6 @@ class Monstra
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean Monstra TMP folder.
|
||||
*/
|
||||
public static function cleanTmp()
|
||||
{
|
||||
// Cleanup minify
|
||||
if (count($files = File::scan(MINIFY, array('css', 'js', 'php'))) > 0) foreach ($files as $file) File::delete(MINIFY . DS . $file);
|
||||
|
||||
// Cleanup cache
|
||||
if (count($namespaces = Dir::scan(CACHE)) > 0) foreach ($namespaces as $namespace) Dir::delete(CACHE . DS . $namespace);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize Monstra Engine
|
||||
*
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -32,7 +32,6 @@ class I18n
|
||||
'el' => 'Ελληνικά',
|
||||
'en' => 'English',
|
||||
'es' => 'Español',
|
||||
'fa' => 'Farsi',
|
||||
'fi' => 'Suomi',
|
||||
'fr' => 'Français',
|
||||
'gl' => 'Galego',
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -110,86 +110,4 @@ class Navigation
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw items
|
||||
*
|
||||
* <code>
|
||||
* Navigation::draw('content');
|
||||
* Navigation::draw('top', Navigation::TOP);
|
||||
* <code>
|
||||
*
|
||||
* @param string $category Category
|
||||
* @param integer $type Type. Default is LEFT
|
||||
*/
|
||||
public static function get($category, $type = Navigation::LEFT)
|
||||
{
|
||||
// Sort items by priority
|
||||
$items = Arr::subvalSort(Navigation::$items, 'priority');
|
||||
|
||||
// Draw left navigation
|
||||
if ($type == Navigation::LEFT) {
|
||||
|
||||
// Loop trough the items
|
||||
foreach ($items as $item) {
|
||||
|
||||
// If current plugin id == selected item id then set class to current
|
||||
if (Request::get('id') == $item['id'] && $item['external'] == false) $class = 'class = "current" '; else $class = '';
|
||||
|
||||
// If current category == item category and navigation type is left them draw this item
|
||||
if ($item['category'] == $category && $item['type'] == Navigation::LEFT) {
|
||||
|
||||
// Is external item id or not ?
|
||||
if ($item['external'] == false) {
|
||||
echo '<li><a '.$class.'href="index.php?id='.$item['id'].'">'.$item['name'].'</a></li>';
|
||||
} else {
|
||||
echo '<li><a target="_blank" href="'.$item['id'].'">'.$item['name'].'</a></li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif ($type == Navigation::TOP) {
|
||||
// Draw top navigation
|
||||
foreach ($items as $item) {
|
||||
if ($item['category'] == $category && $item['type'] == Navigation::TOP) {
|
||||
if ($item['external'] == false) {
|
||||
echo '<a class="btn btn-small btn-inverse" href="index.php?id='.$item['id'].'">'.$item['name'].'</a>'.Html::nbsp(2);
|
||||
} else {
|
||||
echo '<a target="_blank" class="btn btn-small btn-inverse" href="'.$item['id'].'">'.$item['name'].'</a>'.Html::nbsp(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw dropdown items
|
||||
*
|
||||
* <code>
|
||||
* Navigation::getDropdown('content');
|
||||
* <code>
|
||||
*
|
||||
* @param string $category Category
|
||||
*/
|
||||
public static function getDropdown($category)
|
||||
{
|
||||
// Sort items by priority
|
||||
$items = Arr::subvalSort(Navigation::$items, 'priority');
|
||||
|
||||
// Loop trough the items
|
||||
foreach ($items as $item) {
|
||||
|
||||
// If current plugin id == selected item id then set class to current
|
||||
if (Request::get('id') == $item['id'] && $item['external'] == false) $class = 'selected = "selected" '; else $class = '';
|
||||
|
||||
// If current category == item category and navigation type is left them draw this item
|
||||
if ($item['category'] == $category && $item['type'] == Navigation::LEFT) {
|
||||
|
||||
// Is external item id or not ?
|
||||
if ($item['external'] == false) {
|
||||
echo '<option '.$class.'rel="index.php?id='.$item['id'].'">'.$item['name'].'</option>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -68,7 +68,7 @@ class Plugin
|
||||
$plugins = new Table('plugins');
|
||||
|
||||
// Select all plugins
|
||||
$records = $plugins->select(null, 'all', null, array('location', 'status', 'priority'), 'priority', 'ASC');
|
||||
$records = $plugins->select(null, 'all', null, array('location', 'frontend', 'backend', 'status', 'priority'), 'priority', 'ASC');
|
||||
|
||||
// Now include plugins from $records plugins array
|
||||
// If plugin is active then load it to the system.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -96,7 +96,7 @@ class Stylesheet
|
||||
}
|
||||
}
|
||||
$backend_buffer = Stylesheet::parseVariables($backend_buffer);
|
||||
file_put_contents($backend_site_css_path, MinifyCSS::process($backend_buffer));
|
||||
file_put_contents($backend_site_css_path, Minify::css($backend_buffer));
|
||||
$backend_regenerate = false;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ class Stylesheet
|
||||
}
|
||||
}
|
||||
$frontend_buffer = Stylesheet::parseVariables($frontend_buffer);
|
||||
file_put_contents($frontend_site_css_path, MinifyCSS::process($frontend_buffer));
|
||||
file_put_contents($frontend_site_css_path, Minify::css($frontend_buffer));
|
||||
$frontend_regenerate = false;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ class Stylesheet
|
||||
if (BACKEND) {
|
||||
echo '<link rel="stylesheet" href="'.Option::get('siteurl').'tmp/minify/backend_site.minify.css'.'" type="text/css" />';
|
||||
} else {
|
||||
echo '<link rel="stylesheet" href="'.Option::get('siteurl').'tmp/minify/frontend_site.minify.css'.'" type="text/css" />'."\n";
|
||||
echo '<link rel="stylesheet" href="'.Option::get('siteurl').'tmp/minify/frontend_site.minify.css'.'" type="text/css" />';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -22,7 +22,7 @@ class Security
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $token_name = 'security_token';
|
||||
public static $token_name = 'security_token';
|
||||
|
||||
/**
|
||||
* Protected constructor since this is a static class.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -176,7 +176,7 @@ class Site
|
||||
if ( ! file_exists(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $template . '.template.php') or
|
||||
filemtime(THEMES_SITE . DS . $current_theme . DS . $template .'.template.php') > filemtime(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $template . '.template.php')) {
|
||||
$buffer = file_get_contents(THEMES_SITE. DS . $current_theme . DS . $template .'.template.php');
|
||||
$buffer = MinifyHTML::process($buffer);
|
||||
$buffer = Minify::html($buffer);
|
||||
file_put_contents(MINIFY . DS . 'theme.' . $current_theme . '.minify.' . $template . '.template.php', $buffer);
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ class Site
|
||||
if ( ! File::exists(MINIFY . DS . 'theme.' . $current_theme . '.' . 'minify.index.template.php') or
|
||||
filemtime(THEMES_SITE . DS . $current_theme . DS . 'index.template.php') > filemtime(MINIFY . DS . 'theme.' . $current_theme . '.' . 'minify.index.template.php')) {
|
||||
$buffer = file_get_contents(THEMES_SITE . DS . $current_theme . DS . 'index.template.php');
|
||||
$buffer = MinifyHTML::process($buffer);
|
||||
$buffer = Minify::html($buffer);
|
||||
file_put_contents(MINIFY . DS . 'theme.' . $current_theme . '.' . 'minify.index.template.php', $buffer);
|
||||
}
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -137,11 +137,14 @@ class Uri
|
||||
// param1/param2
|
||||
if ($uri[0] !== Uri::$default_component) {
|
||||
if (isset($uri[1])) {
|
||||
|
||||
foreach ($uri as $part) {
|
||||
$data[] = $part;
|
||||
}
|
||||
|
||||
$data[0] = $uri[0];
|
||||
$data[1] = $uri[1];
|
||||
// Some more uri parts :)
|
||||
// site.ru/part1/part2/part3/part4/part5/part6/
|
||||
if (isset($uri[2])) $data[2] = $uri[2];
|
||||
if (isset($uri[3])) $data[3] = $uri[3];
|
||||
if (isset($uri[4])) $data[4] = $uri[4];
|
||||
if (isset($uri[5])) $data[5] = $uri[5];
|
||||
} else { // default
|
||||
$data[0] = $uri[0];
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -546,7 +546,7 @@ class Table
|
||||
if ($order_by == 'id') {
|
||||
$records[$count]['sort'] = (int) $vars['id'];
|
||||
} else {
|
||||
$records[$count]['sort'] = (string) $vars[$order_by];
|
||||
$records[$count]['sort'] = (string) $value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -807,7 +807,6 @@ class Table
|
||||
|
||||
return $c;
|
||||
}
|
||||
return $a;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -854,7 +853,7 @@ class Table
|
||||
*/
|
||||
protected static function _save($table)
|
||||
{
|
||||
$dom = new DOMDocument('1.0', 'utf-8');
|
||||
$dom = new DOMDocument('1.0');
|
||||
$dom->preserveWhiteSpace = false;
|
||||
|
||||
// Save new xml data to xml file only if loadXML successful.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -1,10 +1,19 @@
|
||||
<?php defined('MONSTRA_ACCESS') or die('No direct script access.');
|
||||
|
||||
/**
|
||||
* Monstra requires PHP 5.2.3 or greater
|
||||
* Report All Errors
|
||||
*
|
||||
* By setting error reporting to -1, we essentially force PHP to report
|
||||
* every error, and this is guranteed to show every error on future
|
||||
* releases of PHP. This allows everything to be fixed early!
|
||||
*/
|
||||
if (version_compare(PHP_VERSION, "5.2.3", "<")) {
|
||||
exit("Monstra requires PHP 5.2.3 or greater.");
|
||||
error_reporting(-1);
|
||||
|
||||
/**
|
||||
* Monstra requires PHP 5.2.0 or greater
|
||||
*/
|
||||
if (version_compare(PHP_VERSION, "5.2.0", "<")) {
|
||||
exit("Monstra requires PHP 5.2.0 or greater.");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -21,16 +30,7 @@ include ROOT . DS .'engine'. DS .'Monstra.php';
|
||||
* Monstra::STAGING - The staging environment.
|
||||
* Monstra::PRODUCTION - The production environment.
|
||||
*/
|
||||
Monstra::$environment = Monstra::PRODUCTION;
|
||||
|
||||
/**
|
||||
* Report Errors
|
||||
*/
|
||||
if (Monstra::$environment == Monstra::PRODUCTION) {
|
||||
error_reporting(0);
|
||||
} else {
|
||||
error_reporting(-1);
|
||||
}
|
||||
Monstra::$environment = Monstra::DEVELOPMENT;
|
||||
|
||||
/**
|
||||
* Initialize Monstra
|
||||
|
19
index.php
19
index.php
@@ -9,7 +9,7 @@
|
||||
* @package Monstra
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -21,6 +21,16 @@ define('ROOT', rtrim(dirname(__FILE__), '\\/'));
|
||||
define('BACKEND', false);
|
||||
define('MONSTRA_ACCESS', true);
|
||||
|
||||
/* TEMP CODE BEGIN */
|
||||
function byteFormat($size)
|
||||
{
|
||||
$unit = array('b', 'kb', 'mb', 'gb', 'tb', 'pb');
|
||||
|
||||
return @round($size/pow(1024, ($i=floor(log($size, 1024)))), 2).' '.$unit[$i];
|
||||
}
|
||||
$_start = memory_get_usage();
|
||||
/* TEMP CODE END */
|
||||
|
||||
// First check for installer then go
|
||||
if (file_exists('install.php')) {
|
||||
if (isset($_GET['install'])) {
|
||||
@@ -45,9 +55,6 @@ if (file_exists('install.php')) {
|
||||
if ((Session::exists('user_role')) and (Session::get('user_role') == 'admin' or Session::get('user_role') == 'editor')) {
|
||||
// Monstra show this page :)
|
||||
} else {
|
||||
header('HTTP/1.1 503 Service Temporarily Unavailable');
|
||||
header('Status: 503 Service Temporarily Unavailable');
|
||||
header('Retry-After: 600');
|
||||
die (Text::toHtml(Option::get('maintenance_message')));
|
||||
}
|
||||
}
|
||||
@@ -64,3 +71,7 @@ if (file_exists('install.php')) {
|
||||
// Flush (send) the output buffer and turn off output buffering
|
||||
ob_end_flush();
|
||||
}
|
||||
|
||||
/* TEMP CODE BEGIN */
|
||||
echo byteFormat(memory_get_usage() - $_start);
|
||||
/* TEMP CODE END */
|
||||
|
82
install.php
82
install.php
@@ -10,6 +10,9 @@
|
||||
if ( ! defined('BACKEND')) define('BACKEND', false);
|
||||
if ( ! defined('MONSTRA_ACCESS')) define('MONSTRA_ACCESS', true);
|
||||
|
||||
// Set default timezone
|
||||
$system_timezone = date_default_timezone_get();
|
||||
|
||||
// Load bootstrap file
|
||||
require_once(ROOT . DS . 'engine' . DS . '_init.php');
|
||||
|
||||
@@ -29,7 +32,7 @@
|
||||
$dir_array = array('public', 'storage', 'backups', 'tmp');
|
||||
|
||||
// Languages array
|
||||
$languages_array = array('en', 'fr', 'de', 'it', 'es', 'lt', 'pl', 'pt-br', 'ru', 'uk', 'hu', 'fa' , 'sk', 'nl', 'sr-yu');
|
||||
$languages_array = array('en', 'ru', 'lt', 'it', 'de', 'pt-br', 'uk');
|
||||
|
||||
// Select Monstra language
|
||||
if (Request::get('language')) {
|
||||
@@ -74,7 +77,6 @@
|
||||
'slogan' => __('Site slogan', 'system'),
|
||||
'defaultpage' => 'home',
|
||||
'timezone' => Request::post('timezone'),
|
||||
'system_email' => Request::post('email'),
|
||||
'theme_site_name' => 'default',
|
||||
'theme_admin_name' => 'default'));
|
||||
|
||||
@@ -121,9 +123,11 @@
|
||||
}
|
||||
|
||||
.install-languages {
|
||||
margin: 0 auto 15px;
|
||||
text-align: center;
|
||||
width: 390px;
|
||||
margin: 0 auto;
|
||||
float: none!important;
|
||||
margin-bottom:5px;
|
||||
padding-right:20px;
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
.install-block {
|
||||
@@ -165,54 +169,26 @@
|
||||
color: #F74C18;
|
||||
}
|
||||
|
||||
.install-languages a {
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
.language-link {
|
||||
color:#7A7A7C;
|
||||
}
|
||||
|
||||
.language-link img {
|
||||
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
|
||||
filter: alpha(opacity=30);
|
||||
-moz-opacity:0.3;
|
||||
-khtml-opacity: 0.3;
|
||||
opacity: 0.3;
|
||||
.language-link+.language-link:before {
|
||||
color: #ccc;
|
||||
content: ' | ';
|
||||
}
|
||||
|
||||
.language-link-current img{
|
||||
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
||||
filter: alpha(opacity=100);
|
||||
-moz-opacity:1.0;
|
||||
-khtml-opacity: 1.0;
|
||||
opacity: 1.0;
|
||||
.language-link:hover {
|
||||
color:#000;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.install-languages a img:hover {
|
||||
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
||||
filter: alpha(opacity=100);
|
||||
-moz-opacity:1.0;
|
||||
-khtml-opacity: 1.0;
|
||||
opacity: 1.0;
|
||||
.language-link-current {
|
||||
color:#000;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
|
||||
.input-xlarge {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.install-languages {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.install-languages a {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript" src="<?php echo $site_url; ?>public/assets/js/jquery.js"></script>
|
||||
<script type="text/javascript" src="<?php echo $site_url; ?>public/assets/js/bootstrap.js"></script>
|
||||
|
||||
</head>
|
||||
<body class="install-body">
|
||||
|
||||
@@ -268,8 +244,8 @@
|
||||
?>
|
||||
|
||||
<div class="install-languages">
|
||||
<?php foreach ($languages_array as $lang_code) { ?>
|
||||
<a data-placement="top" class="language-link<?php if (Option::get('language') == $lang_code) echo ' language-link-current';?>" title="<?php echo I18n::$locales[$lang_code]; ?>" href="<?php echo $site_url.'?language=' . $lang_code; ?>"><img src="<?php echo $site_url; ?>public/assets/img/flags/<?php echo $lang_code?>.png" alt="<?php echo $lang_code?>"></a>
|
||||
<?php foreach ($languages_array as $lang_code) {?>
|
||||
<a class="language-link<?php if (Option::get('language') == $lang_code) echo ' language-link-current';?>" href="<?php echo $site_url.'?language=' . $lang_code; ?>"><?php echo $lang_code?></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="install-block">
|
||||
@@ -288,10 +264,10 @@
|
||||
<input type="hidden" name="backups" value="<?php echo $errors['backups']; ?>" />
|
||||
<input type="hidden" name="tmp" value="<?php echo $errors['tmp']; ?>" />
|
||||
|
||||
<label><?php echo __('Site Name', 'system'); ?></label>
|
||||
<label><?php echo __('Site name', 'system'); ?></label>
|
||||
<input class="input-xlarge" name="sitename" type="text" value="<?php if (Request::post('sitename')) echo Html::toText(Request::post('sitename')); ?>" />
|
||||
<br />
|
||||
<label><?php echo __('Site Url', 'system'); ?></label>
|
||||
<label><?php echo __('Site url', 'system'); ?></label>
|
||||
<input class="input-xlarge" name="siteurl" type="text" value="<?php echo Html::toText($site_url); ?>" />
|
||||
<br />
|
||||
<label><?php echo __('Username', 'users'); ?></label>
|
||||
@@ -467,13 +443,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="install-block-footer">
|
||||
<div style="text-align:center;">
|
||||
<span class="small-grey-text">© 2012 - 2014 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span>
|
||||
<div style="text-align:center">
|
||||
<span class="small-grey-text">© 2012 - 2013 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('.language-link').tooltip();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -22,14 +22,14 @@ class Cache
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $cache_dir = '';
|
||||
public static $cache_dir = '';
|
||||
|
||||
/**
|
||||
* Cache file ext
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $cache_file_ext = 'txt';
|
||||
public static $cache_file_ext = 'txt';
|
||||
|
||||
/**
|
||||
* Cache life time (in seconds)
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -58,7 +58,7 @@ class ClassLoader
|
||||
|
||||
/**
|
||||
* Add class to mapping.
|
||||
*
|
||||
*
|
||||
* <code>
|
||||
* ClassLoader::mapClass('ClassName', 'path/to/class');
|
||||
* </code>
|
||||
@@ -74,7 +74,7 @@ class ClassLoader
|
||||
|
||||
/**
|
||||
* Add multiple classes to mapping.
|
||||
*
|
||||
*
|
||||
* <code>
|
||||
* ClassLoader::mapClasses(array('ClassName' => 'path/to/class','ClassName' => 'path/to/class'));
|
||||
* </code>
|
||||
@@ -91,7 +91,7 @@ class ClassLoader
|
||||
|
||||
/**
|
||||
* Adds a PSR-0 directory path.
|
||||
*
|
||||
*
|
||||
* <code>
|
||||
* ClassLoader::directory('path/to/classes');
|
||||
* </code>
|
||||
@@ -106,7 +106,7 @@ class ClassLoader
|
||||
|
||||
/**
|
||||
* Registers a namespace.
|
||||
*
|
||||
*
|
||||
* <code>
|
||||
* ClassLoader::registerNamespace('Namespace', '/path/to/namespace/');
|
||||
* </code>
|
||||
@@ -122,9 +122,9 @@ class ClassLoader
|
||||
|
||||
/**
|
||||
* Set an alias for a class.
|
||||
*
|
||||
*
|
||||
* <code>
|
||||
* ClassLoader::alias('ClassNameAlias', 'ClassName');
|
||||
* ClassLoader::registerNamespace('ClassNameAlias', 'ClassName');
|
||||
* </code>
|
||||
*
|
||||
* @access public
|
||||
@@ -171,7 +171,7 @@ class ClassLoader
|
||||
|
||||
/**
|
||||
* Autoloader.
|
||||
*
|
||||
*
|
||||
* <code>
|
||||
* ClassLoader::load();
|
||||
* </code>
|
||||
@@ -222,15 +222,4 @@ class ClassLoader
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the Gelato ClassLoader to the SPL autoload stack.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function register()
|
||||
{
|
||||
spl_autoload_register('ClassLoader::load', true);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -18,25 +18,6 @@
|
||||
class ErrorHandler
|
||||
{
|
||||
|
||||
/**
|
||||
* Error Levels
|
||||
*/
|
||||
public static $levels = array (
|
||||
E_ERROR => 'Fatal Error',
|
||||
E_PARSE => 'Parse Error',
|
||||
E_COMPILE_ERROR => 'Compile Error',
|
||||
E_COMPILE_WARNING => 'Compile Warning',
|
||||
E_STRICT => 'Strict Mode Error',
|
||||
E_NOTICE => 'Notice',
|
||||
E_WARNING => 'Warning',
|
||||
E_RECOVERABLE_ERROR => 'Recoverable Error',
|
||||
E_USER_NOTICE => 'Notice',
|
||||
E_USER_WARNING => 'Warning',
|
||||
E_USER_ERROR => 'Error',
|
||||
/*E_DEPRECATED => 'Deprecated',*/ /* PHP 5.3 only */
|
||||
/*E_USER_DEPRECATED => 'Deprecated'*/ /* PHP 5.3 only */
|
||||
);
|
||||
|
||||
/**
|
||||
* Protected constructor since this is a static class.
|
||||
*
|
||||
@@ -99,35 +80,11 @@ class ErrorHandler
|
||||
* @param integer $line The line number where the error occurred
|
||||
* @return boolean
|
||||
*/
|
||||
public static function error($code, $message, $file, $line)
|
||||
public static function errorHandler($code, $message, $file, $line)
|
||||
{
|
||||
// If isset error_reporting and $code then throw new error exception
|
||||
if ((error_reporting() & $code) !== 0) {
|
||||
|
||||
/**
|
||||
* Dont thow NOTICE exception for PRODUCTION Environment. Just write to log.
|
||||
*/
|
||||
if (GELATO_DEVELOPMENT == false && $code == 8) {
|
||||
|
||||
// Get exception info
|
||||
$error['code'] = $code;
|
||||
$error['message'] = $message;
|
||||
$error['file'] = $file;
|
||||
$error['line'] = $line;
|
||||
$error['type'] = 'ErrorException: ';
|
||||
|
||||
$codes = array (
|
||||
E_USER_NOTICE => 'Notice',
|
||||
);
|
||||
|
||||
$error['type'] .= in_array($error['code'], array_keys($codes)) ? $codes[$error['code']] : 'Unknown Error';
|
||||
|
||||
// Write to log
|
||||
Log::write("{$error['type']}: {$error['message']} in {$error['file']} at line {$error['line']}");
|
||||
|
||||
} else {
|
||||
throw new ErrorException($message, $code, 0, $file, $line);
|
||||
}
|
||||
throw new ErrorException($message, $code, 0, $file, $line);
|
||||
}
|
||||
|
||||
// Don't execute PHP internal error handler
|
||||
@@ -213,7 +170,7 @@ class ErrorHandler
|
||||
if (isset($entry['file'])) {
|
||||
$location['file'] = $entry['file'];
|
||||
$location['line'] = $entry['line'];
|
||||
$location['code'] = self::highlightCode($entry['file'], $entry['line']);
|
||||
$location['code'] = static::highlightCode($entry['file'], $entry['line']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -231,9 +188,9 @@ class ErrorHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert errors not caught by the error handler to ErrorExceptions.
|
||||
* Convert errors not caught by the errorHandler to ErrorExceptions.
|
||||
*/
|
||||
public static function fatal()
|
||||
public static function fatalErrorHandler()
|
||||
{
|
||||
$e = error_get_last();
|
||||
|
||||
@@ -253,54 +210,70 @@ class ErrorHandler
|
||||
public static function exception($exception)
|
||||
{
|
||||
try {
|
||||
|
||||
// Empty output buffers
|
||||
|
||||
while(ob_get_level() > 0) ob_end_clean();
|
||||
|
||||
// Get exception info
|
||||
|
||||
$error['code'] = $exception->getCode();
|
||||
$error['message'] = $exception->getMessage();
|
||||
$error['file'] = $exception->getFile();
|
||||
$error['line'] = $exception->getLine();
|
||||
|
||||
// Determine error type
|
||||
|
||||
if ($exception instanceof ErrorException) {
|
||||
$error['type'] = 'ErrorException: ';
|
||||
$error['type'] .= in_array($error['code'], array_keys(ErrorHandler::$levels)) ? ErrorHandler::$levels[$error['code']] : 'Unknown Error';
|
||||
|
||||
$codes = array
|
||||
(
|
||||
E_ERROR => 'Fatal Error',
|
||||
E_PARSE => 'Parse Error',
|
||||
E_COMPILE_ERROR => 'Compile Error',
|
||||
E_COMPILE_WARNING => 'Compile Warning',
|
||||
E_STRICT => 'Strict Mode Error',
|
||||
E_NOTICE => 'Notice',
|
||||
E_WARNING => 'Warning',
|
||||
E_RECOVERABLE_ERROR => 'Recoverable Error',
|
||||
/*E_DEPRECATED => 'Deprecated',*/
|
||||
E_USER_NOTICE => 'Notice',
|
||||
E_USER_WARNING => 'Warning',
|
||||
E_USER_ERROR => 'Error',
|
||||
/*E_USER_DEPRECATED => 'Deprecated'*/
|
||||
);
|
||||
|
||||
$error['type'] .= in_array($error['code'], array_keys($codes)) ? $codes[$error['code']] : 'Unknown Error';
|
||||
} else {
|
||||
$error['type'] = get_class($exception);
|
||||
}
|
||||
|
||||
// Write to log
|
||||
Log::write("{$error['type']}: {$error['message']} in {$error['file']} at line {$error['line']}");
|
||||
// @todo Write to error log
|
||||
|
||||
/*if () {
|
||||
Write here
|
||||
}*/
|
||||
|
||||
// Send headers and output
|
||||
@header('Content-Type: text/html; charset=UTF-8');
|
||||
|
||||
if (GELATO_DEVELOPMENT) {
|
||||
|
||||
if (GELATO_DISPLAY_ERRORS) {
|
||||
$error['backtrace'] = $exception->getTrace();
|
||||
|
||||
if ($exception instanceof ErrorException) {
|
||||
$error['backtrace'] = array_slice($error['backtrace'], 1); //Remove call to error handler from backtrace
|
||||
}
|
||||
|
||||
$error['backtrace'] = self::formatBacktrace($error['backtrace']);
|
||||
$error['highlighted'] = self::highlightCode($error['file'], $error['line']);
|
||||
$error['backtrace'] = static::formatBacktrace($error['backtrace']);
|
||||
$error['highlighted'] = static::highlightCode($error['file'], $error['line']);
|
||||
|
||||
@header('HTTP/1.1 500 Internal Server Error');
|
||||
Response::status(500);
|
||||
include 'Resources/Views/Errors/exception.php';
|
||||
|
||||
} else {
|
||||
|
||||
@header('HTTP/1.1 500 Internal Server Error');
|
||||
Response::status(500);
|
||||
include 'Resources/Views/Errors/production.php';
|
||||
|
||||
}
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
||||
// Empty output buffers
|
||||
while(ob_get_level() > 0) ob_end_clean();
|
||||
|
||||
echo $e->getMessage() . ' in ' . $e->getFile() . ' (line ' . $e->getLine() . ').';
|
||||
|
@@ -11,16 +11,6 @@
|
||||
font-size:14px;
|
||||
font-family:Verdana, Arial, Helvetica, "Nimbus Sans", FreeSans, Malayalam, sans-serif;
|
||||
margin:20px auto;
|
||||
|
||||
-webkit-box-shadow: 1px 1px 18px rgba(50, 50, 50, 0.75);
|
||||
-moz-box-shadow: 1px 1px 18px rgba(50, 50, 50, 0.75);
|
||||
box-shadow: 1px 1px 18px rgba(50, 50, 50, 0.75);
|
||||
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#gelato-error pre {
|
||||
@@ -41,13 +31,6 @@
|
||||
font-size:24px;
|
||||
font-weight:700;
|
||||
padding:10px;
|
||||
|
||||
-moz-border-radius-topleft: 5px;
|
||||
-webkit-border-top-left-radius: 5px;
|
||||
border-top-left-radius: 5px;
|
||||
-moz-border-radius-topright: 5px;
|
||||
-webkit-border-top-right-radius: 5px;
|
||||
border-top-right-radius: 5px;
|
||||
}
|
||||
|
||||
#gelato-error .body {
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -18,46 +18,22 @@
|
||||
/**
|
||||
* The version of Gelato
|
||||
*/
|
||||
define('GELATO_VERSION', '1.0.3');
|
||||
|
||||
/**
|
||||
* Define __DIR__ constant for PHP 5.2.x
|
||||
*/
|
||||
if ( ! defined('__DIR__')) {
|
||||
define('__DIR__', dirname(__FILE__));
|
||||
}
|
||||
define('GELATO_VERSION', '1.0.0');
|
||||
|
||||
/**
|
||||
* Display Gelato Errors or not ?
|
||||
*/
|
||||
if ( ! defined('GELATO_DEVELOPMENT')) {
|
||||
define('GELATO_DEVELOPMENT', true);
|
||||
if ( ! defined('GELATO_DISPLAY_ERRORS')) {
|
||||
define('GELATO_DISPLAY_ERRORS', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use Gelato Class Loader or not ?
|
||||
* Display Gelato Autoloader or not ?
|
||||
*/
|
||||
if ( ! defined('GELATO_CLASS_LOADER')) {
|
||||
define('GELATO_CLASS_LOADER', true);
|
||||
if ( ! defined('GELATO_AUTOLOADER')) {
|
||||
define('GELATO_AUTOLOADER', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load Gelato Logger
|
||||
*/
|
||||
require_once __DIR__ . '/Log/Log.php';
|
||||
|
||||
/**
|
||||
* Use Gelato Logger default path or not ?
|
||||
*/
|
||||
if ( ! defined('GELATO_LOGS_PATH')) {
|
||||
define('GELATO_LOGS_PATH', __DIR__. '/_logs');
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure Gelato Logger
|
||||
*/
|
||||
Log::configure('path', GELATO_LOGS_PATH);
|
||||
|
||||
/**
|
||||
* Load Gelato Error Handler
|
||||
*/
|
||||
@@ -66,12 +42,12 @@ require_once __DIR__ . '/ErrorHandler/ErrorHandler.php';
|
||||
/**
|
||||
* Set Error Handler
|
||||
*/
|
||||
set_error_handler('ErrorHandler::error');
|
||||
set_error_handler('ErrorHandler::errorHandler');
|
||||
|
||||
/**
|
||||
* Set Fatal Error Handler
|
||||
*/
|
||||
register_shutdown_function('ErrorHandler::fatal');
|
||||
register_shutdown_function('ErrorHandler::fatalErrorHandler');
|
||||
|
||||
/**
|
||||
* Set Exception Handler
|
||||
@@ -100,9 +76,7 @@ ClassLoader::mapClasses(array(
|
||||
'Html' => __DIR__.'/Html/Html.php',
|
||||
'Image' => __DIR__.'/Image/Image.php',
|
||||
'Inflector' => __DIR__.'/Inflector/Inflector.php',
|
||||
'MinifyCSS' => __DIR__.'/Minify/MinifyCSS.php',
|
||||
'MinifyHTML' => __DIR__.'/Minify/MinifyHTML.php',
|
||||
'MinifyJS' => __DIR__.'/Minify/MinifyJS.php',
|
||||
'Minify' => __DIR__.'/Minify/Minify.php',
|
||||
'Notification' => __DIR__.'/Notification/Notification.php',
|
||||
'Number' => __DIR__.'/Number/Number.php',
|
||||
'Registry' => __DIR__.'/Registry/Registry.php',
|
||||
@@ -117,8 +91,8 @@ ClassLoader::mapClasses(array(
|
||||
));
|
||||
|
||||
/**
|
||||
* Register Gelato Class Loader
|
||||
* Register Gelato Autoloader
|
||||
*/
|
||||
if (GELATO_CLASS_LOADER) {
|
||||
ClassLoader::register();
|
||||
if (GELATO_AUTOLOADER) {
|
||||
spl_autoload_register('ClassLoader::load');
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -28,13 +28,6 @@ class Html
|
||||
'accept', 'tabindex', 'accesskey', 'alt', 'title', 'class',
|
||||
'style', 'selected', 'checked', 'readonly', 'disabled',
|
||||
);
|
||||
|
||||
/**
|
||||
* The registered custom macros.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $macros = array();
|
||||
|
||||
/**
|
||||
* Protected constructor since this is a static class.
|
||||
@@ -286,56 +279,7 @@ class Html
|
||||
$attributes['alt'] = (isset($attributes['alt'])) ? $attributes['alt'] : pathinfo($file, PATHINFO_FILENAME);
|
||||
|
||||
return '<img'.Html::attributes($attributes).' />';
|
||||
}
|
||||
|
||||
/**
|
||||
* Obfuscate an e-mail address to prevent spam-bots from sniffing it.
|
||||
*
|
||||
* <code>
|
||||
* echo Html::email('gelato@monstra.org');
|
||||
* </code>
|
||||
*
|
||||
* @param string $email
|
||||
* @return string
|
||||
*/
|
||||
public static function email($email)
|
||||
{
|
||||
return str_replace('@', '@', Html::obfuscate($email));
|
||||
}
|
||||
|
||||
/**
|
||||
* Obfuscate a string to prevent spam-bots from sniffing it.
|
||||
*
|
||||
* This method obfuscate the value, randomly convert each
|
||||
* letter to its entity or hexadecimal representation, keeping a
|
||||
* bot from sniffing the randomly obfuscated letters.
|
||||
*
|
||||
* <code>
|
||||
* echo Html::obfuscate('gelato@monstra.org');
|
||||
* </code>
|
||||
*
|
||||
* @param string $value
|
||||
* @return string
|
||||
*/
|
||||
public static function obfuscate($value)
|
||||
{
|
||||
$safe = '';
|
||||
|
||||
foreach (str_split($value) as $letter) {
|
||||
switch (rand(1, 3)) {
|
||||
case 1:
|
||||
$safe .= '&#'.ord($letter).';';
|
||||
break;
|
||||
case 2:
|
||||
$safe .= '&#x'.dechex(ord($letter)).';';
|
||||
break;
|
||||
case 3:
|
||||
$safe .= $letter;
|
||||
}
|
||||
}
|
||||
|
||||
return $safe;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert html to plain text
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -173,10 +173,9 @@ class Image
|
||||
public function resize($width, $height = null, $aspect_ratio = null)
|
||||
{
|
||||
// Redefine vars
|
||||
$width = (int) $width;
|
||||
$height = ($height === null) ? null : (int) $height;
|
||||
$width = (int) $width;
|
||||
$height = ($height === null) ? null : (int) $height;
|
||||
$aspect_ratio = ($aspect_ratio === null) ? null : (int) $aspect_ratio;
|
||||
$xpos = $ypos = 0;
|
||||
|
||||
// Resizes the image to {$width}% of the original size
|
||||
if ($height === null) {
|
||||
@@ -187,18 +186,13 @@ class Image
|
||||
} else {
|
||||
|
||||
// Resizes the image to the smalles possible dimension while maintaining aspect ratio
|
||||
if ($aspect_ratio === Image::AUTO || $aspect_ratio === null) {
|
||||
if ($aspect_ratio === Image::AUTO) {
|
||||
|
||||
// Calculate smallest size based on given height and width while maintaining aspect ratio
|
||||
$percentage = min(($width / $this->width), ($height / $this->height));
|
||||
|
||||
$new_width = round($this->width * $percentage);
|
||||
$new_height = round($this->height * $percentage);
|
||||
|
||||
if ($aspect_ratio === null) {
|
||||
$xpos = (int)(($width - $new_width) / 2);
|
||||
$ypos = (int)(($height - $new_height) / 2);
|
||||
}
|
||||
|
||||
// Resizes the image using the width to maintain aspect ratio
|
||||
} elseif ($aspect_ratio === Image::WIDTH) {
|
||||
@@ -222,28 +216,24 @@ class Image
|
||||
}
|
||||
}
|
||||
|
||||
$old_image = $this->image;
|
||||
|
||||
if ($aspect_ratio === null) {
|
||||
$this->image = imagecreatetruecolor($width, $height);
|
||||
} else {
|
||||
$this->image = imagecreatetruecolor($new_width, $new_height);
|
||||
}
|
||||
|
||||
if ($this->type === IMAGETYPE_PNG) {
|
||||
$bgcolor = imagecolorallocatealpha($this->image, 0, 0, 0, 127);
|
||||
} else {
|
||||
$bgcolor = imagecolorallocate($this->image, 255, 255, 255);
|
||||
}
|
||||
|
||||
imagefill($this->image, 0, 0, $bgcolor);
|
||||
// Create a new true color image width new width and height
|
||||
$resized = imagecreatetruecolor($new_width, $new_height);
|
||||
|
||||
// Copy and resize part of an image with resampling
|
||||
imagecopyresampled($this->image, $old_image, $xpos, $ypos, 0, 0, $new_width, $new_height, $this->width, $this->height);
|
||||
imagecopyresampled($resized, $this->image, 0, 0, 0, 0, $new_width, $new_height, $this->width, $this->height);
|
||||
|
||||
// Destroy an image
|
||||
imagedestroy($old_image);
|
||||
|
||||
imagedestroy($this->image);
|
||||
|
||||
// Create a new true color image width new width and height
|
||||
$this->image = imagecreatetruecolor($new_width, $new_height);
|
||||
|
||||
// Copy and resize part of an image with resampling
|
||||
imagecopyresampled($this->image, $resized, 0, 0, 0, 0, $new_width, $new_height, $new_width, $new_height);
|
||||
|
||||
// Destroy an image
|
||||
imagedestroy($resized);
|
||||
|
||||
// Save new width and height
|
||||
$this->width = $new_width;
|
||||
$this->height = $new_height;
|
||||
@@ -269,28 +259,32 @@ class Image
|
||||
// Redefine vars
|
||||
$width = (int) $width;
|
||||
$height = (int) $height;
|
||||
$x = (int) $x;
|
||||
$y = (int) $y;
|
||||
$x = (int) $x;
|
||||
$y = (int) $y;
|
||||
|
||||
// Calculate
|
||||
if ($x + $width > $this->width) $width = $this->width - $x;
|
||||
if ($y + $height > $this->height) $height = $this->height - $y;
|
||||
if ($width <= 0 || $height <= 0) return false;
|
||||
|
||||
$old_image = $this->image;
|
||||
|
||||
// Create a new true color image
|
||||
$this->image = imagecreatetruecolor($width, $height);
|
||||
|
||||
$transparent = imagecolorallocatealpha($this->image, 0, 0, 0, 127);
|
||||
imagefill($this->image, 0, 0, $transparent);
|
||||
$crop = imagecreatetruecolor($width, $height);
|
||||
|
||||
// Copy and resize part of an image with resampling
|
||||
imagecopyresampled($this->image, $old_image, 0, 0, $x, $y, $width, $height, $width, $height);
|
||||
imagecopyresampled($crop, $this->image, 0, 0, $x, $y, $this->width, $this->height, $this->width, $this->height);
|
||||
|
||||
// Destroy an image
|
||||
imagedestroy($old_image);
|
||||
|
||||
imagedestroy($this->image);
|
||||
|
||||
// Create a new true color image
|
||||
$this->image = imagecreatetruecolor($width, $height);
|
||||
|
||||
// Copy and resize part of an image with resampling
|
||||
imagecopyresampled($this->image, $crop, 0, 0, 0, 0, $width, $height, $width, $height);
|
||||
|
||||
// Destroy an image
|
||||
imagedestroy($crop);
|
||||
|
||||
// Save new width and height
|
||||
$this->width = $width;
|
||||
$this->height = $height;
|
||||
@@ -659,4 +653,3 @@ class Image
|
||||
}
|
||||
|
||||
}
|
||||
code
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -1,63 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Gelato Library
|
||||
*
|
||||
* This source file is part of the Gelato Library. More information,
|
||||
* documentation and tutorials can be found at http://gelato.monstra.org
|
||||
*
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class Log
|
||||
{
|
||||
|
||||
/**
|
||||
* Path to the logs.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $path = '';
|
||||
|
||||
/**
|
||||
* Protected constructor since this is a static class.
|
||||
*
|
||||
* @access protected
|
||||
*/
|
||||
protected function __construct()
|
||||
{
|
||||
// Nothing here
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure Log
|
||||
*
|
||||
* @access public
|
||||
* @param string $setting The setting
|
||||
* @param string $value The value
|
||||
*/
|
||||
public static function configure($setting, $value)
|
||||
{
|
||||
if (property_exists("log", $setting)) Log::$$setting = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes message to log.
|
||||
*
|
||||
* @access public
|
||||
* @param string $message The message to write to the log
|
||||
* @return boolean
|
||||
*/
|
||||
public static function write($message)
|
||||
{
|
||||
return (bool) file_put_contents(rtrim(Log::$path, '/') . '/' . gmdate('Y_m_d') . '.log',
|
||||
'[' . gmdate('d-M-Y H:i:s') . '] ' . $message . PHP_EOL,
|
||||
FILE_APPEND);
|
||||
}
|
||||
}
|
93
libraries/Gelato/Minify/Minify.php
Normal file
93
libraries/Gelato/Minify/Minify.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Gelato Library
|
||||
*
|
||||
* This source file is part of the Gelato Library. More information,
|
||||
* documentation and tutorials can be found at http://gelato.monstra.org
|
||||
*
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class Minify
|
||||
{
|
||||
/**
|
||||
* Protected constructor since this is a static class.
|
||||
*
|
||||
* @access protected
|
||||
*/
|
||||
protected function __construct()
|
||||
{
|
||||
// Nothing here
|
||||
}
|
||||
|
||||
/**
|
||||
* Minify html
|
||||
*
|
||||
* <code>
|
||||
* echo Minify::html($buffer);
|
||||
* </code>
|
||||
*
|
||||
* @param string $buffer html
|
||||
* @return string
|
||||
*/
|
||||
public static function html($buffer)
|
||||
{
|
||||
return preg_replace('/^\\s+|\\s+$/m', '', $buffer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Minify css
|
||||
*
|
||||
* <code>
|
||||
* echo Minify::css($buffer);
|
||||
* </code>
|
||||
*
|
||||
* @param string $buffer css
|
||||
* @return string
|
||||
*/
|
||||
public static function css($buffer)
|
||||
{
|
||||
// Remove comments
|
||||
$buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer);
|
||||
|
||||
// Remove tabs, spaces, newlines, etc.
|
||||
$buffer = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $buffer);
|
||||
|
||||
// Preserve empty comment after '>' http://www.webdevout.net/css-hacks#in_css-selectors
|
||||
$buffer = preg_replace('@>/\\*\\s*\\*/@', '>/*keep*/', $buffer);
|
||||
|
||||
// Preserve empty comment between property and value
|
||||
// http://css-discuss.incutio.com/?page=BoxModelHack
|
||||
$buffer = preg_replace('@/\\*\\s*\\*/\\s*:@', '/*keep*/:', $buffer);
|
||||
$buffer = preg_replace('@:\\s*/\\*\\s*\\*/@', ':/*keep*/', $buffer);
|
||||
|
||||
// Remove ws around { } and last semicolon in declaration block
|
||||
$buffer = preg_replace('/\\s*{\\s*/', '{', $buffer);
|
||||
$buffer = preg_replace('/;?\\s*}\\s*/', '}', $buffer);
|
||||
|
||||
// Remove ws surrounding semicolons
|
||||
$buffer = preg_replace('/\\s*;\\s*/', ';', $buffer);
|
||||
|
||||
// Remove ws around urls
|
||||
$buffer = preg_replace('/url\\(\\s*([^\\)]+?)\\s*\\)/x', 'url($1)', $buffer);
|
||||
|
||||
// Remove ws between rules and colons
|
||||
$buffer = preg_replace('/\\s*([{;])\\s*([\\*_]?[\\w\\-]+)\\s*:\\s*(\\b|[#\'"])/x', '$1$2:$3', $buffer);
|
||||
|
||||
// Minimize hex colors
|
||||
$buffer = preg_replace('/([^=])#([a-f\\d])\\2([a-f\\d])\\3([a-f\\d])\\4([\\s;\\}])/i', '$1#$2$3$4$5', $buffer);
|
||||
|
||||
// Replace any ws involving newlines with a single newline
|
||||
$buffer = preg_replace('/[ \\t]*\\n+\\s*/', "\n", $buffer);
|
||||
|
||||
return $buffer;
|
||||
}
|
||||
|
||||
}
|
@@ -1,255 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Gelato Library
|
||||
*
|
||||
* This source file is part of the Gelato Library. More information,
|
||||
* documentation and tutorials can be found at http://gelato.monstra.org
|
||||
*
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @author Stephen Clay <steve@mrclay.org>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class MinifyCSS
|
||||
{
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_options = null;
|
||||
|
||||
/**
|
||||
* Are we "in" a hack? I.e. are some browsers targetted until the next comment?
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $_inHack = false;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param array $options (currently ignored)
|
||||
*/
|
||||
private function __construct($options)
|
||||
{
|
||||
$this->_options = $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Minify a CSS string
|
||||
*
|
||||
* @param string $css
|
||||
*
|
||||
* @param array $options (currently ignored)
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function process($css, $options = array())
|
||||
{
|
||||
$obj = new MinifyCSS($options);
|
||||
|
||||
return $obj->_process($css);
|
||||
}
|
||||
|
||||
/**
|
||||
* Minify a CSS string
|
||||
*
|
||||
* @param string $css
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function _process($css)
|
||||
{
|
||||
$css = str_replace("\r\n", "\n", $css);
|
||||
|
||||
// preserve empty comment after '>'
|
||||
// http://www.webdevout.net/css-hacks#in_css-selectors
|
||||
$css = preg_replace('@>/\\*\\s*\\*/@', '>/*keep*/', $css);
|
||||
|
||||
// preserve empty comment between property and value
|
||||
// http://css-discuss.incutio.com/?page=BoxModelHack
|
||||
$css = preg_replace('@/\\*\\s*\\*/\\s*:@', '/*keep*/:', $css);
|
||||
$css = preg_replace('@:\\s*/\\*\\s*\\*/@', ':/*keep*/', $css);
|
||||
|
||||
// apply callback to all valid comments (and strip out surrounding ws
|
||||
$css = preg_replace_callback('@\\s*/\\*([\\s\\S]*?)\\*/\\s*@'
|
||||
,array($this, '_commentCB'), $css);
|
||||
|
||||
// remove ws around { } and last semicolon in declaration block
|
||||
$css = preg_replace('/\\s*{\\s*/', '{', $css);
|
||||
$css = preg_replace('/;?\\s*}\\s*/', '}', $css);
|
||||
|
||||
// remove ws surrounding semicolons
|
||||
$css = preg_replace('/\\s*;\\s*/', ';', $css);
|
||||
|
||||
// remove ws around urls
|
||||
$css = preg_replace('/
|
||||
url\\( # url(
|
||||
\\s*
|
||||
([^\\)]+?) # 1 = the URL (really just a bunch of non right parenthesis)
|
||||
\\s*
|
||||
\\) # )
|
||||
/x', 'url($1)', $css);
|
||||
|
||||
// remove ws between rules and colons
|
||||
$css = preg_replace('/
|
||||
\\s*
|
||||
([{;]) # 1 = beginning of block or rule separator
|
||||
\\s*
|
||||
([\\*_]?[\\w\\-]+) # 2 = property (and maybe IE filter)
|
||||
\\s*
|
||||
:
|
||||
\\s*
|
||||
(\\b|[#\'"-]) # 3 = first character of a value
|
||||
/x', '$1$2:$3', $css);
|
||||
|
||||
// remove ws in selectors
|
||||
$css = preg_replace_callback('/
|
||||
(?: # non-capture
|
||||
\\s*
|
||||
[^~>+,\\s]+ # selector part
|
||||
\\s*
|
||||
[,>+~] # combinators
|
||||
)+
|
||||
\\s*
|
||||
[^~>+,\\s]+ # selector part
|
||||
{ # open declaration block
|
||||
/x'
|
||||
,array($this, '_selectorsCB'), $css);
|
||||
|
||||
// minimize hex colors
|
||||
$css = preg_replace('/([^=])#([a-f\\d])\\2([a-f\\d])\\3([a-f\\d])\\4([\\s;\\}])/i'
|
||||
, '$1#$2$3$4$5', $css);
|
||||
|
||||
// remove spaces between font families
|
||||
$css = preg_replace_callback('/font-family:([^;}]+)([;}])/'
|
||||
,array($this, '_fontFamilyCB'), $css);
|
||||
|
||||
$css = preg_replace('/@import\\s+url/', '@import url', $css);
|
||||
|
||||
// replace any ws involving newlines with a single newline
|
||||
$css = preg_replace('/[ \\t]*\\n+\\s*/', "\n", $css);
|
||||
|
||||
// separate common descendent selectors w/ newlines (to limit line lengths)
|
||||
$css = preg_replace('/([\\w#\\.\\*]+)\\s+([\\w#\\.\\*]+){/', "$1\n$2{", $css);
|
||||
|
||||
// Use newline after 1st numeric value (to limit line lengths).
|
||||
$css = preg_replace('/
|
||||
((?:padding|margin|border|outline):\\d+(?:px|em)?) # 1 = prop : 1st numeric value
|
||||
\\s+
|
||||
/x'
|
||||
,"$1\n", $css);
|
||||
|
||||
// prevent triggering IE6 bug: http://www.crankygeek.com/ie6pebug/
|
||||
$css = preg_replace('/:first-l(etter|ine)\\{/', ':first-l$1 {', $css);
|
||||
|
||||
return trim($css);
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace what looks like a set of selectors
|
||||
*
|
||||
* @param array $m regex matches
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function _selectorsCB($m)
|
||||
{
|
||||
// remove ws around the combinators
|
||||
return preg_replace('/\\s*([,>+~])\\s*/', '$1', $m[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a comment and return a replacement
|
||||
*
|
||||
* @param array $m regex matches
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function _commentCB($m)
|
||||
{
|
||||
$hasSurroundingWs = (trim($m[0]) !== $m[1]);
|
||||
$m = $m[1];
|
||||
// $m is the comment content w/o the surrounding tokens,
|
||||
// but the return value will replace the entire comment.
|
||||
if ($m === 'keep') {
|
||||
return '/**/';
|
||||
}
|
||||
if ($m === '" "') {
|
||||
// component of http://tantek.com/CSS/Examples/midpass.html
|
||||
return '/*" "*/';
|
||||
}
|
||||
if (preg_match('@";\\}\\s*\\}/\\*\\s+@', $m)) {
|
||||
// component of http://tantek.com/CSS/Examples/midpass.html
|
||||
return '/*";}}/* */';
|
||||
}
|
||||
if ($this->_inHack) {
|
||||
// inversion: feeding only to one browser
|
||||
if (preg_match('@
|
||||
^/ # comment started like /*/
|
||||
\\s*
|
||||
(\\S[\\s\\S]+?) # has at least some non-ws content
|
||||
\\s*
|
||||
/\\* # ends like /*/ or /**/
|
||||
@x', $m, $n)) {
|
||||
// end hack mode after this comment, but preserve the hack and comment content
|
||||
$this->_inHack = false;
|
||||
|
||||
return "/*/{$n[1]}/**/";
|
||||
}
|
||||
}
|
||||
if (substr($m, -1) === '\\') { // comment ends like \*/
|
||||
// begin hack mode and preserve hack
|
||||
$this->_inHack = true;
|
||||
|
||||
return '/*\\*/';
|
||||
}
|
||||
if ($m !== '' && $m[0] === '/') { // comment looks like /*/ foo */
|
||||
// begin hack mode and preserve hack
|
||||
$this->_inHack = true;
|
||||
|
||||
return '/*/*/';
|
||||
}
|
||||
if ($this->_inHack) {
|
||||
// a regular comment ends hack mode but should be preserved
|
||||
$this->_inHack = false;
|
||||
|
||||
return '/**/';
|
||||
}
|
||||
// Issue 107: if there's any surrounding whitespace, it may be important, so
|
||||
// replace the comment with a single space
|
||||
return $hasSurroundingWs // remove all other comments
|
||||
? ' '
|
||||
: '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a font-family listing and return a replacement
|
||||
*
|
||||
* @param array $m regex matches
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function _fontFamilyCB($m)
|
||||
{
|
||||
// Issue 210: must not eliminate WS between words in unquoted families
|
||||
$pieces = preg_split('/(\'[^\']+\'|"[^"]+")/', $m[1], null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
|
||||
$out = 'font-family:';
|
||||
while (null !== ($piece = array_shift($pieces))) {
|
||||
if ($piece[0] !== '"' && $piece[0] !== "'") {
|
||||
$piece = preg_replace('/\\s+/', ' ', $piece);
|
||||
$piece = preg_replace('/\\s?,\\s?/', ',', $piece);
|
||||
}
|
||||
$out .= $piece;
|
||||
}
|
||||
|
||||
return $out . $m[2];
|
||||
}
|
||||
|
||||
}
|
@@ -1,47 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Gelato Library
|
||||
*
|
||||
* This source file is part of the Gelato Library. More information,
|
||||
* documentation and tutorials can be found at http://gelato.monstra.org
|
||||
*
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class MinifyHTML
|
||||
{
|
||||
/**
|
||||
* Minify html
|
||||
*
|
||||
* <code>
|
||||
* echo MinifyHTML::process($html);
|
||||
* </code>
|
||||
*
|
||||
* @param string $buffer html
|
||||
* @return string
|
||||
*/
|
||||
public static function process($html)
|
||||
{
|
||||
// Remove HTML comments (not containing IE conditional comments).
|
||||
$html = preg_replace_callback('/<!--([\\s\\S]*?)-->/', 'MinifyHTML::_comments', $html);
|
||||
|
||||
// Trim each line.
|
||||
$html = preg_replace('/^\\s+|\\s+$/m', '', $html);
|
||||
|
||||
// Return HTML
|
||||
return $html;
|
||||
}
|
||||
|
||||
protected static function _comments($m)
|
||||
{
|
||||
return (0 === strpos($m[1], '[') || false !== strpos($m[1], '<![')) ? $m[0] : '';
|
||||
}
|
||||
|
||||
}
|
@@ -1,50 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Gelato Library
|
||||
*
|
||||
* This source file is part of the Gelato Library. More information,
|
||||
* documentation and tutorials can be found at http://gelato.monstra.org
|
||||
*
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
class MinifyJS
|
||||
{
|
||||
/**
|
||||
* Minify js
|
||||
*
|
||||
* <code>
|
||||
* echo MinifyJS::process($js);
|
||||
* </code>
|
||||
*
|
||||
* @param string $buffer html
|
||||
* @return string
|
||||
*/
|
||||
public static function process($js)
|
||||
{
|
||||
// newlines > linefeed
|
||||
$js = str_replace(array("\r\n", "\r", "\n"), "\n", $js);
|
||||
|
||||
// empty lines > collapse
|
||||
$js = preg_replace('/^[ \t]*|[ \t]*$/m', '', $js);
|
||||
$js = preg_replace('/\n+/m', "\n", $js);
|
||||
$js = trim($js);
|
||||
|
||||
// redundant whitespace > remove
|
||||
$js = preg_replace('/(?<=[{}\[\]\(\)=><&\|;:,\?!\+-])[ \t]*|[ \t]*(?=[{}\[\]\(\)=><&\|;:,\?!\+-])/i', '', $js);
|
||||
$js = preg_replace('/[ \t]+/', ' ', $js);
|
||||
|
||||
// redundant semicolons (followed by another semicolon or closing curly bracket) > remove
|
||||
$js = preg_replace('/;\s*(?=[;}])/s', '', $js);
|
||||
|
||||
// Return JS
|
||||
return $js;
|
||||
}
|
||||
}
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -44,7 +44,7 @@ class Number
|
||||
|
||||
$unit = array('b', 'kb', 'mb', 'gb', 'tb', 'pb');
|
||||
|
||||
return @round($size/pow(1024, ($i=floor(log($size, 1024)))), 2).' '.$unit[($i < 0 ? 0 : $i)];
|
||||
return @round($size/pow(1024, ($i=floor(log($size, 1024)))), 2).' '.$unit[$i];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -4,6 +4,6 @@ Gelato is a PHP5 library for kickass Web Applications.
|
||||
|
||||
## Links
|
||||
- [Site](http://gelato.monstra.org)
|
||||
- [Github Repository](https://github.com/MonstrLab/gelato)
|
||||
- [Github Repository](https://github.com/Monstra/gelato-library)
|
||||
|
||||
Copyright (C) 2013 Romanenko Sergey / Awilum [awilum@msn.com]
|
||||
Copyright (C) 2012-2013 Romanenko Sergey / Awilum [awilum@msn.com]
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -27,7 +27,7 @@ class Registry
|
||||
|
||||
/**
|
||||
* Checks if an object with this name is in the registry.
|
||||
*
|
||||
*
|
||||
* <code>
|
||||
* if (Registry::exists('var')) {
|
||||
* // Do something...
|
||||
@@ -44,7 +44,7 @@ class Registry
|
||||
|
||||
/**
|
||||
* Registers a given value under a given name.
|
||||
*
|
||||
*
|
||||
* <code>
|
||||
* Registry::set('var', 'value');
|
||||
* </code>
|
||||
@@ -69,7 +69,7 @@ class Registry
|
||||
|
||||
/**
|
||||
* Fetch an item from the registry.
|
||||
*
|
||||
*
|
||||
* <code>
|
||||
* $var = Registry::get('var', 'value');
|
||||
* </code>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -22,7 +22,7 @@ class Token
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $token_name = 'security_token';
|
||||
public static $token_name = 'security_token';
|
||||
|
||||
/**
|
||||
* Protected constructor since this is a static class.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @package Gelato
|
||||
*
|
||||
* @author Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum <awilum@msn.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@@ -1,21 +1,3 @@
|
||||
Gelato 1.0.3, 2013-04-03
|
||||
Gelato 1.0.0, XXXX-XX-XX
|
||||
------------------------
|
||||
- Html Class: obfuscate() method added.
|
||||
- Html Class: email() method added.
|
||||
- Html Class: missing $macros var added.
|
||||
|
||||
Gelato 1.0.2, 2013-03-17
|
||||
------------------------
|
||||
- Added support for PHP 5.2.3
|
||||
|
||||
Gelato 1.0.1, 2013-03-05
|
||||
------------------------
|
||||
- New constant GELATO_CLASS_LOADER instead of GELATO_AUTOLOADER
|
||||
- ErrorHanler Class Improvements.
|
||||
- Log Class Improvements.
|
||||
- ClassLoader: new method register() added.
|
||||
- Define __DIR__ constant for PHP 5.2.x
|
||||
|
||||
Gelato 1.0.0, 2013-02-26
|
||||
------------------------
|
||||
- Initial release
|
||||
- Initial release
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,7 @@
|
||||
* @package Monstra
|
||||
* @subpackage Plugins
|
||||
* @author Romanenko Sergey / Awilum
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum
|
||||
* @version 1.0.0
|
||||
*
|
||||
*/
|
||||
|
@@ -3,8 +3,8 @@
|
||||
return array(
|
||||
'backup' => array(
|
||||
'Backups' => 'Backups',
|
||||
'Backup' => 'Backup',
|
||||
'Create Backup' => 'Erstelle Backup',
|
||||
'Backup date' => 'Backup Datum',
|
||||
'Create backup' => 'Erstelle Backup',
|
||||
'Delete' => 'Löschen',
|
||||
'storage' => 'Speicher',
|
||||
'public' => 'Öffentliche',
|
||||
|
@@ -2,10 +2,10 @@
|
||||
|
||||
return array(
|
||||
'backup' => array(
|
||||
'Backups' => 'Backups',
|
||||
'Backup Date' => 'Backup Date',
|
||||
'Create Backup' => 'Create Backup',
|
||||
'Delete' => 'Delete',
|
||||
'Backups' => 'Backups',
|
||||
'Backup date' => 'Backup date',
|
||||
'Create backup' => 'Create backup',
|
||||
'Delete' => 'Delete',
|
||||
'storage' => 'storage',
|
||||
'public' => 'public',
|
||||
'plugins' => 'plugins',
|
||||
@@ -14,4 +14,4 @@
|
||||
'Delete backup: :backup' => 'Delete backup: :backup',
|
||||
'Creating...' => 'Creating...',
|
||||
)
|
||||
);
|
||||
);
|
||||
|
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'backup' => array(
|
||||
'Backups' => 'Backup',
|
||||
'Backup date' => 'Backup dia',
|
||||
'Create Backup' => 'Crear Backup',
|
||||
'Delete' => 'Borrar',
|
||||
'storage' => 'Almacen',
|
||||
'public' => 'publico',
|
||||
'plugins' => 'plugins',
|
||||
'Size' => 'Tamaño',
|
||||
'Actions' => 'Acciones',
|
||||
'Delete backup: :backup' => 'Borrar Backup: :backup',
|
||||
'Creating...' => 'Creando...',
|
||||
)
|
||||
);
|
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'backup' => array(
|
||||
'Backups' => 'پشتیبان گیری',
|
||||
'Backup Date' => 'تاریخ پشتیبان گیری',
|
||||
'Create Backup' => 'ایجاد نسخه پشتیبان',
|
||||
'Delete' => 'حذف',
|
||||
'storage' => 'ذخیره سازی',
|
||||
'public' => 'عمومی',
|
||||
'plugins' => 'پلاگین',
|
||||
'Size' => 'اندازه',
|
||||
'Actions' => 'عملیات',
|
||||
'Delete backup: :backup' => 'حذف نسخه پشتیبان: :backup',
|
||||
'Creating...' => 'ایجاد...',
|
||||
)
|
||||
);
|
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'backup' => array(
|
||||
'Backups' => 'Sauvegardes',
|
||||
'Backup date' => 'Date de la sauvegarde',
|
||||
'Create backup' => 'Créer une sauvegarde',
|
||||
'Delete' => 'Supprimer',
|
||||
'storage' => 'stockage',
|
||||
'public' => 'public',
|
||||
'plugins' => 'plugins',
|
||||
'Size' => 'Taille',
|
||||
'Actions' => 'Actions',
|
||||
'Delete backup: :backup' => 'Supprimer la sauvegarde: :backup',
|
||||
'Creating...' => 'Création...',
|
||||
)
|
||||
);
|
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'backup' => array(
|
||||
'Backups' => 'Biztonsági mentések',
|
||||
'Backup date' => 'Biztonsági mentés dátuma',
|
||||
'Create Backup' => 'Biztonsági mentés készítése',
|
||||
'Delete' => 'Töröl',
|
||||
'storage' => 'tárol',
|
||||
'public' => 'nyilvános',
|
||||
'plugins' => 'pluginok',
|
||||
'Size' => 'Méret',
|
||||
'Actions' => 'Műveletek',
|
||||
'Delete backup: :backup' => 'Biztonsági mentés törlése: :backup',
|
||||
'Creating...' => 'Készítés...',
|
||||
)
|
||||
);
|
@@ -3,8 +3,8 @@
|
||||
return array(
|
||||
'backup' => array(
|
||||
'Backups' => 'Backup',
|
||||
'Backup' => 'Backup',
|
||||
'Create Backup' => 'Crea Backup',
|
||||
'Backup date' => 'Backup',
|
||||
'Create backup' => 'Crea backup',
|
||||
'Delete' => 'Elimina',
|
||||
'storage' => 'dati',
|
||||
'public' => 'pubblica',
|
||||
|
@@ -3,8 +3,8 @@
|
||||
return array(
|
||||
'backup' => array(
|
||||
'Backups' => 'Atsarginės kopijos',
|
||||
'Backup' => 'Atsarginės kopijos data',
|
||||
'Create Backup' => 'Sukurti atsarginę kopiją',
|
||||
'Backup date' => 'Atsarginės kopijos data',
|
||||
'Create backup' => 'Sukurti atsarginę kopiją',
|
||||
'Delete' => 'Ištrinti',
|
||||
'storage' => 'storage',
|
||||
'public' => 'public',
|
||||
|
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'backup' => array(
|
||||
'Backups' => 'Backups',
|
||||
'Backup' => 'Backup',
|
||||
'Create Backup' => 'Maak backup',
|
||||
'Delete' => 'Verwijderen',
|
||||
'storage' => 'Opslag',
|
||||
'public' => 'Publiek',
|
||||
'plugins' => 'Plugins',
|
||||
'Size' => 'Grootte',
|
||||
'Actions' => 'Acties',
|
||||
'Delete backup: :backup' => 'Verwijder backup: :backup',
|
||||
'Creating...' => 'Backup wordt gemaakt...',
|
||||
)
|
||||
);
|
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'backup' => array(
|
||||
'Backups' => 'Kopie zapasowe',
|
||||
'Backup Date' => 'Data kopii zapasowej',
|
||||
'Create Backup' => 'Utwórz kopię zapasową',
|
||||
'Delete' => 'Usuń',
|
||||
'storage' => 'magazyn',
|
||||
'public' => 'publiczny',
|
||||
'plugins' => 'wtyczki',
|
||||
'Size' => 'Rozmiar',
|
||||
'Actions' => 'Akcje',
|
||||
'Delete backup: :backup' => 'Czy napewno usunąć kopię zapasową: :backup',
|
||||
'Creating...' => 'Tworzenie kopii zapasowej...',
|
||||
)
|
||||
);
|
@@ -3,8 +3,8 @@
|
||||
return array(
|
||||
'backup' => array(
|
||||
'Backups' => 'Backups',
|
||||
'Backup' => 'Backup',
|
||||
'Create Backup' => 'Criar Backup',
|
||||
'Backup date' => 'Data do backup',
|
||||
'Create backup' => 'Criar',
|
||||
'Delete' => 'Deletar',
|
||||
'storage' => 'storage',
|
||||
'public' => 'public',
|
||||
|
@@ -3,8 +3,8 @@
|
||||
return array(
|
||||
'backup' => array(
|
||||
'Backups' => 'Бекапы',
|
||||
'Backup' => 'Бекап',
|
||||
'Create Backup' => 'Сделать бекап',
|
||||
'Backup date' => 'Бекап',
|
||||
'Create backup' => 'Сделать бекап',
|
||||
'Delete' => 'Удалить',
|
||||
'storage' => 'данные',
|
||||
'public' => 'публичная',
|
||||
|
@@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'backup' => array(
|
||||
'Backups' => 'Zálohy',
|
||||
'Backup' => 'Zálohy',
|
||||
'Create Backup' => 'Vytvoriť Zálohu',
|
||||
'Delete' => 'Vymazať',
|
||||
'storage' => 'Storage/Obsah diskového miesta',
|
||||
'public' => 'Verejné',
|
||||
'plugins' => 'Pluginy',
|
||||
'Size' => 'Veľkosť',
|
||||
'Actions' => 'Akcie',
|
||||
'Delete backup: :backup' => 'Vymazať zálohu: :backup',
|
||||
'Creating...' => 'Vytváram...',
|
||||
)
|
||||
);
|
@@ -3,8 +3,8 @@
|
||||
return array(
|
||||
'backup' => array(
|
||||
'Backups' => 'Bekapovi',
|
||||
'Backup' => 'Backup',
|
||||
'Create Backup' => 'Kreiraj Bekap',
|
||||
'Backup date' => 'Backup datum',
|
||||
'Create backup' => 'Kreiraj Bekap',
|
||||
'Delete' => 'Obriši',
|
||||
'storage' => 'lokacija arhive',
|
||||
'public' => 'Javno',
|
||||
|
@@ -3,8 +3,8 @@
|
||||
return array(
|
||||
'backup' => array(
|
||||
'Backups' => 'Бекапи',
|
||||
'Backup' => 'Бекап',
|
||||
'Create Backup' => 'Зробити бекап',
|
||||
'Backup date' => 'Бекап',
|
||||
'Create backup' => 'Зробити бекап',
|
||||
'Delete' => 'Видалити',
|
||||
'storage' => 'дані',
|
||||
'public' => 'публічна',
|
||||
|
@@ -14,7 +14,7 @@ $().ready(function(){$('[name=create_backup]').click(function(){$(this).button('
|
||||
Form::checkbox('add_storage_folder', null, true, array('disabled' => 'disabled')) . ' ' . __('storage', 'backup') . ' ' . Html::nbsp(2) .
|
||||
Form::checkbox('add_public_folder') . ' ' . __('public', 'backup') . ' ' . Html::nbsp(2) .
|
||||
Form::checkbox('add_plugins_folder') . ' ' . __('plugins', 'backup') . ' ' . Html::nbsp(2) .
|
||||
Form::submit('create_backup', __('Create Backup', 'backup'), array('class' => 'btn', 'data-loading-text' => __('Creating...', 'backup'))).
|
||||
Form::submit('create_backup', __('Create backup', 'backup'), array('class' => 'btn', 'data-loading-text' => __('Creating...', 'backup'))).
|
||||
Form::close()
|
||||
);
|
||||
?>
|
||||
@@ -23,7 +23,7 @@ $().ready(function(){$('[name=create_backup]').click(function(){$(this).button('
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo __('Backup', 'backup'); ?></th>
|
||||
<th><?php echo __('Backup date', 'backup'); ?></th>
|
||||
<th><?php echo __('Size', 'backup'); ?></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
@@ -66,7 +66,7 @@ class BlocksAdmin extends Backend
|
||||
->display();
|
||||
break;
|
||||
|
||||
// Edit Block
|
||||
// Edit block
|
||||
// -------------------------------------
|
||||
case "edit_block":
|
||||
// Save current block action
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @package Monstra
|
||||
* @subpackage Plugins
|
||||
* @author Romanenko Sergey / Awilum
|
||||
* @copyright 2012-2014 Romanenko Sergey / Awilum
|
||||
* @copyright 2012-2013 Romanenko Sergey / Awilum
|
||||
* @version 1.0.0
|
||||
*
|
||||
*/
|
||||
|
@@ -7,11 +7,11 @@
|
||||
'Delete' => 'Löschen',
|
||||
'Edit' => 'Bearbeiten',
|
||||
'Name' => 'Name',
|
||||
'Create New Block' => 'Erstelle einen neuen Block',
|
||||
'New Block' => 'Neuer Block',
|
||||
'Edit Block' => 'Bearbeite Block',
|
||||
'Save' => 'Speichern',
|
||||
'Save and Exit' => 'Speichern und Schließen',
|
||||
'Create new block' => 'Erstelle einen neuen Block',
|
||||
'New block' => 'Neuer Block',
|
||||
'Edit block' => 'Bearbeite Block',
|
||||
'Save' => 'Save',
|
||||
'Save and exit' => 'Speichern und Schließen',
|
||||
'Actions' => 'Aktionen',
|
||||
'Required field' => 'Erforderliches Feld',
|
||||
'This block already exists' => 'Dieser Block existiert bereits',
|
||||
@@ -19,9 +19,9 @@
|
||||
'Delete block: :block' => 'Lösche Block: :block',
|
||||
'Block content' => 'Block-Inhalt',
|
||||
'Block <i>:name</i> deleted' => 'Block <i>:name</i> gelöscht',
|
||||
'Your changes to the block <i>:name</i> have been saved.' => 'Deine Änderungen für den Block <i>:name</i> wurden gespeichert.',
|
||||
'Your changes to the block <i>:name</i> have been saved.' => 'Deine Änderungen für den Block <i>:name</i> wurden übernommen.',
|
||||
'Delete block: :block' => 'Lösche Block: :block',
|
||||
'View Embed Code' => 'Zeige Embed Code',
|
||||
'View Embed Code' => 'View Embed Code',
|
||||
'Embed Code' => 'Embed Code',
|
||||
'Shortcode' => 'Shortcode',
|
||||
'PHP Code' => 'PHP Code',
|
||||
|
@@ -7,11 +7,11 @@
|
||||
'Delete' => 'Delete',
|
||||
'Edit' => 'Edit',
|
||||
'Name' => 'Name',
|
||||
'Create New Block' => 'Create New Block',
|
||||
'New Block' => 'New Block',
|
||||
'Edit Block' => 'Edit Block',
|
||||
'Create new block' => 'Create new block',
|
||||
'New block' => 'New block',
|
||||
'Edit block' => 'Edit block',
|
||||
'Save' => 'Save',
|
||||
'Save and Exit' => 'Save and Exit',
|
||||
'Save and exit' => 'Save and exit',
|
||||
'Actions' => 'Actions',
|
||||
'Required field' => 'Required field',
|
||||
'This block already exists' => 'This block already exists',
|
||||
|
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'blocks' => array(
|
||||
'Blocks' => 'Bloques',
|
||||
'Blocks manager' => 'Administrar bloques',
|
||||
'Delete' => 'Borrar',
|
||||
'Edit' => 'Editar',
|
||||
'Name' => 'Nombre',
|
||||
'Create New Block' => 'Crear nuevo bloque',
|
||||
'New block' => 'Nuevo bloque',
|
||||
'Edit block' => 'Editar bloque',
|
||||
'Save' => 'Guardar',
|
||||
'Save and Exit' => 'Guardar y salir',
|
||||
'Actions' => 'Acciones',
|
||||
'Required field' => 'Dato requerido',
|
||||
'This block already exists' => 'Este bloque ya esiste',
|
||||
'This block does not exist' => 'Este bloque no esiste',
|
||||
'Delete block: :block' => 'Borrar bloque: :block',
|
||||
'Block content' => 'Contenido del bloque',
|
||||
'Block <i>:name</i> deleted' => 'bloque <i>:name</i> borrdo',
|
||||
'Your changes to the block <i>:name</i> have been saved.' => 'Tus cambios en el bloque <i>:name</i> han sido guardados.',
|
||||
'Delete block: :block' => 'Borrar bloque: :block',
|
||||
'View Embed Code' => 'Ver codigo para incrustar',
|
||||
'Embed Code' => 'Codigo para incrustar',
|
||||
'Shortcode' => 'Codigo corto',
|
||||
'PHP Code' => 'Codigo PHP',
|
||||
)
|
||||
);
|
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'blocks' => array(
|
||||
'Blocks' => 'بلوک',
|
||||
'Blocks manager' => 'مدیریت بلوک',
|
||||
'Delete' => 'حذف',
|
||||
'Edit' => 'ویرایش',
|
||||
'Name' => 'نام',
|
||||
'Create New Block' => 'ایجاد بلوک جدید',
|
||||
'New Block' => 'بلوک جدید',
|
||||
'Edit Block' => 'ویرایش بلوک',
|
||||
'Save' => 'ذخیره',
|
||||
'Save and Exit' => 'ذخیره و خروج',
|
||||
'Actions' => 'عملیات',
|
||||
'Required field' => 'کادر الزامی',
|
||||
'This block already exists' => 'این بلوک در حال حاضر وجود دارد',
|
||||
'This block does not exist' => 'این بلوک وجود ندارد',
|
||||
'Delete block: :block' => 'Delete block: :block',
|
||||
'Block content' => 'حذف بلوک: :block',
|
||||
'Block <i>:name</i> deleted' => 'بلوک <i>:name</i> حذف شد',
|
||||
'Your changes to the block <i>:name</i> have been saved.' => 'تغییرات شما بر روی بلوک <i>:name</i> ذخیره شد.',
|
||||
'Delete block: :block' => 'حذف بلوک: :block',
|
||||
'View Embed Code' => 'نمایش کد درج شده',
|
||||
'Embed Code' => 'کد درج شده',
|
||||
'Shortcode' => 'کدکوتاه',
|
||||
'PHP Code' => 'کد PHP',
|
||||
)
|
||||
);
|
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'blocks' => array(
|
||||
'Blocks' => 'Blocs',
|
||||
'Blocks manager' => 'Gestionnaire des blocs',
|
||||
'Delete' => 'Supprimer',
|
||||
'Edit' => 'Editer',
|
||||
'Name' => 'Nom',
|
||||
'Create new block' => 'Créer un nouveau bloc',
|
||||
'New block' => 'Nouveau bloc',
|
||||
'Edit block' => 'Editer le bloc',
|
||||
'Save' => 'Enregistrer',
|
||||
'Save and exit' => 'Enregistrer et sortir',
|
||||
'Actions' => 'Actions',
|
||||
'Required field' => 'Champ requis',
|
||||
'This block already exists' => 'Ce bloc existe déjà',
|
||||
'This block does not exist' => 'Ce bloc n\'existe pas',
|
||||
'Delete block: :block' => 'Supprimer le bloc: :block',
|
||||
'Block content' => 'Contenu du bloc',
|
||||
'Block <i>:name</i> deleted' => 'Bloc <i>:name</i> supprimé',
|
||||
'Your changes to the block <i>:name</i> have been saved.' => 'Vos changements pour le bloc <i>:name</i> ont été sauvegardés.',
|
||||
'Delete block: :block' => 'Supprimer le bloc: :block',
|
||||
'View Embed Code' => 'Voir le code intégré',
|
||||
'Embed Code' => 'Code intégré',
|
||||
'Shortcode' => 'Code court',
|
||||
'PHP Code' => 'Code PHP',
|
||||
)
|
||||
);
|
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'blocks' => array(
|
||||
'Blocks' => 'Blokkok',
|
||||
'Blocks manager' => 'Blokk-kezelő',
|
||||
'Delete' => 'Törlés',
|
||||
'Edit' => 'Szerkesztés',
|
||||
'Name' => 'Név',
|
||||
'Create New Block' => 'Új blokk készítése',
|
||||
'New Block' => 'Új blokk',
|
||||
'Edit Block' => 'Blokk szerkesztése',
|
||||
'Save' => 'Mentés',
|
||||
'Save and Exit' => 'Mentés és Kilépés',
|
||||
'Actions' => 'Műveletek',
|
||||
'Required field' => 'Kötelező mező',
|
||||
'This block already exists' => 'Ez a blokk már létezik',
|
||||
'This block does not exist' => 'Ez a blokk nem létezik',
|
||||
'Delete block: :block' => 'Blokk törlése: :block',
|
||||
'Block content' => 'Blokk tartalma',
|
||||
'Block <i>:name</i> deleted' => 'A <i>:name</i> blokk törölve',
|
||||
'Your changes to the block <i>:name</i> have been saved.' => 'A <i>:name</i> blokk változtatásai elmentve.',
|
||||
'Delete block: :block' => 'Blokk törlése: :block',
|
||||
'View Embed Code' => 'Beágyazott kód mutatása',
|
||||
'Embed Code' => 'Beágyazott kód',
|
||||
'Shortcode' => 'Shortcode',
|
||||
'PHP Code' => 'PHP Code',
|
||||
)
|
||||
);
|
@@ -6,13 +6,13 @@
|
||||
'Blocks manager' => 'Gestione blocchi',
|
||||
'Delete' => 'Elimina',
|
||||
'Edit' => 'Modifica',
|
||||
'New Block' => 'Nuovo blocco',
|
||||
'Create New Block' => 'Crea nuovo blocco',
|
||||
'New block' => 'Nuovo blocco',
|
||||
'Create new block' => 'Crea nuovo blocco',
|
||||
'Name' => 'Nome',
|
||||
'Edit Block' => 'Modifica blocco',
|
||||
'Edit block' => 'Modifica blocco',
|
||||
'Save' => 'Salva',
|
||||
'Actions' => 'Azioni',
|
||||
'Save and Exit' => 'Salva ed esci',
|
||||
'Save and exit' => 'Salva ed esci',
|
||||
'Required field' => 'Campo obbligatorio',
|
||||
'This block already exists' => 'Tale blocco già esistente',
|
||||
'This block does not exist' => 'Tale blocco non esiste',
|
||||
|
@@ -7,11 +7,11 @@
|
||||
'Delete' => 'Ištrinti',
|
||||
'Edit' => 'Redaguoti',
|
||||
'Name' => 'Pavadinimas',
|
||||
'Create New Block' => 'Sukurti naują bloką',
|
||||
'New Block' => 'Naujas blokas',
|
||||
'Edit Block' => 'Redaguoti bloką',
|
||||
'Create new block' => 'Sukurti naują bloką',
|
||||
'New block' => 'Naujas blokas',
|
||||
'Edit block' => 'Redaguoti bloką',
|
||||
'Save' => 'Išsaugoti',
|
||||
'Save and Exit' => 'Išsaugoti ir išeiti',
|
||||
'Save and exit' => 'Išsaugoti ir išeiti',
|
||||
'Actions' => 'Veiksmai',
|
||||
'Required field' => 'Privalomas laukas',
|
||||
'This block already exists' => 'Toks blokas jau yra',
|
||||
|
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'blocks' => array(
|
||||
'Blocks' => 'Blokken',
|
||||
'Blocks manager' => 'Blokken beheer',
|
||||
'Delete' => 'Verwijderen',
|
||||
'Edit' => 'Bewerken',
|
||||
'Name' => 'Naam',
|
||||
'Create New Block' => 'Nieuw blok',
|
||||
'New Block' => 'Nieuw blok',
|
||||
'Edit Block' => 'Bewerk blok',
|
||||
'Save' => 'Opslaan',
|
||||
'Save and Exit' => 'Opslaan en Terug',
|
||||
'Actions' => 'Acties',
|
||||
'Required field' => 'Vereist veld',
|
||||
'This block already exists' => 'Dit blok bestaat al',
|
||||
'This block does not exist' => 'Dit blok bestaat niet',
|
||||
'Delete block: :block' => 'Verwijder blok: :block',
|
||||
'Block content' => 'Inhoud blok',
|
||||
'Block <i>:name</i> deleted' => 'Blok <i>:name</i> verwijderd',
|
||||
'Your changes to the block <i>:name</i> have been saved.' => 'De aanpassingen aan blok <i>:name</i> zijn opgeslagen.',
|
||||
'Delete block: :block' => 'Verwijder blok: :block',
|
||||
'View Embed Code' => 'Bekijk insluitcode',
|
||||
'Embed Code' => 'Insluitcode',
|
||||
'Shortcode' => 'Verkorte code',
|
||||
'PHP Code' => 'PHP Code',
|
||||
)
|
||||
);
|
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'blocks' => array(
|
||||
'Blocks' => 'Bloki',
|
||||
'Blocks manager' => 'Zarządzaj blokami',
|
||||
'Delete' => 'Usuń',
|
||||
'Edit' => 'Edytuj',
|
||||
'Name' => 'Nazwa',
|
||||
'Create New Block' => 'Utwórz nowy blok',
|
||||
'New Block' => 'Nowy blok',
|
||||
'Edit Block' => 'Edytuj blok',
|
||||
'Save' => 'Zapisz',
|
||||
'Save and Exit' => 'Zapisz i wyjdź',
|
||||
'Actions' => 'Akcje',
|
||||
'Required field' => 'Pole wymagane',
|
||||
'This block already exists' => 'Ten blok już istnieje',
|
||||
'This block does not exist' => 'Ten blok nie istnieje',
|
||||
'Delete block: :block' => 'Czy napewno usunąć blok: :block',
|
||||
'Block content' => 'Zawartość bloku',
|
||||
'Block <i>:name</i> deleted' => 'Blok <i>:name</i> został usunięty',
|
||||
'Your changes to the block <i>:name</i> have been saved.' => 'Twoje zmiany dla bloku <i>:name</i> zostały zapisane.',
|
||||
'Delete block: :block' => 'Czy napewno usunąć blok: :block',
|
||||
'View Embed Code' => 'Pokaż osadzony kod',
|
||||
'Embed Code' => 'Osadzony kod',
|
||||
'Shortcode' => 'Krótki kod (shortcode)',
|
||||
'PHP Code' => 'Kod PHP',
|
||||
)
|
||||
);
|
@@ -7,11 +7,11 @@
|
||||
'Delete' => 'Deletar',
|
||||
'Edit' => 'Editar',
|
||||
'Name' => 'Nome',
|
||||
'Create New Block' => 'Criar novo bloco',
|
||||
'New Block' => 'Novo bloco',
|
||||
'Edit Block' => 'Editar bloco',
|
||||
'Create new block' => 'Criar novo bloco',
|
||||
'New block' => 'Novo bloco',
|
||||
'Edit block' => 'Editar bloco',
|
||||
'Save' => 'Salvar',
|
||||
'Save and Exit' => 'Salvar e sair',
|
||||
'Save and exit' => 'Salvar e sair',
|
||||
'Actions' => 'Ações',
|
||||
'Required field' => 'Campo requerido',
|
||||
'This block already exists' => 'Este bloco já existe',
|
||||
|
@@ -6,13 +6,13 @@
|
||||
'Blocks manager' => 'Менеджер блоков',
|
||||
'Delete' => 'Удалить',
|
||||
'Edit' => 'Редактировать',
|
||||
'New Block' => 'Новый блок',
|
||||
'Create New Block' => 'Создать новый блок',
|
||||
'New block' => 'Новый блок',
|
||||
'Create new block' => 'Создать новый блок',
|
||||
'Name' => 'Название',
|
||||
'Edit Block' => 'Редактирование блока',
|
||||
'Edit block' => 'Редактирование блока',
|
||||
'Save' => 'Сохранить',
|
||||
'Actions' => 'Действия',
|
||||
'Save and Exit' => 'Сохранить и выйти',
|
||||
'Save and exit' => 'Сохранить и выйти',
|
||||
'Required field' => 'Обязательное поле',
|
||||
'This block already exists' => 'Такой блок уже существует',
|
||||
'This block does not exist' => 'Такого блока не существует',
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user