From: Meik S. <acy...@ph...> - 2009-08-13 15:26:05
|
Author: acydburn Date: Thu Aug 13 16:25:20 2009 New Revision: 9970 Log: Lifted minimum requirement for Firebird DBMS from 2.0+ to 2.1+. Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html branches/phpBB-3_0_0/phpBB/docs/INSTALL.html branches/phpBB-3_0_0/phpBB/includes/db/firebird.php branches/phpBB-3_0_0/phpBB/includes/functions_install.php branches/phpBB-3_0_0/phpBB/install/database_update.php branches/phpBB-3_0_0/phpBB/language/en/install.php Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html (original) --- branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html Thu Aug 13 16:25:20 2009 *************** *** 219,224 **** --- 219,225 ---- <li>[Change] When creating a new forum without copying permissions, ask again.</li> <li>[Change] Parse multiline url title for [url] BBCode tag. (Bug #1309)</li> <li>[Change] Introduce new parameter to page_header() for forum specific who is online listings.</li> + <li>[Change] Lifted minimum requirement for Firebird DBMS from 2.0+ to 2.1+.</li> <li>[Feature] Add language selection on the registration terms page (Bug #15085 - Patch by leviatan21)</li> <li>[Feature] Backported 3.2 captcha plugins. <ul> Modified: branches/phpBB-3_0_0/phpBB/docs/INSTALL.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/docs/INSTALL.html (original) --- branches/phpBB-3_0_0/phpBB/docs/INSTALL.html Thu Aug 13 16:25:20 2009 *************** *** 139,145 **** <li>MySQL 3.23 or above (MySQLi supported)</li> <li>PostgreSQL 7.3+</li> <li>SQLite 2.8.2+</li> ! <li>Firebird 2.0+</li> <li>MS SQL Server 2000 or above (directly or via ODBC)</li> <li>Oracle</li> </ul> --- 139,145 ---- <li>MySQL 3.23 or above (MySQLi supported)</li> <li>PostgreSQL 7.3+</li> <li>SQLite 2.8.2+</li> ! <li>Firebird 2.1+</li> <li>MS SQL Server 2000 or above (directly or via ODBC)</li> <li>Oracle</li> </ul> Modified: branches/phpBB-3_0_0/phpBB/includes/db/firebird.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/db/firebird.php (original) --- branches/phpBB-3_0_0/phpBB/includes/db/firebird.php Thu Aug 13 16:25:20 2009 *************** *** 20,26 **** /** * Firebird/Interbase Database Abstraction Layer ! * Minimum Requirement is Firebird 2.0 * @package dbal */ class dbal_firebird extends dbal --- 20,26 ---- /** * Firebird/Interbase Database Abstraction Layer ! * Minimum Requirement is Firebird 2.1 * @package dbal */ class dbal_firebird extends dbal *************** *** 72,78 **** return @ibase_server_info($this->service_handle, IBASE_SVC_SERVER_VERSION); } ! return ($raw) ? '2.0' : 'Firebird/Interbase'; } /** --- 72,78 ---- return @ibase_server_info($this->service_handle, IBASE_SVC_SERVER_VERSION); } ! return ($raw) ? '2.1' : 'Firebird/Interbase'; } /** Modified: branches/phpBB-3_0_0/phpBB/includes/functions_install.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/functions_install.php (original) --- branches/phpBB-3_0_0/phpBB/includes/functions_install.php Thu Aug 13 16:25:20 2009 *************** *** 181,187 **** function dbms_select($default = '', $only_20x_options = false) { global $lang; ! $available_dbms = get_available_dbms(false, false, $only_20x_options); $dbms_options = ''; foreach ($available_dbms as $dbms_name => $details) --- 181,187 ---- function dbms_select($default = '', $only_20x_options = false) { global $lang; ! $available_dbms = get_available_dbms(false, false, $only_20x_options); $dbms_options = ''; foreach ($available_dbms as $dbms_name => $details) *************** *** 402,411 **** } else { ! $sql = "SELECT FIRST 0 char_length('') ! FROM RDB\$DATABASE"; $result = $db->sql_query($sql); ! if (!$result) // This can only fail if char_length is not defined { $error[] = $lang['INST_ERR_DB_NO_FIREBIRD']; } --- 402,411 ---- } else { ! $sql = 'SELECT 1 FROM RDB$DATABASE ! WHERE BIN_AND(10, 1) = 0'; $result = $db->sql_query($sql); ! if (!$result) // This can only fail if BIN_AND is not defined { $error[] = $lang['INST_ERR_DB_NO_FIREBIRD']; } *************** *** 446,452 **** unset($final); } break; ! case 'oracle': if ($unicode_check) { --- 446,452 ---- unset($final); } break; ! case 'oracle': if ($unicode_check) { *************** *** 468,474 **** } } break; ! case 'postgres': if ($unicode_check) { --- 468,474 ---- } } break; ! case 'postgres': if ($unicode_check) { Modified: branches/phpBB-3_0_0/phpBB/install/database_update.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/install/database_update.php (original) --- branches/phpBB-3_0_0/phpBB/install/database_update.php Thu Aug 13 16:25:20 2009 *************** *** 222,227 **** --- 222,254 ---- set_config('dbms_version', $db->sql_server_info(true)); } + // Firebird update from Firebord 2.0 to 2.1+ required? + if ($db->sql_layer == 'firebird') + { + // We do not trust any PHP5 function enabled, we will simply test for a function new in 2.1 + $db->sql_return_on_error(true); + + $sql = 'SELECT 1 FROM RDB$DATABASE + WHERE BIN_AND(10, 1) = 0'; + $result = $db->sql_query($sql); + + if (!$result || $db->sql_error_triggered) + { + echo '<br /><br />'; + echo '<h1>' . $lang['ERROR'] . '</h1><br />'; + + echo '<p>' . $lang['FIREBIRD_DBMS_UPDATE_REQUIRED'] . '</p>'; + + _print_footer(); + + exit_handler(); + exit; + } + + $db->sql_freeresult($result); + $db->sql_return_on_error(false); + } + // MySQL update from MySQL 3.x/4.x to > 4.1.x required? if ($db->sql_layer == 'mysql' || $db->sql_layer == 'mysql4' || $db->sql_layer == 'mysqli') { Modified: branches/phpBB-3_0_0/phpBB/language/en/install.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/language/en/install.php (original) --- branches/phpBB-3_0_0/phpBB/language/en/install.php Thu Aug 13 16:25:20 2009 *************** *** 167,172 **** --- 167,175 ---- 'FILES_REQUIRED_EXPLAIN' => '<strong>Required</strong> - In order to function correctly phpBB needs to be able to access or write to certain files or directories. If you see âNot Foundâ you need to create the relevant file or directory. If you see âUnwritableâ you need to change the permissions on the file or directory to allow phpBB to write to it.', 'FILLING_TABLE' => 'Filling table <strong>%s</strong>', 'FILLING_TABLES' => 'Filling tables', + + 'FIREBIRD_DBMS_UPDATE_REQUIRED' => 'phpBB no longer supports Firebird/Interbase prior to Version 2.1. Please update your Firebird installation to at least 2.1.0 before proceeding with the update.', + 'FINAL_STEP' => 'Process final step', 'FORUM_ADDRESS' => 'Board address', 'FORUM_ADDRESS_EXPLAIN' => 'This is the URL of your former board, for example <samp>http://www.example.com/phpBB2/</samp>. If an address is entered here and not left empty every instance of this address will be replaced by your new board address within messages, private messages and signatures.', *************** *** 209,215 **** <li>MySQL 3.23 or above (MySQLi supported)</li> <li>PostgreSQL 7.3+</li> <li>SQLite 2.8.2+</li> ! <li>Firebird 2.0+</li> <li>MS SQL Server 2000 or above (directly or via ODBC)</li> <li>Oracle</li> </ul> --- 212,218 ---- <li>MySQL 3.23 or above (MySQLi supported)</li> <li>PostgreSQL 7.3+</li> <li>SQLite 2.8.2+</li> ! <li>Firebird 2.1+</li> <li>MS SQL Server 2000 or above (directly or via ODBC)</li> <li>Oracle</li> </ul> *************** *** 231,237 **** 'INST_ERR_DB_NO_MYSQLI' => 'The version of MySQL installed on this machine is incompatible with the âMySQL with MySQLi Extensionâ option you have selected. Please try the âMySQLâ option instead.', 'INST_ERR_DB_NO_SQLITE' => 'The version of the SQLite extension you have installed is too old, it must be upgraded to at least 2.8.2.', 'INST_ERR_DB_NO_ORACLE' => 'The version of Oracle installed on this machine requires you to set the <var>NLS_CHARACTERSET</var> parameter to <var>UTF8</var>. Either upgrade your installation to 9.2+ or change the parameter.', ! 'INST_ERR_DB_NO_FIREBIRD' => 'The version of Firebird installed on this machine is older than 2.0, please upgrade to a newer version.', 'INST_ERR_DB_NO_FIREBIRD_PS'=> 'The database you selected for Firebird has a page size less than 8192, it must be at least 8192.', 'INST_ERR_DB_NO_POSTGRES' => 'The database you have selected was not created in <var>UNICODE</var> or <var>UTF8</var> encoding. Try installing with a database in <var>UNICODE</var> or <var>UTF8</var> encoding.', 'INST_ERR_DB_NO_NAME' => 'No database name specified.', --- 234,240 ---- 'INST_ERR_DB_NO_MYSQLI' => 'The version of MySQL installed on this machine is incompatible with the âMySQL with MySQLi Extensionâ option you have selected. Please try the âMySQLâ option instead.', 'INST_ERR_DB_NO_SQLITE' => 'The version of the SQLite extension you have installed is too old, it must be upgraded to at least 2.8.2.', 'INST_ERR_DB_NO_ORACLE' => 'The version of Oracle installed on this machine requires you to set the <var>NLS_CHARACTERSET</var> parameter to <var>UTF8</var>. Either upgrade your installation to 9.2+ or change the parameter.', ! 'INST_ERR_DB_NO_FIREBIRD' => 'The version of Firebird installed on this machine is older than 2.1, please upgrade to a newer version.', 'INST_ERR_DB_NO_FIREBIRD_PS'=> 'The database you selected for Firebird has a page size less than 8192, it must be at least 8192.', 'INST_ERR_DB_NO_POSTGRES' => 'The database you have selected was not created in <var>UNICODE</var> or <var>UTF8</var> encoding. Try installing with a database in <var>UNICODE</var> or <var>UTF8</var> encoding.', 'INST_ERR_DB_NO_NAME' => 'No database name specified.', |