mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 22:40:39 +02:00
Merge remote-tracking branch 'upstream/develop' into ticket/11015
* upstream/develop: (666 commits) [ticket/11077] Remove code from old global announcements system [ticket/11189] Replace DEBUG_EXTRA with DEBUG [ticket/11189] Always log critical errors when in cron or in image output [ticket/11187] Added a blank array to fix errors in functional tests [ticket/10780] Make L_COLON available in the installer. [ticket/11183] Remove $load_extensions and weird dl() calls [ticket/10970] Added extra documentation to parse_dynamic_path. [ticket/10939] Added documentation for phpbb_request::file [ticket/10865] Use code tags for install/database_update.php. [ticket/10865] Should have been a slash. [ticket/10780] Use L_COLON on LDAP page. [ticket/10780] Use L_COLON on search backend ACP pages. [ticket/10780] Use L_COLON for "download all attachments". [ticket/10780] Use colon from language in ucp_pm_compose.php where possible. [ticket/10780] Replace colons in phpBB/adm/style/acp_ext_details.html. [ticket/10780] Replace colon usage in adm template output with {L_COLON} [ticket/10780] Replace colon usage in template output with {L_COLON} [ticket/11181] Bump PHP requirement to 5.3.3 (from 5.3.2) [develop-olympus] [ticket/11181] Bump PHP requirement to 5.3.3 (from 5.3.2) [ticket/10172] Show prosilver birthday list even if there are no birthdays. ... Conflicts: phpBB/common.php phpBB/download/file.php phpBB/includes/db/dbal.php phpBB/includes/db/firebird.php phpBB/includes/db/mssql.php phpBB/includes/db/mssql_odbc.php phpBB/includes/db/mssqlnative.php phpBB/includes/db/mysql.php phpBB/includes/db/mysqli.php phpBB/includes/db/oracle.php phpBB/includes/db/postgres.php phpBB/includes/db/sqlite.php phpBB/includes/extension/manager.php phpBB/install/database_update.php
This commit is contained in:
@@ -15,27 +15,6 @@ if (!defined('IN_PHPBB'))
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if we are able to load a specified PHP module and do so if possible
|
||||
*/
|
||||
function can_load_dll($dll)
|
||||
{
|
||||
// SQLite2 is a tricky thing, from 5.0.0 it requires PDO; if PDO is not loaded we must state that SQLite is unavailable
|
||||
// as the installer doesn't understand that the extension has a prerequisite.
|
||||
//
|
||||
// On top of this sometimes the SQLite extension is compiled for a different version of PDO
|
||||
// by some Linux distributions which causes phpBB to bomb out with a blank page.
|
||||
//
|
||||
// Net result we'll disable automatic inclusion of SQLite support
|
||||
//
|
||||
// See: r9618 and #56105
|
||||
if ($dll == 'sqlite')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return ((@ini_get('enable_dl') || strtolower(@ini_get('enable_dl')) == 'on') && (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') && function_exists('dl') && @dl($dll . '.' . PHP_SHLIB_SUFFIX)) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of available DBMS with some data, if a DBMS is specified it will only
|
||||
* return data for that DBMS and will load its extension if necessary.
|
||||
@@ -159,18 +138,15 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
|
||||
|
||||
if (!@extension_loaded($dll))
|
||||
{
|
||||
if (!can_load_dll($dll))
|
||||
if ($return_unavailable)
|
||||
{
|
||||
if ($return_unavailable)
|
||||
{
|
||||
$available_dbms[$db_name]['AVAILABLE'] = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($available_dbms[$db_name]);
|
||||
}
|
||||
continue;
|
||||
$available_dbms[$db_name]['AVAILABLE'] = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($available_dbms[$db_name]);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
$any_db_support = true;
|
||||
}
|
||||
@@ -513,15 +489,14 @@ function adjust_language_keys_callback($matches)
|
||||
*
|
||||
* @param array $data Array containing the database connection information
|
||||
* @param string $dbms The name of the DBAL class to use
|
||||
* @param array $load_extensions Array of additional extensions that should be loaded
|
||||
* @param bool $debug If the debug constants should be enabled by default or not
|
||||
* @param bool $debug_test If the DEBUG_TEST constant should be added
|
||||
* NOTE: Only for use within the testing framework
|
||||
*
|
||||
* @return string The output to write to the file
|
||||
*/
|
||||
function phpbb_create_config_file_data($data, $dbms, $load_extensions, $debug = false)
|
||||
function phpbb_create_config_file_data($data, $dbms, $debug = false, $debug_test = false)
|
||||
{
|
||||
$load_extensions = implode(',', $load_extensions);
|
||||
|
||||
$config_data = "<?php\n";
|
||||
$config_data .= "// phpBB 3.1.x auto-generated configuration file\n// Do not change anything in this file!\n";
|
||||
|
||||
@@ -533,8 +508,7 @@ function phpbb_create_config_file_data($data, $dbms, $load_extensions, $debug =
|
||||
'dbuser' => $data['dbuser'],
|
||||
'dbpasswd' => htmlspecialchars_decode($data['dbpasswd']),
|
||||
'table_prefix' => $data['table_prefix'],
|
||||
'acm_type' => 'file',
|
||||
'load_extensions' => $load_extensions,
|
||||
'acm_type' => 'phpbb_cache_driver_file',
|
||||
);
|
||||
|
||||
foreach ($config_data_array as $key => $value)
|
||||
@@ -547,12 +521,15 @@ function phpbb_create_config_file_data($data, $dbms, $load_extensions, $debug =
|
||||
if ($debug)
|
||||
{
|
||||
$config_data .= "@define('DEBUG', true);\n";
|
||||
$config_data .= "@define('DEBUG_EXTRA', true);\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$config_data .= "// @define('DEBUG', true);\n";
|
||||
$config_data .= "// @define('DEBUG_EXTRA', true);\n";
|
||||
}
|
||||
|
||||
if ($debug_test)
|
||||
{
|
||||
$config_data .= "@define('DEBUG_TEST', true);\n";
|
||||
}
|
||||
|
||||
return $config_data;
|
||||
|
Reference in New Issue
Block a user