aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/install')
-rw-r--r--phpBB/install/convertors/convert_phpbb20.php11
-rw-r--r--phpBB/install/database_update.php162
-rw-r--r--phpBB/install/install_convert.php2
-rw-r--r--phpBB/install/install_install.php3
-rw-r--r--phpBB/install/install_update.php105
-rw-r--r--phpBB/install/schemas/firebird_schema.sql1
-rw-r--r--phpBB/install/schemas/mssql_schema.sql11
-rw-r--r--phpBB/install/schemas/mysql_40_schema.sql1
-rw-r--r--phpBB/install/schemas/mysql_41_schema.sql1
-rw-r--r--phpBB/install/schemas/oracle_schema.sql2
-rw-r--r--phpBB/install/schemas/postgres_schema.sql1
-rw-r--r--phpBB/install/schemas/schema_data.sql14
-rw-r--r--phpBB/install/schemas/sqlite_schema.sql1
13 files changed, 262 insertions, 53 deletions
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php
index 5a6603883b..1d6b79bbec 100644
--- a/phpBB/install/convertors/convert_phpbb20.php
+++ b/phpBB/install/convertors/convert_phpbb20.php
@@ -32,7 +32,7 @@ unset($dbpasswd);
$convertor_data = array(
'forum_name' => 'phpBB 2.0.x',
'version' => '1.0.3',
- 'phpbb_version' => '3.0.6',
+ 'phpbb_version' => '3.0.7',
'author' => '<a href="http://www.phpbb.com/">phpBB Group</a>',
'dbms' => $dbms,
'dbhost' => $dbhost,
@@ -78,6 +78,15 @@ $tables = array(
*
* 'table_format' can take the value 'file' to indicate a config file. In this case array_name
* is set to indicate the name of the array the config values are stored in
+* Example of using a file:
+* $config_schema = array(
+* 'table_format' => 'file',
+* 'filename' => 'NAME OF FILE', // If the file is not in the root directory, the path needs to be added with no leading slash
+* 'array_name' => 'NAME OF ARRAY', // Only used if the configuration file stores the setting in an array.
+* 'settings' => array(
+* 'board_email' => 'SUPPORT_EMAIL', // target config name => source target name
+* )
+* );
* 'table_format' can be an array if the values are stored in a table which is an assosciative array
* (as per phpBB 2.0.x)
* If left empty, values are assumed to be stored in a table where each config setting is
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index bf9c183e0c..df8aadfdb2 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -8,7 +8,7 @@
*
*/
-$updates_to_version = '3.0.6';
+$updates_to_version = '3.0.8-dev';
// Enter any version to update from to test updates. The version within the db will not be updated.
$debug_from_version = false;
@@ -885,18 +885,32 @@ function database_update_info()
),
),
),
- // Changes from 3.0.6-RC1 to 3.0.6-RC2
- '3.0.6-RC1' => array(
- 'drop_keys' => array(
- LOG_TABLE => array('log_time'),
- ),
- ),
+
+ // No changes from 3.0.6-RC1 to 3.0.6-RC2
+ '3.0.6-RC1' => array(),
// No changes from 3.0.6-RC2 to 3.0.6-RC3
'3.0.6-RC2' => array(),
// No changes from 3.0.6-RC3 to 3.0.6-RC4
'3.0.6-RC3' => array(),
// No changes from 3.0.6-RC4 to 3.0.6
'3.0.6-RC4' => array(),
+
+ // Changes from 3.0.6 to 3.0.7-RC1
+ '3.0.6' => array(
+ 'drop_keys' => array(
+ LOG_TABLE => array('log_time'),
+ ),
+ 'add_index' => array(
+ TOPICS_TRACK_TABLE => array(
+ 'topic_id' => array('topic_id'),
+ ),
+ ),
+ ),
+
+ // No changes from 3.0.7-RC1 to 3.0.7-RC2
+ '3.0.7-RC1' => array(),
+ // No changes from 3.0.7-RC2 to 3.0.7
+ '3.0.7-RC2' => array(),
);
}
@@ -1569,6 +1583,65 @@ function change_database_data(&$no_updates, $version)
// No changes from 3.0.6-RC4 to 3.0.6
case '3.0.6-RC4':
break;
+
+ // Changes from 3.0.6 to 3.0.7-RC1
+ case '3.0.6':
+
+ // ATOM Feeds
+ set_config('feed_overall', '1');
+ set_config('feed_http_auth', '0');
+ set_config('feed_limit_post', (string) (isset($config['feed_limit']) ? (int) $config['feed_limit'] : 15));
+ set_config('feed_limit_topic', (string) (isset($config['feed_overall_topics_limit']) ? (int) $config['feed_overall_topics_limit'] : 10));
+ set_config('feed_topics_new', (!empty($config['feed_overall_topics']) ? '1' : '0'));
+ set_config('feed_topics_active', (!empty($config['feed_overall_topics']) ? '1' : '0'));
+
+ // Delete all text-templates from the template_data
+ $sql = 'DELETE FROM ' . STYLES_TEMPLATE_DATA_TABLE . '
+ WHERE template_filename ' . $db->sql_like_expression($db->any_char . '.txt');
+ _sql($sql, $errored, $error_ary);
+
+ $no_updates = false;
+ break;
+
+ // Changes from 3.0.7-RC1 to 3.0.7-RC2
+ case '3.0.7-RC1':
+
+ $sql = 'SELECT user_id, user_email, user_email_hash
+ FROM ' . USERS_TABLE . '
+ WHERE user_type <> ' . USER_IGNORE . "
+ AND user_email <> ''";
+ $result = $db->sql_query($sql);
+
+ $i = 0;
+ while ($row = $db->sql_fetchrow($result))
+ {
+ // Snapshot of the phpbb_email_hash() function
+ // We cannot call it directly because the auto updater updates the DB first. :/
+ $user_email_hash = sprintf('%u', crc32(strtolower($row['user_email']))) . strlen($row['user_email']);
+
+ if ($user_email_hash != $row['user_email_hash'])
+ {
+ $sql_ary = array(
+ 'user_email_hash' => $user_email_hash,
+ );
+
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE user_id = ' . (int) $row['user_id'];
+ _sql($sql, $errored, $error_ary, ($i % 100 == 0));
+
+ ++$i;
+ }
+ }
+ $db->sql_freeresult($result);
+
+ $no_updates = false;
+
+ break;
+
+ // No changes from 3.0.7-RC2 to 3.0.7
+ case '3.0.7-RC2':
+ break;
}
}
@@ -1715,7 +1788,37 @@ class updater_db_tools
'VCHAR_CI' => '[varchar] (255)',
'VARBINARY' => '[varchar] (255)',
),
-
+
+ 'mssqlnative' => array(
+ 'INT:' => '[int]',
+ 'BINT' => '[float]',
+ 'UINT' => '[int]',
+ 'UINT:' => '[int]',
+ 'TINT:' => '[int]',
+ 'USINT' => '[int]',
+ 'BOOL' => '[int]',
+ 'VCHAR' => '[varchar] (255)',
+ 'VCHAR:' => '[varchar] (%d)',
+ 'CHAR:' => '[char] (%d)',
+ 'XSTEXT' => '[varchar] (1000)',
+ 'STEXT' => '[varchar] (3000)',
+ 'TEXT' => '[varchar] (8000)',
+ 'MTEXT' => '[text]',
+ 'XSTEXT_UNI'=> '[varchar] (100)',
+ 'STEXT_UNI' => '[varchar] (255)',
+ 'TEXT_UNI' => '[varchar] (4000)',
+ 'MTEXT_UNI' => '[text]',
+ 'TIMESTAMP' => '[int]',
+ 'DECIMAL' => '[float]',
+ 'DECIMAL:' => '[float]',
+ 'PDECIMAL' => '[float]',
+ 'PDECIMAL:' => '[float]',
+ 'VCHAR_UNI' => '[varchar] (255)',
+ 'VCHAR_UNI:'=> '[varchar] (%d)',
+ 'VCHAR_CI' => '[varchar] (255)',
+ 'VARBINARY' => '[varchar] (255)',
+ ),
+
'oracle' => array(
'INT:' => 'number(%d)',
'BINT' => 'number(20)',
@@ -1817,7 +1920,7 @@ class updater_db_tools
* A list of supported DBMS. We change this class to support more DBMS, the DBMS itself only need to follow some rules.
* @var array
*/
- var $supported_dbms = array('firebird', 'mssql', 'mysql_40', 'mysql_41', 'oracle', 'postgres', 'sqlite');
+ var $supported_dbms = array('firebird', 'mssql', 'mssqlnative', 'mysql_40', 'mysql_41', 'oracle', 'postgres', 'sqlite');
/**
* This is set to true if user only wants to return the 'to-be-executed' SQL statement(s) (as an array).
@@ -1862,6 +1965,10 @@ class updater_db_tools
case 'mssql_odbc':
$this->sql_layer = 'mssql';
break;
+
+ case 'mssqlnative':
+ $this->sql_layer = 'mssqlnative';
+ break;
default:
$this->sql_layer = $this->db->sql_layer;
@@ -2294,6 +2401,7 @@ class updater_db_tools
// same deal with PostgreSQL, we must perform more complex operations than
// we technically could
case 'mssql':
+ case 'mssqlnative':
$sql = "SELECT c.name
FROM syscolumns c
LEFT JOIN sysobjects o ON c.id = o.id
@@ -2397,7 +2505,7 @@ class updater_db_tools
*/
function sql_index_exists($table_name, $index_name)
{
- if ($this->sql_layer == 'mssql')
+ if ($this->sql_layer == 'mssql' || $this->sql_layer == 'mssqlnative')
{
$sql = "EXEC sp_statistics '$table_name'";
$result = $this->db->sql_query($sql);
@@ -2502,7 +2610,7 @@ class updater_db_tools
*/
function sql_unique_index_exists($table_name, $index_name)
{
- if ($this->sql_layer == 'mssql')
+ if ($this->sql_layer == 'mssql' || $this->sql_layer == 'mssqlnative')
{
$sql = "EXEC sp_statistics '$table_name'";
$result = $this->db->sql_query($sql);
@@ -2741,6 +2849,7 @@ class updater_db_tools
break;
case 'mssql':
+ case 'mssqlnative':
$sql .= " {$column_type} ";
$sql_default = " {$column_type} ";
@@ -2890,6 +2999,7 @@ class updater_db_tools
break;
case 'mssql':
+ case 'mssqlnative':
// Does not support AFTER, only through temporary table
$statements[] = 'ALTER TABLE [' . $table_name . '] ADD [' . $column_name . '] ' . $column_data['column_type_sql_default'];
break;
@@ -2907,7 +3017,29 @@ class updater_db_tools
case 'postgres':
// Does not support AFTER, only through temporary table
- $statements[] = 'ALTER TABLE ' . $table_name . ' ADD COLUMN "' . $column_name . '" ' . $column_data['column_type_sql'];
+
+ if (version_compare($this->db->sql_server_info(true), '8.0', '>='))
+ {
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ADD COLUMN "' . $column_name . '" ' . $column_data['column_type_sql'];
+ }
+ else
+ {
+ // old versions cannot add columns with default and null information
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ADD COLUMN "' . $column_name . '" ' . $column_data['column_type'] . ' ' . $column_data['constraint'];
+
+ if (isset($column_data['null']))
+ {
+ if ($column_data['null'] == 'NOT NULL')
+ {
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN ' . $column_name . ' SET NOT NULL';
+ }
+ }
+
+ if (isset($column_data['default']))
+ {
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN ' . $column_name . ' SET DEFAULT ' . $column_data['default'];
+ }
+ }
break;
case 'sqlite':
@@ -2992,6 +3124,7 @@ class updater_db_tools
break;
case 'mssql':
+ case 'mssqlnative':
$statements[] = 'ALTER TABLE [' . $table_name . '] DROP COLUMN [' . $column_name . ']';
break;
@@ -3086,6 +3219,7 @@ class updater_db_tools
switch ($this->sql_layer)
{
case 'mssql':
+ case 'mssqlnative':
$statements[] = 'DROP INDEX ' . $table_name . '.' . $index_name;
break;
@@ -3122,6 +3256,7 @@ class updater_db_tools
break;
case 'mssql':
+ case 'mssqlnative':
$sql = "ALTER TABLE [{$table_name}] WITH NOCHECK ADD ";
$sql .= "CONSTRAINT [PK_{$table_name}] PRIMARY KEY CLUSTERED (";
$sql .= '[' . implode("],\n\t\t[", $column) . ']';
@@ -3215,6 +3350,7 @@ class updater_db_tools
break;
case 'mssql':
+ case 'mssqlnative':
$statements[] = 'CREATE UNIQUE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ') ON [PRIMARY]';
break;
}
@@ -3244,6 +3380,7 @@ class updater_db_tools
break;
case 'mssql':
+ case 'mssqlnative':
$statements[] = 'CREATE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ') ON [PRIMARY]';
break;
}
@@ -3276,6 +3413,7 @@ class updater_db_tools
break;
case 'mssql':
+ case 'mssqlnative':
$statements[] = 'ALTER TABLE [' . $table_name . '] ALTER COLUMN [' . $column_name . '] ' . $column_data['column_type_sql'];
if (!empty($column_data['default']))
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php
index 7f1b9de5b6..06c3a8b4a6 100644
--- a/phpBB/install/install_convert.php
+++ b/phpBB/install/install_convert.php
@@ -1248,6 +1248,7 @@ class install_convert extends module
{
case 'mssql':
case 'mssql_odbc':
+ case 'mssqlnative':
$db->sql_query('SET IDENTITY_INSERT ' . $schema['target'] . ' ON');
break;
}
@@ -1375,6 +1376,7 @@ class install_convert extends module
{
case 'mssql':
case 'mssql_odbc':
+ case 'mssqlnative':
$db->sql_query('SET IDENTITY_INSERT ' . $schema['target'] . ' OFF');
break;
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 1cc1365752..f4989b5bd7 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1203,6 +1203,7 @@ class install_install extends module
{
case 'mssql':
case 'mssql_odbc':
+ case 'mssqlnative':
$sql_query = preg_replace('#\# MSSQL IDENTITY (phpbb_[a-z_]+) (ON|OFF) \##s', 'SET IDENTITY_INSERT \1 \2;', $sql_query);
break;
@@ -1375,7 +1376,7 @@ class install_install extends module
$sql_ary[] = 'UPDATE ' . $data['table_prefix'] . "config
SET config_value = 'phpbb_captcha_gd'
WHERE config_name = 'captcha_plugin'";
-
+
$sql_ary[] = 'UPDATE ' . $data['table_prefix'] . "config
SET config_value = '1'
WHERE config_name = 'captcha_gd'";
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php
index 9f5a428029..a5e54a354a 100644
--- a/phpBB/install/install_update.php
+++ b/phpBB/install/install_update.php
@@ -240,6 +240,7 @@ class install_update extends module
// Make sure the update list is destroyed.
$cache->destroy('_update_list');
$cache->destroy('_diff_files');
+ $cache->destroy('_expected_files');
break;
case 'version_check':
@@ -312,7 +313,14 @@ class install_update extends module
case 'file_check':
- // Make sure the previous file collection is no longer valid...
+ // retrieve info on what changes should have already been made to the files.
+ $expected_files = $cache->get('_expected_files');
+ if (!$expected_files)
+ {
+ $expected_files = array();
+ }
+
+ // Now make sure the previous file collection is no longer valid...
$cache->destroy('_diff_files');
$this->page_title = 'STAGE_FILE_CHECK';
@@ -349,7 +357,7 @@ class install_update extends module
if ($get_new_list)
{
- $this->get_update_structure($update_list);
+ $this->get_update_structure($update_list, $expected_files);
$cache->put('_update_list', $update_list);
// Refresh the page if we are still not finished...
@@ -384,6 +392,8 @@ class install_update extends module
);
}
+ $new_expected_files = array();
+
// Now assign the list to the template
foreach ($update_list as $status => $filelist)
{
@@ -419,29 +429,38 @@ class install_update extends module
$diff_url = append_sid($this->p_master->module_url, "mode=$mode&amp;sub=file_check&amp;action=diff&amp;status=$status&amp;file=" . urlencode($file_struct['filename']));
- $template->assign_block_vars($status, array(
- 'STATUS' => $status,
+ if (isset($file_struct['as_expected']) && $file_struct['as_expected'])
+ {
+ $new_expected_files[$file_struct['filename']] = $expected_files[$file_struct['filename']];
+ }
+ else
+ {
+ $template->assign_block_vars($status, array(
+ 'STATUS' => $status,
- 'FILENAME' => $filename,
- 'DIR_PART' => $dir_part,
- 'FILE_PART' => $file_part,
- 'NUM_CONFLICTS' => (isset($file_struct['conflicts'])) ? $file_struct['conflicts'] : 0,
+ 'FILENAME' => $filename,
+ 'DIR_PART' => $dir_part,
+ 'FILE_PART' => $file_part,
+ 'NUM_CONFLICTS' => (isset($file_struct['conflicts'])) ? $file_struct['conflicts'] : 0,
- 'S_CUSTOM' => ($file_struct['custom']) ? true : false,
- 'S_BINARY' => $s_binary,
- 'CUSTOM_ORIGINAL' => ($file_struct['custom']) ? $file_struct['original'] : '',
+ 'S_CUSTOM' => ($file_struct['custom']) ? true : false,
+ 'S_BINARY' => $s_binary,
+ 'CUSTOM_ORIGINAL' => ($file_struct['custom']) ? $file_struct['original'] : '',
- 'U_SHOW_DIFF' => $diff_url,
- 'L_SHOW_DIFF' => ($status != 'up_to_date') ? $user->lang['SHOW_DIFF_' . strtoupper($status)] : '',
+ 'U_SHOW_DIFF' => $diff_url,
+ 'L_SHOW_DIFF' => ($status != 'up_to_date') ? $user->lang['SHOW_DIFF_' . strtoupper($status)] : '',
- 'U_VIEW_MOD_FILE' => $diff_url . '&amp;op=' . MERGE_MOD_FILE,
- 'U_VIEW_NEW_FILE' => $diff_url . '&amp;op=' . MERGE_NEW_FILE,
- 'U_VIEW_NO_MERGE_MOD' => $diff_url . '&amp;op=' . MERGE_NO_MERGE_MOD,
- 'U_VIEW_NO_MERGE_NEW' => $diff_url . '&amp;op=' . MERGE_NO_MERGE_NEW,
- ));
+ 'U_VIEW_MOD_FILE' => $diff_url . '&amp;op=' . MERGE_MOD_FILE,
+ 'U_VIEW_NEW_FILE' => $diff_url . '&amp;op=' . MERGE_NEW_FILE,
+ 'U_VIEW_NO_MERGE_MOD' => $diff_url . '&amp;op=' . MERGE_NO_MERGE_MOD,
+ 'U_VIEW_NO_MERGE_NEW' => $diff_url . '&amp;op=' . MERGE_NO_MERGE_NEW,
+ ));
+ }
}
}
+ $cache->put('_expected_files', $new_expected_files);
+
$all_up_to_date = true;
foreach ($update_list as $status => $filelist)
{
@@ -617,6 +636,7 @@ class install_update extends module
// Before we do anything, let us diff the files and store the raw file information "somewhere"
$get_files = false;
$file_list = $cache->get('_diff_files');
+ $expected_files = $cache->get('_expected_files');
if ($file_list === false || $file_list['status'] != -1)
{
@@ -632,6 +652,11 @@ class install_update extends module
);
}
+ if (!isset($expected_files) || $expected_files === false)
+ {
+ $expected_files = array();
+ }
+
$processed = 0;
foreach ($update_list as $status => $files)
{
@@ -645,6 +670,7 @@ class install_update extends module
// Skip this file if the user selected to not update it
if (in_array($file_struct['filename'], $no_update))
{
+ $expected_files[$file_struct['filename']] = false;
continue;
}
@@ -676,6 +702,15 @@ class install_update extends module
return;
}
+ if (file_exists($phpbb_root_path . $file_struct['filename']))
+ {
+ $contents = file_get_contents($phpbb_root_path . $file_struct['filename']);
+ if (isset($expected_files[$file_struct['filename']]) && md5($contents) == $expected_files[$file_struct['filename']])
+ {
+ continue;
+ }
+ }
+
$original_filename = ($file_struct['custom']) ? $file_struct['original'] : $file_struct['filename'];
switch ($status)
@@ -702,6 +737,7 @@ class install_update extends module
break;
}
+ $expected_files[$file_struct['filename']] = md5($contents);
$file_list[$file_struct['filename']] = '_file_' . md5($file_struct['filename']);
$cache->put($file_list[$file_struct['filename']], base64_encode($contents));
@@ -747,6 +783,7 @@ class install_update extends module
break;
}
+ $expected_files[$file_struct['filename']] = md5($contents);
$file_list[$file_struct['filename']] = '_file_' . md5($file_struct['filename']);
$cache->put($file_list[$file_struct['filename']], base64_encode($contents));
@@ -757,6 +794,7 @@ class install_update extends module
}
}
}
+ $cache->put('_expected_files', $expected_files);
}
$file_list['status'] = -1;
@@ -1217,7 +1255,7 @@ class install_update extends module
/**
* Collect all file status infos we need for the update by diffing all files
*/
- function get_update_structure(&$update_list)
+ function get_update_structure(&$update_list, $expected_files)
{
global $phpbb_root_path, $phpEx, $user;
@@ -1303,7 +1341,7 @@ class install_update extends module
else
{
// not modified?
- $this->make_update_diff($update_list, $file, $file);
+ $this->make_update_diff($update_list, $file, $file, $expected_files);
}
$num_bytes_processed += (file_exists($this->new_location . $file)) ? filesize($this->new_location . $file) : 100 * 1024;
@@ -1344,17 +1382,34 @@ class install_update extends module
/**
* Compare files for storage in update_list
*/
- function make_update_diff(&$update_list, $original_file, $file, $custom = false)
+ function make_update_diff(&$update_list, $original_file, $file, $expected_files, $custom = false)
{
global $phpbb_root_path, $user;
- $update_ary = array('filename' => $file, 'custom' => $custom);
+ $update_ary = array('filename' => $file, 'custom' => $custom, 'as_expected' => false);
if ($custom)
{
$update_ary['original'] = $original_file;
}
+ if (file_exists($phpbb_root_path . $file))
+ {
+ $content = file_get_contents($phpbb_root_path . $file);
+
+ if (isset($expected_files[$file]) && // the user already selected what to do with this file
+ ($expected_files[$file] === false || // the user wanted this file to stay the same, so just assume it's alright
+ $expected_files[$file] === md5($content)))
+ {
+ // the file contains what it was supposed to contain after the merge
+ $update_ary['as_expected'] = true;
+ $update_ary['was_ignored'] = ($expected_files[$file] === false);
+ $update_list['up_to_date'][] = $update_ary;
+
+ return;
+ }
+ }
+
// we only want to know if the files are successfully merged and newlines could result in errors (duplicate addition of lines and such things)
// Therefore we check for empty diffs with two methods, preserving newlines and not preserving them (which mostly works best, therefore the first option)
@@ -1364,7 +1419,7 @@ class install_update extends module
{
$tmp = array(
'file1' => file_get_contents($this->new_location . $original_file),
- 'file2' => file_get_contents($phpbb_root_path . $file),
+ 'file2' => $content,
);
// We need to diff the contents here to make sure the file is really the one we expect
@@ -1403,7 +1458,7 @@ class install_update extends module
{
$tmp = array(
'file1' => file_get_contents($this->old_location . $original_file),
- 'file2' => file_get_contents($phpbb_root_path . $file),
+ 'file2' => $content,
);
// We need to diff the contents here to make sure the file is really the one we expect
@@ -1414,7 +1469,7 @@ class install_update extends module
$tmp = array(
'file1' => file_get_contents($this->new_location . $original_file),
- 'file2' => file_get_contents($phpbb_root_path . $file),
+ 'file2' => $content,
);
$diff = new diff($tmp['file1'], $tmp['file2'], $preserve_cr);
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index f3defe9a54..ab622e8fde 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -1263,6 +1263,7 @@ CREATE TABLE phpbb_topics_track (
ALTER TABLE phpbb_topics_track ADD PRIMARY KEY (user_id, topic_id);;
+CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track(topic_id);;
CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track(forum_id);;
# Table: 'phpbb_topics_posted'
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index ac7c0928cd..068373c9a1 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -4,9 +4,6 @@
*/
-BEGIN TRANSACTION
-GO
-
/*
Table: 'phpbb_attachments'
*/
@@ -1509,6 +1506,9 @@ ALTER TABLE [phpbb_topics_track] WITH NOCHECK ADD
) ON [PRIMARY]
GO
+CREATE INDEX [topic_id] ON [phpbb_topics_track]([topic_id]) ON [PRIMARY]
+GO
+
CREATE INDEX [forum_id] ON [phpbb_topics_track]([forum_id]) ON [PRIMARY]
GO
@@ -1733,8 +1733,3 @@ ALTER TABLE [phpbb_zebra] WITH NOCHECK ADD
) ON [PRIMARY]
GO
-
-
-COMMIT
-GO
-
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
index 4fcead787b..813cf8613f 100644
--- a/phpBB/install/schemas/mysql_40_schema.sql
+++ b/phpBB/install/schemas/mysql_40_schema.sql
@@ -862,6 +862,7 @@ CREATE TABLE phpbb_topics_track (
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (user_id, topic_id),
+ KEY topic_id (topic_id),
KEY forum_id (forum_id)
);
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql
index 34adf5674e..97369d2bf7 100644
--- a/phpBB/install/schemas/mysql_41_schema.sql
+++ b/phpBB/install/schemas/mysql_41_schema.sql
@@ -862,6 +862,7 @@ CREATE TABLE phpbb_topics_track (
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (user_id, topic_id),
+ KEY topic_id (topic_id),
KEY forum_id (forum_id)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index 15692ea984..7be7cd0756 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -1667,6 +1667,8 @@ CREATE TABLE phpbb_topics_track (
)
/
+CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id)
+/
CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id)
/
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index 46e77e64b4..9cdf35024b 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -1117,6 +1117,7 @@ CREATE TABLE phpbb_topics_track (
PRIMARY KEY (user_id, topic_id)
);
+CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id);
CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id);
/*
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index 1c75ee4886..38088b291d 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -99,13 +99,15 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_pm_icons', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_post_confirm', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_enable', '0');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_limit', '10');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_overall_forums', '1');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_overall_forums_limit', '15');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_overall_topics', '0');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_overall_topics_limit', '15');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_http_auth', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_limit_post', '15');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_limit_topic', '10');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_overall_forums', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_overall', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_forum', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_topic', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_topics_new', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_topics_active', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_item_statistics', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval', '15');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('force_server_vars', '0');
@@ -239,7 +241,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page',
INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.6');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.8-dev');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index d754219cdf..34b4b05478 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -834,6 +834,7 @@ CREATE TABLE phpbb_topics_track (
PRIMARY KEY (user_id, topic_id)
);
+CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id);
CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id);
# Table: 'phpbb_topics_posted'