1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 23:25:30 +02:00

some fixes...

git-svn-id: file:///svn/phpbb/trunk@6854 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2007-01-07 17:25:47 +00:00
parent ec7936509a
commit 8f4c3a1fee
3 changed files with 16 additions and 18 deletions

View File

@ -1648,7 +1648,7 @@ function add_default_groups()
*/
function add_bots()
{
global $db, $convert, $user;
global $db, $convert, $user, $config;
$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'";
$result = $db->sql_query($sql);
@ -1725,22 +1725,19 @@ function add_bots()
foreach ($bots as $bot_name => $bot_ary)
{
$sql = 'INSERT INTO ' . USERS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
'user_type' => GROUP_HIDDEN,
'group_id' => $group_id,
'username' => $bot_name,
'username_clean' => utf8_clean_string($bot_name),
'user_regdate' => time(),
'user_permissions' => '',
'user_sig' => '',
'user_interests' => '',
'user_password' => '',
'user_lang' => 'en',
'user_style' => 1,
'user_rank' => 1,
'user_colour' => '9E8DA7')
$user_row = array(
'user_type' => USER_IGNORE,
'group_id' => $group_id,
'username' => $bot_name,
'user_regdate' => time(),
'user_password' => '',
'user_colour' => '9E8DA7',
'user_email' => '',
'user_lang' => $config['default_lang'],
'user_style' => 1,
'user_timezone' => 0,
'user_allow_massemail' => 0,
);
$db->sql_query($sql);
$user_id = $db->sql_nextid();

View File

@ -813,6 +813,7 @@ if (!$get_info)
array('user_icq', 'users.user_icq', ''),
array('user_from', 'users.user_from', 'utf8_htmlspecialchars'),
array('user_rank', 'users.user_rank', ''),
array('user_permissions', '', ''),
array('user_avatar', 'users.user_avatar', 'phpbb_import_avatar'),
array('user_avatar_type', 'users.user_avatar_type', 'phpbb_avatar_type'),

View File

@ -893,7 +893,7 @@ class install_convert extends module
$template->assign_block_vars('checks', array(
'TITLE' => "skip_rows = $skip_rows",
'RESULT' => $rows . ((defined('DEBUG_EXTRA')) ? ceil(memory_get_usage()/1024) . ' KB' : ''),
'RESULT' => $rows . ((defined('DEBUG_EXTRA') && function_exists('memory_get_usage')) ? ceil(memory_get_usage()/1024) . ' KB' : ''),
));
$mtime = explode(' ', microtime());
@ -1125,7 +1125,7 @@ class install_convert extends module
sync('topic', 'range', 'topic_id BETWEEN ' . $sync_batch . ' AND ' . $end, true, true);
$template->assign_block_vars('checks', array(
'TITLE' => sprintf($user->lang['SYNC_TOPIC_ID'], $sync_batch, ($sync_batch + $batch_size)) . ((defined('DEBUG_EXTRA')) ? ' [' . ceil(memory_get_usage()/1024) . ' KB]' : ''),
'TITLE' => sprintf($user->lang['SYNC_TOPIC_ID'], $sync_batch, ($sync_batch + $batch_size)) . ((defined('DEBUG_EXTRA') && function_exists('memory_get_usage')) ? ' [' . ceil(memory_get_usage()/1024) . ' KB]' : ''),
'RESULT' => $user->lang['DONE'],
));