@@ 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) { |
@@ 1079-1092 (lines=14) @@ | ||
1076 | $old_file = $path_info['file']; |
|
1077 | ||
1078 | // Let us delete them. |
|
1079 | if (!empty($old_file)) { |
|
1080 | if (KEEP_THE_OLD_IMAGE_AFTER_CHANGE) { |
|
1081 | $prefix = 'saved_'.date('Y_m_d_H_i_s').'_'.uniqid('').'_'; |
|
1082 | @rename($path.'small_'.$old_file, $path.$prefix.'small_'.$old_file); |
|
1083 | @rename($path.'medium_'.$old_file, $path.$prefix.'medium_'.$old_file); |
|
1084 | @rename($path.'big_'.$old_file, $path.$prefix.'big_'.$old_file); |
|
1085 | @rename($path.$old_file, $path.$prefix.$old_file); |
|
1086 | } else { |
|
1087 | @unlink($path.'small_'.$old_file); |
|
1088 | @unlink($path.'medium_'.$old_file); |
|
1089 | @unlink($path.'big_'.$old_file); |
|
1090 | @unlink($path.$old_file); |
|
1091 | } |
|
1092 | } |
|
1093 | ||
1094 | // Exit if only deletion has been requested. Return an empty picture name. |
|
1095 | if ($delete) { |
@@ 1597-1610 (lines=14) @@ | ||
1594 | $old_file = $path_info['file']; |
|
1595 | ||
1596 | // Let us delete them. |
|
1597 | if (!empty($old_file)) { |
|
1598 | if (KEEP_THE_OLD_IMAGE_AFTER_CHANGE) { |
|
1599 | $prefix = 'saved_'.date('Y_m_d_H_i_s').'_'.uniqid('').'_'; |
|
1600 | @rename($path.'small_'.$old_file, $path.$prefix.'small_'.$old_file); |
|
1601 | @rename($path.'medium_'.$old_file, $path.$prefix.'medium_'.$old_file); |
|
1602 | @rename($path.'big_'.$old_file, $path.$prefix.'big_'.$old_file); |
|
1603 | @rename($path.$old_file, $path.$prefix.$old_file); |
|
1604 | } else { |
|
1605 | @unlink($path.'small_'.$old_file); |
|
1606 | @unlink($path.'medium_'.$old_file); |
|
1607 | @unlink($path.'big_'.$old_file); |
|
1608 | @unlink($path.$old_file); |
|
1609 | } |
|
1610 | } |
|
1611 | ||
1612 | // Exit if only deletion has been requested. Return an empty picture name. |
|
1613 | if ($delete) { |