Merge pull request #1564 from bramley/remove_upload_when_deleting_content_page
Use the page UUID to identify the upload directory when deleting a page
This commit is contained in:
commit
af7488f1b4
1 changed files with 4 additions and 2 deletions
|
@ -322,8 +322,10 @@ class Pages extends dbJSON {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete page images directory; The function already check if exists the directory
|
// Delete page images directory; The function already check if exists the directory
|
||||||
if (Filesystem::deleteRecursive(PATH_UPLOADS_PAGES.$key) === false) {
|
if (($uuid = $this->getUUID($key))) {
|
||||||
Log::set(__METHOD__.LOG_SEP.'Directory with images not found '.PATH_UPLOADS_PAGES.$key);
|
if (Filesystem::deleteRecursive(PATH_UPLOADS_PAGES.$uuid) === false) {
|
||||||
|
Log::set(__METHOD__.LOG_SEP.'Directory with images not found '.PATH_UPLOADS_PAGES.$uuid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove from database
|
// Remove from database
|
||||||
|
|
Loading…
Reference in a new issue