mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-05 04:37:51 +02:00
Merge remote-tracking branch 'origin/dev'
This commit is contained in:
@@ -93,7 +93,7 @@
|
||||
|
||||
|
||||
// Send
|
||||
@mail($user['email'], __('Your login details for :site_name', 'users', array('site_name' => $site_name)), $message);
|
||||
@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)));
|
||||
@@ -108,10 +108,8 @@
|
||||
}
|
||||
|
||||
// If admin user is login = true then set is_admin = true
|
||||
if (Session::exists('admin')) {
|
||||
if (Session::get('admin') == true) {
|
||||
$is_admin = true;
|
||||
}
|
||||
if (Session::exists('admin') && Session::get('admin') == true) {
|
||||
$is_admin = true;
|
||||
} else {
|
||||
$is_admin = false;
|
||||
}
|
||||
@@ -123,13 +121,10 @@
|
||||
|
||||
// If is admin then load admin area
|
||||
if ($is_admin) {
|
||||
|
||||
// If id is empty then redirect to default plugin PAGES
|
||||
if (Request::get('id')) {
|
||||
if (Request::get('sub_id')) {
|
||||
$area = Request::get('sub_id');
|
||||
} else {
|
||||
$area = Request::get('id');
|
||||
}
|
||||
$area = Request::get('id');
|
||||
} else {
|
||||
Request::redirect('index.php?id=pages');
|
||||
}
|
||||
|
@@ -1,3 +1,10 @@
|
||||
Monstra 2.1.2, 2012-12-05
|
||||
------------------------
|
||||
- Blocks Plugin: added ability create and render inline content blocks with {block_inline} and {block_inline_create}
|
||||
- Site Module: methods keywords() and description() fixes.
|
||||
- Pages Plugin: pages.js fixes.
|
||||
- Admin main index.php fixes.
|
||||
|
||||
Monstra 2.1.1, 2012-11-30
|
||||
------------------------
|
||||
- Plugins: Minify bug #71 - fixed.
|
||||
|
@@ -45,7 +45,7 @@
|
||||
/**
|
||||
* The version of Monstra
|
||||
*/
|
||||
const VERSION = '2.1.1';
|
||||
const VERSION = '2.1.2';
|
||||
|
||||
|
||||
/**
|
||||
|
@@ -111,7 +111,7 @@
|
||||
* @return string
|
||||
*/
|
||||
public static function description() {
|
||||
return (trim(call_user_func(ucfirst(Uri::command()).'::description')) == '') ? Html::toText(Option::get('description')) : Html::toText($description);
|
||||
return (($description = trim(call_user_func(ucfirst(Uri::command()).'::description'))) == '') ? Html::toText(Option::get('description')) : Html::toText($description);
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
* @return string
|
||||
*/
|
||||
public static function keywords() {
|
||||
return (trim(call_user_func(ucfirst(Uri::command()).'::keywords')) == '') ? Html::toText(Option::get('keywords')) : Html::toText($description);
|
||||
return (($keywords = trim(call_user_func(ucfirst(Uri::command()).'::keywords'))) == '') ? Html::toText(Option::get('keywords')) : Html::toText($keywords);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -36,12 +36,52 @@
|
||||
// Add shortcode {block get="blockname"}
|
||||
Shortcode::add('block', 'Block::_content');
|
||||
|
||||
// Add shortcode {block_inline name="blockname"}
|
||||
Shortcode::add('block_inline', 'Block::_inlineBlock');
|
||||
|
||||
// Add shortcode {block_inline_create name="blockname"} Block content here {/block_inline_create}
|
||||
Shortcode::add('block_inline_create', 'Block::_createInlineBlock');
|
||||
|
||||
|
||||
/**
|
||||
* Block Class
|
||||
*/
|
||||
class Block {
|
||||
|
||||
|
||||
/**
|
||||
* Inline Blocks
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $inline_blocks = array();
|
||||
|
||||
|
||||
/**
|
||||
* Create Inline Block
|
||||
*/
|
||||
public static function _createInlineBlock($attributes, $content) {
|
||||
if (isset($attributes['name'])) {
|
||||
Block::$inline_blocks[Security::safeName($attributes['name'], '_', true)] = array(
|
||||
'content' => (string)$content,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Draw Inline Block
|
||||
*/
|
||||
public static function _inlineBlock($attributes) {
|
||||
if (isset($attributes['name']) && isset(Block::$inline_blocks[$attributes['name']])) {
|
||||
$content = Filter::apply('content', Text::toHtml(Block::$inline_blocks[$attributes['name']]['content']));
|
||||
return $content;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get block
|
||||
*
|
||||
|
@@ -10,7 +10,7 @@ $.monstra.pages = {
|
||||
$.ajax({
|
||||
type:"post",
|
||||
data:"slug="+slug+"&expand="+expand+"&token="+token,
|
||||
url: $('form input[name="siteurl"]').val()
|
||||
url: $('form input[name="url"]').val()
|
||||
});
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user