diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2006-04-22 16:18:40 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-04-22 16:18:40 +0000 |
| commit | 856650861f0c454b800fe816ba2592444ef13894 (patch) | |
| tree | d73a41902d1d58784c7502c94ce4d03998131e0a /phpBB/install/index.php | |
| parent | 68c349fdc1ad29ff3c80961297db31b1e725973f (diff) | |
| download | forums-856650861f0c454b800fe816ba2592444ef13894.tar forums-856650861f0c454b800fe816ba2592444ef13894.tar.gz forums-856650861f0c454b800fe816ba2592444ef13894.tar.bz2 forums-856650861f0c454b800fe816ba2592444ef13894.tar.xz forums-856650861f0c454b800fe816ba2592444ef13894.zip | |
- removed group settings from roles
- added forum icon in front of forums in permissions acp
- added trace permissions in permission masks (thanks naderman for writing the first code and for the idea... :))
- some bugfixes
- PHP6 fix
git-svn-id: file:///svn/phpbb/trunk@5824 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/index.php')
| -rwxr-xr-x | phpBB/install/index.php | 90 |
1 files changed, 50 insertions, 40 deletions
diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 32728e0900..5a0ecc7bd0 100755 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -13,65 +13,75 @@ define('IN_PHPBB', true); define('IN_INSTALL', true); -// Error reporting level and runtime escaping -//error_reporting(E_ERROR | E_WARNING | E_PARSE); -error_reporting(E_ALL); -set_magic_quotes_runtime(0); - -@set_time_limit(120); - -// Include essential scripts $phpbb_root_path = './../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); -require($phpbb_root_path . 'includes/functions.'.$phpEx); -include($phpbb_root_path . 'includes/auth.' . $phpEx); -include($phpbb_root_path . 'includes/session.'.$phpEx); -include($phpbb_root_path . 'includes/template.'.$phpEx); -include($phpbb_root_path . 'includes/acm/acm_file.'.$phpEx); -include($phpbb_root_path . 'includes/acm/acm_main.'.$phpEx); -include($phpbb_root_path . 'includes/functions_admin.'.$phpEx); -// Protect against GLOBALS tricks -if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) -{ - exit; -} +// Error reporting level and runtime escaping +//error_reporting(E_ERROR | E_WARNING | E_PARSE); +error_reporting(E_ALL); -// Protect against _SESSION tricks -if (isset($_SESSION) && !is_array($_SESSION)) +// If we are on PHP >= 6.0.0 we do not need some code +if (version_compare(phpversion(), '6.0.0', '>=')) { - exit; + define('STRIP', false); } - -// Be paranoid with passed vars -if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on') +else { - $not_unset = array('_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_SESSION', '_ENV', '_FILES', 'phpEx', 'phpbb_root_path'); + set_magic_quotes_runtime(0); - // Not only will array_merge give a warning if a parameter - // is not an array, it will actually fail. So we check if - // _SESSION has been initialised. - if (!isset($_SESSION) || !is_array($_SESSION)) + // Protect against GLOBALS tricks + if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) { - $_SESSION = array(); + exit; } - // Merge all into one extremely huge array; unset - // this later - $input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_SESSION, $_ENV, $_FILES); + // Protect against _SESSION tricks + if (isset($_SESSION) && !is_array($_SESSION)) + { + exit; + } - foreach ($input as $varname => $void) + // Be paranoid with passed vars + if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on') { - if (!in_array($varname, $not_unset)) + $not_unset = array('_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_SESSION', '_ENV', '_FILES', 'phpEx', 'phpbb_root_path'); + + // Not only will array_merge give a warning if a parameter + // is not an array, it will actually fail. So we check if + // _SESSION has been initialised. + if (!isset($_SESSION) || !is_array($_SESSION)) { - unset(${$varname}); + $_SESSION = array(); } + + // Merge all into one extremely huge array; unset + // this later + $input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_SESSION, $_ENV, $_FILES); + + foreach ($input as $varname => $void) + { + if (!in_array($varname, $not_unset)) + { + unset(${$varname}); + } + } + + unset($input); } - unset($input); + define('STRIP', (get_magic_quotes_gpc()) ? true : false); } -define('STRIP', (get_magic_quotes_gpc()) ? true : false); +@set_time_limit(120); + +// Include essential scripts +require($phpbb_root_path . 'includes/functions.'.$phpEx); +include($phpbb_root_path . 'includes/auth.' . $phpEx); +include($phpbb_root_path . 'includes/session.'.$phpEx); +include($phpbb_root_path . 'includes/template.'.$phpEx); +include($phpbb_root_path . 'includes/acm/acm_file.'.$phpEx); +include($phpbb_root_path . 'includes/acm/acm_main.'.$phpEx); +include($phpbb_root_path . 'includes/functions_admin.'.$phpEx); // Try and load an appropriate language if required $language = request_var('language', ''); |
