1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 08:47:45 +02:00

- 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
This commit is contained in:
Meik Sievertsen
2009-06-23 10:48:53 +00:00
parent 926640fc75
commit c32f49679f
13 changed files with 76 additions and 17 deletions

View File

@@ -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']))
{
set_config('allow_avatar', '1');
if ($config['allow_avatar_upload'] || $config['allow_avatar_local'] || $config['allow_avatar_remote'])
{
set_config('allow_avatar', '1');
}
else
{
set_config('allow_avatar', '0');
}
}
else
// Minimum number of characters
if (!isset($config['min_post_chars']))
{
set_config('allow_avatar', '0');
set_config('min_post_chars', '1');
}
if (!isset($config['allow_quick_reply']))
{
set_config('allow_quick_reply', '1');
}
$no_updates = false;