Skip to content

Commit

Permalink
Merge branch 'release/1.0.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed May 19, 2021
2 parents 9ad7171 + f4a56fa commit 82ce6fd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# v1.0.10
## 05/19/2021

1. [](#bugfix)
* Fixed `Add Folder` not updating the page list until cache is cleared
* Fixed broken error message translations

# v1.0.9
## 04/29/2021

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Flex Objects
slug: flex-objects
type: plugin
version: 1.0.9
version: 1.0.10
description: Flex Objects plugin allows you to manage Flex Objects in Grav Admin.
icon: list-alt
author:
Expand Down
9 changes: 5 additions & 4 deletions classes/Admin/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ public function taskDelete()
$grav->fireEvent('onFlexAfterDelete', new Event(['type' => 'flex', 'object' => $object]));
}
} catch (RuntimeException $e) {
$this->admin->setMessage($this->admin::translate('PLUGIN_FLEX_OBJECTS.CONTROLLER.TASK_DELETE_FAILURE', $e->getMessage()), 'error');
$this->admin->setMessage($this->admin::translate(['PLUGIN_FLEX_OBJECTS.CONTROLLER.TASK_DELETE_FAILURE', $e->getMessage()]), 'error');

$this->setRedirect($this->referrerRoute->toString(true), 302);
}
Expand Down Expand Up @@ -416,6 +416,7 @@ public function taskSaveNewFolder(): void

Folder::create($new_path);
Cache::clearCache('invalidate');
$directory->getCache('index')->clear();

$this->grav->fireEvent('onAdminAfterSaveAs', new Event(['path' => $new_path]));

Expand Down Expand Up @@ -575,7 +576,7 @@ protected function taskCopy(): bool
$this->setRedirect($this->getFlex()->adminRoute($object));

} catch (RuntimeException $e) {
$this->admin->setMessage($this->admin::translate('PLUGIN_FLEX_OBJECTS.CONTROLLER.TASK_COPY_FAILURE', $e->getMessage()), 'error');
$this->admin->setMessage($this->admin::translate(['PLUGIN_FLEX_OBJECTS.CONTROLLER.TASK_COPY_FAILURE', $e->getMessage()]), 'error');
$this->setRedirect($this->referrerRoute->toString(true), 302);
}

Expand Down Expand Up @@ -862,7 +863,7 @@ public function taskSave(): bool
$grav = Grav::instance();
$grav->fireEvent('onFlexAfterSave', new Event(['type' => 'flex', 'object' => $object]));
} catch (RuntimeException $e) {
$this->admin->setMessage($this->admin::translate('PLUGIN_FLEX_OBJECTS.CONTROLLER.TASK_SAVE_FAILURE', $e->getMessage()), 'error');
$this->admin->setMessage($this->admin::translate(['PLUGIN_FLEX_OBJECTS.CONTROLLER.TASK_SAVE_FAILURE', $e->getMessage()]), 'error');

if (isset($object, $form)) {
$data = $form->getData();
Expand Down Expand Up @@ -927,7 +928,7 @@ public function taskConfigure(): bool
$this->setRedirect($this->referrerRoute->toString(true));
}
} catch (RuntimeException $e) {
$this->admin->setMessage($this->admin::translate('PLUGIN_FLEX_OBJECTS.CONTROLLER.TASK_CONFIGURE_FAILURE', $e->getMessage()), 'error');
$this->admin->setMessage($this->admin::translate(['PLUGIN_FLEX_OBJECTS.CONTROLLER.TASK_CONFIGURE_FAILURE', $e->getMessage()]), 'error');
$this->setRedirect($this->referrerRoute->toString(true), 302);
}

Expand Down

0 comments on commit 82ce6fd

Please sign in to comment.