diff options
Diffstat (limited to 'phpBB/install')
| -rw-r--r-- | phpBB/install/database_update.php | 21 | ||||
| -rw-r--r-- | phpBB/install/install_install.php | 1 | ||||
| -rw-r--r-- | phpBB/install/install_update.php | 2 |
3 files changed, 23 insertions, 1 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 297802c210..dde0fdcf47 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -113,6 +113,7 @@ $phpbb_container = phpbb_create_dumped_container_unless_debug( ), array( new phpbb_di_pass_collection_pass(), + new phpbb_di_pass_kernel_pass(), ), $phpbb_root_path, $phpEx @@ -2302,6 +2303,26 @@ function change_database_data(&$no_updates, $version) } } + // Disable receiving pms for bots + $sql = 'SELECT user_id + FROM ' . BOTS_TABLE; + $result = $db->sql_query($sql); + + $bot_user_ids = array(); + while ($row = $db->sql_fetchrow($result)) + { + $bot_user_ids[] = (int) $row['user_id']; + } + $db->sql_freeresult($result); + + if (!empty($bot_user_ids)) + { + $sql = 'UPDATE ' . USERS_TABLE . ' + SET user_allow_pm = 0 + WHERE ' . $db->sql_in_set('user_id', $bot_user_ids); + _sql($sql, $errored, $error_ary); + } + $no_updates = false; break; diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index f80b8b5661..51cdd5b329 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1772,6 +1772,7 @@ class install_install extends module 'user_timezone' => 'UTC', 'user_dateformat' => $lang['default_dateformat'], 'user_allow_massemail' => 0, + 'user_allow_pm' => 0, ); $user_id = user_add($user_row); diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 8c044550f3..7f40015002 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -71,7 +71,7 @@ class install_update extends module function main($mode, $sub) { - global $style, $template, $phpEx, $phpbb_root_path, $user, $db, $config, $cache, $auth, $language; + global $phpbb_style, $template, $phpEx, $phpbb_root_path, $user, $db, $config, $cache, $auth, $language; global $request; $this->tpl_name = 'install_update'; |
