clean up for remote content

This commit is contained in:
Diego Najar 2018-09-21 14:28:20 +02:00
parent 8c56c69bd5
commit a7e31640c0
1 changed files with 9 additions and 0 deletions

View File

@ -47,6 +47,8 @@ class pluginRemoteContent extends Plugin {
// Check Webhook // Check Webhook
$webhook = $this->getValue('webhook'); $webhook = $this->getValue('webhook');
if ($this->webhook($webhook)) { if ($this->webhook($webhook)) {
$this->cleanUp();
// Download files // Download files
$this->downloadFiles(); $this->downloadFiles();
@ -98,6 +100,13 @@ class pluginRemoteContent extends Plugin {
return true; return true;
} }
private function cleanUp()
{
$workspace = $this->workspace();
Filesystem::deleteRecursive($workspace.DS);
return true;
}
private function generateContent() private function generateContent()
{ {
global $pages; global $pages;