| @@ 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) { |
|
| @@ 1829-1842 (lines=14) @@ | ||
| 1826 | $old_file = $path_info['file']; |
|
| 1827 | ||
| 1828 | // Let us delete them. |
|
| 1829 | if ($old_file != 'unknown.jpg') { |
|
| 1830 | if (KEEP_THE_OLD_IMAGE_AFTER_CHANGE) { |
|
| 1831 | $prefix = 'saved_'.date('Y_m_d_H_i_s').'_'.uniqid('').'_'; |
|
| 1832 | @rename($path.'small_'.$old_file, $path.$prefix.'small_'.$old_file); |
|
| 1833 | @rename($path.'medium_'.$old_file, $path.$prefix.'medium_'.$old_file); |
|
| 1834 | @rename($path.'big_'.$old_file, $path.$prefix.'big_'.$old_file); |
|
| 1835 | @rename($path.$old_file, $path.$prefix.$old_file); |
|
| 1836 | } else { |
|
| 1837 | @unlink($path.'small_'.$old_file); |
|
| 1838 | @unlink($path.'medium_'.$old_file); |
|
| 1839 | @unlink($path.'big_'.$old_file); |
|
| 1840 | @unlink($path.$old_file); |
|
| 1841 | } |
|
| 1842 | } |
|
| 1843 | ||
| 1844 | // Exit if only deletion has been requested. Return an empty picture name. |
|
| 1845 | if ($delete) { |
|