aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/acp/acp_main.php')
-rw-r--r--phpBB/includes/acp/acp_main.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index 08ba060207..d2b44d553f 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -22,6 +22,7 @@ if (!defined('IN_PHPBB'))
class acp_main
{
var $u_action;
+ private $php_ini;
function main($id, $mode)
{
@@ -657,7 +658,7 @@ class acp_main
}
// Warn if install is still present
- if (file_exists($phpbb_root_path . 'install') && !is_file($phpbb_root_path . 'install'))
+ if (!defined('IN_INSTALL') && !$phpbb_container->getParameter('allow_install_dir') && file_exists($phpbb_root_path . 'install') && !is_file($phpbb_root_path . 'install'))
{
$template->assign_var('S_REMOVE_INSTALL', true);
}
@@ -684,14 +685,19 @@ class acp_main
$template->assign_var('S_WRITABLE_CONFIG', (bool) (@fileperms($phpbb_root_path . 'config.' . $phpEx) & 0x0002));
}
+ $this->php_ini = $phpbb_container->get('php_ini');
+ $func_overload = $this->php_ini->getNumeric('mbstring.func_overload');
+ $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');
if (extension_loaded('mbstring'))
{
$template->assign_vars(array(
'S_MBSTRING_LOADED' => true,
- 'S_MBSTRING_FUNC_OVERLOAD_FAIL' => (intval(@ini_get('mbstring.func_overload')) & (MB_OVERLOAD_MAIL | MB_OVERLOAD_STRING)),
- 'S_MBSTRING_ENCODING_TRANSLATION_FAIL' => (@ini_get('mbstring.encoding_translation') != 0),
- 'S_MBSTRING_HTTP_INPUT_FAIL' => !in_array(@ini_get('mbstring.http_input'), array('pass', '')),
- 'S_MBSTRING_HTTP_OUTPUT_FAIL' => !in_array(@ini_get('mbstring.http_output'), array('pass', '')),
+ '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', '')),
));
}