aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/install_install.php
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2006-12-02 18:16:25 +0000
committerDavid M <davidmj@users.sourceforge.net>2006-12-02 18:16:25 +0000
commite08317eb7132692ab93115d47e78b4841909c07c (patch)
treece8074cf678fd38baa81e9c22ba166f6b11f59a2 /phpBB/install/install_install.php
parent7a79c742883e26f6ba14701a909dc8d2f97ae8c2 (diff)
downloadforums-e08317eb7132692ab93115d47e78b4841909c07c.tar
forums-e08317eb7132692ab93115d47e78b4841909c07c.tar.gz
forums-e08317eb7132692ab93115d47e78b4841909c07c.tar.bz2
forums-e08317eb7132692ab93115d47e78b4841909c07c.tar.xz
forums-e08317eb7132692ab93115d47e78b4841909c07c.zip
- pretty serious speed improvement for strtoupper/strtolower
- mbstring envrio checks #5774 git-svn-id: file:///svn/phpbb/trunk@6701 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/install_install.php')
-rwxr-xr-xphpBB/install/install_install.php62
1 files changed, 60 insertions, 2 deletions
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 0b4f94a5c2..e88e13a05e 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -206,6 +206,64 @@ class install_install extends module
'S_LEGEND' => false,
));
+ $passed['mbstring'] = true;
+ if (extension_loaded('mbstring'))
+ {
+ // Test for available database modules
+ $template->assign_block_vars('checks', array(
+ 'S_LEGEND' => true,
+ 'S_FIRST_ROW' => false,
+ 'LEGEND' => $lang['MBSTRING_CHECK'],
+ 'LEGEND_EXPLAIN' => $lang['MBSTRING_CHECK_EXPLAIN'],
+ ));
+
+ $checks = array(
+ array('func_overload', '&', MB_OVERLOAD_MAIL|MB_OVERLOAD_STRING),
+ array('encoding_translation', '!=', 0),
+ array('http_input', '!=', 'pass'),
+ array('http_output', '!=', 'pass')
+ );
+
+ foreach ($checks as $mb_checks)
+ {
+ $ini_val = ini_get('mbstring.' . $mb_checks[0]);
+ switch ($mb_checks[1])
+ {
+ case '&':
+ if (intval($ini_val) & $mb_checks[2])
+ {
+ $result = '<b style="color:red">' . $lang['NO'] . '</b>';
+ $passed['mbstring'] = false;
+ }
+ else
+ {
+ $result = '<b style="color:green">' . $lang['YES'] . '</b>';
+ }
+ break;
+
+ case '!=':
+ if ($ini_val != $mb_checks[2])
+ {
+ $result = '<b style="color:red">' . $lang['NO'] . '</b>';
+ $passed['mbstring'] = false;
+ }
+ else
+ {
+ $result = '<b style="color:green">' . $lang['YES'] . '</b>';
+ }
+ break;
+ }
+ $template->assign_block_vars('checks', array(
+ 'TITLE' => $lang['MBSTRING_' . strtoupper($mb_checks[0])],
+ 'TITLE_EXPLAIN' => $lang['MBSTRING_' . strtoupper($mb_checks[0]) . '_EXPLAIN'],
+ 'RESULT' => $result,
+
+ 'S_EXPLAIN' => true,
+ 'S_LEGEND' => false,
+ ));
+ }
+ }
+
// Test for available database modules
$template->assign_block_vars('checks', array(
'S_LEGEND' => true,
@@ -415,8 +473,8 @@ class install_install extends module
// And finally where do we want to go next (well today is taken isn't it :P)
$s_hidden_fields = ($img_imagick) ? '<input type="hidden" name="img_imagick" value="' . addslashes($img_imagick) . '" />' : '';
- $url = ($passed['php'] && $passed['db'] && $passed['files'] && $passed['pcre']) ? $this->p_master->module_url . "?mode=$mode&amp;sub=database&amp;language=$language" : $this->p_master->module_url . "?mode=$mode&amp;sub=requirements&amp;language=$language ";
- $submit = ($passed['php'] && $passed['db'] && $passed['files'] && $passed['pcre']) ? $lang['INSTALL_START'] : $lang['INSTALL_TEST'];
+ $url = ($passed['php'] && $passed['db'] && $passed['files'] && $passed['pcre'] && $passed['mbstring']) ? $this->p_master->module_url . "?mode=$mode&amp;sub=database&amp;language=$language" : $this->p_master->module_url . "?mode=$mode&amp;sub=requirements&amp;language=$language ";
+ $submit = ($passed['php'] && $passed['db'] && $passed['files'] && $passed['pcre'] && $passed['mbstring']) ? $lang['INSTALL_START'] : $lang['INSTALL_TEST'];
$template->assign_vars(array(