/** * Synchronizes the admin tools spiders with the native spiders */ public static function synchronize() { require_once WCF_DIR . 'lib/system/cronjob/RefreshSearchRobotsCronjob.class.php'; RefreshSearchRobotsCronjob::execute(null); $sql = "INSERT IGNORE INTO wcf" . WCF_N . "_spider\n\t\t\t\t\t(spiderIdentifier, spiderName, spiderURL)\n\t\t\t\t\tSELECT spiderIdentifier, spiderName, spiderURL\n\t\t\t\t\tFROM wcf" . WCF_N . "_admin_tools_spider"; WCF::getDB()->sendQuery($sql); WCF::getCache()->clear(WCF_DIR . 'cache', 'cache.spiders.php'); }
public function syncSpider($manSync = false) { if ($manSync) { require_once WCF_DIR . 'lib/system/cronjob/RefreshSearchRobotsCronjob.class.php'; RefreshSearchRobotsCronjob::execute(null); } $sql = "INSERT IGNORE INTO wcf" . WCF_N . "_spider" . "\n (spiderIdentifier, spiderName, spiderURL)" . "\nSELECT a.spiderIdentifier, a.spiderName, a.spiderUrl" . "\n FROM wcf" . WCF_N . "_admin_tool_spider a"; WCF::getDB()->sendQuery($sql); WCF::getCache()->clear(WCF_DIR . 'cache', 'cache.spiders.php'); }