mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-04 20:36:03 +01:00
Only delete the folder if it's the last language of this page
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user