Skip to content

Commit 86312eb

Browse files
committed
Pages Plugin: page expand ajax bug #115 - fixed
1 parent 48a62e5 commit 86312eb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

plugins/box/pages/js/pages.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ $.monstra.pages = {
99
pageExpand: function(slug, expand, token) {
1010
$.ajax({
1111
type:"post",
12-
data:"slug="+slug+"&expand="+expand+"&token="+token,
12+
data:"page_slug="+slug+"&page_expand="+expand+"&token="+token,
1313
url: $('form input[name="url"]').val()
1414
});
1515
},

plugins/box/pages/pages.admin.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ class PagesAdmin extends Backend
2323
*/
2424
public static function _pageExpandAjax()
2525
{
26-
if (Request::post('slug')) {
26+
if (Request::post('page_slug')) {
2727
if (Security::check(Request::post('token'))) {
2828
$pages = new Table('pages');
29-
$pages->updateWhere('[slug="'.Request::post('slug').'"]', array('expand' => Request::post('expand')));
29+
$pages->updateWhere('[slug="'.Request::post('page_slug').'"]', array('expand' => Request::post('page_expand')));
3030
Request::shutdown();
3131
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
3232
}

0 commit comments

Comments
 (0)