From dd7f5e790f14e4c03781f340b578a311e8ecbd61 Mon Sep 17 00:00:00 2001 From: Thomas Zilio Date: Thu, 6 Sep 2018 10:23:54 +0200 Subject: [PATCH] Fix modifica per i plugin --- actions.php | 4 +++- src/Models/Plugin.php | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/actions.php b/actions.php index 3d0049139..445f2f308 100644 --- a/actions.php +++ b/actions.php @@ -168,7 +168,9 @@ if ($element->permission == 'rw') { // Esecuzione delle operazioni di gruppo $id_records = post('id_records'); $id_records = is_array($id_records) ? $id_records : explode(';', $id_records); - $id_records = array_filter($id_records, function ($var) {return !empty($var); }); + $id_records = array_filter($id_records, function ($var) { + return !empty($var); + }); $id_records = array_unique($id_records); $bulk = App::filepath($directory.'|custom|', 'bulk.php'); diff --git a/src/Models/Plugin.php b/src/Models/Plugin.php index ff33c6520..3aa4d22ac 100644 --- a/src/Models/Plugin.php +++ b/src/Models/Plugin.php @@ -85,6 +85,10 @@ class Plugin extends Model */ public function getCustomEditFile() { + if (empty($this->script)) { + return; + } + return $this->getAddFile(); }