Use the page UUID to identify the upload directory when deleting a page
Fixes #1545
This commit is contained in:
parent
d586fce4f2
commit
957663b48b
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