diff options
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/acp/acp_php_info.php | 8 | ||||
-rw-r--r-- | phpBB/includes/db/dbal.php | 1 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 12 | ||||
-rw-r--r-- | phpBB/includes/functions_content.php | 2 | ||||
-rw-r--r-- | phpBB/includes/functions_download.php | 1 |
5 files changed, 15 insertions, 9 deletions
diff --git a/phpBB/includes/acp/acp_php_info.php b/phpBB/includes/acp/acp_php_info.php index 03561f3e30..65150a40c5 100644 --- a/phpBB/includes/acp/acp_php_info.php +++ b/phpBB/includes/acp/acp_php_info.php @@ -67,6 +67,9 @@ class acp_php_info $output = preg_replace('#<img border="0"#i', '<img', $output); $output = str_replace(array('class="e"', 'class="v"', 'class="h"', '<hr />', '<font', '</font>'), array('class="row1"', 'class="row2"', '', '', '<span', '</span>'), $output); + // Fix invalid anchor names (eg "module_Zend Optimizer") + $output = preg_replace_callback('#<a name="([^"]+)">#', array($this, 'remove_spaces'), $output); + if (empty($output)) { trigger_error('NO_PHPINFO_AVAILABLE', E_USER_WARNING); @@ -79,4 +82,9 @@ class acp_php_info $template->assign_var('PHPINFO', $output); } + + function remove_spaces($matches) + { + return '<a name="' . str_replace(' ', '_', $matches[1]) . '">'; + } } diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php index 962b997664..a61dc5f58a 100644 --- a/phpBB/includes/db/dbal.php +++ b/phpBB/includes/db/dbal.php @@ -770,6 +770,7 @@ class dbal echo '<!DOCTYPE html> <html dir="ltr"> <head> + <meta charset="utf-8"> <title>SQL Report</title> <link href="' . $phpbb_root_path . 'adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" /> </head> diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 65e8bc251e..73f763c9f6 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -558,8 +558,8 @@ function phpbb_email_hash($email) * @param string $version2 Second version number * @param string $operator Comparison operator (optional) * -* @return mixed Integer (-1, 0, 1) if comparison operator is specified. -* Boolean (true, false) otherwise. +* @return mixed Boolean (true, false) if comparison operator is specified. +* Integer (-1, 0, 1) otherwise. */ function phpbb_version_compare($version1, $version2, $operator = null) { @@ -2300,6 +2300,7 @@ function redirect($url, $return = false, $disable_cd_check = false) echo '<!DOCTYPE html>'; echo '<html dir="' . $user->lang['DIRECTION'] . '" lang="' . $user->lang['USER_LANG'] . '">'; echo '<head>'; + echo '<meta charset="utf-8">'; echo '<meta http-equiv="refresh" content="0; url=' . str_replace('&', '&', $url) . '" />'; echo '<title>' . $user->lang['REDIRECT'] . '</title>'; echo '</head>'; @@ -2478,12 +2479,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'; @@ -3816,6 +3811,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline) echo '<!DOCTYPE html>'; echo '<html dir="ltr">'; echo '<head>'; + echo '<meta charset="utf-8">'; echo '<title>' . $msg_title . '</title>'; echo '<style type="text/css">' . "\n" . '/* <![CDATA[ */' . "\n"; echo '* { margin: 0; padding: 0; } html { font-size: 100%; height: 100%; margin-bottom: 1px; background-color: #E4EDF0; } body { font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; color: #536482; background: #E4EDF0; font-size: 62.5%; margin: 0; } '; diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 179fd3c2f8..b1294a2f14 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 = '') diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php index cbb79009ad..91a09608c7 100644 --- a/phpBB/includes/functions_download.php +++ b/phpBB/includes/functions_download.php @@ -103,6 +103,7 @@ function wrap_img_in_html($src, $title) echo '<!DOCTYPE html>'; echo '<html>'; echo '<head>'; + echo '<meta charset="utf-8">'; echo '<title>' . $title . '</title>'; echo '</head>'; echo '<body>'; |