mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-10-31 18:35:57 +01:00
More payload fixes for getFolderListing
This commit is contained in:
@@ -1410,11 +1410,9 @@ class AdminController extends AdminBaseController
|
|||||||
// Get data from post
|
// Get data from post
|
||||||
$data = $this->post;
|
$data = $this->post;
|
||||||
|
|
||||||
$data['route'] = $this->grav['uri']->param('route'); // For testing
|
|
||||||
$initial = (bool) $this->grav['uri']->param('initial'); // For testing
|
|
||||||
|
|
||||||
// Base64 decode the route
|
// Base64 decode the route
|
||||||
$data['route'] = isset($data['route']) ? base64_decode($data['route']) : null;
|
$data['route'] = isset($data['route']) ? base64_decode($data['route']) : null;
|
||||||
|
$initial = $data['initial'] ?? null;
|
||||||
|
|
||||||
if ($initial) {
|
if ($initial) {
|
||||||
$data['leaf_route'] = $data['route'];
|
$data['leaf_route'] = $data['route'];
|
||||||
@@ -1528,7 +1526,7 @@ class AdminController extends AdminBaseController
|
|||||||
|
|
||||||
// Add children if any
|
// Add children if any
|
||||||
if ($fileInfo->getPathname() == $extra && is_array($children)) {
|
if ($fileInfo->getPathname() == $extra && is_array($children)) {
|
||||||
$payload['children'] = $children;
|
$payload['children'] = array_values($children);
|
||||||
}
|
}
|
||||||
|
|
||||||
$response[] = $payload;
|
$response[] = $payload;
|
||||||
|
|||||||
Reference in New Issue
Block a user