From d4b1e2f4f6aa6a863b14aaaee96115dfbb6ea149 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sun, 12 May 2013 23:25:53 +0300 Subject: [PATCH 01/15] [ticket/11345] Change font for buttons Change font to Open Sans PHPBB3-11345 --- phpBB/styles/prosilver/theme/buttons.css | 3 ++- phpBB/styles/prosilver/theme/colours.css | 1 - phpBB/styles/prosilver/theme/stylesheet.css | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css index 9336dd09f8..4a8d43079a 100644 --- a/phpBB/styles/prosilver/theme/buttons.css +++ b/phpBB/styles/prosilver/theme/buttons.css @@ -27,7 +27,8 @@ border-radius: 4px; background: transparent none 0 0 repeat-x; padding: 2px 22px 2px 8px; - font-family: Verdana, Arial, Helvetica; + font-family: "Open Sans", Verdana, Arial, Helvetica; + font-weight: 600; position: relative; text-decoration: none !important; outline-style: none !important; diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css index 7d0462be1b..7449014801 100644 --- a/phpBB/styles/prosilver/theme/colours.css +++ b/phpBB/styles/prosilver/theme/colours.css @@ -1111,4 +1111,3 @@ input.disabled { .notification_list .pointer_inner { border-bottom-color: #F1F8FF; } - diff --git a/phpBB/styles/prosilver/theme/stylesheet.css b/phpBB/styles/prosilver/theme/stylesheet.css index 48a00c6803..adc5bdff25 100644 --- a/phpBB/styles/prosilver/theme/stylesheet.css +++ b/phpBB/styles/prosilver/theme/stylesheet.css @@ -7,6 +7,7 @@ -------------------------------------------------------------- */ +@import url("http://fonts.googleapis.com/css?family=Open+Sans:600&subset=latin,cyrillic-ext,latin-ext,cyrillic,greek-ext,greek,vietnamese"); @import url("common.css"); @import url("links.css"); @import url("content.css"); From 3139867e6d345a2d9f69e68d2629f31448a17634 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Thu, 11 Jul 2013 11:32:52 -0400 Subject: [PATCH 02/15] [ticket/11345] Add Droid Sans as fallback font PHPBB3-11345 --- phpBB/styles/prosilver/theme/buttons.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css index 4a8d43079a..3860869501 100644 --- a/phpBB/styles/prosilver/theme/buttons.css +++ b/phpBB/styles/prosilver/theme/buttons.css @@ -27,7 +27,7 @@ border-radius: 4px; background: transparent none 0 0 repeat-x; padding: 2px 22px 2px 8px; - font-family: "Open Sans", Verdana, Arial, Helvetica; + font-family: "Open Sans", "Droid Sans", Verdana, Arial, Helvetica; font-weight: 600; position: relative; text-decoration: none !important; From 424040f8901cc4c075924c5d21d89fdfe9e6ca58 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Sun, 14 Jul 2013 14:12:42 -0400 Subject: [PATCH 03/15] [ticket/11345] Move css import to template PHPBB3-11345 --- phpBB/styles/prosilver/template/overall_header.html | 1 + phpBB/styles/prosilver/template/simple_header.html | 1 + phpBB/styles/prosilver/theme/stylesheet.css | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index ddbd917bd6..f513f42fc2 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -63,6 +63,7 @@ + diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index 667698c371..913115a2ed 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -42,6 +42,7 @@ + diff --git a/phpBB/styles/prosilver/theme/stylesheet.css b/phpBB/styles/prosilver/theme/stylesheet.css index adc5bdff25..48a00c6803 100644 --- a/phpBB/styles/prosilver/theme/stylesheet.css +++ b/phpBB/styles/prosilver/theme/stylesheet.css @@ -7,7 +7,6 @@ -------------------------------------------------------------- */ -@import url("http://fonts.googleapis.com/css?family=Open+Sans:600&subset=latin,cyrillic-ext,latin-ext,cyrillic,greek-ext,greek,vietnamese"); @import url("common.css"); @import url("links.css"); @import url("content.css"); From b9fa2089d56d16d8a8cd84bb8ae06d85fec5506a Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 14 Jul 2013 21:13:21 +0200 Subject: [PATCH 04/15] [ticket/11345] Wrap remote webfonts in S_ALLOW_CDN. PHPBB3-11345 --- phpBB/styles/prosilver/template/overall_header.html | 2 +- phpBB/styles/prosilver/template/simple_header.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index f513f42fc2..73ddc29efc 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -63,7 +63,7 @@ - + diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index 913115a2ed..c89c50570a 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -42,7 +42,7 @@ - + From 9c223cdd88a6c4687b8a58c84ad9c7770a5e78ca Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 18 Jul 2013 22:50:17 +0200 Subject: [PATCH 05/15] [ticket/11345] Don't include scheme, so HTTPS is used where necessary. PHPBB3-11345 --- phpBB/styles/prosilver/template/overall_header.html | 2 +- phpBB/styles/prosilver/template/simple_header.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index 73ddc29efc..3a730f2daf 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -63,7 +63,7 @@ - + diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index c89c50570a..d198480d06 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -42,7 +42,7 @@ - + From dba5188f23d0c8ac00ed309003fb3251c204a33c Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 10 Oct 2013 15:12:55 -0500 Subject: [PATCH 06/15] [ticket/11874] Do not always prepend the web path; only replace phpbb_root_path PHPBB3-11874 --- phpBB/phpbb/path_helper.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/phpBB/phpbb/path_helper.php b/phpBB/phpbb/path_helper.php index b2ed11a927..e9fd092b62 100644 --- a/phpBB/phpbb/path_helper.php +++ b/phpBB/phpbb/path_helper.php @@ -89,26 +89,24 @@ class path_helper } /** - * Update a path to the correct relative root path + * Update a web path to the correct relative root path * * This replaces $phpbb_root_path . some_url with - * get_web_root_path() . some_url OR if $phpbb_root_path - * is not at the beginning of $path, just prepends the - * web root path + * get_web_root_path() . some_url * * @param string $path The path to be updated * @return string */ public function update_web_root_path($path) { - $web_root_path = $this->get_web_root_path($this->symfony_request); - if (strpos($path, $this->phpbb_root_path) === 0) { $path = substr($path, strlen($this->phpbb_root_path)); + + return $this->get_web_root_path() . $path; } - return $web_root_path . $path; + return $path; } /** From 31649f1eb0fa7ce44d4ed8137020f63c5d7e62e6 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 10 Oct 2013 16:20:00 -0500 Subject: [PATCH 07/15] [ticket/11874] Fix tests PHPBB3-11874 --- tests/path_helper/web_root_path_test.php | 7 +++++- tests/template/template_includecss_test.php | 4 ++-- tests/template/template_includejs_test.php | 26 ++++++++++----------- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/tests/path_helper/web_root_path_test.php b/tests/path_helper/web_root_path_test.php index 938b58892b..2e1a37e02b 100644 --- a/tests/path_helper/web_root_path_test.php +++ b/tests/path_helper/web_root_path_test.php @@ -52,13 +52,18 @@ class phpbb_path_helper_web_root_path_test extends phpbb_test_case $this->set_phpbb_root_path(); return array( + array( + 'http://www.test.com/test.php', + 'http://www.test.com/test.php', + '/', + ), array( $this->phpbb_root_path . 'test.php', $this->phpbb_root_path . 'test.php', ), array( 'test.php', - $this->phpbb_root_path . 'test.php', + 'test.php', ), array( $this->phpbb_root_path . $this->phpbb_root_path . 'test.php', diff --git a/tests/template/template_includecss_test.php b/tests/template/template_includecss_test.php index 7424af0c93..9ed8bd0947 100644 --- a/tests/template/template_includecss_test.php +++ b/tests/template/template_includecss_test.php @@ -18,8 +18,8 @@ class phpbb_template_template_includecss_test extends phpbb_template_template_te // Prepare correct result $scripts = array( - '', - '', + '', + '', ); // Run test diff --git a/tests/template/template_includejs_test.php b/tests/template/template_includejs_test.php index ab0f4b9ca1..b20d068a64 100644 --- a/tests/template/template_includejs_test.php +++ b/tests/template/template_includejs_test.php @@ -24,51 +24,51 @@ class phpbb_template_template_includejs_test extends phpbb_template_template_tes */ array( array('TEST' => 1), - '', + '', ), array( array('TEST' => 2), - '', + '', ), array( array('TEST' => 3), - '', + '', ), array( array('TEST' => 4), - '', + '', ), array( array('TEST' => 6), - '', + '', ), array( array('TEST' => 7), - '', + '', ), array( array('TEST' => 8), - '', + '', ), array( array('TEST' => 9), - '', + '', ), array( array('TEST' => 10), - '', + '', ), array( array('TEST' => 11), - '', + '', ), array( array('TEST' => 12), - '', + '', ), array( array('TEST' => 14), - '', + '', ), array( array('TEST' => 15), @@ -84,7 +84,7 @@ class phpbb_template_template_includejs_test extends phpbb_template_template_tes ), array( array('TEST' => 18), - '', + '', ), ); } From 94b49d8a925e4bc7f10cbcf117ba81b071019b73 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 14 Jul 2013 20:44:00 +0200 Subject: [PATCH 08/15] [ticket/11703] Make jQuery CDN switch more generic. Config variable: load_jquery_cdn -> allow_cdn Template variable: S_JQUERY_FALLBACK -> S_ALLOW_CDN PHPBB3-11703 --- phpBB/adm/style/install_footer.html | 2 +- phpBB/adm/style/overall_footer.html | 2 +- phpBB/adm/style/simple_footer.html | 2 +- phpBB/includes/acp/acp_board.php | 2 +- phpBB/includes/functions.php | 4 +-- phpBB/includes/functions_acp.php | 4 +-- phpBB/install/schemas/schema_data.sql | 2 +- phpBB/language/en/acp/board.php | 4 +-- .../db/migration/data/v310/allow_cdn.php | 28 +++++++++++++++++++ .../prosilver/template/overall_footer.html | 2 +- .../prosilver/template/simple_footer.html | 2 +- .../subsilver2/template/overall_footer.html | 2 +- .../subsilver2/template/simple_footer.html | 2 +- 13 files changed, 43 insertions(+), 15 deletions(-) create mode 100644 phpBB/phpbb/db/migration/data/v310/allow_cdn.php diff --git a/phpBB/adm/style/install_footer.html b/phpBB/adm/style/install_footer.html index 73c3f5a6b9..f7d62d7c7e 100644 --- a/phpBB/adm/style/install_footer.html +++ b/phpBB/adm/style/install_footer.html @@ -13,7 +13,7 @@ - + diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index 9202cec06b..145ad18709 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -35,7 +35,7 @@ - + {$SCRIPTS} diff --git a/phpBB/adm/style/simple_footer.html b/phpBB/adm/style/simple_footer.html index 906a9bebed..a559b25b72 100644 --- a/phpBB/adm/style/simple_footer.html +++ b/phpBB/adm/style/simple_footer.html @@ -17,7 +17,7 @@ - + diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 8f2548166b..40dca53b76 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -344,7 +344,7 @@ class acp_board 'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'load_user_activity' => array('lang' => 'LOAD_USER_ACTIVITY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'load_tplcompile' => array('lang' => 'RECOMPILE_STYLES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), - 'load_jquery_cdn' => array('lang' => 'LOAD_JQUERY_CDN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), + 'allow_cdn' => array('lang' => 'ALLOW_CDN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'legend3' => 'CUSTOM_PROFILE_FIELDS', 'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index dd0dcc09b6..4ada12b87a 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5451,8 +5451,8 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'T_UPLOAD_PATH' => "{$web_path}{$config['upload_path']}/", 'T_STYLESHEET_LINK' => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/stylesheet.css?assets_version=' . $config['assets_version'], 'T_STYLESHEET_LANG_LINK' => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/' . $user->lang_name . '/stylesheet.css?assets_version=' . $config['assets_version'], - 'T_JQUERY_LINK' => ($config['load_jquery_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery.js?assets_version=" . $config['assets_version'], - 'S_JQUERY_FALLBACK' => ($config['load_jquery_cdn']) ? true : false, + 'T_JQUERY_LINK' => ($config['allow_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery.js?assets_version=" . $config['assets_version'], + 'S_ALLOW_CDN' => !empty($config['allow_cdn']), 'T_THEME_NAME' => rawurlencode($user->style['style_path']), 'T_THEME_LANG_NAME' => $user->data['user_lang'], diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php index 60c44e90e1..3ca0049a1c 100644 --- a/phpBB/includes/functions_acp.php +++ b/phpBB/includes/functions_acp.php @@ -175,8 +175,8 @@ function adm_page_footer($copyright_html = true) 'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '', 'S_COPYRIGHT_HTML' => $copyright_html, 'CREDIT_LINE' => $user->lang('POWERED_BY', 'phpBB® Forum Software © phpBB Group'), - 'T_JQUERY_LINK' => ($config['load_jquery_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery.js", - 'S_JQUERY_FALLBACK' => ($config['load_jquery_cdn']) ? true : false, + 'T_JQUERY_LINK' => ($config['allow_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery.js", + 'S_ALLOW_CDN' => !empty($config['allow_cdn']), 'VERSION' => $config['version']) ); diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 4458dde6a3..4f1cdf5a83 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -17,6 +17,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remot INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bbcode', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_birthdays', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bookmarks', '1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_cdn', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_emailreuse', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_password_reset', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_forum_notify', '1'); @@ -176,7 +177,6 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewprofi INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_track', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_cdn', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jumpbox', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_moderators', '1'); diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index f786374ba6..8ca937a58d 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -354,6 +354,8 @@ $lang = array_merge($lang, array( $lang = array_merge($lang, array( 'ACP_LOAD_SETTINGS_EXPLAIN' => 'Here you can enable and disable certain board functions to reduce the amount of processing required. On most servers there is no need to disable any functions. However on certain systems or in shared hosting environments it may be beneficial to disable capabilities you do not really need. You can also specify limits for system load and active sessions beyond which the board will go offline.', + 'ALLOW_CDN' => 'Allow usage of third party content delivery networks', + 'ALLOW_CDN_EXPLAIN' => 'If this setting is enabled, some files will be served from external third party servers instead of your server. This reduces the network bandwidth required by your server, but may present a privacy issue for some board administrators.', 'CUSTOM_PROFILE_FIELDS' => 'Custom profile fields', 'LIMIT_LOAD' => 'Limit system load', 'LIMIT_LOAD_EXPLAIN' => 'If the system’s 1-minute load average exceeds this value the board will automatically go offline. A value of 1.0 equals ~100% utilisation of one processor. This only functions on UNIX based servers and where this information is accessible. The value here resets itself to 0 if phpBB was unable to get the load limit.', @@ -363,8 +365,6 @@ $lang = array_merge($lang, array( 'LOAD_CPF_PM' => 'Display custom profile fields in private messages', 'LOAD_CPF_VIEWPROFILE' => 'Display custom profile fields in user profiles', 'LOAD_CPF_VIEWTOPIC' => 'Display custom profile fields on topic pages', - 'LOAD_JQUERY_CDN' => 'Serve jQuery using Google’s CDN', - 'LOAD_JQUERY_CDN_EXPLAIN' => 'If this setting is enabled, jQuery will be served from Google’s AJAX API CDN instead of the copy included with phpBB on your server. If the CDN fails, phpBB will attempt to fall back to the copy included with phpBB.', 'LOAD_USER_ACTIVITY' => 'Show user’s activity', 'LOAD_USER_ACTIVITY_EXPLAIN' => 'Displays active topic/forum in user profiles and user control panel. It is recommended to disable this on boards with more than one million posts.', 'READ_NOTIFICATION_EXPIRE_DAYS' => 'Read Notification Expiration', diff --git a/phpBB/phpbb/db/migration/data/v310/allow_cdn.php b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php new file mode 100644 index 0000000000..2570998643 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php @@ -0,0 +1,28 @@ +config['load_jquery_cdn'])), + array('config.remove', array('load_jquery_cdn')), + ); + } +} diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index 15a298053b..e26c94f367 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -57,7 +57,7 @@ - + diff --git a/phpBB/styles/prosilver/template/simple_footer.html b/phpBB/styles/prosilver/template/simple_footer.html index b6afc2fdba..10edece3cd 100644 --- a/phpBB/styles/prosilver/template/simple_footer.html +++ b/phpBB/styles/prosilver/template/simple_footer.html @@ -7,7 +7,7 @@ - + diff --git a/phpBB/styles/subsilver2/template/overall_footer.html b/phpBB/styles/subsilver2/template/overall_footer.html index 348db5d309..dbc9fcd7aa 100644 --- a/phpBB/styles/subsilver2/template/overall_footer.html +++ b/phpBB/styles/subsilver2/template/overall_footer.html @@ -12,7 +12,7 @@ - + diff --git a/phpBB/styles/subsilver2/template/simple_footer.html b/phpBB/styles/subsilver2/template/simple_footer.html index 48d3d934f8..6a9c3096bc 100644 --- a/phpBB/styles/subsilver2/template/simple_footer.html +++ b/phpBB/styles/subsilver2/template/simple_footer.html @@ -6,7 +6,7 @@ - + From 21eae92c27d22a96f847c01770b18f3d00b5aabd Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 14 Jul 2013 21:11:14 +0200 Subject: [PATCH 09/15] [ticket/11703] Add effectively_installed(). PHPBB3-11703 --- phpBB/phpbb/db/migration/data/v310/allow_cdn.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpBB/phpbb/db/migration/data/v310/allow_cdn.php b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php index 2570998643..0b79ac77f9 100644 --- a/phpBB/phpbb/db/migration/data/v310/allow_cdn.php +++ b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php @@ -11,6 +11,11 @@ namespace phpbb\db\migration\data\v310; class allow_cdn extends phpbb_db_migration { + public function effectively_installed() + { + return isset($this->config['allow_cdn']); + } + static public function depends_on() { return array( From a409d398814489b90c94eeb3bf8b3bbde1df0842 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 10 Oct 2013 23:30:29 +0200 Subject: [PATCH 10/15] [ticket/11703] Also use empty() for T_JQUERY_LINK. PHPBB3-11703 --- phpBB/includes/functions.php | 2 +- phpBB/includes/functions_acp.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 4ada12b87a..1e33e6284a 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5451,7 +5451,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'T_UPLOAD_PATH' => "{$web_path}{$config['upload_path']}/", 'T_STYLESHEET_LINK' => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/stylesheet.css?assets_version=' . $config['assets_version'], 'T_STYLESHEET_LANG_LINK' => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/' . $user->lang_name . '/stylesheet.css?assets_version=' . $config['assets_version'], - 'T_JQUERY_LINK' => ($config['allow_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery.js?assets_version=" . $config['assets_version'], + 'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery.js?assets_version=" . $config['assets_version'], 'S_ALLOW_CDN' => !empty($config['allow_cdn']), 'T_THEME_NAME' => rawurlencode($user->style['style_path']), diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php index 3ca0049a1c..c83bc1f7a6 100644 --- a/phpBB/includes/functions_acp.php +++ b/phpBB/includes/functions_acp.php @@ -175,7 +175,7 @@ function adm_page_footer($copyright_html = true) 'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '', 'S_COPYRIGHT_HTML' => $copyright_html, 'CREDIT_LINE' => $user->lang('POWERED_BY', 'phpBB® Forum Software © phpBB Group'), - 'T_JQUERY_LINK' => ($config['allow_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery.js", + 'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery.js", 'S_ALLOW_CDN' => !empty($config['allow_cdn']), 'VERSION' => $config['version']) ); From ac9225774ecd93cbc717b99902c9cc94c7d8372e Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 10 Oct 2013 16:41:31 -0500 Subject: [PATCH 11/15] [ticket/11874] Correct when $phpbb_root_path is appended to build_url() PHPBB3-11874 --- phpBB/includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index dd0dcc09b6..cdadd8ac50 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2866,7 +2866,7 @@ function build_url($strip_vars = false) $url_parts = parse_url($page); // URL - if ($url_parts !== false && !empty($url_parts['scheme']) && !empty($url_parts['host'])) + if ($url_parts === false || empty($url_parts['scheme']) || empty($url_parts['host'])) { $page = $phpbb_root_path . $page; } From 51cc7155041c95ca47147072c1c04449ad0bcf67 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 10 Oct 2013 23:45:22 +0200 Subject: [PATCH 12/15] [ticket/11703] Extend the correct migration class. PHPBB3-11703 --- phpBB/phpbb/db/migration/data/v310/allow_cdn.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/db/migration/data/v310/allow_cdn.php b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php index 0b79ac77f9..aa471df6e7 100644 --- a/phpBB/phpbb/db/migration/data/v310/allow_cdn.php +++ b/phpBB/phpbb/db/migration/data/v310/allow_cdn.php @@ -9,7 +9,7 @@ namespace phpbb\db\migration\data\v310; -class allow_cdn extends phpbb_db_migration +class allow_cdn extends \phpbb\db\migration\migration { public function effectively_installed() { From 4ad1495768d91a24b2744f43a00f922a13b40ce4 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 10 Oct 2013 16:51:26 -0500 Subject: [PATCH 13/15] [ticket/11903] Speed up paging test PHPBB3-11903 --- tests/functional/paging_test.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/functional/paging_test.php b/tests/functional/paging_test.php index d5adc6ad0a..91f14cb75d 100644 --- a/tests/functional/paging_test.php +++ b/tests/functional/paging_test.php @@ -18,22 +18,22 @@ class phpbb_functional_paging_test extends phpbb_functional_test_case $this->login(); $post = $this->create_topic(2, 'Test Topic 1', 'This is a test topic posted by the testing framework.'); - for ($post_id = 1; $post_id < 20; $post_id++) + for ($post_id = 1; $post_id <= 11; $post_id++) { $this->create_post(2, $post['topic_id'], 'Re: Test Topic 1', 'This is a test post no' . $post_id . ' posted by the testing framework.'); } $crawler = self::request('GET', "viewtopic.php?t={$post['topic_id']}&sid={$this->sid}"); $this->assertContains('post no9', $crawler->text()); - $this->assertNotContains('post no19', $crawler->text()); + $this->assertNotContains('post no11', $crawler->text()); $next_link = $crawler->filter('#viewtopic > fieldset > a.arrow-right')->attr('href'); $crawler = self::request('GET', $next_link); - $this->assertContains('post no19', $crawler->text()); + $this->assertContains('post no11', $crawler->text()); $this->assertNotContains('post no9', $crawler->text()); $prev_link = $crawler->filter('#viewtopic > fieldset > a.arrow-left')->attr('href'); $crawler = self::request('GET', $prev_link); $this->assertContains('post no9', $crawler->text()); - $this->assertNotContains('post no19', $crawler->text()); + $this->assertNotContains('post no11', $crawler->text()); } } From 3b1eccbf74a1a66bc5ab2f843d130fe6322c314e Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Thu, 10 Oct 2013 18:16:09 -0500 Subject: [PATCH 14/15] [ticket/11905] 3.1.0-a1 Migration Created a migration tips develop tool to help find the migration tree tips so they can be copied to versions released. With this, A1 is the only current tree tip (it depends on all other migrations). PHPBB3-11905 --- phpBB/develop/migration_tips.php | 42 +++++++++++++++++++ phpBB/phpbb/db/migration/data/v310/alpha1.php | 42 +++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 phpBB/develop/migration_tips.php create mode 100644 phpBB/phpbb/db/migration/data/v310/alpha1.php diff --git a/phpBB/develop/migration_tips.php b/phpBB/develop/migration_tips.php new file mode 100644 index 0000000000..51a579bdb5 --- /dev/null +++ b/phpBB/develop/migration_tips.php @@ -0,0 +1,42 @@ +get('ext.manager'); +$finder = $phpbb_extension_manager->get_finder(); + +$migrations = $finder + ->core_path('phpbb/db/migration/data/') + ->get_classes(); +$tips = $migrations; + +foreach ($migrations as $migration_class) +{ + foreach ($migration_class::depends_on() as $dependency) + { + if (($tips_key = array_search($dependency, $tips)) !== false) + { + unset($tips[$tips_key]); + } + } +} + +foreach ($tips as $migration) +{ + echo "\t\t\t'{$migration}',\n"; +} + diff --git a/phpBB/phpbb/db/migration/data/v310/alpha1.php b/phpBB/phpbb/db/migration/data/v310/alpha1.php new file mode 100644 index 0000000000..04f195daeb --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/alpha1.php @@ -0,0 +1,42 @@ + Date: Fri, 11 Oct 2013 11:59:28 +0200 Subject: [PATCH 15/15] [ticket/11867] Schema files are not created by create_schema_files.php PHPBB3-11867 --- phpBB/install/schemas/firebird_schema.sql | 42 ++++++------- phpBB/install/schemas/mssql_schema.sql | 74 +++++++++++------------ phpBB/install/schemas/mysql_40_schema.sql | 40 ++++++------ phpBB/install/schemas/mysql_41_schema.sql | 40 ++++++------ phpBB/install/schemas/oracle_schema.sql | 56 ++++++++--------- phpBB/install/schemas/postgres_schema.sql | 48 +++++++-------- phpBB/install/schemas/sqlite_schema.sql | 40 ++++++------ 7 files changed, 170 insertions(+), 170 deletions(-) diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 1e47008d73..6c6aca447d 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -128,27 +128,6 @@ CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users(user_id);; CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users(auth_option_id);; CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users(auth_role_id);; -# Table: 'phpbb_oauth_tokens' -CREATE TABLE phpbb_oauth_tokens ( - user_id INTEGER DEFAULT 0 NOT NULL, - session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, - provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - oauth_token BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL -);; - -CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens(user_id);; -CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens(provider);; - -# Table: 'phpbb_oauth_accounts' -CREATE TABLE phpbb_oauth_accounts ( - user_id INTEGER DEFAULT 0 NOT NULL, - provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - oauth_provider_id BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL -);; - -ALTER TABLE phpbb_oauth_accounts ADD PRIMARY KEY (user_id, provider);; - - # Table: 'phpbb_banlist' CREATE TABLE phpbb_banlist ( ban_id INTEGER NOT NULL, @@ -714,6 +693,27 @@ BEGIN END;; +# Table: 'phpbb_oauth_accounts' +CREATE TABLE phpbb_oauth_accounts ( + user_id INTEGER DEFAULT 0 NOT NULL, + provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, + oauth_provider_id BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL +);; + +ALTER TABLE phpbb_oauth_accounts ADD PRIMARY KEY (user_id, provider);; + + +# Table: 'phpbb_oauth_tokens' +CREATE TABLE phpbb_oauth_tokens ( + user_id INTEGER DEFAULT 0 NOT NULL, + session_id CHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, + provider VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, + oauth_token BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL +);; + +CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens(user_id);; +CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens(provider);; + # Table: 'phpbb_poll_options' CREATE TABLE phpbb_poll_options ( poll_option_id INTEGER DEFAULT 0 NOT NULL, diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 922313236e..49804bdcc0 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -166,43 +166,6 @@ CREATE INDEX [auth_role_id] ON [phpbb_acl_users]([auth_role_id]) ON [PRIMARY] GO -/* - Table: 'phpbb_oauth_tokens' -*/ -CREATE TABLE [phpbb_oauth_tokens] ( - [user_id] [int] DEFAULT (0) NOT NULL , - [session_id] [char] (32) DEFAULT ('') NOT NULL , - [provider] [varchar] (255) DEFAULT ('') NOT NULL , - [oauth_token] [text] DEFAULT ('') NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] -GO - -CREATE INDEX [user_id] ON [phpbb_oauth_tokens]([user_id]) ON [PRIMARY] -GO - -CREATE INDEX [provider] ON [phpbb_oauth_tokens]([provider]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_oauth_accounts' -*/ -CREATE TABLE [phpbb_oauth_accounts] ( - [user_id] [int] DEFAULT (0) NOT NULL , - [provider] [varchar] (255) DEFAULT ('') NOT NULL , - [oauth_provider_id] [varchar] (4000) DEFAULT ('') NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_oauth_accounts] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_oauth_accounts] PRIMARY KEY CLUSTERED - ( - [user_id], - [provider] - ) ON [PRIMARY] -GO - - /* Table: 'phpbb_banlist' */ @@ -879,6 +842,43 @@ CREATE INDEX [user] ON [phpbb_notifications]([user_id], [notification_read]) ON GO +/* + Table: 'phpbb_oauth_accounts' +*/ +CREATE TABLE [phpbb_oauth_accounts] ( + [user_id] [int] DEFAULT (0) NOT NULL , + [provider] [varchar] (255) DEFAULT ('') NOT NULL , + [oauth_provider_id] [varchar] (4000) DEFAULT ('') NOT NULL +) ON [PRIMARY] +GO + +ALTER TABLE [phpbb_oauth_accounts] WITH NOCHECK ADD + CONSTRAINT [PK_phpbb_oauth_accounts] PRIMARY KEY CLUSTERED + ( + [user_id], + [provider] + ) ON [PRIMARY] +GO + + +/* + Table: 'phpbb_oauth_tokens' +*/ +CREATE TABLE [phpbb_oauth_tokens] ( + [user_id] [int] DEFAULT (0) NOT NULL , + [session_id] [char] (32) DEFAULT ('') NOT NULL , + [provider] [varchar] (255) DEFAULT ('') NOT NULL , + [oauth_token] [text] DEFAULT ('') NOT NULL +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] +GO + +CREATE INDEX [user_id] ON [phpbb_oauth_tokens]([user_id]) ON [PRIMARY] +GO + +CREATE INDEX [provider] ON [phpbb_oauth_tokens]([provider]) ON [PRIMARY] +GO + + /* Table: 'phpbb_poll_options' */ diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index e07a768387..e287e7dde1 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -90,26 +90,6 @@ CREATE TABLE phpbb_acl_users ( ); -# Table: 'phpbb_oauth_tokens' -CREATE TABLE phpbb_oauth_tokens ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - session_id binary(32) DEFAULT '' NOT NULL, - provider varbinary(255) DEFAULT '' NOT NULL, - oauth_token mediumblob NOT NULL, - KEY user_id (user_id), - KEY provider (provider) -); - - -# Table: 'phpbb_oauth_accounts' -CREATE TABLE phpbb_oauth_accounts ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - provider varbinary(255) DEFAULT '' NOT NULL, - oauth_provider_id blob NOT NULL, - PRIMARY KEY (user_id, provider) -); - - # Table: 'phpbb_banlist' CREATE TABLE phpbb_banlist ( ban_id mediumint(8) UNSIGNED NOT NULL auto_increment, @@ -499,6 +479,26 @@ CREATE TABLE phpbb_notifications ( ); +# Table: 'phpbb_oauth_accounts' +CREATE TABLE phpbb_oauth_accounts ( + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + provider varbinary(255) DEFAULT '' NOT NULL, + oauth_provider_id blob NOT NULL, + PRIMARY KEY (user_id, provider) +); + + +# Table: 'phpbb_oauth_tokens' +CREATE TABLE phpbb_oauth_tokens ( + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + session_id binary(32) DEFAULT '' NOT NULL, + provider varbinary(255) DEFAULT '' NOT NULL, + oauth_token mediumblob NOT NULL, + KEY user_id (user_id), + KEY provider (provider) +); + + # Table: 'phpbb_poll_options' CREATE TABLE phpbb_poll_options ( poll_option_id tinyint(4) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index d3ed1ee15e..870fbd05e4 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -90,26 +90,6 @@ CREATE TABLE phpbb_acl_users ( ) CHARACTER SET `utf8` COLLATE `utf8_bin`; -# Table: 'phpbb_oauth_tokens' -CREATE TABLE phpbb_oauth_tokens ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - session_id char(32) DEFAULT '' NOT NULL, - provider varchar(255) DEFAULT '' NOT NULL, - oauth_token mediumtext NOT NULL, - KEY user_id (user_id), - KEY provider (provider) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_oauth_accounts' -CREATE TABLE phpbb_oauth_accounts ( - user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - provider varchar(255) DEFAULT '' NOT NULL, - oauth_provider_id text NOT NULL, - PRIMARY KEY (user_id, provider) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - # Table: 'phpbb_banlist' CREATE TABLE phpbb_banlist ( ban_id mediumint(8) UNSIGNED NOT NULL auto_increment, @@ -499,6 +479,26 @@ CREATE TABLE phpbb_notifications ( ) CHARACTER SET `utf8` COLLATE `utf8_bin`; +# Table: 'phpbb_oauth_accounts' +CREATE TABLE phpbb_oauth_accounts ( + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + provider varchar(255) DEFAULT '' NOT NULL, + oauth_provider_id text NOT NULL, + PRIMARY KEY (user_id, provider) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + +# Table: 'phpbb_oauth_tokens' +CREATE TABLE phpbb_oauth_tokens ( + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + session_id char(32) DEFAULT '' NOT NULL, + provider varchar(255) DEFAULT '' NOT NULL, + oauth_token mediumtext NOT NULL, + KEY user_id (user_id), + KEY provider (provider) +) CHARACTER SET `utf8` COLLATE `utf8_bin`; + + # Table: 'phpbb_poll_options' CREATE TABLE phpbb_poll_options ( poll_option_id tinyint(4) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index f32980e378..5354e5b1bb 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -210,34 +210,6 @@ CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id) CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id) / -/* - Table: 'phpbb_oauth_tokens' -*/ -CREATE TABLE phpbb_oauth_tokens ( - user_id number(8) DEFAULT '0' NOT NULL, - session_id char(32) DEFAULT '' , - provider varchar2(255) DEFAULT '' , - oauth_token clob DEFAULT '' -) -/ - -CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id) -/ -CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider) -/ - -/* - Table: 'phpbb_oauth_accounts' -*/ -CREATE TABLE phpbb_oauth_accounts ( - user_id number(8) DEFAULT '0' NOT NULL, - provider varchar2(255) DEFAULT '' , - oauth_provider_id clob DEFAULT '' , - CONSTRAINT pk_phpbb_oauth_accounts PRIMARY KEY (user_id, provider) -) -/ - - /* Table: 'phpbb_banlist' */ @@ -963,6 +935,34 @@ END; / +/* + Table: 'phpbb_oauth_accounts' +*/ +CREATE TABLE phpbb_oauth_accounts ( + user_id number(8) DEFAULT '0' NOT NULL, + provider varchar2(255) DEFAULT '' , + oauth_provider_id clob DEFAULT '' , + CONSTRAINT pk_phpbb_oauth_accounts PRIMARY KEY (user_id, provider) +) +/ + + +/* + Table: 'phpbb_oauth_tokens' +*/ +CREATE TABLE phpbb_oauth_tokens ( + user_id number(8) DEFAULT '0' NOT NULL, + session_id char(32) DEFAULT '' , + provider varchar2(255) DEFAULT '' , + oauth_token clob DEFAULT '' +) +/ + +CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id) +/ +CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider) +/ + /* Table: 'phpbb_poll_options' */ diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 14435898eb..7773602c16 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -188,30 +188,6 @@ CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id); CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id); CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id); -/* - Table: 'phpbb_oauth_tokens' -*/ -CREATE TABLE phpbb_oauth_tokens ( - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - session_id char(32) DEFAULT '' NOT NULL, - provider varchar(255) DEFAULT '' NOT NULL, - oauth_token TEXT DEFAULT '' NOT NULL -); - -CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id); -CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider); - -/* - Table: 'phpbb_oauth_accounts' -*/ -CREATE TABLE phpbb_oauth_accounts ( - user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), - provider varchar(255) DEFAULT '' NOT NULL, - oauth_provider_id varchar(4000) DEFAULT '' NOT NULL, - PRIMARY KEY (user_id, provider) -); - - /* Table: 'phpbb_banlist' */ @@ -681,6 +657,30 @@ CREATE TABLE phpbb_notifications ( CREATE INDEX phpbb_notifications_item_ident ON phpbb_notifications (notification_type_id, item_id); CREATE INDEX phpbb_notifications_user ON phpbb_notifications (user_id, notification_read); +/* + Table: 'phpbb_oauth_accounts' +*/ +CREATE TABLE phpbb_oauth_accounts ( + user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), + provider varchar(255) DEFAULT '' NOT NULL, + oauth_provider_id varchar(4000) DEFAULT '' NOT NULL, + PRIMARY KEY (user_id, provider) +); + + +/* + Table: 'phpbb_oauth_tokens' +*/ +CREATE TABLE phpbb_oauth_tokens ( + user_id INT4 DEFAULT '0' NOT NULL CHECK (user_id >= 0), + session_id char(32) DEFAULT '' NOT NULL, + provider varchar(255) DEFAULT '' NOT NULL, + oauth_token TEXT DEFAULT '' NOT NULL +); + +CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id); +CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider); + /* Table: 'phpbb_poll_options' */ diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index de88900f06..079d48bc65 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -89,26 +89,6 @@ CREATE INDEX phpbb_acl_users_user_id ON phpbb_acl_users (user_id); CREATE INDEX phpbb_acl_users_auth_option_id ON phpbb_acl_users (auth_option_id); CREATE INDEX phpbb_acl_users_auth_role_id ON phpbb_acl_users (auth_role_id); -# Table: 'phpbb_oauth_tokens' -CREATE TABLE phpbb_oauth_tokens ( - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - session_id char(32) NOT NULL DEFAULT '', - provider varchar(255) NOT NULL DEFAULT '', - oauth_token mediumtext(16777215) NOT NULL DEFAULT '' -); - -CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id); -CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider); - -# Table: 'phpbb_oauth_accounts' -CREATE TABLE phpbb_oauth_accounts ( - user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - provider varchar(255) NOT NULL DEFAULT '', - oauth_provider_id text(65535) NOT NULL DEFAULT '', - PRIMARY KEY (user_id, provider) -); - - # Table: 'phpbb_banlist' CREATE TABLE phpbb_banlist ( ban_id INTEGER PRIMARY KEY NOT NULL , @@ -484,6 +464,26 @@ CREATE TABLE phpbb_notifications ( CREATE INDEX phpbb_notifications_item_ident ON phpbb_notifications (notification_type_id, item_id); CREATE INDEX phpbb_notifications_user ON phpbb_notifications (user_id, notification_read); +# Table: 'phpbb_oauth_accounts' +CREATE TABLE phpbb_oauth_accounts ( + user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', + provider varchar(255) NOT NULL DEFAULT '', + oauth_provider_id text(65535) NOT NULL DEFAULT '', + PRIMARY KEY (user_id, provider) +); + + +# Table: 'phpbb_oauth_tokens' +CREATE TABLE phpbb_oauth_tokens ( + user_id INTEGER UNSIGNED NOT NULL DEFAULT '0', + session_id char(32) NOT NULL DEFAULT '', + provider varchar(255) NOT NULL DEFAULT '', + oauth_token mediumtext(16777215) NOT NULL DEFAULT '' +); + +CREATE INDEX phpbb_oauth_tokens_user_id ON phpbb_oauth_tokens (user_id); +CREATE INDEX phpbb_oauth_tokens_provider ON phpbb_oauth_tokens (provider); + # Table: 'phpbb_poll_options' CREATE TABLE phpbb_poll_options ( poll_option_id tinyint(4) NOT NULL DEFAULT '0',