diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2009-06-23 10:48:53 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2009-06-23 10:48:53 +0000 |
commit | c32f49679f635175d43de7264ee09782c56c628e (patch) | |
tree | be5368798e1bf839e42b6c28ffa5d126dd5fbc96 /phpBB/install/database_update.php | |
parent | 926640fc750ad2d90d4c86b234350dbdd0cc938c (diff) | |
download | forums-c32f49679f635175d43de7264ee09782c56c628e.tar forums-c32f49679f635175d43de7264ee09782c56c628e.tar.gz forums-c32f49679f635175d43de7264ee09782c56c628e.tar.bz2 forums-c32f49679f635175d43de7264ee09782c56c628e.tar.xz forums-c32f49679f635175d43de7264ee09782c56c628e.zip |
- add options for quick reply (forum-based and board-wide)
- add option for minimum post chars (which is a required setting for quick reply, therefore we introduce it here)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9656 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/database_update.php')
-rw-r--r-- | phpBB/install/database_update.php | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 44bcf2a112..c3f8b40de6 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -1200,9 +1200,19 @@ function change_database_data(&$no_updates, $version) } } - // Set every members user_new column to 0 (old users) - $sql = 'UPDATE ' . USERS_TABLE . ' SET user_new = 0'; - _sql($sql, $errored, $error_ary); + // Set every members user_new column to 0 (old users) only if there is no one yet (this makes sure we do not execute this more than once) + $sql = 'SELECT 1 + FROM ' . USERS_TABLE . ' + WHERE user_new = 0'; + $result = $db->sql_query_limit($sql, 1); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if (!$row) + { + $sql = 'UPDATE ' . USERS_TABLE . ' SET user_new = 0'; + _sql($sql, $errored, $error_ary); + } // Newly registered users limit if (!isset($config['new_member_post_limit'])) @@ -1246,13 +1256,27 @@ function change_database_data(&$no_updates, $version) $auth_admin = new auth_admin(); $auth_admin->acl_clear_prefetch(); - if ($config['allow_avatar_upload'] || $config['allow_avatar_local'] || $config['allow_avatar_remote']) + if (!isset($config['allow_avatar'])) + { + if ($config['allow_avatar_upload'] || $config['allow_avatar_local'] || $config['allow_avatar_remote']) + { + set_config('allow_avatar', '1'); + } + else + { + set_config('allow_avatar', '0'); + } + } + + // Minimum number of characters + if (!isset($config['min_post_chars'])) { - set_config('allow_avatar', '1'); + set_config('min_post_chars', '1'); } - else + + if (!isset($config['allow_quick_reply'])) { - set_config('allow_avatar', '0'); + set_config('allow_quick_reply', '1'); } $no_updates = false; |