aboutsummaryrefslogtreecommitdiff
path: root/app/class/Modelmedia.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-04-29 02:23:29 +0200
committervincent-peugnet <v.peugnet@free.fr>2020-04-29 02:23:29 +0200
commit7370dee913a63a2f7d4bc09bd4e5605eac2eb382 (patch)
tree950a1fc6997daf4a3e3aae778ca3ed6f7f835ede /app/class/Modelmedia.php
parent3075127e848150da8b8d19b45325460346c415c6 (diff)
downloadwcms-7370dee913a63a2f7d4bc09bd4e5605eac2eb382.tar.gz
wcms-7370dee913a63a2f7d4bc09bd4e5605eac2eb382.zip
fix bookmark construction in user
fix colortag file creation by fixing fn access media
Diffstat (limited to 'app/class/Modelmedia.php')
-rw-r--r--app/class/Modelmedia.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/class/Modelmedia.php b/app/class/Modelmedia.php
index 4da7707..89a2305 100644
--- a/app/class/Modelmedia.php
+++ b/app/class/Modelmedia.php
@@ -376,9 +376,13 @@ class Modelmedia extends Model
{
try {
accessfile($oldname);
+ accessfile($newname);
} catch (InvalidArgumentException $e) {
throw new InvalidArgumentException($e->getMessage());
}
+ if (!file_exists($oldname)) {
+ throw new InvalidArgumentException("File : $oldname does not exist");
+ }
return rename($oldname, $newname);
}
}