@@ 1082-1095 (lines=14) @@ | ||
1079 | $old_file = $path_info['file']; |
|
1080 | ||
1081 | // Let us delete them. |
|
1082 | if (!empty($old_file)) { |
|
1083 | if (KEEP_THE_OLD_IMAGE_AFTER_CHANGE) { |
|
1084 | $prefix = 'saved_'.date('Y_m_d_H_i_s').'_'.uniqid('').'_'; |
|
1085 | @rename($path.'small_'.$old_file, $path.$prefix.'small_'.$old_file); |
|
1086 | @rename($path.'medium_'.$old_file, $path.$prefix.'medium_'.$old_file); |
|
1087 | @rename($path.'big_'.$old_file, $path.$prefix.'big_'.$old_file); |
|
1088 | @rename($path.$old_file, $path.$prefix.$old_file); |
|
1089 | } else { |
|
1090 | @unlink($path.'small_'.$old_file); |
|
1091 | @unlink($path.'medium_'.$old_file); |
|
1092 | @unlink($path.'big_'.$old_file); |
|
1093 | @unlink($path.$old_file); |
|
1094 | } |
|
1095 | } |
|
1096 | ||
1097 | // Exit if only deletion has been requested. Return an empty picture name. |
|
1098 | if ($delete) { |
@@ 1786-1799 (lines=14) @@ | ||
1783 | $old_file = $path_info['file']; |
|
1784 | ||
1785 | // Let us delete them. |
|
1786 | if ($old_file != 'unknown.jpg') { |
|
1787 | if (KEEP_THE_OLD_IMAGE_AFTER_CHANGE) { |
|
1788 | $prefix = 'saved_'.date('Y_m_d_H_i_s').'_'.uniqid('').'_'; |
|
1789 | @rename($path.'small_'.$old_file, $path.$prefix.'small_'.$old_file); |
|
1790 | @rename($path.'medium_'.$old_file, $path.$prefix.'medium_'.$old_file); |
|
1791 | @rename($path.'big_'.$old_file, $path.$prefix.'big_'.$old_file); |
|
1792 | @rename($path.$old_file, $path.$prefix.$old_file); |
|
1793 | } else { |
|
1794 | @unlink($path.'small_'.$old_file); |
|
1795 | @unlink($path.'medium_'.$old_file); |
|
1796 | @unlink($path.'big_'.$old_file); |
|
1797 | @unlink($path.$old_file); |
|
1798 | } |
|
1799 | } |
|
1800 | ||
1801 | // Exit if only deletion has been requested. Return an empty picture name. |
|
1802 | if ($delete) { |