diff options
Diffstat (limited to 'phpBB/install')
-rw-r--r-- | phpBB/install/convertors/functions_phpbb20.php | 9 | ||||
-rw-r--r-- | phpBB/install/database_update.php | 2 | ||||
-rw-r--r-- | phpBB/install/index.php | 4 | ||||
-rw-r--r-- | phpBB/install/install_convert.php | 17 | ||||
-rw-r--r-- | phpBB/install/install_install.php | 24 | ||||
-rw-r--r-- | phpBB/install/install_main.php | 2 | ||||
-rw-r--r-- | phpBB/install/phpinfo.php | 11 | ||||
-rw-r--r-- | phpBB/install/schemas/firebird_schema.sql | 5 | ||||
-rw-r--r-- | phpBB/install/schemas/mssql_schema.sql | 8 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_40_schema.sql | 5 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_41_schema.sql | 5 | ||||
-rw-r--r-- | phpBB/install/schemas/oracle_schema.sql | 8 | ||||
-rw-r--r-- | phpBB/install/schemas/postgres_schema.sql | 7 | ||||
-rw-r--r-- | phpBB/install/schemas/schema.json | 24 | ||||
-rw-r--r-- | phpBB/install/schemas/schema_data.sql | 12 | ||||
-rw-r--r-- | phpBB/install/schemas/sqlite_schema.sql | 5 |
16 files changed, 78 insertions, 70 deletions
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index ff20154d03..84e9e8c462 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -223,7 +223,7 @@ function phpbb_insert_forums() 'forum_desc' => htmlspecialchars(phpbb_set_default_encoding($row['forum_desc']), ENT_COMPAT, 'UTF-8'), 'forum_type' => FORUM_POST, 'forum_status' => is_item_locked($row['forum_status']), - 'enable_prune' => ($prune_enabled) ? (int)$row['prune_enable'] : 0, + 'enable_prune' => ($prune_enabled) ? (int) $row['prune_enable'] : 0, 'prune_next' => (int) null_to_zero($row['prune_next']), 'prune_days' => (int) null_to_zero($row['prune_days']), 'prune_viewed' => 0, @@ -1804,13 +1804,6 @@ function phpbb_create_userconv_table() $drop_sql = 'DROP TABLE ' . USERCONV_TABLE; switch ($map_dbms) { - case 'firebird': - $create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' ( - user_id INTEGER NOT NULL, - username_clean VARCHAR(255) CHARACTER SET UTF8 DEFAULT \'\' NOT NULL COLLATE UNICODE - )'; - break; - case 'mssql': $create_sql = 'CREATE TABLE [' . USERCONV_TABLE . '] ( [user_id] [int] NOT NULL , diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 44dbe43cf8..72073be880 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -182,7 +182,7 @@ header('Content-type: text/html; charset=UTF-8'); define('IN_DB_UPDATE', true); /** -* @todo firebird/mysql update? +* @todo mysql update? */ // End startup code diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 43970029cb..bff7b75b18 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -752,12 +752,16 @@ class module break; case 'select': + // @codingStandardsIgnoreStart eval('$s_options = ' . str_replace('{VALUE}', $value, $options) . ';'); + // @codingStandardsIgnoreEnd $tpl = '<select id="' . $name . '" name="' . $name . '">' . $s_options . '</select>'; break; case 'custom': + // @codingStandardsIgnoreStart eval('$tpl = ' . str_replace('{VALUE}', $value, $options) . ';'); + // @codingStandardsIgnoreEnd break; default: diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 674a1f7dd3..a0d5e802e6 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -252,7 +252,6 @@ class install_convert extends module { case 'sqlite': case 'sqlite3': - case 'firebird': $db->sql_query('DELETE FROM ' . SESSIONS_KEYS_TABLE); $db->sql_query('DELETE FROM ' . SESSIONS_TABLE); break; @@ -700,7 +699,6 @@ class install_convert extends module { case 'sqlite': case 'sqlite3': - case 'firebird': $convert->src_truncate_statement = 'DELETE FROM '; break; @@ -733,7 +731,6 @@ class install_convert extends module { case 'sqlite': case 'sqlite3': - case 'firebird': $convert->truncate_statement = 'DELETE FROM '; break; @@ -1021,7 +1018,9 @@ class install_convert extends module // Now process queries and execute functions that have to be executed prior to the conversion if (!empty($convert->convertor['execute_first'])) { + // @codingStandardsIgnoreStart eval($convert->convertor['execute_first']); + // @codingStandardsIgnoreEnd } if (!empty($convert->convertor['query_first'])) @@ -1091,7 +1090,9 @@ class install_convert extends module // process execute_first and query_first for this table... if (!empty($schema['execute_first'])) { + // @codingStandardsIgnoreStart eval($schema['execute_first']); + // @codingStandardsIgnoreEnd } if (!empty($schema['query_first'])) @@ -1156,7 +1157,9 @@ class install_convert extends module // it gets split because of time restrictions if (!empty($schema['execute_always'])) { + // @codingStandardsIgnoreStart eval($schema['execute_always']); + // @codingStandardsIgnoreEnd } // @@ -1667,13 +1670,17 @@ class install_convert extends module { if (!is_array($convert->convertor['execute_last'])) { + // @codingStandardsIgnoreStart eval($convert->convertor['execute_last']); + // @codingStandardsIgnoreEnd } else { while ($last_statement < sizeof($convert->convertor['execute_last'])) { + // @codingStandardsIgnoreStart eval($convert->convertor['execute_last'][$last_statement]); + // @codingStandardsIgnoreEnd $template->assign_block_vars('checks', array( 'TITLE' => $convert->convertor['execute_last'][$last_statement], @@ -2035,7 +2042,9 @@ class install_convert extends module $execution = str_replace('{RESULT}', '$value', $execution); $execution = str_replace('{VALUE}', '$value', $execution); + // @codingStandardsIgnoreStart eval($execution); + // @codingStandardsIgnoreEnd } } } @@ -2082,7 +2091,9 @@ class install_convert extends module $execution = str_replace('{RESULT}', '$value', $execution); $execution = str_replace('{VALUE}', '$value', $execution); + // @codingStandardsIgnoreStart eval($execution); + // @codingStandardsIgnoreEnd } } } diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 576cbba3ca..5f8c0c277c 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1153,21 +1153,25 @@ class install_install extends module // How should we treat this schema? $delimiter = $available_dbms[$data['dbms']]['DELIM']; - $sql_query = @file_get_contents($dbms_schema); - $sql_query = preg_replace('#phpbb_#i', $data['table_prefix'], $sql_query); - $sql_query = phpbb_remove_comments($sql_query); - $sql_query = split_sql_file($sql_query, $delimiter); - foreach ($sql_query as $sql) + if (file_exists($dbms_schema)) { - //$sql = trim(str_replace('|', ';', $sql)); - if (!$db->sql_query($sql)) + $sql_query = @file_get_contents($dbms_schema); + $sql_query = preg_replace('#phpbb_#i', $data['table_prefix'], $sql_query); + $sql_query = phpbb_remove_comments($sql_query); + $sql_query = split_sql_file($sql_query, $delimiter); + + foreach ($sql_query as $sql) { - $error = $db->sql_error(); - $this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__); + //$sql = trim(str_replace('|', ';', $sql)); + if (!$db->sql_query($sql)) + { + $error = $db->sql_error(); + $this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__); + } } + unset($sql_query); } - unset($sql_query); // Ok we have the db info go ahead and work on building the table $db_table_schema = @file_get_contents('schemas/schema.json'); diff --git a/phpBB/install/install_main.php b/phpBB/install/install_main.php index 2f37fc3237..d5874dac83 100644 --- a/phpBB/install/install_main.php +++ b/phpBB/install/install_main.php @@ -56,7 +56,7 @@ class install_main extends module case 'license' : $title = $lang['GPL']; - $body = implode("<br/>\n", file('../docs/COPYING')); + $body = implode("<br/>\n", file(__DIR__ . '/../docs/LICENSE.txt')); break; case 'support' : diff --git a/phpBB/install/phpinfo.php b/phpBB/install/phpinfo.php index 83f154933a..1512b00563 100644 --- a/phpBB/install/phpinfo.php +++ b/phpBB/install/phpinfo.php @@ -1,3 +1,14 @@ <?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ phpinfo(); diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql deleted file mode 100644 index 28649dc54c..0000000000 --- a/phpBB/install/schemas/firebird_schema.sql +++ /dev/null @@ -1,5 +0,0 @@ -# DO NOT EDIT THIS FILE, IT IS GENERATED -# -# To change the contents of this file, edit -# phpBB/develop/create_schema_files.php and -# run it. diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql deleted file mode 100644 index f88513cf0e..0000000000 --- a/phpBB/install/schemas/mssql_schema.sql +++ /dev/null @@ -1,8 +0,0 @@ -/* - * DO NOT EDIT THIS FILE, IT IS GENERATED - * - * To change the contents of this file, edit - * phpBB/develop/create_schema_files.php and - * run it. - */ - diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql deleted file mode 100644 index 28649dc54c..0000000000 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ /dev/null @@ -1,5 +0,0 @@ -# DO NOT EDIT THIS FILE, IT IS GENERATED -# -# To change the contents of this file, edit -# phpBB/develop/create_schema_files.php and -# run it. diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql deleted file mode 100644 index 28649dc54c..0000000000 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ /dev/null @@ -1,5 +0,0 @@ -# DO NOT EDIT THIS FILE, IT IS GENERATED -# -# To change the contents of this file, edit -# phpBB/develop/create_schema_files.php and -# run it. diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index 61f5d5f961..2473d31aab 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -1,12 +1,4 @@ /* - * DO NOT EDIT THIS FILE, IT IS GENERATED - * - * To change the contents of this file, edit - * phpBB/develop/create_schema_files.php and - * run it. - */ - -/* This first section is optional, however its probably the best method of running phpBB on Oracle. If you already have a tablespace and user created for phpBB you can leave this section commented out! diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 3fc8589844..65caba8d1c 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -1,10 +1,3 @@ -/* - * DO NOT EDIT THIS FILE, IT IS GENERATED - * - * To change the contents of this file, edit - * phpBB/develop/create_schema_files.php and - * run it. - */ BEGIN; diff --git a/phpBB/install/schemas/schema.json b/phpBB/install/schemas/schema.json index f684fddc25..a3ffd923a1 100644 --- a/phpBB/install/schemas/schema.json +++ b/phpBB/install/schemas/schema.json @@ -2088,6 +2088,26 @@ "UINT", 0 ], + "pf_phpbb_skype": [ + "VCHAR", + "" + ], + "pf_phpbb_twitter": [ + "VCHAR", + "" + ], + "pf_phpbb_youtube": [ + "VCHAR", + "" + ], + "pf_phpbb_facebook": [ + "VCHAR", + "" + ], + "pf_phpbb_googleplus": [ + "VCHAR", + "" + ], "pf_phpbb_interests": [ "MTEXT", "" @@ -3023,10 +3043,6 @@ "TIMESTAMP", 0 ], - "user_pass_convert": [ - "BOOL", - 0 - ], "user_email": [ "VCHAR_UNI:100", "" diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index e335c1f9ba..9b9b7f77f1 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -82,6 +82,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('confirm_refresh', INSERT INTO phpbb_config (config_name, config_value) VALUES ('check_attachment_content', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('check_dnsbl', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('chg_passforce', '0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('contact_admin_form_enable', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_domain', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_name', 'phpbb3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_path', '/'); @@ -299,6 +300,12 @@ INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('sessio INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('upload_dir_size', '0', 1); INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('warnings_last_gc', '0', 1); +# Config text +INSERT INTO phpbb_config_text (config_name, config_value) VALUES ('contact_admin_info', ''); +INSERT INTO phpbb_config_text (config_name, config_value) VALUES ('contact_admin_info_uid', ''); +INSERT INTO phpbb_config_text (config_name, config_value) VALUES ('contact_admin_info_bitfield', ''); +INSERT INTO phpbb_config_text (config_name, config_value) VALUES ('contact_admin_info_flags', '7'); + # -- Forum related auth options INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_announce', 1); @@ -799,6 +806,11 @@ INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_len INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_icq', 'profilefields.type.string', 'phpbb_icq', '20', '3', '15', '', '', '[0-9]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 6, 1, 'SEND_ICQ_MESSAGE', 'https://www.icq.com/people/%s/'); INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_wlm', 'profilefields.type.string', 'phpbb_wlm', '40', '5', '255', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 7, 1, '', ''); INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_yahoo', 'profilefields.type.string', 'phpbb_yahoo', '40', '5', '255', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 8, 1, 'SEND_YIM_MESSAGE', 'http://edit.yahoo.com/config/send_webmesg?.target=%s&.src=pg'); +INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_facebook', 'profilefields.type.string', 'phpbb_facebook', '20', '5', '50', '', '', '[\w.]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 9, 1, 'VIEW_FACEBOOK_PROFILE', 'http://facebook.com/%s/'); +INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_twitter', 'profilefields.type.string', 'phpbb_twitter', '20', '1', '15', '', '', '[\w_]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 10, 1, 'VIEW_TWITTER_PROFILE', 'http://twitter.com/%s'); +INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_skype', 'profilefields.type.string', 'phpbb_skype', '20', '6', '32', '', '', '[a-zA-Z][\w\.,\-_]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 11, 1, 'VIEW_SKYPE_PROFILE', 'skype:%s?userinfo'); +INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_youtube', 'profilefields.type.string', 'phpbb_youtube', '20', '3', '60', '', '', '[a-zA-Z][\w\.,\-_]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 12, 1, 'VIEW_YOUTUBE_CHANNEL', 'http://youtube.com/user/%s'); +INSERT INTO phpbb_profile_fields (field_name, field_type, field_ident, field_length, field_minlen, field_maxlen, field_novalue, field_default_value, field_validation, field_required, field_show_novalue, field_show_on_reg, field_show_on_pm, field_show_on_vt, field_show_on_ml, field_show_profile, field_hide, field_no_view, field_active, field_order, field_is_contact, field_contact_desc, field_contact_url) VALUES ('phpbb_googleplus', 'profilefields.type.googleplus', 'phpbb_googleplus', '20', '3', '255', '', '', '[\w]+', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 13, 1, 'VIEW_GOOGLEPLUS_PROFILE', 'http://plus.google.com/%s'); # User Notification Options (for first user) INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('post', 0, 2, ''); diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql deleted file mode 100644 index 28649dc54c..0000000000 --- a/phpBB/install/schemas/sqlite_schema.sql +++ /dev/null @@ -1,5 +0,0 @@ -# DO NOT EDIT THIS FILE, IT IS GENERATED -# -# To change the contents of this file, edit -# phpBB/develop/create_schema_files.php and -# run it. |