| @@ 366-368 (lines=3) @@ | ||
| 363 | // Need to make space for the new files. So, bye bye. |
|
| 364 | if (!$ignore_temp) |
|
| 365 | { |
|
| 366 | foreach ($_SESSION['temp_attachments'] as $attachID => $attachment) |
|
| 367 | if (strpos($attachID, 'post_tmp_' . $user_info['id']) !== false) |
|
| 368 | unlink($attachment['tmp_name']); |
|
| 369 | ||
| 370 | $context['we_are_history'] = $txt['error_temp_attachments_flushed']; |
|
| 371 | $_SESSION['temp_attachments'] = array(); |
|
| @@ 921-926 (lines=6) @@ | ||
| 918 | // Is this a request to delete them? |
|
| 919 | if (isset($_GET['delete_temp'])) |
|
| 920 | { |
|
| 921 | foreach ($_SESSION['temp_attachments'] as $attachID => $attachment) |
|
| 922 | { |
|
| 923 | if (strpos($attachID, 'post_tmp_' . $user_info['id']) !== false) |
|
| 924 | if (file_exists($attachment['tmp_name'])) |
|
| 925 | unlink($attachment['tmp_name']); |
|
| 926 | } |
|
| 927 | $post_errors[] = 'temp_attachments_gone'; |
|
| 928 | $_SESSION['temp_attachments'] = array(); |
|
| 929 | } |
|