mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
okay, enough
git-svn-id: file:///svn/phpbb/trunk@8222 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
5f37327568
commit
ce8be416d8
1 changed files with 54 additions and 105 deletions
|
@ -22,97 +22,6 @@ $user->session_begin();
|
|||
$auth->acl($user->data);
|
||||
$user->setup();
|
||||
|
||||
$bots = array(
|
||||
'AdsBot [Google]',
|
||||
'Alexa [Bot]',
|
||||
'Alta Vista [Bot]',
|
||||
'Ask Jeeves [Bot]',
|
||||
'Baidu [Spider]',
|
||||
'Exabot [Bot]',
|
||||
'FAST Enterprise [Crawler]',
|
||||
'FAST WebCrawler [Crawler]',
|
||||
'Francis [Bot]',
|
||||
'Gigabot [Bot]',
|
||||
'Google Adsense [Bot]',
|
||||
'Google Desktop',
|
||||
'Google Feedfetcher',
|
||||
'Google [Bot]',
|
||||
'Heise IT-Markt [Crawler]',
|
||||
'Heritrix [Crawler]',
|
||||
'IBM Research [Bot]',
|
||||
'ICCrawler - ICjobs',
|
||||
'ichiro [Crawler]',
|
||||
'Majestic-12 [Bot]',
|
||||
'Metager [Bot]',
|
||||
'MSN NewsBlogs',
|
||||
'MSN [Bot]',
|
||||
'MSNbot Media',
|
||||
'NG-Search [Bot]',
|
||||
'Nutch [Bot]',
|
||||
'Nutch/CVS [Bot]',
|
||||
'OmniExplorer [Bot]',
|
||||
'Online link [Validator]',
|
||||
'psbot [Picsearch]',
|
||||
'Seekport [Bot]',
|
||||
'Sensis [Crawler]',
|
||||
'SEO Crawler',
|
||||
'Seoma [Crawler]',
|
||||
'SEOSearch [Crawler]',
|
||||
'Snappy [Bot]',
|
||||
'Steeler [Crawler]',
|
||||
'Synoo [Bot]',
|
||||
'Telekom [Bot]',
|
||||
'TurnitinBot [Bot]',
|
||||
'Voyager [Bot]',
|
||||
'W3 [Sitesearch]',
|
||||
'W3C [Linkcheck]',
|
||||
'W3C [Validator]',
|
||||
'WiseNut [Bot]',
|
||||
'YaCy [Bot]',
|
||||
'Yahoo MMCrawler [Bot]',
|
||||
'Yahoo Slurp [Bot]',
|
||||
'Yahoo [Bot]',
|
||||
'YahooSeeker [Bot]',
|
||||
);
|
||||
|
||||
$bot_ids = array();
|
||||
user_get_id_name($bot_ids, $bots, USER_IGNORE);
|
||||
foreach($bot_ids as $bot)
|
||||
{
|
||||
user_delete('remove', $bot);
|
||||
}
|
||||
// Done
|
||||
add_bots();
|
||||
echo 'done';
|
||||
|
||||
|
||||
/**
|
||||
* Add the search bots into the database
|
||||
* This code should be used in execute_last if the source database did not have bots
|
||||
* If you are converting bots this function should not be called
|
||||
* @todo We might want to look at sharing the bot list between the install code and this code for consistency
|
||||
*/
|
||||
function add_bots()
|
||||
{
|
||||
global $db, $config;
|
||||
|
||||
$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'";
|
||||
$result = $db->sql_query($sql);
|
||||
$group_id = (int) $db->sql_fetchfield('group_id', false, $result);
|
||||
$db->sql_freeresult($result);
|
||||
$db->sql_query('TRUNCATE TABLE ' . BOTS_TABLE);
|
||||
|
||||
if (!$group_id)
|
||||
{
|
||||
add_default_groups();
|
||||
|
||||
$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'";
|
||||
$result = $db->sql_query($sql);
|
||||
$group_id = (int) $db->sql_fetchfield('group_id', false, $result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
}
|
||||
|
||||
$bots = array(
|
||||
'AdsBot [Google]' => array('AdsBot-Google', ''),
|
||||
'Alexa [Bot]' => array('ia_archiver', ''),
|
||||
|
@ -166,6 +75,46 @@ function add_bots()
|
|||
'YahooSeeker [Bot]' => array('YahooSeeker/', ''),
|
||||
);
|
||||
|
||||
$bot_ids = array();
|
||||
user_get_id_name($bot_ids, array_keys($bots), USER_IGNORE);
|
||||
foreach($bot_ids as $bot)
|
||||
{
|
||||
user_delete('remove', $bot);
|
||||
}
|
||||
// Done
|
||||
add_bots($bots);
|
||||
echo 'done';
|
||||
|
||||
|
||||
/**
|
||||
* Add the search bots into the database
|
||||
* This code should be used in execute_last if the source database did not have bots
|
||||
* If you are converting bots this function should not be called
|
||||
* @todo We might want to look at sharing the bot list between the install code and this code for consistency
|
||||
*/
|
||||
function add_bots($bots)
|
||||
{
|
||||
global $db, $config;
|
||||
|
||||
$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'";
|
||||
$result = $db->sql_query($sql);
|
||||
$group_id = (int) $db->sql_fetchfield('group_id', false, $result);
|
||||
$db->sql_freeresult($result);
|
||||
$db->sql_query('TRUNCATE TABLE ' . BOTS_TABLE);
|
||||
|
||||
if (!$group_id)
|
||||
{
|
||||
add_default_groups();
|
||||
|
||||
$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'";
|
||||
$result = $db->sql_query($sql);
|
||||
$group_id = (int) $db->sql_fetchfield('group_id', false, $result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
foreach ($bots as $bot_name => $bot_ary)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue