Only delete the folder if it's the last language of this page

This commit is contained in:
Flavio Copes
2015-08-21 15:54:08 +02:00
parent 7d7705fefa
commit 40b406977c

View File

@@ -1050,7 +1050,13 @@ class AdminController
try {
$page = $this->admin->page();
Folder::delete($page->path());
if (count($page->translatedLanguages()) > 1) {
$page->file()->delete();
} else {
Folder::delete($page->path());
}
$results = Cache::clearCache('standard');