From 138d1050fcfa910eb8819e91034741ed74baf4f3 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Sat, 24 Sep 2011 22:05:40 +0100 Subject: [ticket/9307] Remove hardcoded chunk size of mass emails. The new config option is 'email_max_chunk_size' I have not added an interface option to change this. PHPBB3-9307 --- phpBB/install/database_update.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'phpBB/install') diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index a167e79308..21246a215e 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -1994,6 +1994,11 @@ function change_database_data(&$no_updates, $version) // No changes from 3.0.9-RC4 to 3.0.9 case '3.0.9-RC4': break; + + // Changes from 3.0.9 to 3.0.10-RC1 + case '3.0.9': + set_config('email_max_chunk_size', '50'); + break; } } -- cgit v1.2.1 From 81f9385477e1a6b050f447c9659faaf0bc7e871a Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Sun, 25 Sep 2011 22:13:43 +0100 Subject: [ticket/9307] Add config variable to installation schema. PHPBB3-9307 --- phpBB/install/schemas/schema_data.sql | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/install') diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 153ac61157..84b25d676e 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -94,6 +94,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('delete_time', '0') INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_check_mx', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_enable', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_function_name', 'mail'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_max_chunk_size', '50'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_package_size', '20'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_pm_icons', '1'); -- cgit v1.2.1 From 56c6476233646e7c735aa4e3b98c4a6b62df5c7d Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sun, 25 Sep 2011 15:12:56 -0700 Subject: [ticket/10390] Allow option for jQuery to be hosted by a remote CDN Add an option to the ACP so admins can choose to host jQuery from the local version shipped with phpBB, or via a popular CDN. PHPBB3-10390 --- phpBB/install/database_update.php | 1 + phpBB/install/schemas/schema_data.sql | 1 + 2 files changed, 2 insertions(+) (limited to 'phpBB/install') diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 18741191d8..1a47e2a656 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -2090,6 +2090,7 @@ function change_database_data(&$no_updates, $version) // Changes from 3.1.0-dev to 3.1.0-A1 case '3.1.0-dev': + set_config('load_jquery_host', 'localhost'); set_config('use_system_cron', 0); $sql = 'UPDATE ' . GROUPS_TABLE . ' diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 5506922e17..865189f345 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -165,6 +165,7 @@ 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_host', 'localhost'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jumpbox', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_moderators', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online', '1'); -- cgit v1.2.1 From 2dca3c3c278e99cfd6cdbea7149063d160e4cc11 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Mon, 26 Sep 2011 20:26:32 -0700 Subject: [ticket/10390] Serve jQuery from Google CDN Yes/No button in ACP jQuery will now be available via remote CDN from Google. Microsoft and jQuery CDNs have been removed, so we can simplify this option for the user. Default mode is NO so the copy of jQuery included with phpBB is served by default. PHPBB3-10390 --- phpBB/install/database_update.php | 3 ++- phpBB/install/schemas/schema_data.sql | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'phpBB/install') diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 1a47e2a656..1fa01a534d 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -2090,7 +2090,8 @@ function change_database_data(&$no_updates, $version) // Changes from 3.1.0-dev to 3.1.0-A1 case '3.1.0-dev': - set_config('load_jquery_host', 'localhost'); + set_config('load_jquery_cdn', 0); + set_config('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'); set_config('use_system_cron', 0); $sql = 'UPDATE ' . GROUPS_TABLE . ' diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 865189f345..843d6daaa7 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -165,7 +165,8 @@ 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_host', 'localhost'); +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.6.2/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'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online', '1'); -- cgit v1.2.1 From 1df2148bf4d12405018fcbe93cdbff7b9bf4174e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 13 Oct 2011 23:29:52 +0200 Subject: [ticket/10409] Running database_update.php multiple times breaks the update PHPBB3-10409 --- phpBB/install/database_update.php | 85 ++++++++++++++++++++++++++------------- 1 file changed, 57 insertions(+), 28 deletions(-) (limited to 'phpBB/install') diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 18741191d8..4507e5c371 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -2090,42 +2090,68 @@ function change_database_data(&$no_updates, $version) // Changes from 3.1.0-dev to 3.1.0-A1 case '3.1.0-dev': - set_config('use_system_cron', 0); - - $sql = 'UPDATE ' . GROUPS_TABLE . ' - SET group_teampage = 1 - WHERE group_type = ' . GROUP_SPECIAL . " - AND group_name = 'ADMINISTRATORS'"; - _sql($sql, $errored, $error_ary); - - $sql = 'UPDATE ' . GROUPS_TABLE . ' - SET group_teampage = 2 - WHERE group_type = ' . GROUP_SPECIAL . " - AND group_name = 'GLOBAL_MODERATORS'"; - _sql($sql, $errored, $error_ary); - - set_config('legend_sort_groupname', '0'); - set_config('teampage_multiple', '1'); - set_config('teampage_forums', '1'); + if (!isset($config['use_system_cron'])) + { + set_config('use_system_cron', 0); + } - $sql = 'SELECT group_id + $sql = 'SELECT group_teampage FROM ' . GROUPS_TABLE . ' - WHERE group_legend = 1 - ORDER BY group_name ASC'; - $result = $db->sql_query($sql); + WHERE group_teampage > 0'; + $result = $db->sql_query_limit($sql, 1); + $added_groups_teampage = (bool) $db->sql_fetchfield('group_teampage'); + $db->sql_freeresult($result); - $next_legend = 1; - while ($row = $db->sql_fetchrow($result)) + if (!$added_groups_teampage) { $sql = 'UPDATE ' . GROUPS_TABLE . ' - SET group_legend = ' . $next_legend . ' - WHERE group_id = ' . (int) $row['group_id']; + SET group_teampage = 1 + WHERE group_type = ' . GROUP_SPECIAL . " + AND group_name = 'ADMINISTRATORS'"; + _sql($sql, $errored, $error_ary); + + $sql = 'UPDATE ' . GROUPS_TABLE . ' + SET group_teampage = 2 + WHERE group_type = ' . GROUP_SPECIAL . " + AND group_name = 'GLOBAL_MODERATORS'"; _sql($sql, $errored, $error_ary); + } - $next_legend++; + if (!isset($config['use_system_cron'])) + { + set_config('legend_sort_groupname', '0'); + set_config('teampage_multiple', '1'); + set_config('teampage_forums', '1'); } + + $sql = 'SELECT group_legend + FROM ' . GROUPS_TABLE . ' + WHERE group_teampage > 1'; + $result = $db->sql_query_limit($sql, 1); + $updated_group_legend = (bool) $db->sql_fetchfield('group_teampage'); $db->sql_freeresult($result); - unset($next_legend); + + if (!$updated_group_legend) + { + $sql = 'SELECT group_id + FROM ' . GROUPS_TABLE . ' + WHERE group_legend = 1 + ORDER BY group_name ASC'; + $result = $db->sql_query($sql); + + $next_legend = 1; + while ($row = $db->sql_fetchrow($result)) + { + $sql = 'UPDATE ' . GROUPS_TABLE . ' + SET group_legend = ' . $next_legend . ' + WHERE group_id = ' . (int) $row['group_id']; + _sql($sql, $errored, $error_ary); + + $next_legend++; + } + $db->sql_freeresult($result); + unset($next_legend); + } // Install modules $modules_to_install = array( @@ -2229,7 +2255,10 @@ function change_database_data(&$no_updates, $version) } // Allow custom profile fields in pm templates - set_config('load_cpf_pm', '0'); + if (!isset($config['load_cpf_pm'])) + { + set_config('load_cpf_pm', '0'); + } $no_updates = false; break; -- cgit v1.2.1 From 7f42970ba005ca27f85e4375267bd32b8ad35341 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Fri, 14 Oct 2011 02:00:46 +0200 Subject: [feature/remove-imagesets] Fix create_schema_files, get rid of imagesets PHPBB3-10336 --- phpBB/install/schemas/mssql_schema.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/install') diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index fe69670ded..b78a1b7fdc 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -1307,7 +1307,7 @@ CREATE TABLE [phpbb_styles] ( [style_copyright] [varchar] (255) DEFAULT ('') NOT NULL , [style_active] [int] DEFAULT (1) NOT NULL , [template_id] [int] DEFAULT (0) NOT NULL , - [theme_id] [int] DEFAULT (0) NOT NULL + [theme_id] [int] DEFAULT (0) NOT NULL ) ON [PRIMARY] GO -- cgit v1.2.1 From 8cf22f552935417911306cb2830d7522791c9098 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Fri, 14 Oct 2011 03:41:02 +0200 Subject: [ticket/10189] Add "automatically generated" comment into schema-files PHPBB3-10189 --- phpBB/install/schemas/firebird_schema.sql | 5 +++++ phpBB/install/schemas/mssql_schema.sql | 8 ++++++++ phpBB/install/schemas/mysql_40_schema.sql | 5 +++++ phpBB/install/schemas/mysql_41_schema.sql | 5 +++++ phpBB/install/schemas/oracle_schema.sql | 8 ++++++++ phpBB/install/schemas/postgres_schema.sql | 8 ++++++++ phpBB/install/schemas/sqlite_schema.sql | 5 +++++ 7 files changed, 44 insertions(+) (limited to 'phpBB/install') diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 40041b13cb..852c62705e 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -1,3 +1,8 @@ +# 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. # # $Id: $ # diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index c4fc2d4eec..bcdb0dc236 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -1,3 +1,11 @@ +/* + * 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. + */ + /* $Id: $ diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index 06d32166f3..f0357afc23 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -1,3 +1,8 @@ +# 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. # # $Id: $ # diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index 1db2790ec7..97fe33dbdd 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -1,3 +1,8 @@ +# 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. # # $Id: $ # diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index 783261e365..d879da4048 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -1,3 +1,11 @@ +/* + * 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. + */ + /* $Id: $ diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index cf655cb1c7..f532492c2c 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -1,3 +1,11 @@ +/* + * 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. + */ + /* $Id: $ diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index dae1eb839c..5557e0a0b2 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -1,3 +1,8 @@ +# 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. # # $Id: $ # -- cgit v1.2.1 From c3f3435228accc44e2fd8d358c21b81f8ec66d87 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Fri, 14 Oct 2011 04:29:28 +0200 Subject: [ticket/10189] Get rid of $id$ from schema files PHPBB3-10189 --- phpBB/install/schemas/firebird_schema.sql | 4 ---- phpBB/install/schemas/mssql_schema.sql | 6 ------ phpBB/install/schemas/mysql_40_schema.sql | 4 ---- phpBB/install/schemas/mysql_41_schema.sql | 4 ---- phpBB/install/schemas/oracle_schema.sql | 6 ------ phpBB/install/schemas/postgres_schema.sql | 6 ------ phpBB/install/schemas/sqlite_schema.sql | 4 ---- 7 files changed, 34 deletions(-) (limited to 'phpBB/install') diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 852c62705e..73052f0a22 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -3,10 +3,6 @@ # To change the contents of this file, edit # phpBB/develop/create_schema_files.php and # run it. -# -# $Id: $ -# - # Table: 'phpbb_attachments' CREATE TABLE phpbb_attachments ( diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index bcdb0dc236..8ed3ba7e12 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -6,12 +6,6 @@ * run it. */ -/* - - $Id: $ - -*/ - /* Table: 'phpbb_attachments' */ diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index f0357afc23..42b7291d9d 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -3,10 +3,6 @@ # To change the contents of this file, edit # phpBB/develop/create_schema_files.php and # run it. -# -# $Id: $ -# - # Table: 'phpbb_attachments' CREATE TABLE phpbb_attachments ( attach_id mediumint(8) UNSIGNED NOT NULL auto_increment, diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index 97fe33dbdd..7a6d0ae188 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -3,10 +3,6 @@ # To change the contents of this file, edit # phpBB/develop/create_schema_files.php and # run it. -# -# $Id: $ -# - # Table: 'phpbb_attachments' CREATE TABLE phpbb_attachments ( attach_id mediumint(8) UNSIGNED NOT NULL auto_increment, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index d879da4048..6e7ec31efc 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -6,12 +6,6 @@ * run it. */ -/* - - $Id: $ - -*/ - /* 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 diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index f532492c2c..38f167bc7b 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -6,12 +6,6 @@ * run it. */ -/* - - $Id: $ - -*/ - BEGIN; /* diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 5557e0a0b2..c0574244ca 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -3,10 +3,6 @@ # To change the contents of this file, edit # phpBB/develop/create_schema_files.php and # run it. -# -# $Id: $ -# - BEGIN TRANSACTION; # Table: 'phpbb_attachments' -- cgit v1.2.1 From a3928bf82d7fd6a1da074716c08c547afc961346 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Fri, 14 Oct 2011 17:10:21 +0200 Subject: [feature/functional-tests] Generate config correctly and install only once PHPBB3-10414 --- phpBB/install/install_install.php | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'phpBB/install') diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index f8c54678bf..439bebf27e 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -876,33 +876,8 @@ class install_install extends module @chmod($phpbb_root_path . 'cache/install_lock', 0777); - $load_extensions = implode(',', $load_extensions); - // Time to convert the data provided into a config file - $config_data = " $available_dbms[$data['dbms']]['DRIVER'], - 'dbhost' => $data['dbhost'], - 'dbport' => $data['dbport'], - 'dbname' => $data['dbname'], - 'dbuser' => $data['dbuser'], - 'dbpasswd' => htmlspecialchars_decode($data['dbpasswd']), - 'table_prefix' => $data['table_prefix'], - 'acm_type' => 'file', - 'load_extensions' => $load_extensions, - ); - - foreach ($config_data_array as $key => $value) - { - $config_data .= "\${$key} = '" . str_replace("'", "\\'", str_replace('\\', '\\\\', $value)) . "';\n"; - } - unset($config_data_array); - - $config_data .= "\n@define('PHPBB_INSTALLED', true);\n"; - $config_data .= "// @define('DEBUG', true);\n"; - $config_data .= "// @define('DEBUG_EXTRA', true);\n"; + $config_data = phpbb_create_config_file_data($data, $available_dbms[$data['dbms']]['DRIVER'], $load_extensions); // Attempt to write out the config file directly. If it works, this is the easiest way to do it ... if ((file_exists($phpbb_root_path . 'config.' . $phpEx) && phpbb_is_writable($phpbb_root_path . 'config.' . $phpEx)) || phpbb_is_writable($phpbb_root_path)) -- cgit v1.2.1 From 65a34fd047f4ac1ff3638a568f44d3fe7d664d88 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 14 Oct 2011 00:54:11 +0200 Subject: [ticket/10410] Add option to display users in their first teampage group PHPBB3-10410 --- phpBB/install/database_update.php | 8 ++++++-- phpBB/install/schemas/schema_data.sql | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'phpBB/install') diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 4507e5c371..8450cc4ab7 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -2117,10 +2117,9 @@ function change_database_data(&$no_updates, $version) _sql($sql, $errored, $error_ary); } - if (!isset($config['use_system_cron'])) + if (!isset($config['legend_sort_groupname'])) { set_config('legend_sort_groupname', '0'); - set_config('teampage_multiple', '1'); set_config('teampage_forums', '1'); } @@ -2260,6 +2259,11 @@ function change_database_data(&$no_updates, $version) set_config('load_cpf_pm', '0'); } + if (!isset($config['teampage_memberships'])) + { + set_config('teampage_memberships', '1'); + } + $no_updates = false; break; } diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 5506922e17..4361ca45c3 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -243,7 +243,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_host', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_password', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_port', '25'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_username', ''); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('teampage_multiple', '1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('teampage_memberships', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('teampage_forums', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page', '25'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0'); -- cgit v1.2.1 From 6370ef27057643ee7fe0a6fbf2341c2ebdb57d4c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 17 Oct 2011 23:22:36 +0200 Subject: [ticket/9066] Disallow some database prefix to prevent same errors and problems With this patch database prefixes must not be empty and only contain alphanumeric characters, numbers and underscores. PHPBB3-9066 --- phpBB/install/install_install.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'phpBB/install') diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 9fe0c8aed5..bb1d858cfc 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -546,6 +546,11 @@ class install_install extends module $error[] = $lang['INST_ERR_NO_DB']; $connect_test = false; } + else if (!preg_match('#^[a-zA-Z][a-zA-Z0-9_]*$#', $data['table_prefix'], $result)) + { + $error[] = $lang['INST_ERR_DB_INVALID_PREFIX']; + $connect_test = false; + } else { $connect_test = connect_check_db(true, $error, $available_dbms[$data['dbms']], $data['table_prefix'], $data['dbhost'], $data['dbuser'], htmlspecialchars_decode($data['dbpasswd']), $data['dbname'], $data['dbport']); @@ -2032,7 +2037,7 @@ class install_install extends module 'dbname' => array('lang' => 'DB_NAME', 'type' => 'text:25:100', 'explain' => false), 'dbuser' => array('lang' => 'DB_USERNAME', 'type' => 'text:25:100', 'explain' => false), 'dbpasswd' => array('lang' => 'DB_PASSWORD', 'type' => 'password:25:100', 'explain' => false), - 'table_prefix' => array('lang' => 'TABLE_PREFIX', 'type' => 'text:25:100', 'explain' => false), + 'table_prefix' => array('lang' => 'TABLE_PREFIX', 'type' => 'text:25:100', 'explain' => true), ); var $admin_config_options = array( 'legend1' => 'ADMIN_CONFIG', -- cgit v1.2.1 From 3302305cd4a499603784aa87a40f5170d62a4f26 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 13 Nov 2011 16:11:32 +0100 Subject: [ticket/9066] Move regex into get_preg_expression function and add tests PHPBB3-9066 --- phpBB/install/install_install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/install') diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index bb1d858cfc..ccdcf211f1 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -546,7 +546,7 @@ class install_install extends module $error[] = $lang['INST_ERR_NO_DB']; $connect_test = false; } - else if (!preg_match('#^[a-zA-Z][a-zA-Z0-9_]*$#', $data['table_prefix'], $result)) + else if (!preg_match(get_preg_expression('table_prefix'), $data['table_prefix'])) { $error[] = $lang['INST_ERR_DB_INVALID_PREFIX']; $connect_test = false; -- cgit v1.2.1 From 815dd3591b2618f072791aeb7bf6d87492e690b0 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 15 Nov 2011 17:23:55 +0100 Subject: [ticket/10185] Always set board startdate on conversion The board startdate should always be set to first user registration date. The current code did not do anything at all, as the board_startdate was always set on installation before running the convertor. PHPBB3-10185 --- phpBB/install/install_convert.php | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'phpBB/install') diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 814b50cf68..62efc3e46b 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -1716,19 +1716,16 @@ class install_convert extends module fix_empty_primary_groups(); - if (!isset($config['board_startdate'])) - { - $sql = 'SELECT MIN(user_regdate) AS board_startdate - FROM ' . USERS_TABLE; - $result = $db->sql_query($sql); - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); + $sql = 'SELECT MIN(user_regdate) AS board_startdate + FROM ' . USERS_TABLE; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); - if (($row['board_startdate'] < $config['board_startdate'] && $row['board_startdate'] > 0) || !isset($config['board_startdate'])) - { - set_config('board_startdate', $row['board_startdate']); - $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_regdate = ' . $row['board_startdate'] . ' WHERE user_id = ' . ANONYMOUS); - } + if (!isset($config['board_startdate']) || ($row['board_startdate'] < $config['board_startdate'] && $row['board_startdate'] > 0)) + { + set_config('board_startdate', $row['board_startdate']); + $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_regdate = ' . $row['board_startdate'] . ' WHERE user_id = ' . ANONYMOUS); } update_dynamic_config(); -- cgit v1.2.1