1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/11183] Remove $load_extensions and weird dl() calls

PHPBB3-11183
This commit is contained in:
Igor Wiedler
2012-11-10 11:25:22 +01:00
parent 957508c8b1
commit 195014867a
8 changed files with 23 additions and 125 deletions

View File

@@ -73,17 +73,6 @@ if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
die("Please read: <a href='../docs/INSTALL.html'>INSTALL.html</a> before attempting to update.");
}
// Load Extensions
if (!empty($load_extensions) && function_exists('dl'))
{
$load_extensions = explode(',', $load_extensions);
foreach ($load_extensions as $extension)
{
@dl(trim($extension));
}
}
// Include files
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
@@ -2716,10 +2705,10 @@ function change_database_data(&$no_updates, $version)
// Create config value for displaying last subject on forum list
if (!isset($config['display_last_subject']))
{
{
$config->set('display_last_subject', '1');
}
$no_updates = false;
if (!isset($config['assets_version']))
@@ -2752,7 +2741,7 @@ function change_database_data(&$no_updates, $version)
// After we have calculated the timezones we can delete user_dst column from user table.
$db_tools->sql_column_remove(USERS_TABLE, 'user_dst');
}
if (!isset($config['site_home_url']))
{
$config->set('site_home_url', '');

View File

@@ -271,14 +271,6 @@ class install_install extends module
'S_LEGEND' => false,
));
/**
* Better not enabling and adding to the loaded extensions due to the specific requirements needed
if (!@extension_loaded('mbstring'))
{
can_load_dll('mbstring');
}
*/
$passed['mbstring'] = true;
if (@extension_loaded('mbstring'))
{
@@ -382,17 +374,14 @@ class install_install extends module
{
if (!@extension_loaded($dll))
{
if (!can_load_dll($dll))
{
$template->assign_block_vars('checks', array(
'TITLE' => $lang['DLL_' . strtoupper($dll)],
'RESULT' => '<strong style="color:red">' . $lang['UNAVAILABLE'] . '</strong>',
$template->assign_block_vars('checks', array(
'TITLE' => $lang['DLL_' . strtoupper($dll)],
'RESULT' => '<strong style="color:red">' . $lang['UNAVAILABLE'] . '</strong>',
'S_EXPLAIN' => false,
'S_LEGEND' => false,
));
continue;
}
'S_EXPLAIN' => false,
'S_LEGEND' => false,
));
continue;
}
$template->assign_block_vars('checks', array(
@@ -873,22 +862,7 @@ class install_install extends module
$written = false;
// Create a list of any PHP modules we wish to have loaded
$load_extensions = array();
$available_dbms = get_available_dbms($data['dbms']);
$check_exts = array_merge(array($available_dbms[$data['dbms']]['MODULE']), $this->php_dlls_other);
foreach ($check_exts as $dll)
{
if (!@extension_loaded($dll))
{
if (!can_load_dll($dll))
{
continue;
}
$load_extensions[] = $dll . '.' . PHP_SHLIB_SUFFIX;
}
}
// Create a lock file to indicate that there is an install in progress
$fp = @fopen($phpbb_root_path . 'cache/install_lock', 'wb');
@@ -902,7 +876,7 @@ class install_install extends module
@chmod($phpbb_root_path . 'cache/install_lock', 0777);
// Time to convert the data provided into a config file
$config_data = phpbb_create_config_file_data($data, $available_dbms[$data['dbms']]['DRIVER'], $load_extensions);
$config_data = phpbb_create_config_file_data($data, $available_dbms[$data['dbms']]['DRIVER']);
// Attempt to write out the config file directly. If it works, this is the easiest way to do it ...
if ((file_exists($phpbb_root_path . 'config.' . $phpEx) && phpbb_is_writable($phpbb_root_path . 'config.' . $phpEx)) || phpbb_is_writable($phpbb_root_path))
@@ -1368,7 +1342,7 @@ class install_install extends module
WHERE config_name = 'dbms_version'",
);
if (@extension_loaded('gd') || can_load_dll('gd'))
if (@extension_loaded('gd'))
{
$sql_ary[] = 'UPDATE ' . $data['table_prefix'] . "config
SET config_value = 'phpbb_captcha_gd'