| @@ 199-206 (lines=8) @@ | ||
| 196 | $file = $thumbFile; |
|
| 197 | ||
| 198 | // No point in a nicer message, because this is supposed to be an attachment anyway... |
|
| 199 | if (!file_exists($file['filePath'])) |
|
| 200 | { |
|
| 201 | header((preg_match('~HTTP/1\.[01]~i', $_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0') . ' 404 Not Found'); |
|
| 202 | header('Content-Type: text/plain; charset=' . (empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set'])); |
|
| 203 | ||
| 204 | // We need to die like this *before* we send any anti-caching headers as below. |
|
| 205 | die('File not found.'); |
|
| 206 | } |
|
| 207 | ||
| 208 | // If it hasn't been modified since the last time this attachment was retrieved, there's no need to display it again. |
|
| 209 | if (!empty($_SERVER['HTTP_IF_MODIFIED_SINCE'])) |
|
| @@ 1620-1627 (lines=8) @@ | ||
| 1617 | } |
|
| 1618 | ||
| 1619 | // No point in a nicer message, because this is supposed to be an attachment anyway... |
|
| 1620 | if (!file_exists($filename)) |
|
| 1621 | { |
|
| 1622 | header((preg_match('~HTTP/1\.[01]~i', $_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0') . ' 404 Not Found'); |
|
| 1623 | header('Content-Type: text/plain; charset=' . (empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set'])); |
|
| 1624 | ||
| 1625 | // We need to die like this *before* we send any anti-caching headers as below. |
|
| 1626 | die('File not found.'); |
|
| 1627 | } |
|
| 1628 | ||
| 1629 | // If it hasn't been modified since the last time this attachment was retrieved, there's no need to display it again. |
|
| 1630 | if (!empty($_SERVER['HTTP_IF_MODIFIED_SINCE'])) |
|