viewgit/inc/functions.php:22 Function utf8_encode() is deprecated [8192]
Filename | |
---|---|
bin/fetcher.php | |
configs/config.php |
diff --git a/bin/fetcher.php b/bin/fetcher.php index e243097b7..4ebe0fe6c 100755 --- a/bin/fetcher.php +++ b/bin/fetcher.php @@ -95,7 +95,6 @@ require_once BASE_DIR."/lib/crawl_constants.php"; /** used to build miniinverted index*/ require_once BASE_DIR."/lib/index_shard.php"; - /* * We'll set up multi-byte string handling to use UTF-8 */ diff --git a/configs/config.php b/configs/config.php index b395fe1dd..f6d7c4a17 100755 --- a/configs/config.php +++ b/configs/config.php @@ -121,8 +121,13 @@ if(!PROFILE) { /** this is the User-Agent names the crawler provides * a web-server it is crawling */ -define('USER_AGENT', - 'Mozilla/5.0 (compatible; '.USER_AGENT_SHORT.' +'.QUEUE_SERVER.'bot.php)'); + if(!stristr(QUEUE_SERVER, 'localhost') && !stristr(QUEUE_SERVER,'127.0.0.1')) { + define('USER_AGENT', + 'Mozilla/5.0 (compatible; '.USER_AGENT_SHORT. + ' +'.QUEUE_SERVER.'bot.php)'); +} else { + define('USER_AGENT', 'Mozilla/5.0 (compatible; '.USER_AGENT_SHORT.')'); +} /** name of the cookie used to manage the session * (store language and perpage settings)