mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-01-09 22:37:57 +00:00
fix PR update condition
This commit is contained in:
parent
74dd15e544
commit
5875dd58c9
@ -183,18 +183,6 @@ foreach ($db->getCrawlQueue(CRAWL_PAGE_LIMIT, time() - CRAWL_PAGE_SECONDS_OFFSET
|
||||
$hostRobots = $host->robots;
|
||||
$hostRobotsPostfix = $host->robotsPostfix;
|
||||
|
||||
// Increase page rank when link does not match the current host
|
||||
if ($hostURL->scheme . '://' .
|
||||
$hostURL->name .
|
||||
($hostURL->port ? ':' . $hostURL->port : '')
|
||||
!=
|
||||
$queueHostPage->scheme . '://' .
|
||||
$queueHostPage->name .
|
||||
($queueHostPage->port ? ':' . $queueHostPage->port : '')) {
|
||||
|
||||
$db->updateHostPageRank($hostId, crc32($hostPageURI->string), 1);
|
||||
}
|
||||
|
||||
// Register new host
|
||||
} else {
|
||||
|
||||
@ -248,6 +236,18 @@ foreach ($db->getCrawlQueue(CRAWL_PAGE_LIMIT, time() - CRAWL_PAGE_SECONDS_OFFSET
|
||||
}
|
||||
}
|
||||
|
||||
// Increase page rank when link does not match the current host
|
||||
if ($hostURL->scheme . '://' .
|
||||
$hostURL->name .
|
||||
($hostURL->port ? ':' . $hostURL->port : '')
|
||||
!=
|
||||
$queueHostPage->scheme . '://' .
|
||||
$queueHostPage->name .
|
||||
($queueHostPage->port ? ':' . $queueHostPage->port : '')) {
|
||||
|
||||
$db->updateHostPageRank($hostId, crc32($hostPageURI->string), 1);
|
||||
}
|
||||
|
||||
$db->commit();
|
||||
|
||||
} catch(Exception $e){
|
||||
|
Loading…
Reference in New Issue
Block a user