diff options
Diffstat (limited to 'phpBB/install')
-rw-r--r-- | phpBB/install/convertors/convert_phpbb20.php | 3 | ||||
-rw-r--r-- | phpBB/install/convertors/functions_phpbb20.php | 4 | ||||
-rw-r--r-- | phpBB/install/database_update.php | 21 | ||||
-rw-r--r-- | phpBB/install/index.php | 34 | ||||
-rw-r--r-- | phpBB/install/install_convert.php | 20 | ||||
-rw-r--r-- | phpBB/install/install_install.php | 112 | ||||
-rw-r--r-- | phpBB/install/install_update.php | 20 | ||||
-rw-r--r-- | phpBB/install/schemas/schema_data.sql | 50 |
8 files changed, 152 insertions, 112 deletions
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php index 5d2398528b..30ff5119ab 100644 --- a/phpBB/install/convertors/convert_phpbb20.php +++ b/phpBB/install/convertors/convert_phpbb20.php @@ -38,7 +38,7 @@ $dbms = $phpbb_config_php_file->convert_30_dbms_to_31($dbms); $convertor_data = array( 'forum_name' => 'phpBB 2.0.x', 'version' => '1.0.3', - 'phpbb_version' => '3.1.3', + 'phpbb_version' => '3.1.6', 'author' => '<a href="https://www.phpbb.com/">phpBB Limited</a>', 'dbms' => $dbms, 'dbhost' => $dbhost, @@ -963,7 +963,6 @@ if (!$get_info) array('pf_phpbb_interests', 'users.user_interests', array('function1' => 'phpbb_set_encoding')), array('pf_phpbb_location', 'users.user_from', array('function1' => 'phpbb_set_encoding')), array('pf_phpbb_icq', 'users.user_icq', array('function1' => 'phpbb_set_encoding')), - array('pf_phpbb_wlm', 'users.user_msnm', array('function1' => 'phpbb_set_encoding')), array('pf_phpbb_yahoo', 'users.user_yim', array('function1' => 'phpbb_set_encoding')), array('pf_phpbb_aol', 'users.user_aim', array('function1' => 'phpbb_set_encoding')), array('pf_phpbb_website', 'users.user_website', 'validate_website'), diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index 48cff426b8..aa2c59f28c 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -661,7 +661,7 @@ function phpbb_convert_authentication($mode) 'auth_delete' => 'f_delete', 'auth_pollcreate' => 'f_poll', 'auth_vote' => 'f_vote', - 'auth_announce' => 'f_announce', + 'auth_announce' => array('f_announce', 'f_announce_global'), 'auth_sticky' => 'f_sticky', 'auth_attachments' => array('f_attach', 'f_download'), 'auth_download' => 'f_download', @@ -990,7 +990,7 @@ function phpbb_convert_authentication($mode) // We make sure that they have at least standard access to the forums they moderate in addition to the moderating permissions $mod_post_map = array( - 'auth_announce' => 'f_announce', + 'auth_announce' => array('f_announce', 'f_announce_global'), 'auth_sticky' => 'f_sticky' ); diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index ba6f0b3ba9..299467b5f3 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -80,11 +80,13 @@ require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler'); // Set up container (must be done here because extensions table may not exist) -$phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx); -$phpbb_container_builder->set_use_extensions(false); -$phpbb_container_builder->set_use_kernel_pass(false); -$phpbb_container_builder->set_dump_container(false); -$phpbb_container = $phpbb_container_builder->get_container(); +$phpbb_container_builder = new \phpbb\di\container_builder($phpbb_root_path, $phpEx); +$phpbb_container = $phpbb_container_builder + ->with_config($phpbb_config_php_file) + ->without_extensions() + ->without_cache() + ->get_container() +; // set up caching /* @var $cache \phpbb\cache\service */ @@ -183,7 +185,10 @@ define('IN_DB_UPDATE', true); /* @var $migrator \phpbb\db\migrator */ $migrator = $phpbb_container->get('migrator'); -$migrator->set_output_handler(new \phpbb\db\log_wrapper_migrator_output_handler($user, new \phpbb\db\html_migrator_output_handler($user), $phpbb_root_path . 'store/migrations_' . time() . '.log')); + +/** @var \phpbb\filesystem\filesystem_interface $phpbb_filesystem */ +$phpbb_filesystem = $phpbb_container->get('filesystem'); +$migrator->set_output_handler(new \phpbb\db\log_wrapper_migrator_output_handler($user, new \phpbb\db\html_migrator_output_handler($user), $phpbb_root_path . 'store/migrations_' . time() . '.log', $phpbb_filesystem)); $migrator->create_migrations_table(); @@ -200,8 +205,8 @@ $migrator->set_migrations($migrations); // What is a safe limit of execution time? Half the max execution time should be safe. // No more than 15 seconds so the user isn't sitting and waiting for a very long time -$phpbb_ini = new \phpbb\php\ini(); -$safe_time_limit = min(15, ($phpbb_ini->get_int('max_execution_time') / 2)); +$phpbb_ini = new \bantu\IniGetWrapper\IniGetWrapper(); +$safe_time_limit = min(15, ($phpbb_ini->getNumeric('max_execution_time') / 2)); // While we're going to try limit this to half the max execution time, // we want to try and take additional measures to prevent hitting the diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 811034f064..6320b14947 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -22,9 +22,9 @@ define('PHPBB_ENVIRONMENT', 'production'); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); -if (version_compare(PHP_VERSION, '5.3.9') < 0) +if (version_compare(PHP_VERSION, '5.4') < 0) { - die('You are running an unsupported PHP version. Please upgrade to PHP 5.3.9 or higher before trying to install phpBB 3.1'); + die('You are running an unsupported PHP version. Please upgrade to PHP 5.4 or higher before trying to install phpBB 3.2'); } function phpbb_require_updated($path, $optional = false) @@ -116,18 +116,18 @@ $phpbb_class_loader_ext->register(); // Set up container $phpbb_config_php_file = new \phpbb\config_php_file($phpbb_root_path, $phpEx); -$phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx); -$phpbb_container_builder->set_use_extensions(false); -$phpbb_container_builder->set_dump_container(false); -$phpbb_container_builder->set_use_custom_pass(false); -$phpbb_container_builder->set_inject_config(false); -$phpbb_container_builder->set_compile_container(false); +$phpbb_container_builder = new \phpbb\di\container_builder($phpbb_root_path, $phpEx); +$phpbb_container_builder + ->without_extensions() + ->without_cache() + ->without_compiled_container() +; $other_config_path = $phpbb_root_path . 'install/update/new/config/'; $config_path = file_exists($other_config_path . 'services.yml') ? $other_config_path : $phpbb_root_path . 'config/'; -$phpbb_container_builder->set_config_path($config_path); +$phpbb_container_builder->with_config_path($config_path); -$phpbb_container_builder->set_custom_parameters(array( +$phpbb_container_builder->with_custom_parameters(array( 'core.root_path' => $phpbb_root_path, 'core.adm_relative_path' => $phpbb_adm_relative_path, 'core.php_ext' => $phpEx, @@ -138,6 +138,7 @@ $phpbb_container_builder->set_custom_parameters(array( $phpbb_container = $phpbb_container_builder->get_container(); $phpbb_container->register('dbal.conn.driver')->setSynthetic(true); $phpbb_container->register('template.twig.environment')->setSynthetic(true); +$phpbb_container->register('language.loader')->setSynthetic(true); $phpbb_container->compile(); $phpbb_class_loader->set_cache($phpbb_container->get('cache.driver')); @@ -241,7 +242,8 @@ $sub = $request->variable('sub', ''); // Set PHP error handler to ours set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler'); -$user = new \phpbb\user('\phpbb\datetime'); +$lang_service = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)); +$user = new \phpbb\user($lang_service, '\phpbb\datetime'); $auth = new \phpbb\auth\auth(); // Add own hook handler, if present. :o @@ -270,7 +272,7 @@ $config = new \phpbb\config\config(array( /* @var $symfony_request \phpbb\symfony_request */ $symfony_request = $phpbb_container->get('symfony_request'); -/* @var $phpbb_filesystem \phpbb\filesystem */ +/* @var $phpbb_filesystem \phpbb\filesystem\filesystem_interface */ $phpbb_filesystem = $phpbb_container->get('filesystem'); /* @var $phpbb_path_helper \phpbb\path_helper */ @@ -279,6 +281,7 @@ $cache_path = $phpbb_root_path . 'cache/'; $twig_environment = new \phpbb\template\twig\environment( $config, + $phpbb_filesystem, $phpbb_path_helper, $phpbb_container, $cache_path, @@ -286,14 +289,17 @@ $twig_environment = new \phpbb\template\twig\environment( $phpbb_container->get('template.twig.loader') ); +$language_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx); $phpbb_container->set('template.twig.environment', $twig_environment); +$phpbb_container->set('language.loader', $language_loader); +$twig_context = new \phpbb\template\context(); $template = new \phpbb\template\twig\twig( $phpbb_path_helper, $config, - $user, - new \phpbb\template\context(), + $twig_context, $twig_environment, $cache_path, + $user, array($phpbb_container->get('template.twig.extensions.phpbb')) ); diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index 506bece9c9..d72ee1a633 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -96,6 +96,9 @@ class install_convert extends module /** @var string */ protected $php_ext; + /** @var \phpbb\filesystem\filesystem_interface */ + protected $filesystem; + /** * Variables used while converting, they are accessible from the global variable $convert */ @@ -116,6 +119,7 @@ class install_convert extends module $this->template = $template; $this->phpbb_root_path = $phpbb_root_path; $this->php_ext = $phpEx; + $this->filesystem = new \phpbb\filesystem\filesystem(); if (!$this->check_phpbb_installed()) { @@ -127,8 +131,8 @@ class install_convert extends module // Enable super globals to prevent issues with the new \phpbb\request\request object $request->enable_super_globals(); // Create a normal container now - $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx); - $phpbb_container = $phpbb_container_builder->get_container(); + $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_root_path, $phpEx); + $phpbb_container = $phpbb_container_builder->with_config($phpbb_config_php_file)->get_container(); // Create cache /* @var $cache \phpbb\cache\service */ @@ -149,7 +153,7 @@ class install_convert extends module unset($dbpasswd); // We need to fill the config to let internal functions correctly work - $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE); + $config = new \phpbb\config\db($db, new \phpbb\cache\driver\dummy, CONFIG_TABLE); // Detect if there is already a conversion in progress at this point and offer to resume // It's quite possible that the user will get disconnected during a large conversion so they need to be able to resume it @@ -388,7 +392,7 @@ class install_convert extends module $this->page_title = $lang['STAGE_SETTINGS']; // We need to fill the config to let internal functions correctly work - $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE); + $config = new \phpbb\config\db($db, new \phpbb\cache\driver\dummy, CONFIG_TABLE); $convertor_tag = $request->variable('tag', ''); @@ -621,7 +625,7 @@ class install_convert extends module { global $template, $user, $phpbb_root_path, $phpEx, $db, $lang, $config, $cache, $auth; global $convert, $convert_row, $message_parser, $skip_rows, $language; - global $request, $phpbb_config_php_file; + global $request, $phpbb_config_php_file, $phpbb_dispatcher; extract($phpbb_config_php_file->get_all()); @@ -635,7 +639,7 @@ class install_convert extends module unset($dbpasswd); // We need to fill the config to let internal functions correctly work - $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE); + $config = new \phpbb\config\db($db, new \phpbb\cache\driver\dummy, CONFIG_TABLE); // Override a couple of config variables for the duration $config['max_quote_depth'] = 0; @@ -796,7 +800,7 @@ class install_convert extends module } $error = false; - $convert->fulltext_search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user); + $convert->fulltext_search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher); if ($error) { @@ -859,7 +863,7 @@ class install_convert extends module $this->p_master->error($user->lang['DEV_NO_TEST_FILE'], __LINE__, __FILE__); } - if (!$local_path || !phpbb_is_writable($phpbb_root_path . $local_path)) + if (!$local_path || !$this->filesystem->is_writable($phpbb_root_path . $local_path)) { if (!$local_path) { diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index e38c9c5bdf..da6dcb085e 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -43,9 +43,15 @@ if (!empty($setmodules)) */ class install_install extends module { + /** + * @var \phpbb\filesystem\filesystem_interface + */ + protected $filesystem; + function install_install(&$p_master) { $this->p_master = &$p_master; + $this->filesystem = new \phpbb\filesystem\filesystem(); } function main($mode, $sub) @@ -104,8 +110,8 @@ class install_install extends module $request->enable_super_globals(); // Create a normal container now - $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx); - $phpbb_container = $phpbb_container_builder->get_container(); + $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_root_path, $phpEx); + $phpbb_container = $phpbb_container_builder->with_config($phpbb_config_php_file)->get_container(); // Sets the global variables /* @var $cache \phpbb\cache\service */ @@ -157,7 +163,7 @@ class install_install extends module // Test the minimum PHP version $php_version = PHP_VERSION; - if (version_compare($php_version, '5.3.9') < 0) + if (version_compare($php_version, '5.4') < 0) { $result = '<strong style="color:red">' . $lang['NO'] . '</strong>'; } @@ -466,13 +472,29 @@ class install_install extends module if (!file_exists($phpbb_root_path . $dir)) { @mkdir($phpbb_root_path . $dir, 0777); - phpbb_chmod($phpbb_root_path . $dir, CHMOD_READ | CHMOD_WRITE); + + try + { + $this->filesystem->phpbb_chmod($phpbb_root_path . $dir, CHMOD_READ | CHMOD_WRITE); + } + catch (\phpbb\filesystem\exception\filesystem_exception $e) + { + // Do nothing + } } // Now really check if (file_exists($phpbb_root_path . $dir) && is_dir($phpbb_root_path . $dir)) { - phpbb_chmod($phpbb_root_path . $dir, CHMOD_READ | CHMOD_WRITE); + try + { + $this->filesystem->phpbb_chmod($phpbb_root_path . $dir, CHMOD_READ | CHMOD_WRITE); + } + catch (\phpbb\filesystem\exception\filesystem_exception $e) + { + // Do nothing + } + $exists = true; } @@ -514,7 +536,7 @@ class install_install extends module $write = $exists = true; if (file_exists($phpbb_root_path . $dir)) { - if (!phpbb_is_writable($phpbb_root_path . $dir)) + if (!$this->filesystem->is_writable($phpbb_root_path . $dir)) { $write = false; } @@ -892,7 +914,7 @@ class install_install extends module $config_data = phpbb_create_config_file_data($data, $available_dbms[$data['dbms']]['DRIVER']); // 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)) + if ((file_exists($phpbb_root_path . 'config.' . $phpEx) && $this->filesystem->is_writable($phpbb_root_path . 'config.' . $phpEx)) || $this->filesystem->is_writable($phpbb_root_path)) { // Assume it will work ... if nothing goes wrong below $written = true; @@ -914,7 +936,14 @@ class install_install extends module if ($written) { // We may revert back to chmod() if we see problems with users not able to change their config.php file directly - phpbb_chmod($phpbb_root_path . 'config.' . $phpEx, CHMOD_READ); + try + { + $this->filesystem->phpbb_chmod($phpbb_root_path . 'config.' . $phpEx, CHMOD_READ); + } + catch (\phpbb\filesystem\exception\filesystem_exception $e) + { + // Do nothing + } } } @@ -1167,12 +1196,10 @@ class install_install extends module foreach ($sql_query as $sql) { - //$sql = trim(str_replace('|', ';', $sql)); - if (!$db->sql_query($sql)) - { - $error = $db->sql_error(); - $this->p_master->db_error($error['message'], $sql, __LINE__, __FILE__); - } + // Ignore errors when the functions or types already exist + // to allow installing phpBB twice in the same database with + // a different prefix + $db->sql_query($sql); } unset($sql_query); } @@ -1195,7 +1222,7 @@ class install_install extends module include($phpbb_root_path . 'includes/constants.' . $phpEx); } - $finder = new \phpbb\finder(new \phpbb\filesystem(), $phpbb_root_path, null, $phpEx); + $finder = new \phpbb\finder(new \phpbb\filesystem\filesystem(), $phpbb_root_path, null, $phpEx); $classes = $finder->core_path('phpbb/db/migration/data/') ->get_classes(); @@ -1467,7 +1494,7 @@ class install_install extends module */ function build_search_index($mode, $sub) { - global $db, $lang, $phpbb_root_path, $phpEx, $config, $auth, $user; + global $db, $lang, $phpbb_root_path, $phpbb_dispatcher, $phpEx, $config, $auth, $user; // Obtain any submitted data $data = $this->get_submitted_data(); @@ -1495,10 +1522,10 @@ class install_install extends module include_once($phpbb_root_path . 'phpbb/search/fulltext_native.' . $phpEx); // We need to fill the config to let internal functions correctly work - $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE); + $config = new \phpbb\config\db($db, new \phpbb\cache\driver\dummy, CONFIG_TABLE); $error = false; - $search = new \phpbb\search\fulltext_native($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user); + $search = new \phpbb\search\fulltext_native($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher); $sql = 'SELECT post_id, post_subject, post_text, poster_id, forum_id FROM ' . POSTS_TABLE; @@ -1525,9 +1552,14 @@ class install_install extends module $phpbb_extension_manager = $phpbb_container->get('ext.manager'); } - include_once($phpbb_root_path . 'includes/acp/acp_modules.' . $phpEx); - - $_module = new acp_modules(); + $_module = new \phpbb\module\module_manager( + new \phpbb\cache\driver\dummy(), + $db, + $phpbb_extension_manager, + MODULES_TABLE, + $phpbb_root_path, + $phpEx + ); $module_classes = array('acp', 'mcp', 'ucp'); // Add categories @@ -1558,7 +1590,7 @@ class install_install extends module ); // Add category - $_module->update_module_data($module_data, true); + $_module->update_module_data($module_data); // Check for last sql error happened if ($db->get_sql_error_triggered()) @@ -1592,7 +1624,7 @@ class install_install extends module 'module_auth' => '', ); - $_module->update_module_data($module_data, true); + $_module->update_module_data($module_data); // Check for last sql error happened if ($db->get_sql_error_triggered()) @@ -1608,7 +1640,7 @@ class install_install extends module } // Get the modules we want to add... returned sorted by name - $module_info = $_module->get_module_infos('', $module_class); + $module_info = $_module->get_module_infos($module_class); foreach ($module_info as $module_basename => $fileinfo) { @@ -1632,7 +1664,7 @@ class install_install extends module 'module_auth' => $row['auth'], ); - $_module->update_module_data($module_data, true); + $_module->update_module_data($module_data); // Check for last sql error happened if ($db->get_sql_error_triggered()) @@ -1657,7 +1689,7 @@ class install_install extends module $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - $_module->move_module_by($row, 'move_up', 4); + $_module->move_module_by($row, 'acp', 'move_up', 4); // Move permissions intro screen module 4 up... $sql = 'SELECT * @@ -1669,7 +1701,7 @@ class install_install extends module $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - $_module->move_module_by($row, 'move_up', 4); + $_module->move_module_by($row, 'acp', 'move_up', 4); // Move manage users screen module 5 up... $sql = 'SELECT * @@ -1681,7 +1713,7 @@ class install_install extends module $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - $_module->move_module_by($row, 'move_up', 5); + $_module->move_module_by($row, 'acp', 'move_up', 5); // Move extension management module 1 up... $sql = 'SELECT * @@ -1694,7 +1726,7 @@ class install_install extends module $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - $_module->move_module_by($row, 'move_up', 1); + $_module->move_module_by($row, 'acp', 'move_up', 1); } if ($module_class == 'mcp') @@ -1709,7 +1741,7 @@ class install_install extends module $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - $_module->move_module_by($row, 'move_down', 3); + $_module->move_module_by($row, 'mcp', 'move_down', 3); // Move closed pm reports module 3 down... $sql = 'SELECT * @@ -1721,7 +1753,7 @@ class install_install extends module $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - $_module->move_module_by($row, 'move_down', 3); + $_module->move_module_by($row, 'mcp', 'move_down', 3); // Move open pm reports module 3 down... $sql = 'SELECT * @@ -1733,7 +1765,7 @@ class install_install extends module $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - $_module->move_module_by($row, 'move_down', 3); + $_module->move_module_by($row, 'mcp', 'move_down', 3); } if ($module_class == 'ucp') @@ -1748,7 +1780,7 @@ class install_install extends module $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - $_module->move_module_by($row, 'move_down', 4); + $_module->move_module_by($row, 'ucp', 'move_down', 4); // Move notification options module 4 down... $sql = 'SELECT * @@ -1760,7 +1792,7 @@ class install_install extends module $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - $_module->move_module_by($row, 'move_down', 4); + $_module->move_module_by($row, 'ucp', 'move_down', 4); // Move OAuth module 5 down... $sql = 'SELECT * @@ -1772,7 +1804,7 @@ class install_install extends module $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - $_module->move_module_by($row, 'move_down', 5); + $_module->move_module_by($row, 'ucp', 'move_down', 5); } // And now for the special ones @@ -1811,7 +1843,7 @@ class install_install extends module 'module_auth' => $row['module_auth'], ); - $_module->update_module_data($module_data, true); + $_module->update_module_data($module_data); // Check for last sql error happened if ($db->get_sql_error_triggered()) @@ -1823,7 +1855,7 @@ class install_install extends module } } - $_module->remove_cache_file(); + $_module->remove_cache_file($module_class); } } @@ -1910,7 +1942,7 @@ class install_install extends module $data = $this->get_submitted_data(); // We need to fill the config to let internal functions correctly work - $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE); + $config = new \phpbb\config\db($db, new \phpbb\cache\driver\dummy, CONFIG_TABLE); $sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " @@ -1982,7 +2014,7 @@ class install_install extends module $data = $this->get_submitted_data(); // We need to fill the config to let internal functions correctly work - $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE); + $config = new \phpbb\config\db($db, new \phpbb\cache\driver\dummy, CONFIG_TABLE); $user->session_begin(); $auth->login($data['admin_name'], $data['admin_pass1'], false, true, true); @@ -2031,7 +2063,7 @@ class install_install extends module { global $config, $phpbb_root_path; - if (!phpbb_is_writable($phpbb_root_path . 'images/avatars/upload/')) + if (!$this->filesystem->is_writable($phpbb_root_path . 'images/avatars/upload/')) { $config->set('allow_avatar', 0); $config->set('allow_avatar_upload', 0); diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 0ec6897607..d9ba2e7fe9 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -55,6 +55,8 @@ class install_update extends module var $update_to_version; + protected $filesystem; + // Set to false var $test_update = false; @@ -74,12 +76,16 @@ class install_update extends module $request->enable_super_globals(); // Create a normal container now - $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx); - $phpbb_container_builder->set_dump_container(false); - $phpbb_container_builder->set_use_extensions(false); + $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_root_path, $phpEx); + $phpbb_container = $phpbb_container_builder + ->with_config($phpbb_config_php_file) + ->without_cache() + ->without_extensions() + ; + if (file_exists($phpbb_root_path . 'install/update/new/config')) { - $phpbb_container_builder->set_config_path($phpbb_root_path . 'install/update/new/config'); + $phpbb_container_builder->with_config_path($phpbb_root_path . 'install/update/new/config'); } $phpbb_container = $phpbb_container_builder->get_container(); @@ -87,6 +93,8 @@ class install_update extends module /* @var $cache \phpbb\cache\service */ $cache = $phpbb_container->get('cache'); + $this->filesystem = $phpbb_container->get('filesystem'); + $this->tpl_name = 'install_update'; $this->page_title = 'UPDATE_INSTALLATION'; @@ -114,7 +122,7 @@ class install_update extends module unset($dbpasswd); // We need to fill the config to let internal functions correctly work - $config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE); + $config = new \phpbb\config\db($db, new \phpbb\cache\driver\dummy, CONFIG_TABLE); // Force template recompile $config['load_tplcompile'] = 1; @@ -961,7 +969,7 @@ class install_update extends module // Now init the connection if ($update_mode == 'download') { - if (function_exists('phpbb_is_writable') && !phpbb_is_writable($phpbb_root_path . 'store/')) + if ($this->filesystem->is_writable($phpbb_root_path . 'store/')) { trigger_error(sprintf('The directory ā%sā is not writable.', $phpbb_root_path . 'store/'), E_USER_ERROR); } diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 1f856f016c..680341b855 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -41,6 +41,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_pm', '1' INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_smilies', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_smilies', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_topic_notify', '1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allowed_schemes_links', 'http,https,ftp'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('assets_version', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('attachment_quota', '52428800'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_bbcode_pm', '1'); @@ -107,6 +108,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_max_chunk_si 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_mod_rewrite', '0'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_board_notifications', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_pm_icons', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_post_confirm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_enable', '1'); @@ -309,6 +311,7 @@ INSERT INTO phpbb_config_text (config_name, config_value) VALUES ('contact_admin # -- 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); +INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_announce_global', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_attach', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_bbcode', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_bump', 1); @@ -355,6 +358,7 @@ INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_soft # -- Global moderator auth option (not a local option) INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_ban', 0, 1); +INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_pm_report', 0, 1); INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_warn', 0, 1); # -- Admin related auth options @@ -542,7 +546,7 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 11, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option NOT IN ('m_ban', 'm_chgposter'); # Simple Moderator (m_) -INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 12, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_delete', 'm_softdelete', 'm_edit', 'm_info', 'm_report'); +INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 12, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_delete', 'm_softdelete', 'm_edit', 'm_info', 'm_report', 'm_pm_report'); # Queue Moderator (m_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 13, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_approve', 'm_edit'); @@ -551,7 +555,7 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 14, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%'; # Standard Access (f_) -INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 15, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_flash', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock'); +INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 15, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_announce_global', 'f_flash', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock'); # No Access (f_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 16, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option = 'f_'; @@ -560,20 +564,20 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 17, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_', 'f_download', 'f_list', 'f_read', 'f_search', 'f_subscribe', 'f_print'); # Limited Access (f_) -INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 18, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_attach', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock', 'f_votechg'); +INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 18, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_announce_global', 'f_attach', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock', 'f_votechg'); # Bot Access (f_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 19, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_', 'f_download', 'f_list', 'f_read', 'f_print'); # On Moderation Queue (f_) -INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 20, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock', 'f_votechg', 'f_noapprove'); +INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 20, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_announce_global', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock', 'f_votechg', 'f_noapprove'); INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 20, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_noapprove'); # Standard Access + Polls (f_) -INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 21, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_flash', 'f_ignoreflood', 'f_sticky', 'f_user_lock'); +INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 21, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_announce_global', 'f_flash', 'f_ignoreflood', 'f_sticky', 'f_user_lock'); # Limited Access + Polls (f_) -INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 22, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_attach', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_sticky', 'f_user_lock', 'f_votechg'); +INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 22, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_announce_global', 'f_attach', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_sticky', 'f_user_lock', 'f_votechg'); # New Member (u_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 23, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_sendpm', 'u_masspm', 'u_masspm_group', 'u_chgprofileinfo'); @@ -715,10 +719,7 @@ INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mo 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, 1, '', 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, ''); INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('FLASH_FILES', 5, 0, 1, '', 0, ''); -INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('QUICKTIME_MEDIA', 6, 0, 1, '', 0, ''); INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('DOWNLOADABLE_FILES', 0, 0, 1, '', 0, ''); # -- extensions @@ -775,27 +776,13 @@ INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'ods'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'odt'); INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'rtf'); -INSERT INTO phpbb_extensions (group_id, extension) VALUES (5, 'rm'); -INSERT INTO phpbb_extensions (group_id, extension) VALUES (5, 'ram'); +INSERT INTO phpbb_extensions (group_id, extension) VALUES (5, 'swf'); -INSERT INTO phpbb_extensions (group_id, extension) VALUES (6, 'wma'); -INSERT INTO phpbb_extensions (group_id, extension) VALUES (6, 'wmv'); - -INSERT INTO phpbb_extensions (group_id, extension) VALUES (7, 'swf'); - -INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'mov'); -INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'm4v'); -INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'm4a'); -INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'mp4'); -INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, '3gp'); -INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, '3g2'); -INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'qt'); - -INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'mpeg'); -INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'mpg'); -INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'mp3'); -INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogg'); -INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogm'); +INSERT INTO phpbb_extensions (group_id, extension) VALUES (6, 'mp3'); +INSERT INTO phpbb_extensions (group_id, extension) VALUES (6, 'mpeg'); +INSERT INTO phpbb_extensions (group_id, extension) VALUES (6, 'mpg'); +INSERT INTO phpbb_extensions (group_id, extension) VALUES (6, 'ogg'); +INSERT INTO phpbb_extensions (group_id, extension) VALUES (6, 'ogm'); # Add default profile fields 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_location', 'profilefields.type.string', 'phpbb_location', '20', '2', '100', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, '', ''); @@ -804,7 +791,6 @@ 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_occupation', 'profilefields.type.text', 'phpbb_occupation', '3|30', '2', '500', '', '', '.*', 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, '', ''); 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_aol', 'profilefields.type.string', 'phpbb_aol', '40', '5', '255', '', '', '.*', 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 5, 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_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', 'ymsgr:sendim?%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_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'); @@ -813,9 +799,9 @@ 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_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('notification.type.post', 0, 2, ''); +INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('notification.type.post', 0, 2, 'notification.method.board'); INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('notification.type.post', 0, 2, 'notification.method.email'); -INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('notification.type.topic', 0, 2, ''); +INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('notification.type.topic', 0, 2, 'notification.method.board'); INSERT INTO phpbb_user_notifications (item_type, item_id, user_id, method) VALUES('notification.type.topic', 0, 2, 'notification.method.email'); # POSTGRES COMMIT # |