diff options
Diffstat (limited to 'phpBB/install')
-rw-r--r-- | phpBB/install/database_update.php | 30 | ||||
-rw-r--r-- | phpBB/install/install_convert.php | 2 | ||||
-rw-r--r-- | phpBB/install/install_install.php | 4 | ||||
-rw-r--r-- | phpBB/install/install_update.php | 4 |
4 files changed, 36 insertions, 4 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 8aa62af7e1..a0ca05a129 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -2204,6 +2204,36 @@ function change_database_data(&$no_updates, $version) _sql($sql, $errored, $error_ary); } + /** + * Update BBCodes that currently use the LOCAL_URL tag + * + * To fix http://tracker.phpbb.com/browse/PHPBB3-8319 we changed + * the second_pass_replace value, so that needs updating for existing ones + */ + $sql = 'SELECT * + FROM ' . BBCODES_TABLE . ' + WHERE bbcode_match ' . $db->sql_like_expression($db->any_char . 'LOCAL_URL' . $db->any_char); + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + if (!class_exists('acp_bbcodes')) + { + phpbb_require_updated('includes/acp/acp_bbcodes.' . $phpEx); + } + $bbcode_match = $row['bbcode_match']; + $bbcode_tpl = $row['bbcode_tpl']; + + $acp_bbcodes = new acp_bbcodes(); + $sql_ary = $acp_bbcodes->build_regexp($bbcode_match, $bbcode_tpl); + + $sql = 'UPDATE ' . BBCODES_TABLE . ' + SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' + WHERE bbcode_id = ' . (int) $row['bbcode_id']; + $db->sql_query($sql); + } + $db->sql_freeresult($result); + $no_updates = false; break; } diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 62efc3e46b..fb97255981 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -2087,7 +2087,7 @@ class install_convert extends module // Because we should not rely on correct settings, we simply use the relative path here directly. $template->assign_vars(array( 'S_REFRESH' => true, - 'META' => '<meta http-equiv="refresh" content="5;url=' . $url . '" />') + 'META' => '<meta http-equiv="refresh" content="5; url=' . $url . '" />') ); } } diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 0575b58d92..4618cff855 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1025,8 +1025,8 @@ class install_install extends module } // Replace backslashes and doubled slashes (could happen on some proxy setups) - $name = str_replace(array('\\', '//', '/install'), '/', $name); - $data['script_path'] = trim(dirname($name)); + $name = str_replace(array('\\', '//'), '/', $name); + $data['script_path'] = trim(dirname(dirname($name))); } foreach ($this->advanced_config_options as $config_key => $vars) diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index ec76f2a407..c18a0fb4ec 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -1656,7 +1656,9 @@ class install_update extends module { case 'version_info': global $phpbb_root_path, $phpEx; - $info = get_remote_file('www.phpbb.com', '/updatecheck', ((defined('PHPBB_QA')) ? '30x_qa.txt' : '30x.txt'), $errstr, $errno); + + $info = get_remote_file('version.phpbb.com', '/phpbb', + ((defined('PHPBB_QA')) ? '30x_qa.txt' : '30x.txt'), $errstr, $errno); if ($info !== false) { |