clean up for remote content

This commit is contained in:
Diego Najar 2018-09-21 14:28:20 +02:00
parent 8c56c69bd5
commit a7e31640c0

View File

@ -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;