From: Andrey Kutejko Date: Tue, 7 May 2013 14:17:19 +0000 (+0300) Subject: admin: fix file rename X-Git-Tag: 0.5~287 X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=a3a353c1924bb7a1ced64d864efa5a4cd4d111ea;p=ipf.git admin: fix file rename --- 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)