mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-05 04:37:51 +02:00
Pages Plugin: page expand ajax bug #115 - fixed
This commit is contained in:
@@ -9,7 +9,7 @@ $.monstra.pages = {
|
|||||||
pageExpand: function(slug, expand, token) {
|
pageExpand: function(slug, expand, token) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"post",
|
type:"post",
|
||||||
data:"slug="+slug+"&expand="+expand+"&token="+token,
|
data:"page_slug="+slug+"&page_expand="+expand+"&token="+token,
|
||||||
url: $('form input[name="url"]').val()
|
url: $('form input[name="url"]').val()
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@@ -23,10 +23,10 @@ class PagesAdmin extends Backend
|
|||||||
*/
|
*/
|
||||||
public static function _pageExpandAjax()
|
public static function _pageExpandAjax()
|
||||||
{
|
{
|
||||||
if (Request::post('slug')) {
|
if (Request::post('page_slug')) {
|
||||||
if (Security::check(Request::post('token'))) {
|
if (Security::check(Request::post('token'))) {
|
||||||
$pages = new Table('pages');
|
$pages = new Table('pages');
|
||||||
$pages->updateWhere('[slug="'.Request::post('slug').'"]', array('expand' => Request::post('expand')));
|
$pages->updateWhere('[slug="'.Request::post('page_slug').'"]', array('expand' => Request::post('page_expand')));
|
||||||
Request::shutdown();
|
Request::shutdown();
|
||||||
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
|
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user