Changeset 1534
- Timestamp:
- 02/28/08 18:58:58 (2 months ago)
- Files:
-
- branches/punbb-1.3-dev/upload/edit.php (modified) (1 diff)
- branches/punbb-1.3-dev/upload/include/common.php (modified) (1 diff)
- branches/punbb-1.3-dev/upload/include/parser.php (modified) (1 diff)
- branches/punbb-1.3-dev/upload/lang/English/misc.php (modified) (1 diff)
- branches/punbb-1.3-dev/upload/lang/English/post.php (modified) (1 diff)
- branches/punbb-1.3-dev/upload/misc.php (modified) (1 diff)
- branches/punbb-1.3-dev/upload/post.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/punbb-1.3-dev/upload/edit.php
r1533 r1534 109 109 if ($message == '') 110 110 $errors[] = $lang_post['No message']; 111 else if (strlen($message) > 65535)111 else if (strlen($message) > PUN_MAX_POSTSIZE) 112 112 $errors[] = $lang_post['Too long message']; 113 113 else if ($pun_config['p_message_all_caps'] == '0' && strtoupper($message) == $message && !$pun_user['is_admmod']) branches/punbb-1.3-dev/upload/include/common.php
r1533 r1534 55 55 define('PUN_GUEST', 2); 56 56 define('PUN_MEMBER', 3); 57 define('PUN_MAX_POSTSIZE', 65535); 57 58 58 59 branches/punbb-1.3-dev/upload/include/parser.php
r1533 r1534 128 128 $q2_start = strpos($text, $matches[0]); 129 129 else 130 $q2_start = 65536;130 $q2_start = PUN_MAX_POSTSIZE + 1; 131 131 132 132 // Deal with strpos() returning false when the string is not found 133 // ( 65536is one byte longer than the maximum post length)134 if ($c_start === false) $c_start = 65536;135 if ($c_end === false) $c_end = 65536;136 if ($q_start === false) $q_start = 65536;137 if ($q_end === false) $q_end = 65536;133 // (PUN_MAX_POSTSIZE + 1 is one byte longer than the maximum post length) 134 if ($c_start === false) $c_start = PUN_MAX_POSTSIZE + 1; 135 if ($c_end === false) $c_end = PUN_MAX_POSTSIZE + 1; 136 if ($q_start === false) $q_start = PUN_MAX_POSTSIZE + 1; 137 if ($q_end === false) $q_end = PUN_MAX_POSTSIZE + 1; 138 138 139 139 // If none of the strings were found 140 if (min($c_start, $c_end, $q_start, $q_end, $q2_start) == 65536)140 if (min($c_start, $c_end, $q_start, $q_end, $q2_start) == PUN_MAX_POSTSIZE + 1) 141 141 break; 142 142 branches/punbb-1.3-dev/upload/lang/English/misc.php
r1490 r1534 12 12 'No e-mail subject' => 'You must enter a subject.', 13 13 'No e-mail message' => 'You must enter a message.', 14 'Too long e-mail message' => 'Messages cannot be longer than 65535 characters (64 KB).',14 'Too long e-mail message' => 'Messages cannot be longer than '.PUN_MAX_POSTSIZE.' characters.', 15 15 'E-mail sent redirect' => 'E-mail sent. Redirecting âŠ', 16 16 'E-mail subject' => 'Subject:', branches/punbb-1.3-dev/upload/lang/English/post.php
r1485 r1534 8 8 'Too long subject' => 'Subjects cannot be longer than 70 characters.', 9 9 'No message' => 'You must enter a message.', 10 'Too long message' => 'Posts cannot be longer tha t 65535 characters (64 KB).',10 'Too long message' => 'Posts cannot be longer than '.PUN_MAX_POSTSIZE.' characters.', 11 11 'CSRF token mismatch' => 'Unable to confirm security token. A likely cause for this is that some time passed between when you first entered the page and when you posted the form. Clicking "Submit" again should solve the problem.', 12 12 branches/punbb-1.3-dev/upload/misc.php
r1533 r1534 164 164 if ($message == '') 165 165 $errors[] = $lang_misc['No e-mail message']; 166 else if (strlen($message) > 65535)166 else if (strlen($message) > PUN_MAX_POSTSIZE) 167 167 $errors[] = $lang_misc['Too long e-mail message']; 168 168 branches/punbb-1.3-dev/upload/post.php
r1533 r1534 171 171 if ($message == '') 172 172 $errors[] = $lang_post['No message']; 173 else if (strlen($message) > 65535)173 else if (strlen($message) > PUN_MAX_POSTSIZE) 174 174 $errors[] = $lang_post['Too long message']; 175 175 else if ($pun_config['p_message_all_caps'] == '0' && strtoupper($message) == $message && !$pun_user['is_admmod'])
