mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-18 06:38:43 +01:00
Merge pull request #6093 from 3D-I/ticket/16656
[ticket/16656] Fix ACP check-in for mbstring http_input & output
This commit is contained in:
commit
53d966cd64
@ -78,6 +78,13 @@
|
||||
<p>{L_ERROR_MBSTRING_HTTP_OUTPUT_EXPLAIN}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
{% if S_DEFAULT_CHARSET_FAIL %}
|
||||
<div class="errorbox">
|
||||
<h3>{{ lang('ERROR_DEFAULT_CHARSET') }}</h3>
|
||||
<p>{{ lang('ERROR_DEFAULT_CHARSET_EXPLAIN') }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_WRITABLE_CONFIG -->
|
||||
|
@ -690,16 +690,22 @@ class acp_main
|
||||
$encoding_translation = $this->php_ini->getString('mbstring.encoding_translation');
|
||||
$http_input = $this->php_ini->getString('mbstring.http_input');
|
||||
$http_output = $this->php_ini->getString('mbstring.http_output');
|
||||
$default_charset = $this->php_ini->getString('default_charset');
|
||||
|
||||
if (extension_loaded('mbstring'))
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
/**
|
||||
* “mbstring.http_input” and “mbstring.http_output” are deprecated as of PHP 5.6.0
|
||||
* @link https://www.php.net/manual/mbstring.configuration.php#ini.mbstring.http-input
|
||||
*/
|
||||
$template->assign_vars([
|
||||
'S_MBSTRING_LOADED' => true,
|
||||
'S_MBSTRING_FUNC_OVERLOAD_FAIL' => $func_overload && ($func_overload & (MB_OVERLOAD_MAIL | MB_OVERLOAD_STRING)),
|
||||
'S_MBSTRING_ENCODING_TRANSLATION_FAIL' => $encoding_translation && ($encoding_translation != 0),
|
||||
'S_MBSTRING_HTTP_INPUT_FAIL' => $http_input && !in_array($http_input, array('pass', '')),
|
||||
'S_MBSTRING_HTTP_OUTPUT_FAIL' => $http_output && !in_array($http_output, array('pass', '')),
|
||||
));
|
||||
'S_MBSTRING_HTTP_INPUT_FAIL' => !empty($http_input),
|
||||
'S_MBSTRING_HTTP_OUTPUT_FAIL' => !empty($http_output),
|
||||
'S_DEFAULT_CHARSET_FAIL' => $default_charset !== 'UTF-8',
|
||||
]);
|
||||
}
|
||||
|
||||
// Fill dbms version if not yet filled
|
||||
|
@ -371,9 +371,11 @@ $lang = array_merge($lang, array(
|
||||
'ERROR_MBSTRING_ENCODING_TRANSLATION' => 'Transparent character encoding is improperly configured',
|
||||
'ERROR_MBSTRING_ENCODING_TRANSLATION_EXPLAIN' => '<var>mbstring.encoding_translation</var> must be set to 0. You can check the current value on the <samp>PHP information</samp> page.',
|
||||
'ERROR_MBSTRING_HTTP_INPUT' => 'HTTP input character conversion is improperly configured',
|
||||
'ERROR_MBSTRING_HTTP_INPUT_EXPLAIN' => '<var>mbstring.http_input</var> must be set to <samp>pass</samp>. You can check the current value on the <samp>PHP information</samp> page.',
|
||||
'ERROR_MBSTRING_HTTP_INPUT_EXPLAIN' => '<var>mbstring.http_input</var> must be left empty. You can check the current value on the <samp>PHP information</samp> page.',
|
||||
'ERROR_MBSTRING_HTTP_OUTPUT' => 'HTTP output character conversion is improperly configured',
|
||||
'ERROR_MBSTRING_HTTP_OUTPUT_EXPLAIN' => '<var>mbstring.http_output</var> must be set to <samp>pass</samp>. You can check the current value on the <samp>PHP information</samp> page.',
|
||||
'ERROR_MBSTRING_HTTP_OUTPUT_EXPLAIN' => '<var>mbstring.http_output</var> must be left empty. You can check the current value on the <samp>PHP information</samp> page.',
|
||||
'ERROR_DEFAULT_CHARSET' => 'Default charset is improperly configured',
|
||||
'ERROR_DEFAULT_CHARSET_EXPLAIN' => '<var>default_charset</var> must be set to <samp>UTF-8</samp>. You can check the current value on the <samp>PHP information</samp> page.',
|
||||
|
||||
'FILES_PER_DAY' => 'Attachments per day',
|
||||
'FORUM_STATS' => 'Board statistics',
|
||||
|
Loading…
x
Reference in New Issue
Block a user