]> git.wh0rd.org Git - tt-rss.git/commitdiff
change default user-agent
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 13 Nov 2010 15:20:51 +0000 (18:20 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 13 Nov 2010 15:20:51 +0000 (18:20 +0300)
functions.php

index 66b868560d51fc01673a7ecd4a523b758ca0348e..7d7e828931b4f5dd0e806eeaf7c07cd45e4c9a9b 100644 (file)
        require_once 'lib/phpmailer/class.phpmailer.php';
        require_once 'lib/sphinxapi.php';
 
-       define('MAGPIE_USER_AGENT_EXT', ' (Tiny Tiny RSS/' . VERSION . ')');
+       //define('MAGPIE_USER_AGENT_EXT', ' (Tiny Tiny RSS/' . VERSION . ')');
        define('MAGPIE_OUTPUT_ENCODING', 'UTF-8');
        define('MAGPIE_CACHE_AGE', 60*15); // 15 minutes
 
+       define('SELF_USER_AGENT', 'Tiny Tiny RSS/' . VERSION . ' (http://tt-rss.org/)');
+       define('MAGPIE_USER_AGENT', SELF_USER_AGENT);
+
        require_once "lib/simplepie/simplepie.inc";
        require_once "lib/magpierss/rss_fetch.inc";
        require_once 'lib/magpierss/rss_utils.inc';
                                }
        
                                $rss = new SimplePie();
-                               $rss->set_useragent(SIMPLEPIE_USERAGENT . MAGPIE_USER_AGENT_EXT);
+                               $rss->set_useragent(SELF_USER_AGENT);
        #                       $rss->set_timeout(10);
                                $rss->set_feed_url($fetch_url);
                                $rss->set_output_encoding('UTF-8');
 
                if (DEFAULT_UPDATE_METHOD == "1") {
                        $rss = new SimplePie();
-                       $rss->set_useragent(SIMPLEPIE_USERAGENT . MAGPIE_USER_AGENT_EXT);
+                       $rss->set_useragent(SELF_USER_AGENT);
                        $rss->set_feed_url($fetch_url);
                        $rss->set_output_encoding('UTF-8');
                        $rss->init();