| @@ 1099-1112 (lines=14) @@ | ||
| 1096 | $old_file = $path_info['file']; |
|
| 1097 | ||
| 1098 | // Let us delete them. |
|
| 1099 | if (!empty($old_file)) { |
|
| 1100 | if (KEEP_THE_OLD_IMAGE_AFTER_CHANGE) { |
|
| 1101 | $prefix = 'saved_'.date('Y_m_d_H_i_s').'_'.uniqid('').'_'; |
|
| 1102 | @rename($path.'small_'.$old_file, $path.$prefix.'small_'.$old_file); |
|
| 1103 | @rename($path.'medium_'.$old_file, $path.$prefix.'medium_'.$old_file); |
|
| 1104 | @rename($path.'big_'.$old_file, $path.$prefix.'big_'.$old_file); |
|
| 1105 | @rename($path.$old_file, $path.$prefix.$old_file); |
|
| 1106 | } else { |
|
| 1107 | @unlink($path.'small_'.$old_file); |
|
| 1108 | @unlink($path.'medium_'.$old_file); |
|
| 1109 | @unlink($path.'big_'.$old_file); |
|
| 1110 | @unlink($path.$old_file); |
|
| 1111 | } |
|
| 1112 | } |
|
| 1113 | ||
| 1114 | // Exit if only deletion has been requested. Return an empty picture name. |
|
| 1115 | if ($delete) { |
|
| @@ 1802-1815 (lines=14) @@ | ||
| 1799 | $old_file = $path_info['file']; |
|
| 1800 | ||
| 1801 | // Let us delete them. |
|
| 1802 | if ($old_file != 'unknown.jpg') { |
|
| 1803 | if (KEEP_THE_OLD_IMAGE_AFTER_CHANGE) { |
|
| 1804 | $prefix = 'saved_'.date('Y_m_d_H_i_s').'_'.uniqid('').'_'; |
|
| 1805 | @rename($path.'small_'.$old_file, $path.$prefix.'small_'.$old_file); |
|
| 1806 | @rename($path.'medium_'.$old_file, $path.$prefix.'medium_'.$old_file); |
|
| 1807 | @rename($path.'big_'.$old_file, $path.$prefix.'big_'.$old_file); |
|
| 1808 | @rename($path.$old_file, $path.$prefix.$old_file); |
|
| 1809 | } else { |
|
| 1810 | @unlink($path.'small_'.$old_file); |
|
| 1811 | @unlink($path.'medium_'.$old_file); |
|
| 1812 | @unlink($path.'big_'.$old_file); |
|
| 1813 | @unlink($path.$old_file); |
|
| 1814 | } |
|
| 1815 | } |
|
| 1816 | ||
| 1817 | // Exit if only deletion has been requested. Return an empty picture name. |
|
| 1818 | if ($delete) { |
|