mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
erm...
git-svn-id: file:///svn/phpbb/trunk@6855 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
8f4c3a1fee
commit
29ef0fdb86
1 changed files with 19 additions and 11 deletions
|
@ -1648,7 +1648,7 @@ function add_default_groups()
|
||||||
*/
|
*/
|
||||||
function add_bots()
|
function add_bots()
|
||||||
{
|
{
|
||||||
global $db, $convert, $user, $config;
|
global $db, $convert, $user, $config, $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'";
|
$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
@ -1723,6 +1723,11 @@ function add_bots()
|
||||||
'YahooSeeker [Bot]' => array('YahooSeeker/', ''),
|
'YahooSeeker [Bot]' => array('YahooSeeker/', ''),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!function_exists('user_add'))
|
||||||
|
{
|
||||||
|
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($bots as $bot_name => $bot_ary)
|
foreach ($bots as $bot_name => $bot_ary)
|
||||||
{
|
{
|
||||||
$user_row = array(
|
$user_row = array(
|
||||||
|
@ -1739,8 +1744,10 @@ function add_bots()
|
||||||
'user_allow_massemail' => 0,
|
'user_allow_massemail' => 0,
|
||||||
);
|
);
|
||||||
|
|
||||||
$user_id = $db->sql_nextid();
|
$user_id = user_add($user_row);
|
||||||
|
|
||||||
|
if ($user_id)
|
||||||
|
{
|
||||||
add_user_group($group_id, $user_id, false);
|
add_user_group($group_id, $user_id, false);
|
||||||
|
|
||||||
$sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
$sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
||||||
|
@ -1752,6 +1759,7 @@ function add_bots()
|
||||||
);
|
);
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue