mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-05 04:46: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 {
|
try {
|
||||||
$page = $this->admin->page();
|
$page = $this->admin->page();
|
||||||
|
|
||||||
|
if (count($page->translatedLanguages()) > 1) {
|
||||||
|
$page->file()->delete();
|
||||||
|
} else {
|
||||||
Folder::delete($page->path());
|
Folder::delete($page->path());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$results = Cache::clearCache('standard');
|
$results = Cache::clearCache('standard');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user