mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-03-24 13:30:08 +01:00
pagemediaselect is now an extend of filepicker. Add default for folder field. Fill changelog.
This commit is contained in:
@@ -349,10 +349,13 @@ class AdminController
|
||||
}
|
||||
|
||||
$data = $this->view == 'pages' ? $this->admin->page(true) : $this->prepareData([]);
|
||||
|
||||
$settings = $data->blueprints()->schema()->getProperty($this->post['name']);
|
||||
|
||||
$folder = $settings['folder'];
|
||||
if (isset($settings['folder'])) {
|
||||
$folder = $settings['folder'];
|
||||
} else {
|
||||
$folder = '@self';
|
||||
}
|
||||
|
||||
// Do not use self@ outside of pages
|
||||
if ($this->view != 'pages' && in_array($folder, ['@self', 'self@'])) {
|
||||
|
||||
Reference in New Issue
Block a user