|
@@ 602-603 (lines=2) @@
|
| 599 |
|
|
| 600 |
|
// Is the file too big? |
| 601 |
|
$context['attachments']['total_size'] += $_SESSION['temp_attachments'][$attachID]['size']; |
| 602 |
|
if (!empty($modSettings['attachmentSizeLimit']) && $_SESSION['temp_attachments'][$attachID]['size'] > $modSettings['attachmentSizeLimit'] * 1024) |
| 603 |
|
$_SESSION['temp_attachments'][$attachID]['errors'][] = array('file_too_big', array(comma_format($modSettings['attachmentSizeLimit'], 0))); |
| 604 |
|
|
| 605 |
|
// Check the total upload size for this post... |
| 606 |
|
if (!empty($modSettings['attachmentPostLimit']) && $context['attachments']['total_size'] > $modSettings['attachmentPostLimit'] * 1024) |
|
@@ 616-617 (lines=2) @@
|
| 613 |
|
if (empty($modSettings['attachmentNumPerPostLimit']) && $context['attachments']['quantity'] >= 50) |
| 614 |
|
$modSettings['attachmentNumPerPostLimit'] = 50; |
| 615 |
|
|
| 616 |
|
if (!empty($modSettings['attachmentNumPerPostLimit']) && $context['attachments']['quantity'] > $modSettings['attachmentNumPerPostLimit']) |
| 617 |
|
$_SESSION['temp_attachments'][$attachID]['errors'][] = array('attachments_limit_per_post', array($modSettings['attachmentNumPerPostLimit'])); |
| 618 |
|
|
| 619 |
|
// File extension check |
| 620 |
|
if (!empty($modSettings['attachmentCheckExtensions'])) |