From a8c22829d8e8845cd4ddf4ef8b61a1ed79edfffc Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Mon, 12 Mar 2018 22:57:42 +0100 Subject: Imported from the SVN repository http://svn.wolffelaar.nl/wsvn/phpbb/branches/jessie/ Signed-off-by: Olivier Gayot --- debian/maint-patches/007_database_update_php.diff | 306 ++++++++++++++++++++++ 1 file changed, 306 insertions(+) create mode 100644 debian/maint-patches/007_database_update_php.diff (limited to 'debian/maint-patches/007_database_update_php.diff') diff --git a/debian/maint-patches/007_database_update_php.diff b/debian/maint-patches/007_database_update_php.diff new file mode 100644 index 0000000..d0c4275 --- /dev/null +++ b/debian/maint-patches/007_database_update_php.diff @@ -0,0 +1,306 @@ +--- ../install/database_update.php 2013-09-28 14:36:35.462359564 -0400 ++++ database_update_debian.php 2013-09-28 16:04:35.046507402 -0400 +@@ -1,3 +1,4 @@ ++#!/usr/bin/php5 + +- +- +- +- +- +- +- +- +- +-<?php echo $lang['UPDATING_TO_LATEST_STABLE']; ?> +- +- +- +- +- +- +-
+- +- +-
+-
+-
+- +-
+-
+- +-

+- +-
+- +-

:: sql_layer; ?>
+-' . $config['version'] . '
'; +-echo $lang['UPDATED_VERSION'] . ' :: ' . $updates_to_version . '

'; +- + $current_version = str_replace('rc', 'RC', strtolower($config['version'])); + $latest_version = str_replace('rc', 'RC', strtolower($updates_to_version)); + $orig_version = $config['version']; +@@ -243,79 +205,6 @@ + set_config('dbms_version', $db->sql_server_info(true)); + } + +-// Firebird update from Firebird 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 '

'; +- echo '

' . $lang['ERROR'] . '


'; +- +- echo '

' . $lang['FIREBIRD_DBMS_UPDATE_REQUIRED'] . '

'; +- +- _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') +-{ +- // Verify by fetching column... if the column type matches the new type we update dbms_version... +- $sql = "SHOW COLUMNS FROM " . CONFIG_TABLE; +- $result = $db->sql_query($sql); +- +- $column_type = ''; +- while ($row = $db->sql_fetchrow($result)) +- { +- $field = strtolower($row['Field']); +- +- if ($field == 'config_value') +- { +- $column_type = strtolower($row['Type']); +- break; +- } +- } +- $db->sql_freeresult($result); +- +- // If column type is blob, but mysql version says we are on > 4.1.3, then the schema needs an update +- if (strpos($column_type, 'blob') !== false && version_compare($db->sql_server_info(true), '4.1.3', '>=')) +- { +- echo '

'; +- echo '

' . $lang['ERROR'] . '


'; +- +- echo '

' . sprintf($lang['MYSQL_SCHEMA_UPDATE_REQUIRED'], $config['dbms_version'], $db->sql_server_info(true)) . '

'; +- +- _print_footer(); +- +- exit_handler(); +- exit; +- } +-} +- +-// Now check if the user wants to update from a version we no longer support updates from +-if (version_compare($current_version, $oldest_from_version, '<')) +-{ +- echo '

' . $lang['ERROR'] . '


'; +- echo '

' . sprintf($lang['DB_UPDATE_NOT_SUPPORTED'], $oldest_from_version, $current_version) . '

'; +- +- _print_footer(); +- exit_handler(); +- exit; +-} +- + // If the latest version and the current version are 'unequal', we will update the version_update_from, else we do not update anything. + if ($inline_update) + { +@@ -331,17 +220,6 @@ + } + + // Schema updates +-?> +-

+- +-

+- +-
+-

:: +- +- +- +-

+-

+-
+-

:: +- +- +- +-

+-

+-
+-

:: +- +- +- +-
+-

+- +-
+- +- +- +-

+- +-

+- +- +- +-

+- +-

" class="button1">

+- +-purge(); + +-_print_footer(); ++//_print_footer(); + + garbage_collection(); + +@@ -514,32 +340,9 @@ + } + + /** +-* Print out footer +-*/ +-function _print_footer() +-{ +- echo << +-
+- +-
+-
+-
+- +- +-
+- +- +- +-EOF; +-} +- +-/** + * Function for triggering an sql statement + */ +-function _sql($sql, &$errored, &$error_ary, $echo_dot = true) ++function _sql($sql, &$errored, &$error_ary, $echo_dot = false) + { + global $db; + +@@ -582,6 +385,7 @@ + + function _write_result($no_updates, $errored, $error_ary) + { ++ return true; + global $lang; + + if ($no_updates) -- cgit v1.2.3