mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
Viewtopic:
- PGSQL friendly New Install: - file_get_contents New/Old Install: - remove remarks for PGSQL, some versions don't like 'em - fixed the regex in remove_remarks - rewrote split_sql_file Schema: - removed explicit inserts, replaced with implicit inserts. This is more friendly to our non auto incrementing friends. (One set of data is not fixed yet, the modules table) - removed all those SELECT SETVAL statements, they were not needed. git-svn-id: file:///svn/phpbb/trunk@5854 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
5994371c0a
commit
1b065fb74a
6 changed files with 142 additions and 203 deletions
|
@ -1683,7 +1683,7 @@ function remove_comments(&$output)
|
|||
*/
|
||||
function remove_remarks(&$sql)
|
||||
{
|
||||
$sql = preg_replace('/(\n){2,}/', "\n", preg_replace('/^#.*/m', "\n", $sql));
|
||||
$sql = preg_replace('/\n{2,}/', "\n", preg_replace('/^#.*$/m', "\n", $sql));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1692,88 +1692,18 @@ function remove_remarks(&$sql)
|
|||
*/
|
||||
function split_sql_file($sql, $delimiter)
|
||||
{
|
||||
// Split up our string into "possible" SQL statements.
|
||||
$tokens = explode($delimiter, $sql);
|
||||
|
||||
// try to save mem.
|
||||
$sql = '';
|
||||
$output = array();
|
||||
|
||||
// we don't actually care about the matches preg gives us.
|
||||
$matches = array();
|
||||
|
||||
// this is faster than calling sizeof($oktens) every time thru the loop.
|
||||
for ($i = 0, $token_count = sizeof($tokens); $i < $token_count; $i++)
|
||||
$sql = str_replace("\r" , '', $sql);
|
||||
$data = preg_split('/' . $delimiter . '$/m', $sql);
|
||||
foreach ($data as $key => $value)
|
||||
{
|
||||
// Don't wanna add an empty string as the last thing in the array.
|
||||
if ($i != $token_count - 1)
|
||||
{
|
||||
// This is the total number of single quotes in the token.
|
||||
$total_quotes = preg_match_all("#'#", $tokens[$i], $matches);
|
||||
// Counts single quotes that are preceded by an odd number of backslashes,
|
||||
// which means they're escaped quotes.
|
||||
$escaped_quotes = preg_match_all("/(?<!\\\\)(?>\\\\{2})*\\\\'/", $tokens[$i], $matches);
|
||||
|
||||
$unescaped_quotes = $total_quotes - $escaped_quotes;
|
||||
|
||||
// If the number of unescaped quotes is even, then the delimiter did NOT occur inside a string literal.
|
||||
if (!($unescaped_quotes % 2))
|
||||
{
|
||||
// It's a complete sql statement.
|
||||
$output[] = $tokens[$i];
|
||||
// save memory.
|
||||
$tokens[$i] = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
// incomplete sql statement. keep adding tokens until we have a complete one.
|
||||
// $temp will hold what we have so far.
|
||||
$temp = $tokens[$i] . $delimiter;
|
||||
// save memory..
|
||||
$tokens[$i] = '';
|
||||
|
||||
// Do we have a complete statement yet?
|
||||
$complete_stmt = false;
|
||||
|
||||
for ($j = $i + 1; (!$complete_stmt && ($j < $token_count)); $j++)
|
||||
{
|
||||
// This is the total number of single quotes in the token.
|
||||
$total_quotes = preg_match_all("#'#", $tokens[$j], $matches);
|
||||
// Counts single quotes that are preceded by an odd number of backslashes,
|
||||
// which means they're escaped quotes.
|
||||
$escaped_quotes = preg_match_all("/(?<!\\\\)(?>\\\\{2})*\\\\'/", $tokens[$j], $matches);
|
||||
|
||||
$unescaped_quotes = $total_quotes - $escaped_quotes;
|
||||
|
||||
if (($unescaped_quotes % 2) == 1)
|
||||
{
|
||||
// odd number of unescaped quotes. In combination with the previous incomplete
|
||||
// statement(s), we now have a complete statement. (2 odds always make an even)
|
||||
$output[] = $temp . $tokens[$j];
|
||||
|
||||
// save memory.
|
||||
$tokens[$j] = '';
|
||||
$temp = '';
|
||||
|
||||
// exit the loop.
|
||||
$complete_stmt = true;
|
||||
// make sure the outer loop continues at the right point.
|
||||
$i = $j;
|
||||
}
|
||||
else
|
||||
{
|
||||
// even number of unescaped quotes. We still don't have a complete statement.
|
||||
// (1 odd and 1 even always make an odd)
|
||||
$temp .= $tokens[$j] . $delimiter;
|
||||
// save memory.
|
||||
$tokens[$j] = '';
|
||||
}
|
||||
} // for..
|
||||
} // else
|
||||
}
|
||||
$data[$key] = trim($value) . ';';
|
||||
}
|
||||
|
||||
return $output;
|
||||
// The empty case
|
||||
if (end($data) == ';')
|
||||
{
|
||||
unset($data[key($data)]);
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1086,7 +1086,7 @@ if ($stage == 3)
|
|||
$delimiter = $available_dbms[$dbms]['DELIM'];
|
||||
|
||||
$sql_query = @fread(@fopen($dbms_schema, 'r'), @filesize($dbms_schema));
|
||||
$sql_query = preg_replace('#phpbb_#is', $table_prefix, $sql_query);
|
||||
$sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query);
|
||||
|
||||
$remove_remarks($sql_query);
|
||||
|
||||
|
@ -1116,6 +1116,8 @@ if ($stage == 3)
|
|||
|
||||
case 'postgres':
|
||||
$sql_query = preg_replace('#\# POSTGRES (BEGIN|COMMIT) \##s', '\1; ', $sql_query);
|
||||
// Some versions of PGSQL don't like remarks, lets remove them.
|
||||
remove_remarks($sql_query);
|
||||
break;
|
||||
|
||||
case 'firebird':
|
||||
|
@ -1130,7 +1132,7 @@ if ($stage == 3)
|
|||
//$sql_query = preg_replace('#\# MSSQL IDENTITY (phpbb_[a-z_]+) (ON|OFF) \##s', '', $sql_query);
|
||||
}
|
||||
|
||||
$sql_query = preg_replace('#phpbb_#', $table_prefix, $sql_query);
|
||||
$sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query);
|
||||
|
||||
remove_remarks($sql_query);
|
||||
$sql_query = split_sql_file($sql_query, ';');
|
||||
|
|
|
@ -898,8 +898,8 @@ class install_install extends module
|
|||
$remove_remarks = $this->available_dbms[$dbms]['COMMENTS'];
|
||||
$delimiter = $this->available_dbms[$dbms]['DELIM'];
|
||||
|
||||
$sql_query = @fread(@fopen($dbms_schema, 'r'), @filesize($dbms_schema));
|
||||
$sql_query = preg_replace('#phpbb_#is', $table_prefix, $sql_query);
|
||||
$sql_query = @file_get_contents($dbms_schema);
|
||||
$sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query);
|
||||
|
||||
$remove_remarks($sql_query);
|
||||
|
||||
|
@ -917,7 +917,7 @@ class install_install extends module
|
|||
unset($sql_query);
|
||||
|
||||
// Ok tables have been built, let's fill in the basic information
|
||||
$sql_query = fread(fopen('schemas/schema_data.sql', 'r'), filesize('schemas/schema_data.sql'));
|
||||
$sql_query = file_get_contents('schemas/schema_data.sql');
|
||||
|
||||
// Deal with any special comments, used at present for mssql set identity switching
|
||||
switch ($dbms)
|
||||
|
@ -929,6 +929,8 @@ class install_install extends module
|
|||
|
||||
case 'postgres':
|
||||
$sql_query = preg_replace('#\# POSTGRES (BEGIN|COMMIT) \##s', '\1; ', $sql_query);
|
||||
// Some versions of PGSQL don't like remarks, lets remove them.
|
||||
remove_remarks($sql_query);
|
||||
break;
|
||||
|
||||
case 'firebird':
|
||||
|
@ -943,7 +945,7 @@ class install_install extends module
|
|||
//$sql_query = preg_replace('#\# MSSQL IDENTITY (phpbb_[a-z_]+) (ON|OFF) \##s', '', $sql_query);
|
||||
}
|
||||
|
||||
$sql_query = preg_replace('#phpbb_#', $table_prefix, $sql_query);
|
||||
$sql_query = preg_replace('#phpbb_#i', $table_prefix, $sql_query);
|
||||
|
||||
$remove_remarks($sql_query);
|
||||
$sql_query = split_sql_file($sql_query, ';');
|
||||
|
|
|
@ -42,7 +42,7 @@ CREATE INDEX phpbb_attachments_poster_id ON phpbb_attachments (poster_id);
|
|||
CREATE INDEX phpbb_attachments_physical_filename ON phpbb_attachments (physical_filename);
|
||||
CREATE INDEX phpbb_attachments_filesize ON phpbb_attachments (filesize);
|
||||
|
||||
SELECT SETVAL('phpbb_attachments_seq',(select case when max(attach_id)>0 then max(attach_id)+1 else 1 end from phpbb_attachments));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_auth_groups */
|
||||
|
@ -72,7 +72,7 @@ CREATE TABLE phpbb_auth_options (
|
|||
|
||||
CREATE INDEX phpbb_auth_options_auth_option ON phpbb_auth_options (auth_option);
|
||||
|
||||
SELECT SETVAL('phpbb_auth_options_seq',(select case when max(auth_option_id)>0 then max(auth_option_id)+1 else 1 end from phpbb_auth_options));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_auth_roles */
|
||||
|
@ -90,7 +90,7 @@ CREATE TABLE phpbb_auth_roles (
|
|||
CREATE INDEX phpbb_auth_roles_role_type ON phpbb_auth_roles (role_type);
|
||||
CREATE INDEX phpbb_auth_roles_role_order ON phpbb_auth_roles (role_order);
|
||||
|
||||
SELECT SETVAL('phpbb_auth_roles_seq',(select case when max(role_id)>0 then max(role_id)+1 else 1 end from phpbb_auth_roles));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_auth_roles_data */
|
||||
|
@ -132,7 +132,7 @@ CREATE TABLE phpbb_banlist (
|
|||
CHECK (ban_userid>=0)
|
||||
);
|
||||
|
||||
SELECT SETVAL('phpbb_banlist_seq',(select case when max(ban_id)>0 then max(ban_id)+1 else 1 end from phpbb_banlist));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_bbcodes */
|
||||
|
@ -180,7 +180,7 @@ CREATE TABLE phpbb_bots (
|
|||
|
||||
CREATE INDEX phpbb_bots_bot_active ON phpbb_bots (bot_active);
|
||||
|
||||
SELECT SETVAL('phpbb_bots_seq',(select case when max(bot_id)>0 then max(bot_id)+1 else 1 end from phpbb_bots));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_cache */
|
||||
|
@ -223,7 +223,7 @@ CREATE TABLE phpbb_disallow (
|
|||
PRIMARY KEY (disallow_id)
|
||||
);
|
||||
|
||||
SELECT SETVAL('phpbb_disallow_seq',(select case when max(disallow_id)>0 then max(disallow_id)+1 else 1 end from phpbb_disallow));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_drafts */
|
||||
|
@ -246,7 +246,7 @@ CREATE TABLE phpbb_drafts (
|
|||
|
||||
CREATE INDEX phpbb_drafts_save_time ON phpbb_drafts (save_time);
|
||||
|
||||
SELECT SETVAL('phpbb_drafts_seq',(select case when max(draft_id)>0 then max(draft_id)+1 else 1 end from phpbb_drafts));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_extensions */
|
||||
|
@ -260,7 +260,7 @@ CREATE TABLE phpbb_extensions (
|
|||
CHECK (group_id>=0)
|
||||
);
|
||||
|
||||
SELECT SETVAL('phpbb_extensions_seq',(select case when max(extension_id)>0 then max(extension_id)+1 else 1 end from phpbb_extensions));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_extension_groups */
|
||||
|
@ -280,7 +280,7 @@ CREATE TABLE phpbb_extension_groups (
|
|||
CHECK (download_mode>=0)
|
||||
);
|
||||
|
||||
SELECT SETVAL('phpbb_extension_groups_seq',(select case when max(group_id)>0 then max(group_id)+1 else 1 end from phpbb_extension_groups));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_forums */
|
||||
|
@ -344,7 +344,7 @@ CREATE TABLE phpbb_forums (
|
|||
CREATE INDEX phpbb_forums_left_right_id ON phpbb_forums (left_id, right_id);
|
||||
CREATE INDEX phpbb_forums_forum_last_post_id ON phpbb_forums (forum_last_post_id);
|
||||
|
||||
SELECT SETVAL('phpbb_forums_seq',(select case when max(forum_id)>0 then max(forum_id)+1 else 1 end from phpbb_forums));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_forum_access */
|
||||
|
@ -413,7 +413,7 @@ CREATE TABLE phpbb_groups (
|
|||
|
||||
CREATE INDEX phpbb_groups_group_legend ON phpbb_groups (group_legend);
|
||||
|
||||
SELECT SETVAL('phpbb_groups_seq',(select case when max(group_id)>0 then max(group_id)+1 else 1 end from phpbb_groups));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_icons */
|
||||
|
@ -433,7 +433,7 @@ CREATE TABLE phpbb_icons (
|
|||
CHECK (display_on_posting>=0)
|
||||
);
|
||||
|
||||
SELECT SETVAL('phpbb_icons_seq',(select case when max(icons_id)>0 then max(icons_id)+1 else 1 end from phpbb_icons));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_lang */
|
||||
|
@ -449,7 +449,7 @@ CREATE TABLE phpbb_lang (
|
|||
PRIMARY KEY (lang_id)
|
||||
);
|
||||
|
||||
SELECT SETVAL('phpbb_lang_seq',(select case when max(lang_id)>0 then max(lang_id)+1 else 1 end from phpbb_lang));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_log */
|
||||
|
@ -479,7 +479,7 @@ CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id);
|
|||
CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id);
|
||||
CREATE INDEX phpbb_log_user_id ON phpbb_log (user_id);
|
||||
|
||||
SELECT SETVAL('phpbb_log_seq',(select case when max(log_id)>0 then max(log_id)+1 else 1 end from phpbb_log));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_moderator_cache */
|
||||
|
@ -518,7 +518,7 @@ CREATE TABLE phpbb_modules (
|
|||
CREATE INDEX phpbb_modules_module_enabled ON phpbb_modules (module_enabled);
|
||||
CREATE INDEX phpbb_modules_left_right_id ON phpbb_modules (left_id, right_id);
|
||||
|
||||
SELECT SETVAL('phpbb_modules_seq',(select case when max(module_id)>0 then max(module_id)+1 else 1 end from phpbb_modules));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_poll_results */
|
||||
|
@ -595,14 +595,14 @@ CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id);
|
|||
CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved);
|
||||
CREATE INDEX phpbb_posts_post_time ON phpbb_posts (post_time);
|
||||
|
||||
SELECT SETVAL('phpbb_posts_seq',(select case when max(post_id)>0 then max(post_id)+1 else 1 end from phpbb_posts));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_privmsgs */
|
||||
CREATE SEQUENCE phpbb_privmsgs_seq;
|
||||
|
||||
CREATE TABLE phpbb_privmsgs (
|
||||
msg_id INT4 DEFAULT nextval('phpbb_privmsgs_msg_id_seq'),
|
||||
msg_id INT4 DEFAULT nextval('phpbb_privmsgs_seq'),
|
||||
root_level INT4 DEFAULT '0' NOT NULL,
|
||||
author_id INT4 DEFAULT '0' NOT NULL,
|
||||
icon_id INT2 DEFAULT '1' NOT NULL,
|
||||
|
@ -639,7 +639,7 @@ CREATE INDEX phpbb_privmsgs_message_time ON phpbb_privmsgs (message_time);
|
|||
CREATE INDEX phpbb_privmsgs_author_id ON phpbb_privmsgs (author_id);
|
||||
CREATE INDEX phpbb_privmsgs_root_level ON phpbb_privmsgs (root_level);
|
||||
|
||||
SELECT SETVAL('phpbb_privmsgs_seq',(select case when max(msg_id)>0 then max(msg_id)+1 else 1 end from phpbb_privmsgs));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_privmsgs_folder */
|
||||
|
@ -657,7 +657,7 @@ CREATE TABLE phpbb_privmsgs_folder (
|
|||
|
||||
CREATE INDEX phpbb_privmsgs_folder_user_id ON phpbb_privmsgs_folder (user_id);
|
||||
|
||||
SELECT SETVAL('phpbb_privmsgs_folder_seq',(select case when max(folder_id)>0 then max(folder_id)+1 else 1 end from phpbb_privmsgs_folder));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_privmsgs_rules */
|
||||
|
@ -683,7 +683,7 @@ CREATE TABLE phpbb_privmsgs_rules (
|
|||
CHECK (rule_folder_id>=0)
|
||||
);
|
||||
|
||||
SELECT SETVAL('phpbb_privmsgs_rules_seq',(select case when max(rule_id)>0 then max(rule_id)+1 else 1 end from phpbb_privmsgs_rules));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_privmsgs_to */
|
||||
|
@ -738,7 +738,7 @@ CREATE TABLE phpbb_profile_fields (
|
|||
CREATE INDEX phpbb_profile_fields_field_type ON phpbb_profile_fields (field_type);
|
||||
CREATE INDEX phpbb_profile_fields_field_order ON phpbb_profile_fields (field_order);
|
||||
|
||||
SELECT SETVAL('phpbb_profile_fields_seq',(select case when max(field_id)>0 then max(field_id)+1 else 1 end from phpbb_profile_fields));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_profile_fields_data */
|
||||
|
@ -788,7 +788,7 @@ CREATE TABLE phpbb_ranks (
|
|||
PRIMARY KEY (rank_id)
|
||||
);
|
||||
|
||||
SELECT SETVAL('phpbb_ranks_seq',(select case when max(rank_id)>0 then max(rank_id)+1 else 1 end from phpbb_ranks));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_reports_reasons */
|
||||
|
@ -802,7 +802,7 @@ CREATE TABLE phpbb_reports_reasons (
|
|||
PRIMARY KEY (reason_id)
|
||||
);
|
||||
|
||||
SELECT SETVAL('phpbb_reports_reasons_seq',(select case when max(reason_id)>0 then max(reason_id)+1 else 1 end from phpbb_reports_reasons));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_reports */
|
||||
|
@ -824,7 +824,7 @@ CREATE TABLE phpbb_reports (
|
|||
CHECK (report_time>=0)
|
||||
);
|
||||
|
||||
SELECT SETVAL('phpbb_reports_seq',(select case when max(report_id)>0 then max(report_id)+1 else 1 end from phpbb_reports));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_search_results */
|
||||
|
@ -850,7 +850,7 @@ CREATE TABLE phpbb_search_wordlist (
|
|||
|
||||
CREATE INDEX phpbb_search_wordlist_word_id ON phpbb_search_wordlist (word_id);
|
||||
|
||||
SELECT SETVAL('phpbb_search_wordlist_seq',(select case when max(word_id)>0 then max(word_id)+1 else 1 end from phpbb_search_wordlist));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_search_wordmatch */
|
||||
|
@ -907,7 +907,7 @@ CREATE TABLE phpbb_sitelist (
|
|||
PRIMARY KEY (site_id)
|
||||
);
|
||||
|
||||
SELECT SETVAL('phpbb_sitelist_seq',(select case when max(site_id)>0 then max(site_id)+1 else 1 end from phpbb_sitelist));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_smilies */
|
||||
|
@ -929,7 +929,7 @@ CREATE TABLE phpbb_smilies (
|
|||
CHECK (display_on_posting>=0)
|
||||
);
|
||||
|
||||
SELECT SETVAL('phpbb_smilies_seq',(select case when max(smiley_id)>0 then max(smiley_id)+1 else 1 end from phpbb_smilies));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_styles */
|
||||
|
@ -951,7 +951,7 @@ CREATE TABLE phpbb_styles (
|
|||
|
||||
CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name);
|
||||
|
||||
SELECT SETVAL('phpbb_styles_seq',(select case when max(style_id)>0 then max(style_id)+1 else 1 end from phpbb_styles));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_styles_template */
|
||||
|
@ -970,7 +970,7 @@ CREATE TABLE phpbb_styles_template (
|
|||
|
||||
CREATE UNIQUE INDEX phpbb_styles_template_template_name ON phpbb_styles_template (template_name);
|
||||
|
||||
SELECT SETVAL('phpbb_styles_template_seq',(select case when max(template_id)>0 then max(template_id)+1 else 1 end from phpbb_styles_template));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_styles_template_data */
|
||||
|
@ -999,7 +999,7 @@ CREATE TABLE phpbb_styles_theme (
|
|||
|
||||
CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme (theme_name);
|
||||
|
||||
SELECT SETVAL('phpbb_styles_theme_seq',(select case when max(theme_id)>0 then max(theme_id)+1 else 1 end from phpbb_styles_theme));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_styles_imageset */
|
||||
|
@ -1092,7 +1092,7 @@ CREATE TABLE phpbb_styles_imageset (
|
|||
|
||||
CREATE UNIQUE INDEX phpbb_styles_imageset_imageset_name ON phpbb_styles_imageset (imageset_name);
|
||||
|
||||
SELECT SETVAL('phpbb_styles_imageset_seq',(select case when max(imageset_id)>0 then max(imageset_id)+1 else 1 end from phpbb_styles_imageset));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_topics */
|
||||
|
@ -1156,7 +1156,7 @@ CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id);
|
|||
CREATE INDEX phpbb_topics_forum_id_type ON phpbb_topics (forum_id, topic_type);
|
||||
CREATE INDEX phpbb_topics_topic_last_post_time ON phpbb_topics (topic_last_post_time);
|
||||
|
||||
SELECT SETVAL('phpbb_topics_seq',(select case when max(topic_id)>0 then max(topic_id)+1 else 1 end from phpbb_topics));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_topics_marking */
|
||||
|
@ -1295,7 +1295,7 @@ CREATE INDEX phpbb_users_user_birthday ON phpbb_users (user_birthday);
|
|||
CREATE INDEX phpbb_users_user_email_hash ON phpbb_users (user_email_hash);
|
||||
CREATE INDEX phpbb_users_username ON phpbb_users (username);
|
||||
|
||||
SELECT SETVAL('phpbb_users_seq',(select case when max(user_id)>0 then max(user_id)+1 else 1 end from phpbb_users));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_warnings */
|
||||
|
@ -1310,7 +1310,7 @@ CREATE TABLE phpbb_warnings (
|
|||
PRIMARY KEY (warning_id)
|
||||
);
|
||||
|
||||
SELECT SETVAL('phpbb_warnings_seq',(select case when max(warning_id)>0 then max(warning_id)+1 else 1 end from phpbb_warnings));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_words */
|
||||
|
@ -1323,7 +1323,7 @@ CREATE TABLE phpbb_words (
|
|||
PRIMARY KEY (word_id)
|
||||
);
|
||||
|
||||
SELECT SETVAL('phpbb_words_seq',(select case when max(word_id)>0 then max(word_id)+1 else 1 end from phpbb_words));
|
||||
|
||||
|
||||
|
||||
/* Table: phpbb_zebra */
|
||||
|
|
|
@ -339,7 +339,7 @@ INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_flash', 1)
|
|||
# MSSQL IDENTITY phpbb_styles ON #
|
||||
|
||||
# -- phpbb_styles
|
||||
INSERT INTO phpbb_styles (style_id, style_name, style_copyright, template_id, theme_id, imageset_id) VALUES (1, 'subSilver', '© phpBB Group', 1, 1, 1);
|
||||
INSERT INTO phpbb_styles (style_name, style_copyright, template_id, theme_id, imageset_id) VALUES ('subSilver', '© phpBB Group', 1, 1, 1);
|
||||
|
||||
# MSSQL IDENTITY phpbb_styles OFF #
|
||||
|
||||
|
@ -347,7 +347,7 @@ INSERT INTO phpbb_styles (style_id, style_name, style_copyright, template_id, th
|
|||
# MSSQL IDENTITY phpbb_styles_imageset ON #
|
||||
|
||||
# -- phpbb_styles_imageset
|
||||
INSERT INTO phpbb_styles_imageset (imageset_id, imageset_name, imageset_copyright, imageset_path, site_logo, btn_post, btn_post_pm, btn_reply, btn_reply_pm, btn_locked, btn_profile, btn_pm, btn_delete, btn_info, btn_quote, btn_search, btn_edit, btn_report, btn_email, btn_www, btn_icq, btn_aim, btn_yim, btn_msnm, btn_jabber, btn_online, btn_offline, btn_friend, btn_foe, icon_unapproved, icon_reported, icon_attach, icon_post, icon_post_new, icon_post_latest, icon_post_newest, forum, forum_new, forum_locked, forum_link, sub_forum, sub_forum_new, folder, folder_moved, folder_posted, folder_new, folder_new_posted, folder_hot, folder_hot_posted, folder_hot_new, folder_hot_new_posted, folder_locked, folder_locked_posted, folder_locked_new, folder_locked_new_posted, folder_sticky, folder_sticky_posted, folder_sticky_new, folder_sticky_new_posted, folder_announce, folder_announce_posted, folder_announce_new, folder_announce_new_posted, folder_global, folder_global_posted, folder_global_new, folder_global_new_posted, poll_left, poll_center, poll_right, attach_progress_bar, user_icon1, user_icon2, user_icon3, user_icon4, user_icon5, user_icon6, user_icon7, user_icon8, user_icon9, user_icon10) VALUES (1, 'subSilver', '© phpBB Group', 'subSilver', 'sitelogo.gif*94*170', '{LANG}/btn_post.gif*27*97', '{LANG}/btn_post_pm.gif*27*97', '{LANG}/btn_reply.gif*27*97', '{LANG}/btn_reply_pm.gif*20*90', '{LANG}/btn_locked.gif*27*97', '{LANG}/btn_profile.gif*20*72', '{LANG}/btn_pm.gif*20*72', '{LANG}/btn_delete.gif*20*20', '{LANG}/btn_info.gif*20*20', '{LANG}/btn_quote.gif*20*90', '{LANG}/btn_search.gif*20*72', '{LANG}/btn_edit.gif*20*90', '{LANG}/btn_report.gif*20*20', '{LANG}/btn_email.gif*20*72', '{LANG}/btn_www.gif*20*72', '{LANG}/btn_icq.gif*20*72', '{LANG}/btn_aim.gif*20*72', '{LANG}/btn_yim.gif*20*72', '{LANG}/btn_msnm.gif*20*72', '{LANG}/btn_jabber.gif*20*72', '{LANG}/btn_online.gif*20*72', '{LANG}/btn_offline.gif*20*72', '', '', 'icon_unapproved.gif*18*19', 'icon_reported.gif*18*19', 'icon_attach.gif*18*14', 'icon_minipost.gif*9*12', 'icon_minipost_new.gif*9*12', 'icon_latest_reply.gif*9*18', 'icon_newest_reply.gif*9*18', 'folder_big.gif*25*46', 'folder_new_big.gif*25*46', 'folder_locked_big.gif*25*46', 'folder_link_big.gif*25*46', 'subfolder_big.gif*25*46', 'subfolder_new_big.gif*25*46', 'folder.gif*18*19', 'folder_moved.gif*18*19', 'folder_posted.gif*18*19', 'folder_new.gif*18*19', 'folder_new_posted.gif*18*19', 'folder_hot.gif*18*19', 'folder_hot_posted.gif*18*19', 'folder_new_hot.gif*18*19', 'folder_new_hot_posted.gif*18*19', 'folder_lock.gif*18*19', 'folder_lock_posted.gif*18*19', 'folder_lock_new.gif*18*19', 'folder_lock_new_posted.gif*18*19', 'folder_sticky.gif*18*19', 'folder_sticky_posted.gif*18*19', 'folder_sticky_new.gif*18*19', 'folder_sticky_new_posted.gif*18*19', 'folder_announce.gif*18*19', 'folder_announce_posted.gif*18*19', 'folder_announce_new.gif*18*19', 'folder_announce_new_posted.gif*18*19', '', '', '', '', 'vote_lcap.gif*12*4', 'voting_bar.gif*12', 'vote_rcap.gif*12*4', 'progress_bar.gif*16*280', '', '', '', '', '', '', '', '', '', '');
|
||||
INSERT INTO phpbb_styles_imageset (imageset_name, imageset_copyright, imageset_path, site_logo, btn_post, btn_post_pm, btn_reply, btn_reply_pm, btn_locked, btn_profile, btn_pm, btn_delete, btn_info, btn_quote, btn_search, btn_edit, btn_report, btn_email, btn_www, btn_icq, btn_aim, btn_yim, btn_msnm, btn_jabber, btn_online, btn_offline, btn_friend, btn_foe, icon_unapproved, icon_reported, icon_attach, icon_post, icon_post_new, icon_post_latest, icon_post_newest, forum, forum_new, forum_locked, forum_link, sub_forum, sub_forum_new, folder, folder_moved, folder_posted, folder_new, folder_new_posted, folder_hot, folder_hot_posted, folder_hot_new, folder_hot_new_posted, folder_locked, folder_locked_posted, folder_locked_new, folder_locked_new_posted, folder_sticky, folder_sticky_posted, folder_sticky_new, folder_sticky_new_posted, folder_announce, folder_announce_posted, folder_announce_new, folder_announce_new_posted, folder_global, folder_global_posted, folder_global_new, folder_global_new_posted, poll_left, poll_center, poll_right, attach_progress_bar, user_icon1, user_icon2, user_icon3, user_icon4, user_icon5, user_icon6, user_icon7, user_icon8, user_icon9, user_icon10) VALUES ('subSilver', '© phpBB Group', 'subSilver', 'sitelogo.gif*94*170', '{LANG}/btn_post.gif*27*97', '{LANG}/btn_post_pm.gif*27*97', '{LANG}/btn_reply.gif*27*97', '{LANG}/btn_reply_pm.gif*20*90', '{LANG}/btn_locked.gif*27*97', '{LANG}/btn_profile.gif*20*72', '{LANG}/btn_pm.gif*20*72', '{LANG}/btn_delete.gif*20*20', '{LANG}/btn_info.gif*20*20', '{LANG}/btn_quote.gif*20*90', '{LANG}/btn_search.gif*20*72', '{LANG}/btn_edit.gif*20*90', '{LANG}/btn_report.gif*20*20', '{LANG}/btn_email.gif*20*72', '{LANG}/btn_www.gif*20*72', '{LANG}/btn_icq.gif*20*72', '{LANG}/btn_aim.gif*20*72', '{LANG}/btn_yim.gif*20*72', '{LANG}/btn_msnm.gif*20*72', '{LANG}/btn_jabber.gif*20*72', '{LANG}/btn_online.gif*20*72', '{LANG}/btn_offline.gif*20*72', '', '', 'icon_unapproved.gif*18*19', 'icon_reported.gif*18*19', 'icon_attach.gif*18*14', 'icon_minipost.gif*9*12', 'icon_minipost_new.gif*9*12', 'icon_latest_reply.gif*9*18', 'icon_newest_reply.gif*9*18', 'folder_big.gif*25*46', 'folder_new_big.gif*25*46', 'folder_locked_big.gif*25*46', 'folder_link_big.gif*25*46', 'subfolder_big.gif*25*46', 'subfolder_new_big.gif*25*46', 'folder.gif*18*19', 'folder_moved.gif*18*19', 'folder_posted.gif*18*19', 'folder_new.gif*18*19', 'folder_new_posted.gif*18*19', 'folder_hot.gif*18*19', 'folder_hot_posted.gif*18*19', 'folder_new_hot.gif*18*19', 'folder_new_hot_posted.gif*18*19', 'folder_lock.gif*18*19', 'folder_lock_posted.gif*18*19', 'folder_lock_new.gif*18*19', 'folder_lock_new_posted.gif*18*19', 'folder_sticky.gif*18*19', 'folder_sticky_posted.gif*18*19', 'folder_sticky_new.gif*18*19', 'folder_sticky_new_posted.gif*18*19', 'folder_announce.gif*18*19', 'folder_announce_posted.gif*18*19', 'folder_announce_new.gif*18*19', 'folder_announce_new_posted.gif*18*19', '', '', '', '', 'vote_lcap.gif*12*4', 'voting_bar.gif*12', 'vote_rcap.gif*12*4', 'progress_bar.gif*16*280', '', '', '', '', '', '', '', '', '', '');
|
||||
|
||||
# MSSQL IDENTITY phpbb_styles_imageset OFF #
|
||||
|
||||
|
@ -355,7 +355,7 @@ INSERT INTO phpbb_styles_imageset (imageset_id, imageset_name, imageset_copyrigh
|
|||
# MSSQL IDENTITY phpbb_styles_template ON #
|
||||
|
||||
# -- phpbb_styles_template
|
||||
INSERT INTO phpbb_styles_template (template_id, template_name, template_copyright, template_path, bbcode_bitfield) VALUES (1, 'subSilver', '© phpBB Group', 'subSilver', 6921);
|
||||
INSERT INTO phpbb_styles_template (template_name, template_copyright, template_path, bbcode_bitfield) VALUES ('subSilver', '© phpBB Group', 'subSilver', 6921);
|
||||
|
||||
# MSSQL IDENTITY phpbb_styles_template OFF #
|
||||
|
||||
|
@ -363,7 +363,7 @@ INSERT INTO phpbb_styles_template (template_id, template_name, template_copyrigh
|
|||
# MSSQL IDENTITY phpbb_styles_theme ON #
|
||||
|
||||
# -- phpbb_styles_theme
|
||||
INSERT INTO phpbb_styles_theme (theme_id, theme_name, theme_copyright, theme_path, theme_data) VALUES (1, 'subSilver', '© phpBB Group', 'subSilver', '');
|
||||
INSERT INTO phpbb_styles_theme (theme_name, theme_copyright, theme_path, theme_data) VALUES ('subSilver', '© phpBB Group', 'subSilver', '');
|
||||
|
||||
# MSSQL IDENTITY phpbb_styles_theme OFF #
|
||||
|
||||
|
@ -371,7 +371,7 @@ INSERT INTO phpbb_styles_theme (theme_id, theme_name, theme_copyright, theme_pat
|
|||
# MSSQL IDENTITY phpbb_lang ON #
|
||||
|
||||
# -- Language
|
||||
INSERT INTO phpbb_lang (lang_id, lang_iso, lang_dir, lang_english_name, lang_local_name, lang_author) VALUES (1, 'en', 'en', 'English [ UK ]', 'English [ UK ]', 'phpBB Group');
|
||||
INSERT INTO phpbb_lang (lang_iso, lang_dir, lang_english_name, lang_local_name, lang_author) VALUES ('en', 'en', 'English [ UK ]', 'English [ UK ]', 'phpBB Group');
|
||||
|
||||
# MSSQL IDENTITY phpbb_lang OFF #
|
||||
|
||||
|
@ -379,9 +379,9 @@ INSERT INTO phpbb_lang (lang_id, lang_iso, lang_dir, lang_english_name, lang_loc
|
|||
# MSSQL IDENTITY phpbb_forums ON #
|
||||
|
||||
# -- Forums
|
||||
INSERT INTO phpbb_forums (forum_id, 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_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed) VALUES (1, 'My first Category', '', 1, 4, 0, 0, 1, 1, 1, 1, 2, 'Admin', 972086460, '', '', '', '', '', '', '', 0, 0);
|
||||
INSERT INTO phpbb_forums (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_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed) VALUES ('My first Category', '', 1, 4, 0, 0, 1, 1, 1, 1, 2, 'Admin', 972086460, '', '', '', '', '', '', '', 0, 0);
|
||||
|
||||
INSERT INTO phpbb_forums (forum_id, 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_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed) VALUES (2, 'Test Forum 1', 'This is just a test forum.', 2, 3, 1, 1, 1, 1, 1, 1, 2, 'Admin', 972086460, '', '', '', '', '', '', '', 0, 0);
|
||||
INSERT INTO phpbb_forums (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_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed) VALUES ('Test Forum 1', 'This is just a test forum.', 2, 3, 1, 1, 1, 1, 1, 1, 2, 'Admin', 972086460, '', '', '', '', '', '', '', 0, 0);
|
||||
|
||||
# MSSQL IDENTITY phpbb_forums OFF #
|
||||
|
||||
|
@ -389,16 +389,16 @@ INSERT INTO phpbb_forums (forum_id, forum_name, forum_desc, left_id, right_id, p
|
|||
# MSSQL IDENTITY phpbb_users ON #
|
||||
|
||||
# -- Users
|
||||
INSERT INTO phpbb_users (user_id, user_type, group_id, username, user_regdate, user_password, user_email, user_lang, user_style, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_colour, 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) VALUES (1, 2, 1, 'Anonymous', 0, '', '', 'en', 1, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
|
||||
INSERT INTO phpbb_users (user_type, group_id, username, user_regdate, user_password, user_email, user_lang, user_style, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_colour, 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) VALUES (2, 1, 'Anonymous', 0, '', '', 'en', 1, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
|
||||
|
||||
# -- username: Admin password: admin (change this or remove it ON #ce everything is working!)
|
||||
INSERT INTO phpbb_users (user_id, user_type, group_id, username, 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) VALUES (2, 3, 7, 'Admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
|
||||
INSERT INTO phpbb_users (user_type, group_id, username, 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) VALUES (3, 7, 'Admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
|
||||
|
||||
# -- bots
|
||||
INSERT INTO phpbb_users (user_id, user_type, group_id, username, user_regdate, user_password, user_lang, user_style, user_rank, user_colour, 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_email) VALUES (3, 2, 8, 'Googlebot', 0, '', 'en', 1, 1, '9E8DA7', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
|
||||
INSERT INTO phpbb_users (user_id, user_type, group_id, username, user_regdate, user_password, user_lang, user_style, user_rank, user_colour, 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_email) VALUES (4, 2, 8, 'Fastcrawler', 0, '', 'en', 1, 1, '9E8DA7', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
|
||||
INSERT INTO phpbb_users (user_id, user_type, group_id, username, user_regdate, user_password, user_lang, user_style, user_rank, user_colour, 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_email) VALUES (5, 2, 8, 'Alexa', 0, '', 'en', 1, 1, '9E8DA7', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
|
||||
INSERT INTO phpbb_users (user_id, user_type, group_id, username, user_regdate, user_password, user_lang, user_style, user_rank, user_colour, 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_email) VALUES (6, 2, 8, 'Inktomi', 0, '', 'en', 1, 1, '9E8DA7', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
|
||||
INSERT INTO phpbb_users (user_type, group_id, username, user_regdate, user_password, user_lang, user_style, user_rank, user_colour, 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_email) VALUES (2, 8, 'Googlebot', 0, '', 'en', 1, 1, '9E8DA7', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
|
||||
INSERT INTO phpbb_users (user_type, group_id, username, user_regdate, user_password, user_lang, user_style, user_rank, user_colour, 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_email) VALUES (2, 8, 'Fastcrawler', 0, '', 'en', 1, 1, '9E8DA7', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
|
||||
INSERT INTO phpbb_users (user_type, group_id, username, user_regdate, user_password, user_lang, user_style, user_rank, user_colour, 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_email) VALUES (2, 8, 'Alexa', 0, '', 'en', 1, 1, '9E8DA7', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
|
||||
INSERT INTO phpbb_users (user_type, group_id, username, user_regdate, user_password, user_lang, user_style, user_rank, user_colour, 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_email) VALUES (2, 8, 'Inktomi', 0, '', 'en', 1, 1, '9E8DA7', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
|
||||
|
||||
# MSSQL IDENTITY phpbb_users OFF #
|
||||
|
||||
|
@ -406,14 +406,14 @@ INSERT INTO phpbb_users (user_id, user_type, group_id, username, user_regdate, u
|
|||
# MSSQL IDENTITY phpbb_groups ON #
|
||||
|
||||
# -- Groups
|
||||
INSERT INTO phpbb_groups (group_id, group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES (1, 'GUESTS', 3, '', 0, '', '', '');
|
||||
INSERT INTO phpbb_groups (group_id, group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES (2, 'INACTIVE', 3, '', 0, '', '', '');
|
||||
INSERT INTO phpbb_groups (group_id, group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES (3, 'INACTIVE_COPPA', 3, '', 0, '', '', '');
|
||||
INSERT INTO phpbb_groups (group_id, group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES (4, 'REGISTERED', 3, '', 0, '', '', '');
|
||||
INSERT INTO phpbb_groups (group_id, group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES (5, 'REGISTERED_COPPA', 3, '', 0, '', '', '');
|
||||
INSERT INTO phpbb_groups (group_id, group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES (6, 'SUPER_MODERATORS', 3, '00AA00', 0, '', '', '');
|
||||
INSERT INTO phpbb_groups (group_id, group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES (7, 'ADMINISTRATORS', 3, 'AA0000', 1, '', '', '');
|
||||
INSERT INTO phpbb_groups (group_id, group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES (8, 'BOTS', 3, '9E8DA7', 1, '', '', '');
|
||||
INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('GUESTS', 3, '', 0, '', '', '');
|
||||
INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('INACTIVE', 3, '', 0, '', '', '');
|
||||
INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('INACTIVE_COPPA', 3, '', 0, '', '', '');
|
||||
INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('REGISTERED', 3, '', 0, '', '', '');
|
||||
INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('REGISTERED_COPPA', 3, '', 0, '', '', '');
|
||||
INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('SUPER_MODERATORS', 3, '00AA00', 0, '', '', '');
|
||||
INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('ADMINISTRATORS', 3, 'AA0000', 1, '', '', '');
|
||||
INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('BOTS', 3, '9E8DA7', 1, '', '', '');
|
||||
|
||||
# MSSQL IDENTITY phpbb_groups OFF #
|
||||
|
||||
|
@ -431,7 +431,7 @@ INSERT INTO phpbb_user_group (group_id, user_id, user_pending, group_leader) VAL
|
|||
# MSSQL IDENTITY phpbb_ranks ON #
|
||||
|
||||
# -- Ranks
|
||||
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES (1, 'Site Admin', -1, 1, NULL);
|
||||
INSERT INTO phpbb_ranks (rank_title, rank_min, rank_special, rank_image) VALUES ('Site Admin', -1, 1, NULL);
|
||||
|
||||
# MSSQL IDENTITY phpbb_ranks OFF #
|
||||
|
||||
|
@ -439,9 +439,9 @@ INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image
|
|||
# MSSQL IDENTITY phpbb_bots ON #
|
||||
|
||||
# -- Bots
|
||||
INSERT INTO phpbb_bots (bot_id, bot_active, bot_name, user_id, bot_agent, bot_ip) VALUES (1, 1, 'Googlebot', 3, 'Googlebot/', '216.239.46.,64.68.8');
|
||||
INSERT INTO phpbb_bots (bot_id, bot_active, bot_name, user_id, bot_agent, bot_ip) VALUES (3, 1, 'Alexa', 5, 'ia_archiver', '66.28.250.,209.237.238.');
|
||||
INSERT INTO phpbb_bots (bot_id, bot_active, bot_name, user_id, bot_agent, bot_ip) VALUES (4, 1, 'Inktomi', 6, 'Slurp/', '216.35.116.,66.196.');
|
||||
INSERT INTO phpbb_bots (bot_active, bot_name, user_id, bot_agent, bot_ip) VALUES (1, 'Googlebot', 3, 'Googlebot/', '216.239.46.,64.68.8');
|
||||
INSERT INTO phpbb_bots (bot_active, bot_name, user_id, bot_agent, bot_ip) VALUES (1, 'Alexa', 5, 'ia_archiver', '66.28.250.,209.237.238.');
|
||||
INSERT INTO phpbb_bots (bot_active, bot_name, user_id, bot_agent, bot_ip) VALUES (1, 'Inktomi', 6, 'Slurp/', '216.35.116.,66.196.');
|
||||
|
||||
# MSSQL IDENTITY phpbb_bots OFF #
|
||||
|
||||
|
@ -697,7 +697,7 @@ INSERT INTO phpbb_moderator_cache (user_id, forum_id, username, group_name) VALU
|
|||
# MSSQL IDENTITY phpbb_topics ON #
|
||||
|
||||
# -- Demo Topic
|
||||
INSERT INTO phpbb_topics (topic_id, 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_last_post_id, topic_last_poster_id, topic_last_poster_name, topic_last_post_time, topic_last_view_time, poll_title) VALUES (1, 'Welcome to phpBB 3', 2, 972086460, 0, 0, 0, 2, 0, 0, 1, 'Admin', 1, 2, 'Admin', 972086460, 972086460, '');
|
||||
INSERT INTO phpbb_topics (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_last_post_id, topic_last_poster_id, topic_last_poster_name, topic_last_post_time, topic_last_view_time, poll_title) VALUES ('Welcome to phpBB 3', 2, 972086460, 0, 0, 0, 2, 0, 0, 1, 'Admin', 1, 2, 'Admin', 972086460, 972086460, '');
|
||||
|
||||
# MSSQL IDENTITY phpbb_topics OFF #
|
||||
|
||||
|
@ -705,7 +705,7 @@ INSERT INTO phpbb_topics (topic_id, topic_title, topic_poster, topic_time, topic
|
|||
# MSSQL IDENTITY phpbb_posts ON #
|
||||
|
||||
# -- Demo Post
|
||||
INSERT INTO phpbb_posts (post_id, topic_id, forum_id, poster_id, post_time, post_username, poster_ip, post_subject, post_text, post_checksum, bbcode_uid) VALUES (1, 1, 2, 2, 972086460, NULL, '127.0.0.1', 'Welcome to phpBB 3', 'This is an example post in your phpBB 3.0 installation. You may delete this post, this topic and even this forum if you like since everything seems to be working!', '', '');
|
||||
INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, post_time, post_username, poster_ip, post_subject, post_text, post_checksum, bbcode_uid) VALUES (1, 2, 2, 972086460, NULL, '127.0.0.1', 'Welcome to phpBB 3', 'This is an example post in your phpBB 3.0 installation. You may delete this post, this topic and even this forum if you like since everything seems to be working!', '', '');
|
||||
|
||||
# MSSQL IDENTITY phpbb_posts OFF #
|
||||
|
||||
|
@ -752,18 +752,18 @@ INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, disp
|
|||
# MSSQL IDENTITY phpbb_search_wordlist ON #
|
||||
|
||||
# -- wordlist
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES (1, 'example', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES (2, 'post', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES (3, 'phpbb', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES (4, 'installation', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES (5, 'delete', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES (6, 'topic', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES (7, 'forum', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES (8, 'since', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES (9, 'everything', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES (10, 'seems', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES (11, 'working', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES (12, 'welcome', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('example', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('post', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('phpbb', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('installation', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('delete', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('topic', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('forum', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('since', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('everything', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('seems', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('working', 0);
|
||||
INSERT INTO phpbb_search_wordlist (word_text, word_common) VALUES ('welcome', 0);
|
||||
|
||||
# MSSQL IDENTITY phpbb_search_wordlist OFF #
|
||||
|
||||
|
@ -787,22 +787,22 @@ INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES (3, 1,
|
|||
# MSSQL IDENTITY phpbb_reports_reasons ON #
|
||||
|
||||
# -- reasons
|
||||
INSERT INTO phpbb_reports_reasons (reason_id, reason_title, reason_description, reason_order) VALUES (1, 'warez', 'The reported post contains links to pirated or illegal software', 1);
|
||||
INSERT INTO phpbb_reports_reasons (reason_id, reason_title, reason_description, reason_order) VALUES (2, 'spam', 'The reported post has for only purpose to advertise for a website or another product', 2);
|
||||
INSERT INTO phpbb_reports_reasons (reason_id, reason_title, reason_description, reason_order) VALUES (3, 'off_topic', 'The reported post is off topic', 3);
|
||||
INSERT INTO phpbb_reports_reasons (reason_id, reason_title, reason_description, reason_order) VALUES (4, 'other', 'The reported post does not fit into any other category (please use the description field)', 4);
|
||||
INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('warez', 'The reported post contains links to pirated or illegal software', 1);
|
||||
INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('spam', 'The reported post has for only purpose to advertise for a website or another product', 2);
|
||||
INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('off_topic', 'The reported post is off topic', 3);
|
||||
INSERT INTO phpbb_reports_reasons (reason_title, reason_description, reason_order) VALUES ('other', 'The reported post does not fit into any other category (please use the description field)', 4);
|
||||
|
||||
# MSSQL IDENTITY phpbb_reports_reasons OFF #
|
||||
|
||||
# MSSQL IDENTITY phpbb_extension_groups ON #
|
||||
|
||||
# -- extension_groups
|
||||
INSERT INTO phpbb_extension_groups (group_id, group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES (1, 'Images', 1, 1, 1, '', 0, '');
|
||||
INSERT INTO phpbb_extension_groups (group_id, group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES (2, 'Archives', 0, 1, 1, '', 0, '');
|
||||
INSERT INTO phpbb_extension_groups (group_id, group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES (3, 'Plain Text', 0, 0, 1, '', 0, '');
|
||||
INSERT INTO phpbb_extension_groups (group_id, group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES (4, 'Documents', 0, 0, 1, '', 0, '');
|
||||
INSERT INTO phpbb_extension_groups (group_id, group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES (5, 'Real Media', 3, 0, 2, '', 0, '');
|
||||
INSERT INTO phpbb_extension_groups (group_id, group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES (6, 'Windows Media', 2, 0, 1, '', 0, '');
|
||||
INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Images', 1, 1, 1, '', 0, '');
|
||||
INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Archives', 0, 1, 1, '', 0, '');
|
||||
INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Plain Text', 0, 0, 1, '', 0, '');
|
||||
INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Documents', 0, 0, 1, '', 0, '');
|
||||
INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Real Media', 3, 0, 2, '', 0, '');
|
||||
INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Windows Media', 2, 0, 1, '', 0, '');
|
||||
|
||||
# MSSQL IDENTITY phpbb_extension_groups OFF #
|
||||
|
||||
|
@ -810,34 +810,34 @@ INSERT INTO phpbb_extension_groups (group_id, group_name, cat_id, allow_group, d
|
|||
# MSSQL IDENTITY phpbb_extensions ON #
|
||||
|
||||
# -- extensions
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (1, 1, 'gif');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (2, 1, 'png');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (3, 1, 'jpeg');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (4, 1, 'jpg');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (5, 1, 'tif');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (6, 1, 'tga');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (7, 2, 'gtar');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (8, 2, 'gz');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (9, 2, 'tar');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (10, 2, 'zip');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (11, 2, 'rar');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (12, 2, 'ace');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (13, 3, 'txt');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (14, 3, 'c');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (15, 3, 'h');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (16, 3, 'cpp');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (17, 3, 'hpp');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (18, 3, 'diz');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (19, 4, 'xls');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (20, 4, 'doc');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (21, 4, 'dot');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (22, 4, 'pdf');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (23, 4, 'ai');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (24, 4, 'ps');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (25, 4, 'ppt');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (26, 5, 'rm');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (27, 6, 'wma');
|
||||
INSERT INTO phpbb_extensions (extension_id, group_id, extension) VALUES (28, 6, 'wmv');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'gif');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'png');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'jpeg');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'jpg');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'tif');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'tga');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'gtar');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'gz');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'tar');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'zip');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'rar');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'ace');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'txt');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'c');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'h');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'cpp');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'hpp');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'diz');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'xls');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'doc');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'dot');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'pdf');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'ai');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'ps');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'ppt');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (5, 'rm');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (6, 'wma');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (6, 'wmv');
|
||||
|
||||
# MSSQL IDENTITY phpbb_extensions OFF #
|
||||
|
||||
|
|
|
@ -159,17 +159,18 @@ else
|
|||
$join_sql .= ($sort_dir == 'd') ? " AND p2.post_id >= $post_id" : " AND p2.post_id <= $post_id";
|
||||
}
|
||||
$extra_fields = (!$post_id) ? '' : ', COUNT(p2.post_id) AS prev_posts';
|
||||
$order_sql = (!$post_id) ? '' : 'GROUP BY p.post_id, ' . $select_sql . ' ORDER BY p.post_id ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
|
||||
|
||||
$extra_sql = '';
|
||||
if ($user->data['is_registered'])
|
||||
{
|
||||
$extra_fields .= ', tw.notify_status';
|
||||
$extra_sql .= ', tw.notify_status';
|
||||
$join_sql_table .= ' LEFT JOIN ' . TOPICS_WATCH_TABLE . ' tw ON (tw.user_id = ' . $user->data['user_id'] . '
|
||||
AND t.topic_id = tw.topic_id)';
|
||||
|
||||
if ($config['allow_bookmarks'])
|
||||
{
|
||||
$extra_fields .= ', bm.order_id as bookmarked';
|
||||
$extra_sql .= ', bm.order_id';
|
||||
$join_sql_table .= ' LEFT JOIN ' . BOOKMARKS_TABLE . ' bm ON (bm.user_id = ' . $user->data['user_id'] . '
|
||||
AND t.topic_id = bm.topic_id)';
|
||||
}
|
||||
|
@ -177,20 +178,24 @@ if ($user->data['is_registered'])
|
|||
if ($config['load_db_lastread'])
|
||||
{
|
||||
$extra_fields .= ', tt.mark_time, ft.mark_time as forum_mark_time';
|
||||
$extra_sql .= ', tt.mark_time, ft.mark_time';
|
||||
$join_sql_table .= ' LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.user_id = ' . $user->data['user_id'] . '
|
||||
AND t.topic_id = tt.topic_id)';
|
||||
|
||||
$join_sql_table .= ' LEFT JOIN ' . FORUMS_TRACK_TABLE . ' ft ON (ft.user_id = ' . $user->data['user_id'] . '
|
||||
AND f.forum_id = ft.forum_id)';
|
||||
AND t.forum_id = ft.forum_id)';
|
||||
}
|
||||
}
|
||||
|
||||
$order_sql = (!$post_id) ? '' : 'GROUP BY p.post_id, ' . $select_sql . $extra_sql . ' ORDER BY p.post_id ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
|
||||
|
||||
|
||||
// Join to forum table on topic forum_id unless topic forum_id is zero
|
||||
// whereupon we join on the forum_id passed as a parameter ... this
|
||||
// is done so navigation, forum name, etc. remain consistent with where
|
||||
// user clicked to view a global topic
|
||||
$sql = "SELECT $select_sql $extra_fields
|
||||
FROM (" . FORUMS_TABLE . ' f, ' . TOPICS_TABLE . ' t' . ((!$post_id) ? '' : ', ' . POSTS_TABLE . ' p, ' . POSTS_TABLE . ' p2') . ') ' .
|
||||
FROM (" . FORUMS_TABLE . ' f' . ((!$post_id) ? '' : ', ' . POSTS_TABLE . ' p, ' . POSTS_TABLE . ' p2') . ', ' . TOPICS_TABLE . ' t) ' .
|
||||
$join_sql_table . "
|
||||
WHERE $join_sql
|
||||
AND (f.forum_id = t.forum_id
|
||||
|
|
Loading…
Add table
Reference in a new issue