aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/bbcode.php7
-rw-r--r--phpBB/includes/functions.php6
-rw-r--r--phpBB/includes/functions_content.php2
3 files changed, 8 insertions, 7 deletions
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index d77bb3c4a7..9356e3e9b4 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -584,6 +584,13 @@ class bbcode
$code = str_replace("\t", '   ', $code);
$code = str_replace(' ', '  ', $code);
$code = str_replace(' ', '  ', $code);
+ $code = str_replace("\n ", "\n ", $code);
+
+ // keep space at the beginning
+ if (!empty($code) && $code[0] == ' ')
+ {
+ $code = ' ' . substr($code, 1);
+ }
// remove newline at the beginning
if (!empty($code) && $code[0] == "\n")
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 40d07ff770..6b6679bde5 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2708,12 +2708,6 @@ function send_status_line($code, $message)
{
$version = $_SERVER['SERVER_PROTOCOL'];
}
- else if (!empty($_SERVER['HTTP_VERSION']))
- {
- // I cannot remember where I got this from.
- // This code path may never be reachable in reality.
- $version = $_SERVER['HTTP_VERSION'];
- }
else
{
$version = 'HTTP/1.0';
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index faff9dd0de..b7650ecd6a 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -1107,7 +1107,7 @@ function extension_allowed($forum_id, $extension, &$extensions)
* @param int $max_length Maximum length of string (multibyte character count as 1 char / Html entity count as 1 char)
* @param int $max_store_length Maximum character length of string (multibyte character count as 1 char / Html entity count as entity chars).
* @param bool $allow_reply Allow Re: in front of string
-* NOTE: This parameter can cause undesired behavior (returning strings longer than $max_store_legnth) and is deprecated.
+* 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 = '')