From 53d846477665ea6b8a3463318f03050282aec89a Mon Sep 17 00:00:00 2001 From: Michael Cullum Date: Sat, 11 Feb 2012 21:12:36 +0000 Subject: [PATCH 1/4] [ticket/10640] Change maximum subject length PHPBB3-10640 --- phpBB/includes/functions_content.php | 2 +- phpBB/styles/prosilver/template/posting_editor.html | 2 +- phpBB/styles/prosilver/template/quickreply_editor.html | 2 +- phpBB/styles/subsilver2/template/posting_body.html | 2 +- phpBB/styles/subsilver2/template/quickreply_editor.html | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 6b2ee98d7a..752ebe0f13 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -1107,7 +1107,7 @@ function extension_allowed($forum_id, $extension, &$extensions) * NOTE: This parameter can cause undesired behavior (returning strings longer than $max_store_length) and is deprecated. * @param string $append String to be appended */ -function truncate_string($string, $max_length = 60, $max_store_length = 255, $allow_reply = false, $append = '') +function truncate_string($string, $max_length = 120, $max_store_length = 255, $allow_reply = false, $append = '') { $chars = array(); diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html index 60766495c6..d1c86e7e13 100644 --- a/phpBB/styles/prosilver/template/posting_editor.html +++ b/phpBB/styles/prosilver/template/posting_editor.html @@ -103,7 +103,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/quickreply_editor.html b/phpBB/styles/prosilver/template/quickreply_editor.html index 724fdb85b8..5fcdf0f5d4 100644 --- a/phpBB/styles/prosilver/template/quickreply_editor.html +++ b/phpBB/styles/prosilver/template/quickreply_editor.html @@ -5,7 +5,7 @@
-
+
diff --git a/phpBB/styles/subsilver2/template/posting_body.html b/phpBB/styles/subsilver2/template/posting_body.html index 712c02b856..ae7d2f88d6 100644 --- a/phpBB/styles/subsilver2/template/posting_body.html +++ b/phpBB/styles/subsilver2/template/posting_body.html @@ -173,7 +173,7 @@ {L_SUBJECT}: - + {L_MESSAGE_BODY}:
{L_MESSAGE_BODY_EXPLAIN} 

diff --git a/phpBB/styles/subsilver2/template/quickreply_editor.html b/phpBB/styles/subsilver2/template/quickreply_editor.html index 4c3f7a3d0b..7a68a8f605 100644 --- a/phpBB/styles/subsilver2/template/quickreply_editor.html +++ b/phpBB/styles/subsilver2/template/quickreply_editor.html @@ -6,7 +6,7 @@ {L_SUBJECT}: - + {L_MESSAGE}: From a259db71058cd20eb54ac3b45a88b558c66e4cb5 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 2 May 2012 13:13:20 +0200 Subject: [PATCH 2/4] [ticket/10640] Do not change default value of truncate_string() The default value should be kept, so we do not change the behaviour for MODs and Extensions that use the function with its default values. PHPBB3-10640 --- phpBB/includes/functions_content.php | 2 +- phpBB/includes/functions_posting.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 752ebe0f13..6b2ee98d7a 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -1107,7 +1107,7 @@ function extension_allowed($forum_id, $extension, &$extensions) * NOTE: This parameter can cause undesired behavior (returning strings longer than $max_store_length) and is deprecated. * @param string $append String to be appended */ -function truncate_string($string, $max_length = 120, $max_store_length = 255, $allow_reply = false, $append = '') +function truncate_string($string, $max_length = 60, $max_store_length = 255, $allow_reply = false, $append = '') { $chars = array(); diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index f77f54679f..c549f99091 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1657,8 +1657,8 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u // First of all make sure the subject and topic title are having the correct length. // To achieve this without cutting off between special chars we convert to an array and then count the elements. - $subject = truncate_string($subject); - $data['topic_title'] = truncate_string($data['topic_title']); + $subject = truncate_string($subject, 120); + $data['topic_title'] = truncate_string($data['topic_title'], 120); // Collect some basic information about which tables and which rows to update/insert $sql_data = $topic_row = array(); From 7a6a5738db3c43b385a15a84c6956c2b295cc709 Mon Sep 17 00:00:00 2001 From: Michael Cullum Date: Sun, 17 Jun 2012 19:01:17 +0100 Subject: [PATCH 3/4] [ticket/10640] Change subject length in MCP PHPBB3-10640 --- phpBB/styles/prosilver/template/mcp_topic.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html index 2a6de3ce9d..8d0294d226 100644 --- a/phpBB/styles/prosilver/template/mcp_topic.html +++ b/phpBB/styles/prosilver/template/mcp_topic.html @@ -67,7 +67,7 @@ onload_functions.push('subPanels()');
-
+
From a41f86f2f724c31b2bb6e55d278b65e2660697c1 Mon Sep 17 00:00:00 2001 From: Michael Cullum Date: Sun, 17 Jun 2012 19:22:50 +0100 Subject: [PATCH 4/4] [ticket/10640] Change subject length in mcp in subsilver PHPBB3-10640 --- phpBB/styles/subsilver2/template/mcp_topic.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/styles/subsilver2/template/mcp_topic.html b/phpBB/styles/subsilver2/template/mcp_topic.html index 8ff648da39..6bbf13e12c 100644 --- a/phpBB/styles/subsilver2/template/mcp_topic.html +++ b/phpBB/styles/subsilver2/template/mcp_topic.html @@ -12,7 +12,7 @@ {L_SPLIT_SUBJECT} - + {L_SPLIT_FORUM}