| @@ 946-959 (lines=14) @@ | ||
| 943 | $old_file = $path_info['file']; |
|
| 944 | ||
| 945 | // Let us delete them. |
|
| 946 | if (!empty($old_file)) { |
|
| 947 | if (KEEP_THE_OLD_IMAGE_AFTER_CHANGE) { |
|
| 948 | $prefix = 'saved_'.date('Y_m_d_H_i_s').'_'.uniqid('').'_'; |
|
| 949 | @rename($path.'small_'.$old_file, $path.$prefix.'small_'.$old_file); |
|
| 950 | @rename($path.'medium_'.$old_file, $path.$prefix.'medium_'.$old_file); |
|
| 951 | @rename($path.'big_'.$old_file, $path.$prefix.'big_'.$old_file); |
|
| 952 | @rename($path.$old_file, $path.$prefix.$old_file); |
|
| 953 | } else { |
|
| 954 | @unlink($path.'small_'.$old_file); |
|
| 955 | @unlink($path.'medium_'.$old_file); |
|
| 956 | @unlink($path.'big_'.$old_file); |
|
| 957 | @unlink($path.$old_file); |
|
| 958 | } |
|
| 959 | } |
|
| 960 | ||
| 961 | // Exit if only deletion has been requested. Return an empty picture name. |
|
| 962 | if ($delete) { |
|
| @@ 1593-1606 (lines=14) @@ | ||
| 1590 | $old_file = $path_info['file']; |
|
| 1591 | ||
| 1592 | // Let us delete them. |
|
| 1593 | if (!empty($old_file)) { |
|
| 1594 | if (KEEP_THE_OLD_IMAGE_AFTER_CHANGE) { |
|
| 1595 | $prefix = 'saved_'.date('Y_m_d_H_i_s').'_'.uniqid('').'_'; |
|
| 1596 | @rename($path.'small_'.$old_file, $path.$prefix.'small_'.$old_file); |
|
| 1597 | @rename($path.'medium_'.$old_file, $path.$prefix.'medium_'.$old_file); |
|
| 1598 | @rename($path.'big_'.$old_file, $path.$prefix.'big_'.$old_file); |
|
| 1599 | @rename($path.$old_file, $path.$prefix.$old_file); |
|
| 1600 | } else { |
|
| 1601 | @unlink($path.'small_'.$old_file); |
|
| 1602 | @unlink($path.'medium_'.$old_file); |
|
| 1603 | @unlink($path.'big_'.$old_file); |
|
| 1604 | @unlink($path.$old_file); |
|
| 1605 | } |
|
| 1606 | } |
|
| 1607 | ||
| 1608 | // Exit if only deletion has been requested. Return an empty picture name. |
|
| 1609 | if ($delete) { |
|
| @@ 1078-1091 (lines=14) @@ | ||
| 1075 | $old_file = $path_info['file']; |
|
| 1076 | ||
| 1077 | // Let us delete them. |
|
| 1078 | if (!empty($old_file)) { |
|
| 1079 | if (KEEP_THE_OLD_IMAGE_AFTER_CHANGE) { |
|
| 1080 | $prefix = 'saved_'.date('Y_m_d_H_i_s').'_'.uniqid('').'_'; |
|
| 1081 | @rename($path.'small_'.$old_file, $path.$prefix.'small_'.$old_file); |
|
| 1082 | @rename($path.'medium_'.$old_file, $path.$prefix.'medium_'.$old_file); |
|
| 1083 | @rename($path.'big_'.$old_file, $path.$prefix.'big_'.$old_file); |
|
| 1084 | @rename($path.$old_file, $path.$prefix.$old_file); |
|
| 1085 | } else { |
|
| 1086 | @unlink($path.'small_'.$old_file); |
|
| 1087 | @unlink($path.'medium_'.$old_file); |
|
| 1088 | @unlink($path.'big_'.$old_file); |
|
| 1089 | @unlink($path.$old_file); |
|
| 1090 | } |
|
| 1091 | } |
|
| 1092 | ||
| 1093 | // Exit if only deletion has been requested. Return an empty picture name. |
|
| 1094 | if ($delete) { |
|