1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Move trunk/phpBB to old_trunk/phpBB

git-svn-id: file:///svn/phpbb/trunk@10210 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2009-10-04 18:13:59 +00:00
parent 3215bbf888
commit bf8ac19eaa
747 changed files with 0 additions and 173670 deletions

View File

@@ -1,934 +0,0 @@
<?php
/**
*
* @package install
* @version $Id$
* @copyright (c) 2006 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* NOTE to potential convertor authors. Please use this file to get
* familiar with the structure since we added some bare explanations here.
*
* Since this file gets included more than once on one page you are not able to add functions to it.
* Instead use a functions_ file.
*
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
include(PHPBB_ROOT_PATH . 'config.' . PHP_EXT);
unset($dbpasswd);
/**
* $convertor_data provides some basic information about this convertor which is
* used on the initial list of convertors and to populate the default settings
*/
$convertor_data = array(
'forum_name' => 'phpBB 2.0.x',
'version' => '1.0.2',
'phpbb_version' => '3.0.3',
'author' => '<a href="http://www.phpbb.com/">phpBB Group</a>',
'dbms' => $dbms,
'dbhost' => $dbhost,
'dbport' => $dbport,
'dbuser' => $dbuser,
'dbpasswd' => '',
'dbname' => $dbname,
'table_prefix' => 'phpbb_',
'forum_path' => '../forums',
'author_notes' => '',
);
/**
* $tables is a list of the tables (minus prefix) which we expect to find in the
* source forum. It is used to guess the prefix if the specified prefix is incorrect
*/
$tables = array(
'auth_access',
'banlist',
'categories',
'disallow',
'forum_prune',
'forums',
'groups',
'posts',
'posts_text',
'privmsgs',
'privmsgs_text',
'ranks',
'smilies',
'topics',
'topics_watch',
'user_group',
'users',
'vote_desc',
'vote_results',
'vote_voters',
'words'
);
/**
* $config_schema details how the board configuration information is stored in the source forum.
*
* '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
* '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
* a column (as per phpBB 1.x)
*
* In either of the latter cases 'table_name' indicates the name of the table in the database
*
* 'settings' is an array which maps the name of the config directive in the source forum
* to the config directive in phpBB3. It can either be a direct mapping or use a function.
* Please note that the contents of the old config value are passed to the function, therefore
* an in-built function requiring the variable passed by reference is not able to be used. Since
* empty() is such a function we created the function is_empty() to be used instead.
*/
$config_schema = array(
'table_name' => 'config',
'table_format' => array('config_name' => 'config_value'),
'settings' => array(
'allow_bbcode' => 'allow_bbcode',
'allow_smilies' => 'allow_smilies',
'allow_sig' => 'allow_sig',
'allow_namechange' => 'allow_namechange',
'allow_avatar_local' => 'allow_avatar_local',
'allow_avatar_remote' => 'allow_avatar_remote',
'allow_avatar_upload' => 'allow_avatar_upload',
'board_disable' => 'board_disable',
'sitename' => 'phpbb_set_encoding(sitename)',
'site_desc' => 'phpbb_set_encoding(site_desc)',
'session_length' => 'session_length',
'board_email_sig' => 'phpbb_set_encoding(board_email_sig)',
'posts_per_page' => 'posts_per_page',
'topics_per_page' => 'topics_per_page',
'enable_confirm' => 'enable_confirm',
'board_email_form' => 'board_email_form',
'override_user_style' => 'override_user_style',
'hot_threshold' => 'hot_threshold',
'max_poll_options' => 'max_poll_options',
'max_sig_chars' => 'max_sig_chars',
'pm_max_msgs' => 'max_inbox_privmsgs',
'smtp_delivery' => 'smtp_delivery',
'smtp_host' => 'smtp_host',
'smtp_username' => 'smtp_username',
'smtp_password' => 'smtp_password',
'require_activation' => 'require_activation',
'flood_interval' => 'flood_interval',
'avatar_filesize' => 'avatar_filesize',
'avatar_max_width' => 'avatar_max_width',
'avatar_max_height' => 'avatar_max_height',
'default_dateformat' => 'default_dateformat',
'board_timezone' => 'board_timezone',
'allow_privmsg' => 'not(privmsg_disable)',
'gzip_compress' => 'gzip_compress',
'coppa_enable' => 'is_empty(coppa_mail)',
'coppa_fax' => 'coppa_fax',
'coppa_mail' => 'coppa_mail',
'record_online_users' => 'record_online_users',
'record_online_date' => 'record_online_date',
'board_startdate' => 'board_startdate',
)
);
/**
* $test_file is the name of a file which is present on the source
* forum which can be used to check that the path specified by the
* user was correct
*/
$test_file = 'modcp.php';
/**
* If this is set then we are not generating the first page of information but getting the conversion information.
*/
if (!$get_info)
{
// Test to see if the birthday MOD is installed on the source forum
// Niels' birthday mod
if (get_config_value('birthday_required') !== false || get_config_value('bday_require') !== false)
{
define('MOD_BIRTHDAY', true);
}
// TerraFrost's validated birthday mod
if (get_config_value('bday_require') !== false)
{
define('MOD_BIRTHDAY_TERRA', true);
}
// Test to see if the attachment MOD is installed on the source forum
// If it is, we will convert this data as well
$src_db->sql_return_on_error(true);
$sql = "SELECT config_value
FROM {$convert->src_table_prefix}attachments_config
WHERE config_name = 'upload_dir'";
$result = $src_db->sql_query($sql);
if ($result && $row = $src_db->sql_fetchrow($result))
{
// Here the constant is defined
define('MOD_ATTACHMENT', true);
// Here i add more tables to be checked in the old forum
$tables += array(
'attachments',
'attachments_desc',
'extensions',
'extension_groups'
);
$src_db->sql_freeresult($result);
}
else if ($result)
{
$src_db->sql_freeresult($result);
}
/**
* Tests for further MODs can be included here.
* Please use constants for this, prefixing them with MOD_
*/
$src_db->sql_return_on_error(false);
// Now let us set a temporary config variable for user id incrementing
$sql = "SELECT user_id
FROM {$convert->src_table_prefix}users
WHERE user_id = 1";
$result = $src_db->sql_query($sql);
$user_id = (int) $src_db->sql_fetchfield('user_id');
$src_db->sql_freeresult($result);
// If there is a user id 1, we need to increment user ids. :/
if ($user_id === 1)
{
// Try to get the maximum user id possible...
$sql = "SELECT MAX(user_id) AS max_user_id
FROM {$convert->src_table_prefix}users";
$result = $src_db->sql_query($sql);
$user_id = (int) $src_db->sql_fetchfield('max_user_id');
$src_db->sql_freeresult($result);
set_config('increment_user_id', ($user_id + 1), true);
}
else
{
set_config('increment_user_id', 0, true);
}
// Overwrite maximum avatar width/height
@define('DEFAULT_AVATAR_X_CUSTOM', get_config_value('avatar_max_width'));
@define('DEFAULT_AVATAR_Y_CUSTOM', get_config_value('avatar_max_height'));
// additional table used only during conversion
@define('USERCONV_TABLE', $table_prefix . 'userconv');
/**
* Description on how to use the convertor framework.
*
* 'schema' Syntax Description
* -> 'target' => Target Table. If not specified the next table will be handled
* -> 'primary' => Primary Key. If this is specified then this table is processed in batches
* -> 'query_first' => array('target' or 'src', Query to execute before beginning the process
* (if more than one then specified as array))
* -> 'function_first' => Function to execute before beginning the process (if more than one then specified as array)
* (This is mostly useful if variables need to be given to the converting process)
* -> 'test_file' => This is not used at the moment but should be filled with a file from the old installation
*
* // DB Functions
* 'distinct' => Add DISTINCT to the select query
* 'where' => Add WHERE to the select query
* 'group_by' => Add GROUP BY to the select query
* 'left_join' => Add LEFT JOIN to the select query (if more than one joins specified as array)
* 'having' => Add HAVING to the select query
*
* // DB INSERT array
* This one consist of three parameters
* First Parameter:
* The key need to be filled within the target table
* If this is empty, the target table gets not assigned the source value
* Second Parameter:
* Source value. If the first parameter is specified, it will be assigned this value.
* If the first parameter is empty, this only gets added to the select query
* Third Parameter:
* Custom Function. Function to execute while storing source value into target table.
* The functions return value get stored.
* The function parameter consist of the value of the second parameter.
*
* types:
* - empty string == execute nothing
* - string == function to execute
* - array == complex execution instructions
*
* Complex execution instructions:
* @todo test complex execution instructions - in theory they will work fine
*
* By defining an array as the third parameter you are able to define some statements to be executed. The key
* is defining what to execute, numbers can be appended...
*
* 'function' => execute function
* 'execute' => run code, whereby all occurrences of {VALUE} get replaced by the last returned value.
* The result *must* be assigned/stored to {RESULT}.
* 'typecast' => typecast value
*
* The returned variables will be made always available to the next function to continue to work with.
*
* example (variable inputted is an integer of 1):
*
* array(
* 'function1' => 'increment_by_one', // returned variable is 2
* 'typecast' => 'string', // typecast variable to be a string
* 'execute' => '{RESULT} = {VALUE} . ' is good';', // returned variable is '2 is good'
* 'function2' => 'replace_good_with_bad', // returned variable is '2 is bad'
* ),
*
*/
$convertor = array(
'test_file' => 'viewtopic.php',
'avatar_path' => get_config_value('avatar_path') . '/',
'avatar_gallery_path' => get_config_value('avatar_gallery_path') . '/',
'smilies_path' => get_config_value('smilies_path') . '/',
'upload_path' => (defined('MOD_ATTACHMENT')) ? phpbb_get_files_dir() . '/' : '',
'thumbnails' => (defined('MOD_ATTACHMENT')) ? array('thumbs/', 't_') : '',
'ranks_path' => false, // phpBB 2.0.x had no config value for a ranks path
// We empty some tables to have clean data available
'query_first' => array(
array('target', $convert->truncate_statement . SEARCH_RESULTS_TABLE),
array('target', $convert->truncate_statement . SEARCH_WORDLIST_TABLE),
array('target', $convert->truncate_statement . SEARCH_WORDMATCH_TABLE),
array('target', $convert->truncate_statement . LOG_TABLE),
),
// with this you are able to import all attachment files on the fly. For large boards this is not an option, therefore commented out by default.
// Instead every file gets copied while processing the corresponding attachment entry.
// if (defined("MOD_ATTACHMENT")) { import_attachment_files(); phpbb_copy_thumbnails(); }
// phpBB2 allowed some similar usernames to coexist which would have the same
// username_clean in phpBB3 which is not possible, so we'll give the admin a list
// of user ids and usernames and let him deicde what he wants to do with them
'execute_first' => '
phpbb_create_userconv_table();
import_avatar_gallery();
if (defined("MOD_ATTACHMENT")) phpbb_import_attach_config();
phpbb_insert_forums();
',
'execute_last' => array('
add_bots();
', '
update_folder_pm_count();
', '
update_unread_count();
', '
phpbb_convert_authentication(\'start\');
', '
phpbb_convert_authentication(\'first\');
', '
phpbb_convert_authentication(\'second\');
', '
phpbb_convert_authentication(\'third\');
'),
'schema' => array(
array(
'target' => USERCONV_TABLE,
'query_first' => array('target', $convert->truncate_statement . USERCONV_TABLE),
array('user_id', 'users.user_id', ''),
array('username_clean', 'users.username', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_clean_string')),
),
array(
'target' => (defined('MOD_ATTACHMENT')) ? ATTACHMENTS_TABLE : '',
'primary' => 'attachments.attach_id',
'query_first' => (defined('MOD_ATTACHMENT')) ? array('target', $convert->truncate_statement . ATTACHMENTS_TABLE) : '',
'autoincrement' => 'attach_id',
array('attach_id', 'attachments.attach_id', ''),
array('post_msg_id', 'attachments.post_id', ''),
array('topic_id', 'posts.topic_id', ''),
array('in_message', 0, ''),
array('is_orphan', 0, ''),
array('poster_id', 'attachments.user_id_1 AS poster_id', 'phpbb_user_id'),
array('physical_filename', 'attachments_desc.physical_filename', 'import_attachment'),
array('real_filename', 'attachments_desc.real_filename', 'phpbb_set_encoding'),
array('download_count', 'attachments_desc.download_count', ''),
array('attach_comment', 'attachments_desc.comment', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')),
array('extension', 'attachments_desc.extension', ''),
array('mimetype', 'attachments_desc.mimetype', ''),
array('filesize', 'attachments_desc.filesize', ''),
array('filetime', 'attachments_desc.filetime', ''),
array('thumbnail', 'attachments_desc.thumbnail', ''),
'where' => 'attachments_desc.attach_id = attachments.attach_id AND attachments.privmsgs_id = 0 AND posts.post_id = attachments.post_id',
'group_by' => 'attachments.attach_id'
),
array(
'target' => (defined('MOD_ATTACHMENT')) ? ATTACHMENTS_TABLE : '',
'primary' => 'attachments.attach_id',
'autoincrement' => 'attach_id',
array('attach_id', 'attachments.attach_id', ''),
array('post_msg_id', 'attachments.privmsgs_id', ''),
array('topic_id', 0, ''),
array('in_message', 1, ''),
array('is_orphan', 0, ''),
array('poster_id', 'attachments.user_id_1 AS poster_id', 'phpbb_user_id'),
array('physical_filename', 'attachments_desc.physical_filename', 'import_attachment'),
array('real_filename', 'attachments_desc.real_filename', ''),
array('download_count', 'attachments_desc.download_count', ''),
array('attach_comment', 'attachments_desc.comment', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')),
array('extension', 'attachments_desc.extension', ''),
array('mimetype', 'attachments_desc.mimetype', ''),
array('filesize', 'attachments_desc.filesize', ''),
array('filetime', 'attachments_desc.filetime', ''),
array('thumbnail', 'attachments_desc.thumbnail', ''),
'where' => 'attachments_desc.attach_id = attachments.attach_id AND attachments.post_id = 0',
'group_by' => 'attachments.attach_id'
),
array(
'target' => (defined('MOD_ATTACHMENT')) ? EXTENSIONS_TABLE : '',
'query_first' => (defined('MOD_ATTACHMENT')) ? array('target', $convert->truncate_statement . EXTENSIONS_TABLE) : '',
'autoincrement' => 'extension_id',
array('extension_id', 'extensions.ext_id', ''),
array('group_id', 'extensions.group_id', ''),
array('extension', 'extensions.extension', ''),
),
array(
'target' => (defined('MOD_ATTACHMENT')) ? EXTENSION_GROUPS_TABLE : '',
'query_first' => (defined('MOD_ATTACHMENT')) ? array('target', $convert->truncate_statement . EXTENSION_GROUPS_TABLE) : '',
'autoincrement' => 'group_id',
array('group_id', 'extension_groups.group_id', ''),
array('group_name', 'extension_groups.group_name', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')),
array('cat_id', 'extension_groups.cat_id', 'phpbb_attachment_category'),
array('allow_group', 'extension_groups.allow_group', ''),
array('download_mode', 1, ''),
array('upload_icon', '', ''),
array('max_filesize', 'extension_groups.max_filesize', ''),
array('allowed_forums', 'extension_groups.forum_permissions', 'phpbb_attachment_forum_perms'),
array('allow_in_pm', 1, ''),
),
array(
'target' => BANLIST_TABLE,
'execute_first' => 'phpbb_check_username_collisions();',
'query_first' => array('target', $convert->truncate_statement . BANLIST_TABLE),
array('ban_ip', 'banlist.ban_ip', 'decode_ban_ip'),
array('ban_userid', 'banlist.ban_userid', 'phpbb_user_id'),
array('ban_email', 'banlist.ban_email', ''),
array('ban_reason', '', ''),
array('ban_give_reason', '', ''),
'where' => "banlist.ban_ip NOT LIKE '%.%'",
),
array(
'target' => BANLIST_TABLE,
array('ban_ip', 'banlist.ban_ip', ''),
array('ban_userid', 0, ''),
array('ban_email', '', ''),
array('ban_reason', '', ''),
array('ban_give_reason', '', ''),
'where' => "banlist.ban_ip LIKE '%.%'",
),
array(
'target' => DISALLOW_TABLE,
'query_first' => array('target', $convert->truncate_statement . DISALLOW_TABLE),
array('disallow_username', 'disallow.disallow_username', 'phpbb_disallowed_username'),
),
array(
'target' => RANKS_TABLE,
'query_first' => array('target', $convert->truncate_statement . RANKS_TABLE),
'autoincrement' => 'rank_id',
array('rank_id', 'ranks.rank_id', ''),
array('rank_title', 'ranks.rank_title', array('function1' => 'phpbb_set_default_encoding', 'function2' => 'utf8_htmlspecialchars')),
array('rank_min', 'ranks.rank_min', array('typecast' => 'int', 'execute' => '{RESULT} = ({VALUE}[0] < 0) ? 0 : {VALUE}[0];')),
array('rank_special', 'ranks.rank_special', ''),
array('rank_image', 'ranks.rank_image', 'import_rank'),
),
array(
'target' => TOPICS_TABLE,
'query_first' => array('target', $convert->truncate_statement . TOPICS_TABLE),
'primary' => 'topics.topic_id',
'autoincrement' => 'topic_id',
array('topic_id', 'topics.topic_id', ''),
array('forum_id', 'topics.forum_id', ''),
array('icon_id', 0, ''),
array('topic_poster', 'topics.topic_poster AS poster_id', 'phpbb_user_id'),
array('topic_attachment', ((defined('MOD_ATTACHMENT')) ? 'topics.topic_attachment' : 0), ''),
array('topic_title', 'topics.topic_title', 'phpbb_set_encoding'),
array('topic_time', 'topics.topic_time', ''),
array('topic_views', 'topics.topic_views', ''),
array('topic_replies', 'topics.topic_replies', ''),
array('topic_replies_real', 'topics.topic_replies', ''),
array('topic_last_post_id', 'topics.topic_last_post_id', ''),
array('topic_status', 'topics.topic_status', 'is_topic_locked'),
array('topic_moved_id', 0, ''),
array('topic_type', 'topics.topic_type', 'phpbb_convert_topic_type'),
array('topic_first_post_id', 'topics.topic_first_post_id', ''),
array('topic_last_view_time', 'posts.post_time', 'intval'),
array('poll_title', 'vote_desc.vote_text', array('function1' => 'null_to_str', 'function2' => 'phpbb_set_encoding', 'function3' => 'utf8_htmlspecialchars')),
array('poll_start', 'vote_desc.vote_start', 'null_to_zero'),
array('poll_length', 'vote_desc.vote_length', 'null_to_zero'),
array('poll_max_options', 1, ''),
array('poll_vote_change', 0, ''),
'left_join' => array ( 'topics LEFT JOIN vote_desc ON topics.topic_id = vote_desc.topic_id AND topics.topic_vote = 1',
'topics LEFT JOIN posts ON topics.topic_last_post_id = posts.post_id',
),
'where' => 'topics.topic_moved_id = 0',
),
array(
'target' => TOPICS_TABLE,
'primary' => 'topics.topic_id',
'autoincrement' => 'topic_id',
array('topic_id', 'topics.topic_id', ''),
array('forum_id', 'topics.forum_id', ''),
array('icon_id', 0, ''),
array('topic_poster', 'topics.topic_poster AS poster_id', 'phpbb_user_id'),
array('topic_attachment', ((defined('MOD_ATTACHMENT')) ? 'topics.topic_attachment' : 0), ''),
array('topic_title', 'topics.topic_title', 'phpbb_set_encoding'),
array('topic_time', 'topics.topic_time', ''),
array('topic_views', 'topics.topic_views', ''),
array('topic_replies', 'topics.topic_replies', ''),
array('topic_replies_real', 'topics.topic_replies', ''),
array('topic_last_post_id', 'topics.topic_last_post_id', ''),
array('topic_status', ITEM_MOVED, ''),
array('topic_moved_id', 'topics.topic_moved_id', ''),
array('topic_type', 'topics.topic_type', 'phpbb_convert_topic_type'),
array('topic_first_post_id', 'topics.topic_first_post_id', ''),
array('poll_title', 'vote_desc.vote_text', array('function1' => 'null_to_str', 'function2' => 'phpbb_set_encoding', 'function3' => 'utf8_htmlspecialchars')),
array('poll_start', 'vote_desc.vote_start', 'null_to_zero'),
array('poll_length', 'vote_desc.vote_length', 'null_to_zero'),
array('poll_max_options', 1, ''),
array('poll_vote_change', 0, ''),
'left_join' => 'topics LEFT JOIN vote_desc ON topics.topic_id = vote_desc.topic_id AND topics.topic_vote = 1',
'where' => 'topics.topic_moved_id <> 0',
),
array(
'target' => TOPICS_WATCH_TABLE,
'primary' => 'topics_watch.topic_id',
'query_first' => array('target', $convert->truncate_statement . TOPICS_WATCH_TABLE),
array('topic_id', 'topics_watch.topic_id', ''),
array('user_id', 'topics_watch.user_id', 'phpbb_user_id'),
array('notify_status', 'topics_watch.notify_status', ''),
),
array(
'target' => SMILIES_TABLE,
'query_first' => array('target', $convert->truncate_statement . SMILIES_TABLE),
'autoincrement' => 'smiley_id',
array('smiley_id', 'smilies.smilies_id', ''),
array('code', 'smilies.code', array('function1' => 'phpbb_smilie_html_decode', 'function2' => 'phpbb_set_encoding', 'function3' => 'utf8_htmlspecialchars')),
array('emotion', 'smilies.emoticon', 'phpbb_set_encoding'),
array('smiley_url', 'smilies.smile_url', 'import_smiley'),
array('smiley_width', 'smilies.smile_url', 'get_smiley_width'),
array('smiley_height', 'smilies.smile_url', 'get_smiley_height'),
array('smiley_order', 'smilies.smilies_id', ''),
array('display_on_posting', 'smilies.smilies_id', 'get_smiley_display'),
'order_by' => 'smilies.smilies_id ASC',
),
array(
'target' => POLL_OPTIONS_TABLE,
'primary' => 'vote_results.vote_option_id',
'query_first' => array('target', $convert->truncate_statement . POLL_OPTIONS_TABLE),
array('poll_option_id', 'vote_results.vote_option_id', ''),
array('topic_id', 'vote_desc.topic_id', ''),
array('', 'topics.topic_poster AS poster_id', 'phpbb_user_id'),
array('poll_option_text', 'vote_results.vote_option_text', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')),
array('poll_option_total', 'vote_results.vote_result', ''),
'where' => 'vote_results.vote_id = vote_desc.vote_id',
'left_join' => 'vote_desc LEFT JOIN topics ON topics.topic_id = vote_desc.topic_id',
),
array(
'target' => POLL_VOTES_TABLE,
'primary' => 'vote_desc.topic_id',
'query_first' => array('target', $convert->truncate_statement . POLL_VOTES_TABLE),
array('poll_option_id', VOTE_CONVERTED, ''),
array('topic_id', 'vote_desc.topic_id', ''),
array('vote_user_id', 'vote_voters.vote_user_id', 'phpbb_user_id'),
array('vote_user_ip', 'vote_voters.vote_user_ip', 'decode_ip'),
'where' => 'vote_voters.vote_id = vote_desc.vote_id',
),
array(
'target' => WORDS_TABLE,
'primary' => 'words.word_id',
'query_first' => array('target', $convert->truncate_statement . WORDS_TABLE),
'autoincrement' => 'word_id',
array('word_id', 'words.word_id', ''),
array('word', 'words.word', 'phpbb_set_encoding'),
array('replacement', 'words.replacement', 'phpbb_set_encoding'),
),
array(
'target' => POSTS_TABLE,
'primary' => 'posts.post_id',
'autoincrement' => 'post_id',
'query_first' => array('target', $convert->truncate_statement . POSTS_TABLE),
'execute_first' => '
$config["max_post_chars"] = 0;
$config["max_quote_depth"] = 0;
',
array('post_id', 'posts.post_id', ''),
array('topic_id', 'posts.topic_id', ''),
array('forum_id', 'posts.forum_id', ''),
array('poster_id', 'posts.poster_id', 'phpbb_user_id'),
array('icon_id', 0, ''),
array('poster_ip', 'posts.poster_ip', 'decode_ip'),
array('post_time', 'posts.post_time', ''),
array('enable_bbcode', 'posts.enable_bbcode', ''),
array('', 'posts.enable_html', ''),
array('enable_smilies', 'posts.enable_smilies', ''),
array('enable_sig', 'posts.enable_sig', ''),
array('enable_magic_url', 1, ''),
array('post_username', 'posts.post_username', 'phpbb_set_encoding'),
array('post_subject', 'posts_text.post_subject', 'phpbb_set_encoding'),
array('post_attachment', ((defined('MOD_ATTACHMENT')) ? 'posts.post_attachment' : 0), ''),
array('post_edit_time', 'posts.post_edit_time', array('typecast' => 'int')),
array('post_edit_count', 'posts.post_edit_count', ''),
array('post_edit_reason', '', ''),
array('post_edit_user', '', 'phpbb_post_edit_user'),
array('bbcode_uid', 'posts.post_time', 'make_uid'),
array('post_text', 'posts_text.post_text', 'phpbb_prepare_message'),
array('', 'posts_text.bbcode_uid AS old_bbcode_uid', ''),
array('bbcode_bitfield', '', 'get_bbcode_bitfield'),
array('post_checksum', '', ''),
// Commented out inline search indexing, this takes up a LOT of time. :D
// @todo We either need to enable this or call the rebuild search functionality post convert
/* array('', '', 'search_indexing'),
array('', 'posts_text.post_text AS message', ''),
array('', 'posts_text.post_subject AS title', ''),*/
'where' => 'posts.post_id = posts_text.post_id'
),
array(
'target' => PRIVMSGS_TABLE,
'primary' => 'privmsgs.privmsgs_id',
'autoincrement' => 'msg_id',
'query_first' => array(
array('target', $convert->truncate_statement . PRIVMSGS_TABLE),
array('target', $convert->truncate_statement . PRIVMSGS_RULES_TABLE),
),
'execute_first' => '
$config["max_post_chars"] = 0;
$config["max_quote_depth"] = 0;
',
array('msg_id', 'privmsgs.privmsgs_id', ''),
array('root_level', 0, ''),
array('author_id', 'privmsgs.privmsgs_from_userid AS poster_id', 'phpbb_user_id'),
array('icon_id', 0, ''),
array('author_ip', 'privmsgs.privmsgs_ip', 'decode_ip'),
array('message_time', 'privmsgs.privmsgs_date', ''),
array('enable_bbcode', 'privmsgs.privmsgs_enable_bbcode AS enable_bbcode', ''),
array('', 'privmsgs.privmsgs_enable_html AS enable_html', ''),
array('enable_smilies', 'privmsgs.privmsgs_enable_smilies AS enable_smilies', ''),
array('enable_magic_url', 1, ''),
array('enable_sig', 'privmsgs.privmsgs_attach_sig', ''),
array('message_subject', 'privmsgs.privmsgs_subject', 'phpbb_set_encoding'), // Already specialchared in 2.0.x
array('message_attachment', ((defined('MOD_ATTACHMENT')) ? 'privmsgs.privmsgs_attachment' : 0), ''),
array('message_edit_reason', '', ''),
array('message_edit_user', 0, ''),
array('message_edit_time', 0, ''),
array('message_edit_count', 0, ''),
array('bbcode_uid', 'privmsgs.privmsgs_date AS post_time', 'make_uid'),
array('message_text', 'privmsgs_text.privmsgs_text', 'phpbb_prepare_message'),
array('', 'privmsgs_text.privmsgs_bbcode_uid AS old_bbcode_uid', ''),
array('bbcode_bitfield', '', 'get_bbcode_bitfield'),
array('to_address', 'privmsgs.privmsgs_to_userid', 'phpbb_privmsgs_to_userid'),
array('bcc_address', '', ''),
'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id'
),
array(
'target' => PRIVMSGS_FOLDER_TABLE,
'primary' => 'users.user_id',
'query_first' => array('target', $convert->truncate_statement . PRIVMSGS_FOLDER_TABLE),
array('user_id', 'users.user_id', 'phpbb_user_id'),
array('folder_name', $user->lang['CONV_SAVED_MESSAGES'], ''),
array('pm_count', 0, ''),
'where' => 'users.user_id <> -1',
),
// Inbox
array(
'target' => PRIVMSGS_TO_TABLE,
'primary' => 'privmsgs.privmsgs_id',
'query_first' => array('target', $convert->truncate_statement . PRIVMSGS_TO_TABLE),
array('msg_id', 'privmsgs.privmsgs_id', ''),
array('user_id', 'privmsgs.privmsgs_to_userid', 'phpbb_user_id'),
array('author_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'),
array('pm_deleted', 0, ''),
array('pm_new', 'privmsgs.privmsgs_type', 'phpbb_new_pm'),
array('pm_unread', 'privmsgs.privmsgs_type', 'phpbb_unread_pm'),
array('pm_replied', 0, ''),
array('pm_marked', 0, ''),
array('pm_forwarded', 0, ''),
array('folder_id', PRIVMSGS_INBOX, ''),
'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id
AND (privmsgs.privmsgs_type = 0 OR privmsgs.privmsgs_type = 1 OR privmsgs.privmsgs_type = 5)',
),
// Outbox
array(
'target' => PRIVMSGS_TO_TABLE,
'primary' => 'privmsgs.privmsgs_id',
array('msg_id', 'privmsgs.privmsgs_id', ''),
array('user_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'),
array('author_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'),
array('pm_deleted', 0, ''),
array('pm_new', 0, ''),
array('pm_unread', 0, ''),
array('pm_replied', 0, ''),
array('pm_marked', 0, ''),
array('pm_forwarded', 0, ''),
array('folder_id', PRIVMSGS_OUTBOX, ''),
'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id
AND (privmsgs.privmsgs_type = 1 OR privmsgs.privmsgs_type = 5)',
),
// Sentbox
array(
'target' => PRIVMSGS_TO_TABLE,
'primary' => 'privmsgs.privmsgs_id',
array('msg_id', 'privmsgs.privmsgs_id', ''),
array('user_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'),
array('author_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'),
array('pm_deleted', 0, ''),
array('pm_new', 'privmsgs.privmsgs_type', 'phpbb_new_pm'),
array('pm_unread', 'privmsgs.privmsgs_type', 'phpbb_unread_pm'),
array('pm_replied', 0, ''),
array('pm_marked', 0, ''),
array('pm_forwarded', 0, ''),
array('folder_id', PRIVMSGS_SENTBOX, ''),
'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id
AND privmsgs.privmsgs_type = 2',
),
// Savebox (SAVED IN)
array(
'target' => PRIVMSGS_TO_TABLE,
'primary' => 'privmsgs.privmsgs_id',
array('msg_id', 'privmsgs.privmsgs_id', ''),
array('user_id', 'privmsgs.privmsgs_to_userid', 'phpbb_user_id'),
array('author_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'),
array('pm_deleted', 0, ''),
array('pm_new', 'privmsgs.privmsgs_type', 'phpbb_new_pm'),
array('pm_unread', 'privmsgs.privmsgs_type', 'phpbb_unread_pm'),
array('pm_replied', 0, ''),
array('pm_marked', 0, ''),
array('pm_forwarded', 0, ''),
array('folder_id', 'privmsgs.privmsgs_to_userid', 'phpbb_get_savebox_id'),
'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id
AND privmsgs.privmsgs_type = 3',
),
// Savebox (SAVED OUT)
array(
'target' => PRIVMSGS_TO_TABLE,
'primary' => 'privmsgs.privmsgs_id',
array('msg_id', 'privmsgs.privmsgs_id', ''),
array('user_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'),
array('author_id', 'privmsgs.privmsgs_from_userid', 'phpbb_user_id'),
array('pm_deleted', 0, ''),
array('pm_new', 'privmsgs.privmsgs_type', 'phpbb_new_pm'),
array('pm_unread', 'privmsgs.privmsgs_type', 'phpbb_unread_pm'),
array('pm_replied', 0, ''),
array('pm_marked', 0, ''),
array('pm_forwarded', 0, ''),
array('folder_id', 'privmsgs.privmsgs_from_userid', 'phpbb_get_savebox_id'),
'where' => 'privmsgs.privmsgs_id = privmsgs_text.privmsgs_text_id
AND privmsgs.privmsgs_type = 4',
),
array(
'target' => GROUPS_TABLE,
'autoincrement' => 'group_id',
'query_first' => array('target', $convert->truncate_statement . GROUPS_TABLE),
array('group_id', 'groups.group_id', ''),
array('group_type', 'groups.group_type', 'phpbb_convert_group_type'),
array('group_display', 0, ''),
array('group_legend', 0, ''),
array('group_name', 'groups.group_name', 'phpbb_convert_group_name'), // phpbb_set_encoding called in phpbb_convert_group_name
array('group_name_clean', 'groups.group_name', 'phpbb_convert_group_name_clean'), // phpbb_set_encoding called in phpbb_convert_group_name
array('group_desc', 'groups.group_description', 'phpbb_set_encoding'),
'where' => 'groups.group_single_user = 0',
),
array(
'target' => USER_GROUP_TABLE,
'query_first' => array('target', $convert->truncate_statement . USER_GROUP_TABLE),
'execute_first' => '
add_default_groups();
',
array('group_id', 'groups.group_id', ''),
array('user_id', 'groups.group_moderator', 'phpbb_user_id'),
array('group_leader', 1, ''),
array('user_pending', 0, ''),
'where' => 'groups.group_single_user = 0 AND groups.group_moderator <> 0',
),
array(
'target' => USER_GROUP_TABLE,
array('group_id', 'user_group.group_id', ''),
array('user_id', 'user_group.user_id', 'phpbb_user_id'),
array('group_leader', 0, ''),
array('user_pending', 'user_group.user_pending', ''),
'where' => 'user_group.group_id = groups.group_id AND groups.group_single_user = 0 AND groups.group_moderator <> user_group.user_id',
),
array(
'target' => USERS_TABLE,
'primary' => 'users.user_id',
'autoincrement' => 'user_id',
'query_first' => array(
array('target', 'DELETE FROM ' . USERS_TABLE . ' WHERE user_id <> ' . ANONYMOUS),
array('target', $convert->truncate_statement . BOTS_TABLE)
),
'execute_last' => '
remove_invalid_users();
',
array('user_id', 'users.user_id', 'phpbb_user_id'),
array('', 'users.user_id AS poster_id', 'phpbb_user_id'),
array('user_type', 'users.user_active', 'set_user_type'),
array('group_id', 'users.user_level', 'phpbb_set_primary_group'),
array('user_regdate', 'users.user_regdate', ''),
array('username', 'users.username', 'phpbb_set_default_encoding'), // recode to utf8 with default lang
array('username_clean', 'users.username', array('function1' => 'phpbb_set_default_encoding', 'function2' => 'utf8_clean_string')),
array('user_password', 'users.user_password', 'phpbb_hash'),
array('user_pass_convert', 1, ''),
array('user_posts', 'users.user_posts', 'intval'),
array('user_email', 'users.user_email', 'strtolower'),
array('user_email_hash', 'users.user_email', 'gen_email_hash'),
array('user_birthday', ((defined('MOD_BIRTHDAY')) ? 'users.user_birthday' : ''), 'phpbb_get_birthday'),
array('user_lastvisit', 'users.user_lastvisit', 'intval'),
array('user_lastmark', 'users.user_lastvisit', 'intval'),
array('user_lang', $config['default_lang'], ''),
array('', 'users.user_lang', ''),
array('user_timezone', 'users.user_timezone', 'floatval'),
array('user_dateformat', 'users.user_dateformat', array('function1' => 'phpbb_set_encoding', 'function2' => 'fill_dateformat')),
array('user_inactive_reason', '', 'phpbb_inactive_reason'),
array('user_inactive_time', '', 'phpbb_inactive_time'),
array('user_interests', 'users.user_interests', array('function1' => 'phpbb_set_encoding')),
array('user_occ', 'users.user_occ', array('function1' => 'phpbb_set_encoding')),
array('user_website', 'users.user_website', 'validate_website'),
array('user_jabber', '', ''),
array('user_msnm', 'users.user_msnm', array('function1' => 'phpbb_set_encoding')),
array('user_yim', 'users.user_yim', array('function1' => 'phpbb_set_encoding')),
array('user_aim', 'users.user_aim', array('function1' => 'phpbb_set_encoding')),
array('user_icq', 'users.user_icq', array('function1' => 'phpbb_set_encoding')),
array('user_from', 'users.user_from', array('function1' => 'phpbb_set_encoding')),
array('user_rank', 'users.user_rank', 'intval'),
array('user_permissions', '', ''),
array('user_avatar', 'users.user_avatar', 'phpbb_import_avatar'),
array('user_avatar_type', 'users.user_avatar_type', 'phpbb_avatar_type'),
array('user_avatar_width', 'users.user_avatar', 'phpbb_get_avatar_width'),
array('user_avatar_height', 'users.user_avatar', 'phpbb_get_avatar_height'),
array('user_new_privmsg', 'users.user_new_privmsg', ''),
array('user_unread_privmsg', 0, ''), //'users.user_unread_privmsg'
array('user_last_privmsg', 'users.user_last_privmsg', 'intval'),
array('user_emailtime', 'users.user_emailtime', 'null_to_zero'),
array('user_notify', 'users.user_notify', 'intval'),
array('user_notify_pm', 'users.user_notify_pm', 'intval'),
array('user_notify_type', NOTIFY_EMAIL, ''),
array('user_allow_pm', 'users.user_allow_pm', 'intval'),
array('user_allow_viewonline', 'users.user_allow_viewonline', 'intval'),
array('user_allow_viewemail', 'users.user_viewemail', 'intval'),
array('user_actkey', 'users.user_actkey', ''),
array('user_newpasswd', '', ''), // Users need to re-request their password...
array('user_style', $config['default_style'], ''),
array('user_options', '', 'set_user_options'),
array('', 'users.user_popup_pm AS popuppm', ''),
array('', 'users.user_allowhtml AS html', ''),
array('', 'users.user_allowbbcode AS bbcode', ''),
array('', 'users.user_allowsmile AS smile', ''),
array('', 'users.user_attachsig AS attachsig',''),
array('user_sig_bbcode_uid', 'users.user_regdate', 'make_uid'),
array('user_sig', 'users.user_sig', 'phpbb_prepare_message'),
array('', 'users.user_sig_bbcode_uid AS old_bbcode_uid', ''),
array('user_sig_bbcode_bitfield', '', 'get_bbcode_bitfield'),
array('', 'users.user_regdate AS post_time', ''),
'where' => 'users.user_id <> -1',
),
),
);
}
?>

File diff suppressed because it is too large Load Diff

View File

@@ -1,410 +0,0 @@
<?php
/**
*
* @package install
* @version $Id$
* @copyright (c) 2006 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
$updates_to_version = '3.1.0-dev1';
// Enter any version to update from to test updates. The version within the db will not be updated.
$debug_from_version = false;
// Return if we "just include it" to find out for which version the database update is responsible for
if (defined('IN_PHPBB') && defined('IN_INSTALL'))
{
return;
}
/**
*/
define('IN_PHPBB', true);
define('IN_INSTALL', true);
if (!defined('PHPBB_ROOT_PATH')) define('PHPBB_ROOT_PATH', './../');
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include PHPBB_ROOT_PATH . 'common.' . PHP_EXT;
@set_time_limit(0);
// Start session management
phpbb::$user->session_begin();
phpbb::$acl->init(phpbb::$user->data);
phpbb::$user->setup('install');
if (!phpbb::$user->is_registered)
{
login_box();
}
if (!phpbb::$acl->acl_get('a_board'))
{
trigger_error('NO_AUTH');
}
include PHPBB_ROOT_PATH . 'includes/db/db_tools.' . PHP_EXT;
$db_tools = new phpbb_db_tools(phpbb::$db, true);
// Define some variables for the database update
$inline_update = (request_var('type', 0)) ? true : false;
// Only an example, but also commented out
$database_update_info = array(
// Changes from 3.0.5 to 3.1.0-dev1
'3.0.5' => array(),
);
$error_ary = array();
$errored = false;
header('Content-type: text/html; charset=UTF-8');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo phpbb::$user->lang['DIRECTION']; ?>" lang="<?php echo phpbb::$user->lang['USER_LANG']; ?>" xml:lang="<?php echo phpbb::$user->lang['USER_LANG']; ?>">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="content-language" content="<?php echo phpbb::$user->lang['USER_LANG']; ?>" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="imagetoolbar" content="no" />
<title><?php echo phpbb::$user->lang['UPDATING_TO_LATEST_STABLE']; ?></title>
<link href="../adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="wrap">
<div id="page-header">&nbsp;</div>
<div id="page-body">
<div id="acp">
<div class="panel">
<span class="corners-top"><span></span></span>
<div id="content">
<div id="main" class="install-body">
<h1><?php echo phpbb::$user->lang['UPDATING_TO_LATEST_STABLE']; ?></h1>
<br />
<p><?php echo phpbb::$user->lang['DATABASE_TYPE']; ?> :: <strong><?php echo phpbb::$db->sql_layer; ?></strong><br />
<?php
// To let set_config() calls succeed, we need to make the config array available globally
phpbb::$acm->destroy('#config');
$config = phpbb_cache::obtain_config();
echo phpbb::$user->lang['PREVIOUS_VERSION'] . ' :: <strong>' . phpbb::$config['version'] . '</strong><br />';
echo phpbb::$user->lang['UPDATED_VERSION'] . ' :: <strong>' . $updates_to_version . '</strong></p>';
$current_version = str_replace('rc', 'RC', strtolower(phpbb::$config['version']));
$latest_version = str_replace('rc', 'RC', strtolower($updates_to_version));
$orig_version = phpbb::$config['version'];
// Fill DB version
if (empty(phpbb::$config['dbms_version']))
{
set_config('dbms_version', phpbb::$db->sql_server_info(true));
}
// 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)
{
if ($current_version !== $latest_version)
{
set_config('version_update_from', $orig_version);
}
}
else
{
// If not called from the update script, we will actually remove the traces
phpbb::$db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'version_update_from'");
}
// Schema updates
?>
<br /><br />
<h1><?php echo phpbb::$user->lang['UPDATE_DATABASE_SCHEMA']; ?></h1>
<br />
<p><?php echo phpbb::$user->lang['PROGRESS']; ?> :: <strong>
<?php
flush();
// We go through the schema changes from the lowest to the highest version
// We try to also include versions 'in-between'...
// We go through the schema changes from the lowest to the highest version
// We try to also include versions 'in-between'...
$no_updates = true;
$versions = array_keys($database_update_info);
for ($i = 0; $i < sizeof($versions); $i++)
{
$version = $versions[$i];
$schema_changes = $database_update_info[$version];
$next_version = (isset($versions[$i + 1])) ? $versions[$i + 1] : $updates_to_version;
// If the installed version to be updated to is < than the current version, and if the current version is >= as the version to be updated to next, we will skip the process
if (version_compare($version, $current_version, '<') && version_compare($current_version, $next_version, '>='))
{
continue;
}
if (!sizeof($schema_changes))
{
continue;
}
// Get statements for schema updates
$statements = $db_tools->sql_schema_changes($schema_changes);
if (sizeof($statements))
{
$no_updates = false;
foreach ($statements as $sql)
{
_sql($sql, $errored, $error_ary);
}
}
}
_write_result($no_updates, $errored, $error_ary);
// Data updates
$error_ary = array();
$errored = $no_updates = false;
?>
<br /><br />
<h1><?php echo phpbb::$user->lang['UPDATING_DATA']; ?></h1>
<br />
<p><?php echo phpbb::$user->lang['PROGRESS']; ?> :: <strong>
<?php
flush();
$no_updates = true;
$no_updates = true;
$versions = array_keys($database_update_info);
// some code magic
for ($i = 0; $i < sizeof($versions); $i++)
{
$version = $versions[$i];
$next_version = (isset($versions[$i + 1])) ? $versions[$i + 1] : $updates_to_version;
// If the installed version to be updated to is < than the current version, and if the current version is >= as the version to be updated to next, we will skip the process
if (version_compare($version, $current_version, '<') && version_compare($current_version, $next_version, '>='))
{
continue;
}
change_database_data($no_updates, $version);
}
_write_result($no_updates, $errored, $error_ary);
$error_ary = array();
$errored = $no_updates = false;
?>
<br /><br />
<h1><?php echo phpbb::$user->lang['UPDATE_VERSION_OPTIMIZE']; ?></h1>
<br />
<p><?php echo phpbb::$user->lang['PROGRESS']; ?> :: <strong>
<?php
flush();
if ($debug_from_version === false)
{
// update the version
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '$updates_to_version'
WHERE config_name = 'version'";
_sql($sql, $errored, $error_ary);
}
// Reset permissions
$sql = 'UPDATE ' . USERS_TABLE . "
SET user_permissions = '',
user_perm_from = 0";
_sql($sql, $errored, $error_ary);
/* Optimize/vacuum analyze the tables where appropriate
// this should be done for each version in future along with
// the version number update
switch (phpbb::$db->dbms_type)
{
case 'mysql':
$sql = 'OPTIMIZE TABLE ' . $table_prefix . 'auth_access, ' . $table_prefix . 'banlist, ' . $table_prefix . 'categories, ' . $table_prefix . 'config, ' . $table_prefix . 'disallow, ' . $table_prefix . 'forum_prune, ' . $table_prefix . 'forums, ' . $table_prefix . 'groups, ' . $table_prefix . 'posts, ' . $table_prefix . 'posts_text, ' . $table_prefix . 'privmsgs, ' . $table_prefix . 'privmsgs_text, ' . $table_prefix . 'ranks, ' . $table_prefix . 'search_results, ' . $table_prefix . 'search_wordlist, ' . $table_prefix . 'search_wordmatch, ' . $table_prefix . 'sessions_keys' . $table_prefix . 'smilies, ' . $table_prefix . 'themes, ' . $table_prefix . 'themes_name, ' . $table_prefix . 'topics, ' . $table_prefix . 'topics_watch, ' . $table_prefix . 'user_group, ' . $table_prefix . 'users, ' . $table_prefix . 'vote_desc, ' . $table_prefix . 'vote_results, ' . $table_prefix . 'vote_voters, ' . $table_prefix . 'words';
_sql($sql, $errored, $error_ary);
break;
case 'postgresql':
_sql("VACUUM ANALYZE", $errored, $error_ary);
break;
}
*/
_write_result($no_updates, $errored, $error_ary);
?>
<br />
<h1><?php echo phpbb::$user->lang['UPDATE_COMPLETED']; ?></h1>
<br />
<?php
if (!$inline_update)
{
// Purge the cache...
phpbb::$acm->purge();
?>
<p style="color:red"><?php echo phpbb::$user->lang['UPDATE_FILES_NOTICE']; ?></p>
<p><?php echo phpbb::$user->lang['COMPLETE_LOGIN_TO_BOARD']; ?></p>
<?php
}
else
{
?>
<p><?php echo ((isset(phpbb::$user->lang['INLINE_UPDATE_SUCCESSFUL'])) ? phpbb::$user->lang['INLINE_UPDATE_SUCCESSFUL'] : 'The database update was successful. Now you need to continue the update process.'); ?></p>
<p><a href="<?php echo append_sid('install/index', "mode=update&amp;sub=file_check&amp;lang=$language"); ?>" class="button1"><?php echo (isset(phpbb::$user->lang['CONTINUE_UPDATE_NOW'])) ? phpbb::$user->lang['CONTINUE_UPDATE_NOW'] : 'Continue the update process now'; ?></a></p>
<?php
}
// Add database update to log
add_log('admin', 'LOG_UPDATE_DATABASE', $orig_version, $updates_to_version);
// Now we purge the session table as well as all cache files
phpbb::$acm->purge();
?>
</div>
</div>
<span class="corners-bottom"><span></span></span>
</div>
</div>
</div>
<div id="page-footer">
Powered by phpBB &copy; 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>
</div>
</div>
</body>
</html>
<?php
garbage_collection();
if (function_exists('exit_handler'))
{
exit_handler();
}
/**
* Function where all data changes are executed
*/
function change_database_data($version)
{
global $errored, $error_ary;
switch ($version)
{
default:
// Changes from 3.0.5 to 3.1.0-dev1
case '3.0.5':
break;
break;
}
}
/**
* Function for triggering an sql statement
*/
function _sql($sql, &$errored, &$error_ary, $echo_dot = true)
{
if (phpbb::$base_config['debug_extra'])
{
echo "<br />\n{$sql}\n<br />";
}
phpbb::$db->sql_return_on_error(true);
$result = phpbb::$db->sql_query($sql);
if (phpbb::$db->sql_error_triggered)
{
$errored = true;
$error_ary['sql'][] = phpbb::$db->sql_error_sql;
$error_ary['error_code'][] = phpbb::$db->_sql_error();
}
phpbb::$db->sql_return_on_error(false);
if ($echo_dot)
{
echo ". \n";
flush();
}
return $result;
}
function _write_result($no_updates, $errored, $error_ary)
{
if ($no_updates)
{
echo ' ' . phpbb::$user->lang['NO_UPDATES_REQUIRED'] . '</strong></p>';
}
else
{
echo ' <span class="success">' . phpbb::$user->lang['DONE'] . '</span></strong><br />' . phpbb::$user->lang['RESULT'] . ' :: ';
if ($errored)
{
echo ' <strong>' . phpbb::$user->lang['SOME_QUERIES_FAILED'] . '</strong> <ul>';
for ($i = 0; $i < sizeof($error_ary['sql']); $i++)
{
echo '<li>' . phpbb::$user->lang['ERROR'] . ' :: <strong>' . htmlspecialchars($error_ary['error_code'][$i]['message']) . '</strong><br />';
echo phpbb::$user->lang['SQL'] . ' :: <strong>' . htmlspecialchars($error_ary['sql'][$i]) . '</strong><br /><br /></li>';
}
echo '</ul> <br /><br />' . phpbb::$user->lang['SQL_FAILURE_EXPLAIN'] . '</p>';
}
else
{
echo '<strong>' . phpbb::$user->lang['NO_ERRORS'] . '</strong></p>';
}
}
}
?>

View File

@@ -1,498 +0,0 @@
<?php
/**
*
* @package install
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**#@+
* @ignore
*/
define('IN_PHPBB', true);
define('IN_INSTALL', true);
/**#@-*/
if (!defined('PHPBB_ROOT_PATH')) define('PHPBB_ROOT_PATH', './../');
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
// Include bootstrap
include PHPBB_ROOT_PATH . 'includes/core/bootstrap.' . PHP_EXT;
// Includes functions for the installer
require PHPBB_ROOT_PATH . 'includes/functions_install.' . PHP_EXT;
// Set time limit to 0
@set_time_limit(0);
/**
* @todo get memory limit and display notice if it is too low for a conversion (only within conversion)
$mem_limit = @ini_get('memory_limit');
if (!empty($mem_limit))
{
$unit = strtolower(substr($mem_limit, -1, 1));
$mem_limit = (int) $mem_limit;
if ($unit == 'k')
{
$mem_limit = floor($mem_limit / 1024);
}
else if ($unit == 'g')
{
$mem_limit *= 1024;
}
else if (is_numeric($unit))
{
$mem_limit = floor((int) ($mem_limit . $unit) / 1048576);
}
$mem_limit = max(128, $mem_limit) . 'M';
}
else
{
$mem_limit = '128M';
}
@ini_set('memory_limit', $mem_limit);
*/
// Initialize some common config variables
phpbb::$config += array(
'load_tplcompile' => true,
'cookie_name' => '',
);
// Register the template and the user object
phpbb::register('template');
phpbb::register('user', false, false, 'db', PHPBB_ROOT_PATH . 'language/');
// Init "loose" user session
phpbb::$user->session_begin();
// Now set users language
phpbb::$user->set_language(request_var('language', ''));
// And also add the install language file
phpbb::$user->add_lang('install');
$mode = request_var('mode', 'overview');
$sub = request_var('sub', '');
// Set PHP error handler to ours
set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler');
phpbb::$template->set_custom_template('../adm/style', 'admin');
phpbb::$template->assign_var('T_TEMPLATE_PATH', '../adm/style');
$install = new module();
$install->create('install', 'index.' . PHP_EXT, $mode, $sub);
$install->load();
// Generate the page
$install->page_header();
$install->generate_navigation();
phpbb::$template->set_filenames(array(
'body' => $install->get_tpl_name())
);
$install->page_footer();
/**
* @package install
*/
class module
{
var $id = 0;
var $type = 'install';
var $module_ary = array();
var $filename;
var $module_url = '';
var $tpl_name = '';
var $mode;
var $sub;
/**
* Private methods, should not be overwritten
*/
function create($module_type, $module_url, $selected_mod = false, $selected_submod = false)
{
$module = array();
// Grab module information using Bart's "neat-o-module" system (tm)
$dir = @opendir('.');
if (!$dir)
{
$this->error('Unable to access the installation directory', __LINE__, __FILE__);
}
$setmodules = 1;
while (($file = readdir($dir)) !== false)
{
if (preg_match('#^install_(.*?)\.' . PHP_EXT . '$#', $file))
{
include($file);
}
}
closedir($dir);
unset($setmodules);
if (!sizeof($module))
{
$this->error('No installation modules found', __LINE__, __FILE__);
}
// Order to use and count further if modules get assigned to the same position or not having an order
$max_module_order = 1000;
foreach ($module as $row)
{
// Check any module pre-reqs
if ($row['module_reqs'] != '')
{
}
// Module order not specified or module already assigned at this position?
if (!isset($row['module_order']) || isset($this->module_ary[$row['module_order']]))
{
$row['module_order'] = $max_module_order;
$max_module_order++;
}
$this->module_ary[$row['module_order']]['name'] = $row['module_title'];
$this->module_ary[$row['module_order']]['filename'] = $row['module_filename'];
$this->module_ary[$row['module_order']]['subs'] = $row['module_subs'];
$this->module_ary[$row['module_order']]['stages'] = $row['module_stages'];
if (strtolower($selected_mod) == strtolower($row['module_title']))
{
$this->id = (int) $row['module_order'];
$this->filename = (string) $row['module_filename'];
$this->module_url = (string) $module_url;
$this->mode = (string) $selected_mod;
// Check that the sub-mode specified is valid or set a default if not
if (is_array($row['module_subs']))
{
$this->sub = strtolower((in_array(strtoupper($selected_submod), $row['module_subs'])) ? $selected_submod : $row['module_subs'][0]);
}
else if (is_array($row['module_stages']))
{
$this->sub = strtolower((in_array(strtoupper($selected_submod), $row['module_stages'])) ? $selected_submod : $row['module_stages'][0]);
}
else
{
$this->sub = '';
}
}
} // END foreach
} // END create
/**
* Load and run the relevant module if applicable
*/
function load($mode = false, $run = true)
{
if ($run)
{
if (!empty($mode))
{
$this->mode = $mode;
}
$module = $this->filename;
if (!class_exists($module))
{
$this->error('Module "' . htmlspecialchars($module) . '" not accessible.', __LINE__, __FILE__);
}
$this->module = new $module($this);
if (method_exists($this->module, 'main'))
{
$this->module->main($this->mode, $this->sub);
}
}
}
/**
* Output the standard page header
*/
function page_header()
{
if (defined('HEADER_INC'))
{
return;
}
define('HEADER_INC', true);
global $stage;
phpbb::$template->assign_vars(array(
'PAGE_TITLE' => $this->get_page_title(),
'T_IMAGE_PATH' => PHPBB_ROOT_PATH . 'adm/images/',
'S_CONTENT_DIRECTION' => phpbb::$user->lang['DIRECTION'],
'S_CONTENT_FLOW_BEGIN' => (phpbb::$user->lang['DIRECTION'] == 'ltr') ? 'left' : 'right',
'S_CONTENT_FLOW_END' => (phpbb::$user->lang['DIRECTION'] == 'ltr') ? 'right' : 'left',
'S_CONTENT_ENCODING' => 'UTF-8',
'S_USER_LANG' => phpbb::$user->lang['USER_LANG'],
)
);
header('Content-type: text/html; charset=UTF-8');
header('Cache-Control: private, no-cache="set-cookie"');
header('Expires: 0');
header('Pragma: no-cache');
return;
}
/**
* Output the standard page footer
*/
function page_footer()
{
phpbb::$template->display('body');
// Close our DB connection.
if (phpbb::registered('db'))
{
phpbb::$db->sql_close();
}
if (function_exists('exit_handler'))
{
exit_handler();
}
}
/**
* Returns desired template name
*/
function get_tpl_name()
{
return $this->module->tpl_name . '.html';
}
/**
* Returns the desired page title
*/
function get_page_title()
{
if (!isset($this->module->page_title))
{
return '';
}
return (isset(phpbb::$user->lang[$this->module->page_title])) ? phpbb::$user->lang[$this->module->page_title] : $this->module->page_title;
}
/**
* Generate the navigation tabs
*/
function generate_navigation()
{
if (is_array($this->module_ary))
{
@ksort($this->module_ary);
foreach ($this->module_ary as $cat_ary)
{
$cat = $cat_ary['name'];
$l_cat = (!empty($lang['CAT_' . $cat])) ? $lang['CAT_' . $cat] : preg_replace('#_#', ' ', $cat);
$cat = strtolower($cat);
$url = $this->module_url . "?mode=$cat&amp;language=" . phpbb::$user->lang_name;
if ($this->mode == $cat)
{
phpbb::$template->assign_block_vars('t_block1', array(
'L_TITLE' => $l_cat,
'S_SELECTED' => true,
'U_TITLE' => $url,
));
if (is_array($this->module_ary[$this->id]['subs']))
{
$subs = $this->module_ary[$this->id]['subs'];
foreach ($subs as $option)
{
$l_option = (!empty(phpbb::$user->lang['SUB_' . $option])) ? phpbb::$user->lang['SUB_' . $option] : preg_replace('#_#', ' ', $option);
$option = strtolower($option);
$url = $this->module_url . '?mode=' . $this->mode . "&amp;sub=$option&amp;language=" . phpbb::$user->lang_name;
phpbb::$template->assign_block_vars('l_block1', array(
'L_TITLE' => $l_option,
'S_SELECTED' => ($this->sub == $option),
'U_TITLE' => $url,
));
}
}
if (is_array($this->module_ary[$this->id]['stages']))
{
$subs = $this->module_ary[$this->id]['stages'];
$matched = false;
foreach ($subs as $option)
{
$l_option = (!empty(phpbb::$user->lang['STAGE_' . $option])) ? phpbb::$user->lang['STAGE_' . $option] : preg_replace('#_#', ' ', $option);
$option = strtolower($option);
$matched = ($this->sub == $option) ? true : $matched;
phpbb::$template->assign_block_vars('l_block2', array(
'L_TITLE' => $l_option,
'S_SELECTED' => ($this->sub == $option),
'S_COMPLETE' => !$matched,
));
}
}
}
else
{
phpbb::$template->assign_block_vars('t_block1', array(
'L_TITLE' => $l_cat,
'S_SELECTED' => false,
'U_TITLE' => $url,
));
}
}
}
}
/**
* Output an error message
* If skip is true, return and continue execution, else exit
*/
function error($error, $line, $file)
{
phpbb::$template->assign_block_vars('checks', array(
'S_LEGEND' => true,
'LEGEND' => phpbb::$user->lang['INST_ERR'],
));
phpbb::$template->assign_block_vars('checks', array(
'TITLE' => basename($file) . ' [ ' . $line . ' ]',
'RESULT' => '<b style="color:red">' . $error . '</b>',
));
return;
}
/**
* Output an error message for a database related problem
* If skip is true, return and continue execution, else exit
*/
function db_error($error, $sql, $line, $file)
{
phpbb::$template->assign_block_vars('checks', array(
'S_LEGEND' => true,
'LEGEND' => phpbb::$user->lang['INST_ERR_FATAL'],
));
phpbb::$template->assign_block_vars('checks', array(
'TITLE' => basename($file) . ' [ ' . $line . ' ]',
'RESULT' => '<b style="color:red">' . $error . '</b><br />&#187; SQL:' . $sql,
));
return;
}
/**
* Generate the relevant HTML for an input field and the associated label and explanatory text
*/
function input_field($name, $type, $value='', $options='')
{
$tpl_type = explode(':', $type);
$tpl = '';
switch ($tpl_type[0])
{
case 'text':
case 'password':
$size = (int) $tpl_type[1];
$maxlength = (int) $tpl_type[2];
$tpl = '<input id="' . $name . '" type="' . $tpl_type[0] . '"' . (($size) ? ' size="' . $size . '"' : '') . ' maxlength="' . (($maxlength) ? $maxlength : 255) . '" name="' . $name . '" value="' . $value . '" />';
break;
case 'textarea':
$rows = (int) $tpl_type[1];
$cols = (int) $tpl_type[2];
$tpl = '<textarea id="' . $name . '" name="' . $name . '" rows="' . $rows . '" cols="' . $cols . '">' . $value . '</textarea>';
break;
case 'radio':
$key_yes = ($value) ? ' checked="checked" id="' . $name . '"' : '';
$key_no = (!$value) ? ' checked="checked" id="' . $name . '"' : '';
$tpl_type_cond = explode('_', $tpl_type[1]);
$type_no = ($tpl_type_cond[0] == 'disabled' || $tpl_type_cond[0] == 'enabled') ? false : true;
$tpl_no = '<label><input type="radio" name="' . $name . '" value="0"' . $key_no . ' class="radio" /> ' . (($type_no) ? phpbb::$user->lang['NO'] : phpbb::$user->lang['DISABLED']) . '</label>';
$tpl_yes = '<label><input type="radio" name="' . $name . '" value="1"' . $key_yes . ' class="radio" /> ' . (($type_no) ? phpbb::$user->lang['YES'] : phpbb::$user->lang['ENABLED']) . '</label>';
$tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . '&nbsp;&nbsp;' . $tpl_no : $tpl_no . '&nbsp;&nbsp;' . $tpl_yes;
break;
case 'select':
eval('$s_options = ' . str_replace('{VALUE}', $value, $options) . ';');
$tpl = '<select id="' . $name . '" name="' . $name . '">' . $s_options . '</select>';
break;
case 'custom':
eval('$tpl = ' . str_replace('{VALUE}', $value, $options) . ';');
break;
default:
break;
}
return $tpl;
}
/**
* Generate the drop down of available language packs
*/
function inst_language_select($default = '')
{
$dir = @opendir(PHPBB_ROOT_PATH . 'language');
if (!$dir)
{
$this->error('Unable to access the language directory', __LINE__, __FILE__);
}
while ($file = readdir($dir))
{
$path = PHPBB_ROOT_PATH . 'language/' . $file;
if ($file == '.' || $file == '..' || is_link($path) || is_file($path) || $file == 'CVS')
{
continue;
}
if (file_exists($path . '/iso.txt'))
{
list($displayname, $localname) = @file($path . '/iso.txt');
$lang[$localname] = $file;
}
}
closedir($dir);
@asort($lang);
@reset($lang);
$user_select = '';
foreach ($lang as $displayname => $filename)
{
$selected = (strtolower($default) == strtolower($filename)) ? ' selected="selected"' : '';
$user_select .= '<option value="' . $filename . '"' . $selected . '>' . ucwords($displayname) . '</option>';
}
return $user_select;
}
}
?>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,76 +0,0 @@
<?php
/**
*
* @package install
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
*/
if ( !defined('IN_INSTALL') )
{
// Someone has tried to access the file direct. This is not a good idea, so exit
exit;
}
if (!empty($setmodules))
{
$module[] = array(
'module_type' => 'install',
'module_title' => 'OVERVIEW',
'module_filename' => substr(basename(__FILE__), 0, -strlen(PHP_EXT)-1),
'module_order' => 0,
'module_subs' => array('INTRO', 'LICENSE', 'SUPPORT'),
'module_stages' => '',
'module_reqs' => ''
);
}
/**
* Main Tab - Installation
* @package install
*/
class install_main extends module
{
function install_main(&$p_master)
{
$this->p_master = &$p_master;
}
function main($mode, $sub)
{
switch ($sub)
{
case 'intro' :
$title = phpbb::$user->lang['SUB_INTRO'];
$body = phpbb::$user->lang['OVERVIEW_BODY'];
break;
case 'license' :
$title = phpbb::$user->lang['GPL'];
$body = implode("<br />\n", file('../docs/COPYING'));
break;
case 'support' :
$title = phpbb::$user->lang['SUB_SUPPORT'];
$body = phpbb::$user->lang['SUPPORT_BODY'];
break;
}
$this->tpl_name = 'install/main';
$this->page_title = $title;
phpbb::$template->assign_vars(array(
'TITLE' => $title,
'BODY' => $body,
'S_LANG_SELECT' => '<select id="language" name="language">' . $this->p_master->inst_language_select(phpbb::$user->lang_name) . '</select>',
));
}
}
?>

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +0,0 @@
<?php
phpinfo();
?>

View File

@@ -1,877 +0,0 @@
<?php
$schema_data = $schema_updates = array();
// We need some default increments first, so add them first
// phpbb_styles_imageset
$schema_data[] = array(
'table' => 'phpbb_styles_imageset',
'columns' => array('imageset_name', 'imageset_copyright', 'imageset_path'),
'data' => array(
array('prosilver', '&copy; phpBB Group', 'prosilver'),
),
'store_auto_increment' => 'IMAGESET_ID',
);
// phpbb_styles_template
$schema_data[] = array(
'table' => 'phpbb_styles_template',
'columns' => array('template_name', 'template_copyright', 'template_path', 'bbcode_bitfield'),
'data' => array(
array('prosilver', '&copy; phpBB Group', 'prosilver', 'lNg='),
),
'store_auto_increment' => 'TEMPLATE_ID',
);
// phpbb_styles_theme
$schema_data[] = array(
'table' => 'phpbb_styles_theme',
'columns' => array('theme_name', 'theme_copyright', 'theme_path', 'theme_storedb', 'theme_data'),
'data' => array(
array('prosilver', '&copy; phpBB Group', 'prosilver', 1, ''),
),
'store_auto_increment' => 'THEME_ID',
);
// phpbb_styles
$schema_data[] = array(
'table' => 'phpbb_styles',
'columns' => array('style_name', 'style_copyright', 'style_active', 'template_id', 'theme_id', 'imageset_id'),
'data' => array(
array('prosilver', '&copy; phpBB Group', 1, array('auto_increment' => 'TEMPLATE_ID:0'), array('auto_increment' => 'THEME_ID:0'), array('auto_increment' => 'IMAGESET_ID:0')),
),
'store_auto_increment' => 'STYLE_ID',
);
// phpbb_config
$schema_data[] = array(
'table' => 'phpbb_config',
'columns' => array('string:config_name', 'string:config_value'),
'data' => array(
array('active_sessions', '0'),
array('allow_attachments', '1'),
array('allow_autologin', '1'),
array('allow_avatar_local', '0'),
array('allow_avatar_remote', '0'),
array('allow_avatar_upload', '0'),
array('allow_bbcode', '1'),
array('allow_birthdays', '1'),
array('allow_bookmarks', '1'),
array('allow_emailreuse', '0'),
array('allow_forum_notify', '1'),
array('allow_mass_pm', '1'),
array('allow_name_chars', 'USERNAME_CHARS_ANY'),
array('allow_namechange', '0'),
array('allow_nocensors', '0'),
array('allow_pm_attach', '0'),
array('allow_post_flash', '1'),
array('allow_post_links', '1'),
array('allow_privmsg', '1'),
array('allow_sig', '1'),
array('allow_sig_bbcode', '1'),
array('allow_sig_flash', '0'),
array('allow_sig_img', '1'),
array('allow_sig_links', '1'),
array('allow_sig_pm', '1'),
array('allow_sig_smilies', '1'),
array('allow_smilies', '1'),
array('allow_topic_notify', '1'),
array('attachment_quota', '52428800'),
array('auth_bbcode_pm', '1'),
array('auth_flash_pm', '0'),
array('auth_img_pm', '1'),
array('auth_method', 'db'),
array('auth_smilies_pm', '1'),
array('avatar_filesize', '6144'),
array('avatar_gallery_path', 'images/avatars/gallery'),
array('avatar_max_height', '90'),
array('avatar_max_width', '90'),
array('avatar_min_height', '20'),
array('avatar_min_width', '20'),
array('avatar_path', 'images/avatars/upload'),
array('avatar_salt', '{AVATAR_SALT}'),
array('board_contact', '{BOARD_CONTACT}'),
array('board_disable', '0'),
array('board_disable_msg', ''),
array('board_dst', '0'),
array('board_email', '{BOARD_EMAIL}'),
array('board_email_from', '0'),
array('board_email_sig', '{L_CONFIG_BOARD_EMAIL_SIG}'),
array('board_hide_emails', '1'),
array('board_startdate', '{BOARD_STARTDATE}'),
array('board_timezone', '0'),
array('browser_check', '1'),
array('bump_interval', '10'),
array('bump_type', 'd'),
array('cache_gc', '7200'),
array('captcha_plugin', '{CAPTCHA_PLUGIN}'),
array('captcha_gd_foreground_noise', '0'),
array('captcha_gd_x_grid', '25'),
array('captcha_gd_y_grid', '25'),
array('captcha_gd_wave', '0'),
array('captcha_gd_3d_noise', '1'),
array('captcha_gd_fonts', '1'),
array('confirm_refresh', '1'),
array('check_attachment_content', '1'),
array('check_dnsbl', '0'),
array('chg_passforce', '0'),
array('cookie_domain', '{COOKIE_DOMAIN}'),
array('cookie_name', '{COOKIE_NAME}'),
array('cookie_path', '/'),
array('cookie_secure', '{COOKIE_SECURE}'),
array('coppa_enable', '0'),
array('coppa_fax', ''),
array('coppa_mail', ''),
array('database_gc', '604800'),
array('dbms_version', '{DBMS_VERSION}'),
array('default_dateformat', '{DEFAULT_DATEFORMAT}'),
array('default_lang', '{DEFAULT_LANG}'),
array('default_style', array('auto_increment' => 'STYLE_ID:0')),
array('display_last_edited', '1'),
array('display_order', '0'),
array('edit_time', '0'),
array('email_check_mx', '0'),
array('email_enable', '{EMAIL_ENABLE}'),
array('email_function_name', 'mail'),
array('email_package_size', '50'),
array('enable_confirm', '1'),
array('enable_pm_icons', '1'),
array('enable_post_confirm', '1'),
array('enable_queue_trigger', '0'),
array('flood_interval', '15'),
array('force_server_vars', '{FORCE_SERVER_VARS}'),
array('form_token_lifetime', '7200'),
array('form_token_mintime', '0'),
array('form_token_sid_guests', '1'),
array('forward_pm', '1'),
array('forwarded_for_check', '0'),
array('full_folder_action', '2'),
array('fulltext_mysql_max_word_len', '254'),
array('fulltext_mysql_min_word_len', '4'),
array('fulltext_native_common_thres', '5'),
array('fulltext_native_load_upd', '1'),
array('fulltext_native_max_chars', '14'),
array('fulltext_native_min_chars', '3'),
array('gzip_compress', '0'),
array('hot_threshold', '25'),
array('icons_path', 'images/icons'),
array('img_create_thumbnail', '0'),
array('img_display_inlined', '1'),
array('img_imagick', '{IMG_IMAGICK}'),
array('img_link_height', '0'),
array('img_link_width', '0'),
array('img_max_height', '0'),
array('img_max_thumb_width', '400'),
array('img_max_width', '0'),
array('img_min_thumb_filesize', '12000'),
array('ip_check', '3'),
array('jab_enable', '0'),
array('jab_host', ''),
array('jab_password', ''),
array('jab_package_size', '20'),
array('jab_port', '5222'),
array('jab_use_ssl', '0'),
array('jab_username', ''),
array('ldap_base_dn', ''),
array('ldap_email', ''),
array('ldap_password', ''),
array('ldap_port', ''),
array('ldap_server', ''),
array('ldap_uid', ''),
array('ldap_user', ''),
array('ldap_user_filter', ''),
array('limit_load', '0'),
array('limit_search_load', '0'),
array('load_anon_lastread', '0'),
array('load_birthdays', '1'),
array('load_cpf_memberlist', '0'),
array('load_cpf_viewprofile', '1'),
array('load_cpf_viewtopic', '0'),
array('load_db_lastread', '1'),
array('load_db_track', '1'),
array('load_jumpbox', '1'),
array('load_moderators', '1'),
array('load_online', '1'),
array('load_online_guests', '1'),
array('load_online_time', '5'),
array('load_online_track', '1'),
array('load_search', '1'),
array('load_tplcompile', '0'),
array('load_user_activity', '1'),
array('max_attachments', '3'),
array('max_attachments_pm', '1'),
array('max_autologin_time', '0'),
array('max_filesize', '262144'),
array('max_filesize_pm', '262144'),
array('max_login_attempts', '3'),
array('max_name_chars', '20'),
array('max_num_search_keywords', '10'),
array('max_pass_chars', '30'),
array('max_poll_options', '10'),
array('max_poll_chars', '60000'),
array('max_post_font_size', '200'),
array('max_post_img_height', '0'),
array('max_post_img_width', '0'),
array('max_post_smilies', '0'),
array('max_post_urls', '0'),
array('max_quote_depth', '3'),
array('max_reg_attempts', '5'),
array('max_sig_chars', '255'),
array('max_sig_font_size', '200'),
array('max_sig_img_height', '0'),
array('max_sig_img_width', '0'),
array('max_sig_smilies', '0'),
array('max_sig_urls', '5'),
array('min_name_chars', '3'),
array('min_pass_chars', '6'),
array('min_search_author_chars', '3'),
array('mime_triggers', 'body|head|html|img|plaintext|a href|pre|script|table|title'),
array('override_user_style', '0'),
array('pass_complex', 'PASS_TYPE_ANY'),
array('pm_edit_time', '0'),
array('pm_max_boxes', '4'),
array('pm_max_msgs', '50'),
array('pm_max_recipients', '0'),
array('posts_per_page', '10'),
array('print_pm', '1'),
array('queue_interval', '600'),
array('queue_trigger_posts', '3'),
array('ranks_path', 'images/ranks'),
array('require_activation', '0'),
array('referer_validation', '{REFERER_VALIDATION}'),
array('script_path', '{SCRIPT_PATH}'),
array('search_block_size', '250'),
array('search_gc', '7200'),
array('search_indexing_state', ''),
array('search_interval', '0'),
array('search_anonymous_interval', '0'),
array('search_type', 'fulltext_native'),
array('search_store_results', '1800'),
array('secure_allow_deny', '1'),
array('secure_allow_empty_referer', '1'),
array('secure_downloads', '0'),
array('server_name', '{SERVER_NAME}'),
array('server_port', '{SERVER_PORT}'),
array('server_protocol', '{SERVER_PROTOCOL}'),
array('session_gc', '3600'),
array('session_length', '3600'),
array('site_desc', '{L_CONFIG_SITE_DESC}'),
array('sitename', '{L_CONFIG_SITENAME}'),
array('smilies_path', 'images/smilies'),
array('smtp_auth_method', '{SMTP_AUTH_METHOD}'),
array('smtp_delivery', '{SMTP_DELIVERY}'),
array('smtp_host', '{SMTP_HOST}'),
array('smtp_password', '{SMTP_PASSWORD}'),
array('smtp_port', '25'),
array('smtp_username', '{SMTP_USERNAME}'),
array('topics_per_page', '25'),
array('tpl_allow_php', '0'),
array('upload_icons_path', 'images/upload_icons'),
array('upload_path', 'files'),
array('version', '3.1.0-dev1'),
array('warnings_expire_days', '90'),
array('warnings_gc', '14400'),
),
);
// Ranks
$schema_data[] = array(
'table' => 'phpbb_ranks',
'columns' => array('rank_title', 'rank_min', 'rank_special', 'rank_image'),
'data' => array(
array('{L_RANKS_SITE_ADMIN_TITLE}', 0, 1, ''),
),
'store_auto_increment' => 'RANK_ID',
);
// Groups
$schema_data[] = array(
'table' => 'phpbb_groups',
'columns' => array('group_name', 'group_name_clean', 'group_type', 'group_founder_manage', 'group_colour', 'group_legend', 'group_avatar', 'group_desc', 'group_desc_uid', 'group_max_recipients'),
'data' => array(
array('GUESTS', 'guests', 3, 0, '', 0, '', '', '', 0),
array('REGISTERED', 'registered', 3, 0, '', 0, '', '', '', 5),
array('REGISTERED_COPPA', 'registered_coppa', 3, 0, '', 0, '', '', '', 5),
array('GLOBAL_MODERATORS', 'global_moderators', 3, 0, '00AA00', 1, '', '', '', 50),
array('ADMINISTRATORS', 'administrators', 3, 1, 'AA0000', 1, '', '', '', 50),
array('BOTS', 'bots', 3, 0, '9E8DA7', 0, '', '', '', 5),
),
'store_auto_increment' => 'GROUP_ID',
);
// Users
$schema_data[] = array(
'table' => 'phpbb_users',
'columns' => array('user_type', 'group_id', 'username', 'username_clean', 'user_regdate', 'user_password', 'user_email', 'user_lang', 'user_style', 'user_rank', 'user_colour', 'user_posts', 'user_permissions', 'user_ip', 'user_birthday', 'user_lastpage', 'user_last_confirm_key', 'user_post_sortby_type', 'user_post_sortby_dir', 'user_topic_sortby_type', 'user_topic_sortby_dir', 'user_avatar', 'user_sig', 'user_sig_bbcode_uid', 'user_from', 'user_icq', 'user_aim', 'user_yim', 'user_msnm', 'user_jabber', 'user_website', 'user_occ', 'user_interests', 'user_actkey', 'user_newpasswd', 'user_allow_massemail', 'user_email_hash', 'user_dateformat'),
'data' => array(
// Anonymous
array(2, array('auto_increment' => 'GROUP_ID:0'), 'Anonymous', 'anonymous', '{CURRENT_TIME}', '', '', '{DEFAULT_LANG}', array('auto_increment' => 'STYLE_ID:0'), 0, '', 0, '', '{USER_IP}', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0, 0, '{DEFAULT_DATEFORMAT}'),
// Admin
array(3, array('auto_increment' => 'GROUP_ID:4'), '{ADMIN_NAME}', '{ADMIN_NAME_CLEAN}', '{CURRENT_TIME}', '{ADMIN_PASSWORD}', '{ADMIN_EMAIL}', '{DEFAULT_LANG}', array('auto_increment' => 'STYLE_ID:0'), array('auto_increment' => 'RANK_ID:0'), 'AA0000', 1, '', '{USER_IP}', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 1, '{ADMIN_EMAIL_HASH}', '{DEFAULT_DATEFORMAT}'),
),
'store_auto_increment' => 'USER_ID',
);
// Dynamic config values
$schema_data[] = array(
'table' => 'phpbb_config',
'columns' => array('string:config_name', 'string:config_value', 'is_dynamic'),
'data' => array(
array('cache_last_gc', '0', 1),
array('cron_lock', '0', 1),
array('database_last_gc', '0', 1),
array('last_queue_run', '0', 1),
array('newest_user_colour', 'AA0000', 1),
array('newest_user_id', array('auto_increment' => 'USER_ID:1'), 1),
array('newest_username', '{NEWEST_USERNAME}', 1),
array('num_files', '0', 1),
array('num_posts', '1', 1),
array('num_topics', '1', 1),
array('num_users', '1', 1),
array('rand_seed', '0', 1),
array('rand_seed_last_update', '0', 1),
array('record_online_date', '0', 1),
array('record_online_users', '0', 1),
array('search_last_gc', '0', 1),
array('session_last_gc', '0', 1),
array('upload_dir_size', '0', 1),
array('warnings_last_gc', '0', 1),
),
);
// Forums
$schema_data[] = array(
'table' => 'phpbb_forums',
'columns' => array('forum_name', 'forum_desc', 'left_id', 'right_id', 'parent_id', 'forum_type', 'forum_posts', 'forum_topics', 'forum_topics_real', 'forum_last_post_id', 'forum_last_poster_id', 'forum_last_poster_name', 'forum_last_poster_colour', 'forum_last_post_subject', 'forum_last_post_time', 'forum_link', 'forum_password', 'forum_image', 'forum_rules', 'forum_rules_link', 'forum_rules_uid', 'forum_desc_uid', 'prune_days', 'prune_viewed', 'forum_parents'),
'data' => array(
array('{L_FORUMS_FIRST_CATEGORY}', '', 1, 4, 0, 0, 1, 1, 1, 0, array('auto_increment' => 'USER_ID:1'), '{ADMIN_NAME}', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', '{CURRENT_TIME}', '', '', '', '', '', '', '', 0, 0, ''),
array('{L_FORUMS_TEST_FORUM_TITLE}', '{L_FORUMS_TEST_FORUM_DESC}', 2, 3, array('auto_increment' => 'FORUM_ID:0'), 1, 1, 1, 1, 0, array('auto_increment' => 'USER_ID:1'), '{ADMIN_NAME}', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', '{CURRENT_TIME}', '', '', '', '', '', '', '', 0, 0, ''),
),
'store_auto_increment' => 'FORUM_ID',
);
// Demo Topic
$schema_data[] = array(
'table' => 'phpbb_topics',
'columns' => array('topic_title', 'topic_poster', 'topic_time', 'topic_views', 'topic_replies', 'topic_replies_real', 'forum_id', 'topic_status', 'topic_type', 'topic_first_post_id', 'topic_first_poster_name', 'topic_first_poster_colour', 'topic_last_post_id', 'topic_last_poster_id', 'topic_last_poster_name', 'topic_last_poster_colour', 'topic_last_post_subject', 'topic_last_post_time', 'topic_last_view_time', 'poll_title'),
'data' => array(
array('{L_TOPICS_TOPIC_TITLE}', array('auto_increment' => 'USER_ID:1'), '{CURRENT_TIME}', 0, 0, 0, array('auto_increment' => 'FORUM_ID:1'), 0, 0, 0, '{ADMIN_NAME}', 'AA0000', 0, array('auto_increment' => 'USER_ID:1'), '{ADMIN_NAME}', 'AA0000', '{L_TOPICS_TOPIC_TITLE}', '{CURRENT_TIME}', 0, ''),
),
'store_auto_increment' => 'TOPIC_ID',
);
// Demo Post
$schema_data[] = array(
'table' => 'phpbb_posts',
'columns' => array('topic_id', 'forum_id', 'poster_id', 'icon_id', 'post_time', 'post_username', 'poster_ip', 'post_subject', 'post_text', 'post_checksum', 'bbcode_uid'),
'data' => array(
array(array('auto_increment' => 'TOPIC_ID:0'), array('auto_increment' => 'FORUM_ID:1'), array('auto_increment' => 'USER_ID:1'), 0, '{CURRENT_TIME}', '', '{USER_IP}', '{L_TOPICS_TOPIC_TITLE}', '{L_DEFAULT_INSTALL_POST}', '', ''),
),
'store_auto_increment' => 'POST_ID',
);
// Admin posted to the demo topic
$schema_data[] = array(
'table' => 'phpbb_topics_posted',
'columns' => array('user_id', 'topic_id', 'topic_posted'),
'data' => array(
array(array('auto_increment' => 'USER_ID:1'), array('auto_increment' => 'TOPIC_ID:0'), 1),
),
);
// Update forums table
$schema_updates[] = array(
'table' => 'phpbb_forums',
'columns' => array('forum_last_post_id'),
'data' => array(array('auto_increment' => 'POST_ID:0')),
);
// Update topics table
$schema_updates[] = array(
'table' => 'phpbb_topics',
'columns' => array('topic_first_post_id', 'topic_last_post_id'),
'data' => array(array('auto_increment' => 'POST_ID:0'), array('auto_increment' => 'POST_ID:0')),
'where' => array(
array('topic_id' => array('auto_increment' => 'TOPIC_ID:0')),
),
);
// User -> Group
$schema_data[] = array(
'table' => 'phpbb_user_group',
'columns' => array('group_id', 'user_id', 'user_pending', 'group_leader'),
'data' => array(
array(array('auto_increment' => 'GROUP_ID:0'), array('auto_increment' => 'USER_ID:0'), 0, 0),
array(array('auto_increment' => 'GROUP_ID:1'), array('auto_increment' => 'USER_ID:1'), 0, 0),
array(array('auto_increment' => 'GROUP_ID:3'), array('auto_increment' => 'USER_ID:1'), 0, 0),
array(array('auto_increment' => 'GROUP_ID:4'), array('auto_increment' => 'USER_ID:1'), 0, 1),
),
);
// Forum related auth options
$schema_data[] = array(
'table' => 'phpbb_acl_options',
'columns' => array('auth_option', 'is_local', 'is_global'),
'data' => array(
array('f_', 1, 0),
array('f_announce', 1, 0),
array('f_attach', 1, 0),
array('f_bbcode', 1, 0),
array('f_bump', 1, 0),
array('f_delete', 1, 0),
array('f_download', 1, 0),
array('f_edit', 1, 0),
array('f_email', 1, 0),
array('f_flash', 1, 0),
array('f_icons', 1, 0),
array('f_ignoreflood', 1, 0),
array('f_img', 1, 0),
array('f_list', 1, 0),
array('f_noapprove', 1, 0),
array('f_poll', 1, 0),
array('f_post', 1, 0),
array('f_postcount', 1, 0),
array('f_print', 1, 0),
array('f_read', 1, 0),
array('f_reply', 1, 0),
array('f_report', 1, 0),
array('f_search', 1, 0),
array('f_sigs', 1, 0),
array('f_smilies', 1, 0),
array('f_sticky', 1, 0),
array('f_subscribe', 1, 0),
array('f_user_lock', 1, 0),
array('f_vote', 1, 0),
array('f_votechg', 1, 0),
// Moderator related auth options
array('m_', 1, 1),
array('m_approve', 1, 1),
array('m_chgposter', 1, 1),
array('m_delete', 1, 1),
array('m_edit', 1, 1),
array('m_info', 1, 1),
array('m_lock', 1, 1),
array('m_merge', 1, 1),
array('m_move', 1, 1),
array('m_report', 1, 1),
array('m_split', 1, 1),
// Global moderator auth option (not a local option)
array('m_ban', 0, 1),
array('m_warn', 0, 1),
// Admin related auth options
array('a_', 0, 1),
array('a_aauth', 0, 1),
array('a_attach', 0, 1),
array('a_authgroups', 0, 1),
array('a_authusers', 0, 1),
array('a_backup', 0, 1),
array('a_ban', 0, 1),
array('a_bbcode', 0, 1),
array('a_board', 0, 1),
array('a_bots', 0, 1),
array('a_clearlogs', 0, 1),
array('a_email', 0, 1),
array('a_fauth', 0, 1),
array('a_forum', 0, 1),
array('a_forumadd', 0, 1),
array('a_forumdel', 0, 1),
array('a_group', 0, 1),
array('a_groupadd', 0, 1),
array('a_groupdel', 0, 1),
array('a_icons', 0, 1),
array('a_jabber', 0, 1),
array('a_language', 0, 1),
array('a_mauth', 0, 1),
array('a_modules', 0, 1),
array('a_names', 0, 1),
array('a_phpinfo', 0, 1),
array('a_profile', 0, 1),
array('a_prune', 0, 1),
array('a_ranks', 0, 1),
array('a_reasons', 0, 1),
array('a_roles', 0, 1),
array('a_search', 0, 1),
array('a_server', 0, 1),
array('a_styles', 0, 1),
array('a_switchperm', 0, 1),
array('a_uauth', 0, 1),
array('a_user', 0, 1),
array('a_userdel', 0, 1),
array('a_viewauth', 0, 1),
array('a_viewlogs', 0, 1),
array('a_words', 0, 1),
// User related auth options
array('u_', 0, 1),
array('u_attach', 0, 1),
array('u_chgavatar', 0, 1),
array('u_chgcensors', 0, 1),
array('u_chgemail', 0, 1),
array('u_chggrp', 0, 1),
array('u_chgname', 0, 1),
array('u_chgpasswd', 0, 1),
array('u_download', 0, 1),
array('u_hideonline', 0, 1),
array('u_ignoreflood', 0, 1),
array('u_masspm', 0, 1),
array('u_masspm_group', 0, 1),
array('u_pm_attach', 0, 1),
array('u_pm_bbcode', 0, 1),
array('u_pm_delete', 0, 1),
array('u_pm_download', 0, 1),
array('u_pm_edit', 0, 1),
array('u_pm_emailpm', 0, 1),
array('u_pm_flash', 0, 1),
array('u_pm_forward', 0, 1),
array('u_pm_img', 0, 1),
array('u_pm_printpm', 0, 1),
array('u_pm_smilies', 0, 1),
array('u_readpm', 0, 1),
array('u_savedrafts', 0, 1),
array('u_search', 0, 1),
array('u_sendemail', 0, 1),
array('u_sendim', 0, 1),
array('u_sendpm', 0, 1),
array('u_sig', 0, 1),
array('u_viewonline', 0, 1),
array('u_viewprofile', 0, 1),
),
'store_auto_increment' => 'AUTH_OPTION_ID',
);
// standard auth roles
$schema_data[] = array(
'table' => 'phpbb_acl_roles',
'columns' => array('role_name', 'role_description', 'role_type', 'role_order'),
'data' => array(
array('ROLE_ADMIN_STANDARD', 'ROLE_DESCRIPTION_ADMIN_STANDARD', 'a_', 1),
array('ROLE_ADMIN_FORUM', 'ROLE_DESCRIPTION_ADMIN_FORUM', 'a_', 3),
array('ROLE_ADMIN_USERGROUP', 'ROLE_DESCRIPTION_ADMIN_USERGROUP', 'a_', 4),
array('ROLE_ADMIN_FULL', 'ROLE_DESCRIPTION_ADMIN_FULL', 'a_', 2),
array('ROLE_USER_FULL', 'ROLE_DESCRIPTION_USER_FULL', 'u_', 3),
array('ROLE_USER_STANDARD', 'ROLE_DESCRIPTION_USER_STANDARD', 'u_', 1),
array('ROLE_USER_LIMITED', 'ROLE_DESCRIPTION_USER_LIMITED', 'u_', 2),
array('ROLE_USER_NOPM', 'ROLE_DESCRIPTION_USER_NOPM', 'u_', 4),
array('ROLE_USER_NOAVATAR', 'ROLE_DESCRIPTION_USER_NOAVATAR', 'u_', 5),
array('ROLE_MOD_FULL', 'ROLE_DESCRIPTION_MOD_FULL', 'm_', 3),
array('ROLE_MOD_STANDARD', 'ROLE_DESCRIPTION_MOD_STANDARD', 'm_', 1),
array('ROLE_MOD_SIMPLE', 'ROLE_DESCRIPTION_MOD_SIMPLE', 'm_', 2),
array('ROLE_MOD_QUEUE', 'ROLE_DESCRIPTION_MOD_QUEUE', 'm_', 4),
array('ROLE_FORUM_FULL', 'ROLE_DESCRIPTION_FORUM_FULL', 'f_', 7),
array('ROLE_FORUM_STANDARD', 'ROLE_DESCRIPTION_FORUM_STANDARD', 'f_', 5),
array('ROLE_FORUM_NOACCESS', 'ROLE_DESCRIPTION_FORUM_NOACCESS', 'f_', 1),
array('ROLE_FORUM_READONLY', 'ROLE_DESCRIPTION_FORUM_READONLY', 'f_', 2),
array('ROLE_FORUM_LIMITED', 'ROLE_DESCRIPTION_FORUM_LIMITED', 'f_', 3),
array('ROLE_FORUM_BOT', 'ROLE_DESCRIPTION_FORUM_BOT', 'f_', 9),
array('ROLE_FORUM_ONQUEUE', 'ROLE_DESCRIPTION_FORUM_ONQUEUE', 'f_', 8),
array('ROLE_FORUM_POLLS', 'ROLE_DESCRIPTION_FORUM_POLLS', 'f_', 6),
array('ROLE_FORUM_LIMITED_POLLS', 'ROLE_DESCRIPTION_FORUM_LIMITED_POLLS', 'f_', 4),
array('ROLE_USER_GUESTS', 'ROLE_DESCRIPTION_USER_GUESTS', 'u_', 6),
),
'store_auto_increment' => 'ROLE_ID',
);
// Permissions
$schema_data[] = array(
'table' => 'phpbb_acl_groups',
'columns' => array('group_id', 'forum_id', 'auth_option_id', 'auth_role_id', 'auth_setting'),
'data' => array(
// GUESTS - u_download and u_search ability
array(array('auto_increment' => 'GROUP_ID:0'), 0, 0, array('auto_increment' => 'ROLE_ID:22'), 0),
// ADMINISTRATOR Group - full user features
array(array('auto_increment' => 'GROUP_ID:4'), 0, 0, array('auto_increment' => 'ROLE_ID:4'), 0),
// ADMINISTRATOR Group - standard admin
array(array('auto_increment' => 'GROUP_ID:4'), 0, 0, array('auto_increment' => 'ROLE_ID:0'), 0),
// REGISTERED and REGISTERED_COPPA having standard user features
array(array('auto_increment' => 'GROUP_ID:1'), 0, 0, array('auto_increment' => 'ROLE_ID:5'), 0),
array(array('auto_increment' => 'GROUP_ID:2'), 0, 0, array('auto_increment' => 'ROLE_ID:5'), 0),
// GLOBAL_MODERATORS having full user features
array(array('auto_increment' => 'GROUP_ID:3'), 0, 0, array('auto_increment' => 'ROLE_ID:4'), 0),
// GLOBAL_MODERATORS having full global moderator access
array(array('auto_increment' => 'GROUP_ID:3'), 0, 0, array('auto_increment' => 'ROLE_ID:9'), 0),
// Giving all groups read only access to the first category
// since administrators and moderators are already within the registered users group we do not need to set them here
array(array('auto_increment' => 'GROUP_ID:0'), array('auto_increment' => 'FORUM_ID:0'), 0, array('auto_increment' => 'ROLE_ID:16'), 0),
array(array('auto_increment' => 'GROUP_ID:1'), array('auto_increment' => 'FORUM_ID:0'), 0, array('auto_increment' => 'ROLE_ID:16'), 0),
array(array('auto_increment' => 'GROUP_ID:2'), array('auto_increment' => 'FORUM_ID:0'), 0, array('auto_increment' => 'ROLE_ID:16'), 0),
array(array('auto_increment' => 'GROUP_ID:5'), array('auto_increment' => 'FORUM_ID:0'), 0, array('auto_increment' => 'ROLE_ID:16'), 0),
// Giving access to the first forum
// guests having read only access
array(array('auto_increment' => 'GROUP_ID:0'), array('auto_increment' => 'FORUM_ID:1'), 0, array('auto_increment' => 'ROLE_ID:16'), 0),
// registered and registered_coppa having standard access
array(array('auto_increment' => 'GROUP_ID:1'), array('auto_increment' => 'FORUM_ID:1'), 0, array('auto_increment' => 'ROLE_ID:14'), 0),
array(array('auto_increment' => 'GROUP_ID:2'), array('auto_increment' => 'FORUM_ID:1'), 0, array('auto_increment' => 'ROLE_ID:14'), 0),
// global moderators having standard access + polls
array(array('auto_increment' => 'GROUP_ID:3'), array('auto_increment' => 'FORUM_ID:1'), 0, array('auto_increment' => 'ROLE_ID:20'), 0),
// administrators having full forum and full moderator access
array(array('auto_increment' => 'GROUP_ID:4'), array('auto_increment' => 'FORUM_ID:1'), 0, array('auto_increment' => 'ROLE_ID:13'), 0),
array(array('auto_increment' => 'GROUP_ID:4'), array('auto_increment' => 'FORUM_ID:1'), 0, array('auto_increment' => 'ROLE_ID:9'), 0),
// Bots having bot access
array(array('auto_increment' => 'GROUP_ID:5'), array('auto_increment' => 'FORUM_ID:1'), 0, array('auto_increment' => 'ROLE_ID:18'), 0),
),
);
// phpbb_styles_imageset_data
$schema_data[] = array(
'table' => 'phpbb_styles_imageset_data',
'columns' => array('image_name', 'image_filename', 'image_lang', 'image_height', 'image_width', 'imageset_id'),
'data' => array(
array('site_logo', 'site_logo.gif', '', 52, 139, array('auto_increment' => 'IMAGESET_ID:0')),
array('forum_link', 'forum_link.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('forum_read', 'forum_read.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('forum_read_locked', 'forum_read_locked.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('forum_read_subforum', 'forum_read_subforum.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('forum_unread', 'forum_unread.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('forum_unread_locked', 'forum_unread_locked.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('forum_unread_subforum', 'forum_unread_subforum.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('topic_moved', 'topic_moved.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('topic_read', 'topic_read.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('topic_read_mine', 'topic_read_mine.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('topic_read_hot', 'topic_read_hot.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('topic_read_hot_mine', 'topic_read_hot_mine.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('topic_read_locked', 'topic_read_locked.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('topic_read_locked_mine', 'topic_read_locked_mine.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('topic_unread', 'topic_unread.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('topic_unread_mine', 'topic_unread_mine.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('topic_unread_hot', 'topic_unread_hot.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('topic_unread_hot_mine', 'topic_unread_hot_mine.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('topic_unread_locked', 'topic_unread_locked.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('topic_unread_locked_mine', 'topic_unread_locked_mine.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('sticky_read', 'sticky_read.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('sticky_read_mine', 'sticky_read_mine.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('sticky_read_locked', 'sticky_read_locked.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('sticky_read_locked_mine', 'sticky_read_locked_mine.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('sticky_unread', 'sticky_unread.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('sticky_unread_mine', 'sticky_unread_mine.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('sticky_unread_locked', 'sticky_unread_locked.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('sticky_unread_locked_mine', 'sticky_unread_locked_mine.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('announce_read', 'announce_read.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('announce_read_mine', 'announce_read_mine.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('announce_read_locked', 'announce_read_locked.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('announce_read_locked_mine', 'announce_read_locked_mine.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('announce_unread', 'announce_unread.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('announce_unread_mine', 'announce_unread_mine.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('announce_unread_locked', 'announce_unread_locked.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('announce_unread_locked_mine', 'announce_unread_locked_mine.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('global_read', 'announce_read.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('global_read_mine', 'announce_read_mine.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('global_read_locked', 'announce_read_locked.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('global_read_locked_mine', 'announce_read_locked_mine.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('global_unread', 'announce_unread.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('global_unread_mine', 'announce_unread_mine.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('global_unread_locked', 'announce_unread_locked.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('global_unread_locked_mine', 'announce_unread_locked_mine.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('pm_read', 'topic_read.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('pm_unread', 'topic_unread.gif', '', 27, 27, array('auto_increment' => 'IMAGESET_ID:0')),
array('icon_back_top', 'icon_back_top.gif', '', 11, 11, array('auto_increment' => 'IMAGESET_ID:0')),
array('icon_contact_aim', 'icon_contact_aim.gif', '', 20, 20, array('auto_increment' => 'IMAGESET_ID:0')),
array('icon_contact_email', 'icon_contact_email.gif', '', 20, 20, array('auto_increment' => 'IMAGESET_ID:0')),
array('icon_contact_icq', 'icon_contact_icq.gif', '', 20, 20, array('auto_increment' => 'IMAGESET_ID:0')),
array('icon_contact_jabber', 'icon_contact_jabber.gif', '', 20, 20, array('auto_increment' => 'IMAGESET_ID:0')),
array('icon_contact_msnm', 'icon_contact_msnm.gif', '', 20, 20, array('auto_increment' => 'IMAGESET_ID:0')),
array('icon_contact_www', 'icon_contact_www.gif', '', 20, 20, array('auto_increment' => 'IMAGESET_ID:0')),
array('icon_contact_yahoo', 'icon_contact_yahoo.gif', '', 20, 20, array('auto_increment' => 'IMAGESET_ID:0')),
array('icon_post_delete', 'icon_post_delete.gif', '', 20, 20, array('auto_increment' => 'IMAGESET_ID:0')),
array('icon_post_info', 'icon_post_info.gif', '', 20, 20, array('auto_increment' => 'IMAGESET_ID:0')),
array('icon_post_report', 'icon_post_report.gif', '', 20, 20, array('auto_increment' => 'IMAGESET_ID:0')),
array('icon_post_target', 'icon_post_target.gif', '', 9, 11, array('auto_increment' => 'IMAGESET_ID:0')),
array('icon_post_target_unread', 'icon_post_target_unread.gif', '', 9, 11, array('auto_increment' => 'IMAGESET_ID:0')),
array('icon_topic_attach', 'icon_topic_attach.gif', '', 10, 7, array('auto_increment' => 'IMAGESET_ID:0')),
array('icon_topic_latest', 'icon_topic_latest.gif', '', 9, 11, array('auto_increment' => 'IMAGESET_ID:0')),
array('icon_topic_newest', 'icon_topic_newest.gif', '', 9, 11, array('auto_increment' => 'IMAGESET_ID:0')),
array('icon_topic_reported', 'icon_topic_reported.gif', '', 14, 16, array('auto_increment' => 'IMAGESET_ID:0')),
array('icon_topic_unapproved', 'icon_topic_unapproved.gif', '', 14, 16, array('auto_increment' => 'IMAGESET_ID:0')),
array('icon_user_warn', 'icon_user_warn.gif', '', 20, 20, array('auto_increment' => 'IMAGESET_ID:0')),
array('subforum_read', 'subforum_read.gif', '', 9, 11, array('auto_increment' => 'IMAGESET_ID:0')),
array('subforum_unread', 'subforum_unread.gif', '', 9, 11, array('auto_increment' => 'IMAGESET_ID:0')),
),
);
// Smilies
$schema_data[] = array(
'table' => 'phpbb_smilies',
'columns' => array('code', 'smiley_url', 'emotion', 'smiley_width', 'smiley_height', 'smiley_order'),
'data' => array(
array(':D', 'icon_e_biggrin.gif', '{L_SMILIES_VERY_HAPPY}', 15, 17, 1),
array(':-D', 'icon_e_biggrin.gif', '{L_SMILIES_VERY_HAPPY}', 15, 17, 2),
array(':grin:', 'icon_e_biggrin.gif', '{L_SMILIES_VERY_HAPPY}', 15, 17, 3),
array(':)', 'icon_e_smile.gif', '{L_SMILIES_SMILE}', 15, 17, 4),
array(':-)', 'icon_e_smile.gif', '{L_SMILIES_SMILE}', 15, 17, 5),
array(':smile:', 'icon_e_smile.gif', '{L_SMILIES_SMILE}', 15, 17, 6),
array(';)', 'icon_e_wink.gif', '{L_SMILIES_WINK}', 15, 17, 7),
array(';-)', 'icon_e_wink.gif', '{L_SMILIES_WINK}', 15, 17, 8),
array(':wink:', 'icon_e_wink.gif', '{L_SMILIES_WINK}', 15, 17, 9),
array(':(', 'icon_e_sad.gif', '{L_SMILIES_SAD}', 15, 17, 10),
array(':-(', 'icon_e_sad.gif', '{L_SMILIES_SAD}', 15, 17, 11),
array(':sad:', 'icon_e_sad.gif', '{L_SMILIES_SAD}', 15, 17, 12),
array(':o', 'icon_e_surprised.gif', '{L_SMILIES_SURPRISED}', 15, 17, 13),
array(':-o', 'icon_e_surprised.gif', '{L_SMILIES_SURPRISED}', 15, 17, 14),
array(':eek:', 'icon_e_surprised.gif', '{L_SMILIES_SURPRISED}', 15, 17, 15),
array(':shock:', 'icon_eek.gif', '{L_SMILIES_SHOCKED}', 15, 17, 16),
array(':?', 'icon_e_confused.gif', '{L_SMILIES_CONFUSED}', 15, 17, 17),
array(':-?', 'icon_e_confused.gif', '{L_SMILIES_CONFUSED}', 15, 17, 18),
array(':???:', 'icon_e_confused.gif', '{L_SMILIES_CONFUSED}', 15, 17, 19),
array('8-)', 'icon_cool.gif', '{L_SMILIES_COOL}', 15, 17, 20),
array(':cool:', 'icon_cool.gif', '{L_SMILIES_COOL}', 15, 17, 21),
array(':lol:', 'icon_lol.gif', '{L_SMILIES_LAUGHING}', 15, 17, 22),
array(':x', 'icon_mad.gif', '{L_SMILIES_MAD}', 15, 17, 23),
array(':-x', 'icon_mad.gif', '{L_SMILIES_MAD}', 15, 17, 24),
array(':mad:', 'icon_mad.gif', '{L_SMILIES_MAD}', 15, 17, 25),
array(':P', 'icon_razz.gif', '{L_SMILIES_RAZZ}', 15, 17, 26),
array(':-P', 'icon_razz.gif', '{L_SMILIES_RAZZ}', 15, 17, 27),
array(':razz:', 'icon_razz.gif', '{L_SMILIES_RAZZ}', 15, 17, 28),
array(':oops:', 'icon_redface.gif', '{L_SMILIES_EMARRASSED}', 15, 17, 29),
array(':cry:', 'icon_cry.gif', '{L_SMILIES_CRYING}', 15, 17, 30),
array(':evil:', 'icon_evil.gif', '{L_SMILIES_EVIL}', 15, 17, 31),
array(':twisted:', 'icon_twisted.gif', '{L_SMILIES_TWISTED_EVIL}', 15, 17, 32),
array(':roll:', 'icon_rolleyes.gif', '{L_SMILIES_ROLLING_EYES}', 15, 17, 33),
array(':!:', 'icon_exclaim.gif', '{L_SMILIES_EXCLAMATION}', 15, 17, 34),
array(':?:', 'icon_question.gif', '{L_SMILIES_QUESTION}', 15, 17, 35),
array(':idea:', 'icon_idea.gif', '{L_SMILIES_IDEA}', 15, 17, 36),
array(':arrow:', 'icon_arrow.gif', '{L_SMILIES_ARROW}', 15, 17, 37),
array(':|', 'icon_neutral.gif', '{L_SMILIES_NEUTRAL}', 15, 17, 38),
array(':-|', 'icon_neutral.gif', '{L_SMILIES_NEUTRAL}', 15, 17, 39),
array(':mrgreen:', 'icon_mrgreen.gif', '{L_SMILIES_MR_GREEN}', 15, 17, 40),
array(':geek:', 'icon_e_geek.gif', '{L_SMILIES_GEEK}', 17, 17, 41),
array(':ugeek:', 'icon_e_ugeek.gif', '{L_SMILIES_UBER_GEEK}', 17, 18, 42),
),
);
// icons
$schema_data[] = array(
'table' => 'phpbb_icons',
'columns' => array('icons_url', 'icons_width', 'icons_height', 'icons_order', 'display_on_posting'),
'data' => array(
array('misc/fire.gif', 16, 16, 1, 1),
array('smile/redface.gif', 16, 16, 9, 1),
array('smile/mrgreen.gif', 16, 16, 10, 1),
array('misc/heart.gif', 16, 16, 4, 1),
array('misc/star.gif', 16, 16, 2, 1),
array('misc/radioactive.gif', 16, 16, 3, 1),
array('misc/thinking.gif', 16, 16, 5, 1),
array('smile/info.gif', 16, 16, 8, 1),
array('smile/question.gif', 16, 16, 6, 1),
array('smile/alert.gif', 16, 16, 7, 1),
),
);
// reasons
$schema_data[] = array(
'table' => 'phpbb_reports_reasons',
'columns' => array('reason_title', 'reason_description', 'reason_order'),
'data' => array(
array('warez', '{L_REPORT_WAREZ}', 1),
array('spam', '{L_REPORT_SPAM}', 2),
array('off_topic', '{L_REPORT_OFF_TOPIC}', 3),
array('other', '{L_REPORT_OTHER}', 4),
),
);
// extension_groups
$schema_data[] = array(
'table' => 'phpbb_extension_groups',
'columns' => array('group_name', 'cat_id', 'allow_group', 'download_mode', 'upload_icon', 'max_filesize', 'allowed_forums'),
'data' => array(
array('{L_EXT_GROUP_IMAGES}', 1, 1, 1, '', 0, ''),
array('{L_EXT_GROUP_ARCHIVES}', 0, 1, 1, '', 0, ''),
array('{L_EXT_GROUP_PLAIN_TEXT}', 0, 0, 1, '', 0, ''),
array('{L_EXT_GROUP_DOCUMENTS}', 0, 0, 1, '', 0, ''),
array('{L_EXT_GROUP_REAL_MEDIA}', 3, 0, 1, '', 0, ''),
array('{L_EXT_GROUP_WINDOWS_MEDIA}', 2, 0, 1, '', 0, ''),
array('{L_EXT_GROUP_FLASH_FILES}', 5, 0, 1, '', 0, ''),
array('{L_EXT_GROUP_QUICKTIME_MEDIA}', 6, 0, 1, '', 0, ''),
array('{L_EXT_GROUP_DOWNLOADABLE_FILES}', 0, 0, 1, '', 0, ''),
),
'store_auto_increment' => 'EXT_GROUP_ID',
);
// extensions
$schema_data[] = array(
'table' => 'phpbb_extensions',
'columns' => array('group_id', 'extension'),
'data' => array(
array(array('auto_increment' => 'EXT_GROUP_ID:0'), 'gif'),
array(array('auto_increment' => 'EXT_GROUP_ID:0'), 'png'),
array(array('auto_increment' => 'EXT_GROUP_ID:0'), 'jpeg'),
array(array('auto_increment' => 'EXT_GROUP_ID:0'), 'jpg'),
array(array('auto_increment' => 'EXT_GROUP_ID:0'), 'tif'),
array(array('auto_increment' => 'EXT_GROUP_ID:0'), 'tiff'),
array(array('auto_increment' => 'EXT_GROUP_ID:0'), 'tga'),
array(array('auto_increment' => 'EXT_GROUP_ID:1'), 'gtar'),
array(array('auto_increment' => 'EXT_GROUP_ID:1'), 'gz'),
array(array('auto_increment' => 'EXT_GROUP_ID:1'), 'tar'),
array(array('auto_increment' => 'EXT_GROUP_ID:1'), 'zip'),
array(array('auto_increment' => 'EXT_GROUP_ID:1'), 'rar'),
array(array('auto_increment' => 'EXT_GROUP_ID:1'), 'ace'),
array(array('auto_increment' => 'EXT_GROUP_ID:1'), 'torrent'),
array(array('auto_increment' => 'EXT_GROUP_ID:1'), 'tgz'),
array(array('auto_increment' => 'EXT_GROUP_ID:1'), 'bz2'),
array(array('auto_increment' => 'EXT_GROUP_ID:1'), '7z'),
array(array('auto_increment' => 'EXT_GROUP_ID:2'), 'txt'),
array(array('auto_increment' => 'EXT_GROUP_ID:2'), 'c'),
array(array('auto_increment' => 'EXT_GROUP_ID:2'), 'h'),
array(array('auto_increment' => 'EXT_GROUP_ID:2'), 'cpp'),
array(array('auto_increment' => 'EXT_GROUP_ID:2'), 'hpp'),
array(array('auto_increment' => 'EXT_GROUP_ID:2'), 'diz'),
array(array('auto_increment' => 'EXT_GROUP_ID:2'), 'csv'),
array(array('auto_increment' => 'EXT_GROUP_ID:2'), 'ini'),
array(array('auto_increment' => 'EXT_GROUP_ID:2'), 'log'),
array(array('auto_increment' => 'EXT_GROUP_ID:2'), 'js'),
array(array('auto_increment' => 'EXT_GROUP_ID:2'), 'xml'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'xls'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'xlsx'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'xlsm'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'xlsb'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'doc'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'docx'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'docm'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'dot'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'dotx'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'dotm'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'pdf'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'ai'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'ps'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'ppt'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'pptx'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'pptm'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'odg'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'odp'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'ods'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'odt'),
array(array('auto_increment' => 'EXT_GROUP_ID:3'), 'rtf'),
array(array('auto_increment' => 'EXT_GROUP_ID:4'), 'rm'),
array(array('auto_increment' => 'EXT_GROUP_ID:4'), 'ram'),
array(array('auto_increment' => 'EXT_GROUP_ID:5'), 'wma'),
array(array('auto_increment' => 'EXT_GROUP_ID:5'), 'wmv'),
array(array('auto_increment' => 'EXT_GROUP_ID:6'), 'swf'),
array(array('auto_increment' => 'EXT_GROUP_ID:7'), 'mov'),
array(array('auto_increment' => 'EXT_GROUP_ID:7'), 'm4v'),
array(array('auto_increment' => 'EXT_GROUP_ID:7'), 'm4a'),
array(array('auto_increment' => 'EXT_GROUP_ID:7'), 'mp4'),
array(array('auto_increment' => 'EXT_GROUP_ID:7'), '3gp'),
array(array('auto_increment' => 'EXT_GROUP_ID:7'), '3g2'),
array(array('auto_increment' => 'EXT_GROUP_ID:7'), 'qt'),
array(array('auto_increment' => 'EXT_GROUP_ID:8'), 'mpeg'),
array(array('auto_increment' => 'EXT_GROUP_ID:8'), 'mpg'),
array(array('auto_increment' => 'EXT_GROUP_ID:8'), 'mp3'),
array(array('auto_increment' => 'EXT_GROUP_ID:8'), 'ogg'),
array(array('auto_increment' => 'EXT_GROUP_ID:8'), 'ogm'),
),
);
?>

File diff suppressed because it is too large Load Diff