From a7e31640c01f23aeeccdbfa9770a745eea072871 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Fri, 21 Sep 2018 14:28:20 +0200 Subject: [PATCH] clean up for remote content --- bl-plugins/remote-content/plugin.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bl-plugins/remote-content/plugin.php b/bl-plugins/remote-content/plugin.php index 3e77399d..c0e266b2 100644 --- a/bl-plugins/remote-content/plugin.php +++ b/bl-plugins/remote-content/plugin.php @@ -47,6 +47,8 @@ class pluginRemoteContent extends Plugin { // Check Webhook $webhook = $this->getValue('webhook'); if ($this->webhook($webhook)) { + $this->cleanUp(); + // Download files $this->downloadFiles(); @@ -98,6 +100,13 @@ class pluginRemoteContent extends Plugin { return true; } + private function cleanUp() + { + $workspace = $this->workspace(); + Filesystem::deleteRecursive($workspace.DS); + return true; + } + private function generateContent() { global $pages;