From a3a353c1924bb7a1ced64d864efa5a4cd4d111ea Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Tue, 7 May 2013 17:17:19 +0300 Subject: [PATCH] admin: fix file rename --- ipf/form/field/file.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ipf/form/field/file.php b/ipf/form/field/file.php index 2d131d1..278f84b 100644 --- a/ipf/form/field/file.php +++ b/ipf/form/field/file.php @@ -30,8 +30,9 @@ class IPF_Form_Field_File extends IPF_Form_Field protected function renameFile($old_name, $new_name) { - @rename(getAbsolutePath($old_name), getAbsolutePath($new_name)); - return getRelativePath($new_name); + $upload_root = IPF::getUploadPath() . DIRECTORY_SEPARATOR; + @rename($upload_root . $old_name, $upload_root . $new_name); + return $new_name; } public function clean($value) -- 2.49.0