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