]> git.wh0rd.org Git - tt-rss.git/commitdiff
rename USE_CURL_FOR_ICONS to USE_CURL
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 27 Dec 2010 12:45:28 +0000 (15:45 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 27 Dec 2010 12:45:28 +0000 (15:45 +0300)
config.php-dist
functions.php
sanity_check.php

index 5027f78d0cdaa95daef5426150f1a2cda9456779..df12d8f9db8d91e98fae4abee09d5224e50fc05b 100644 (file)
@@ -71,8 +71,8 @@
        define('CHECK_FOR_NEW_VERSION', true);
        // Check for new versions of tt-rss automatically.
 
-       define('USE_CURL_FOR_ICONS', false);
-       // Fetch favicons using CURL, useful if your PHP has disabled remote fopen()
+       define('USE_CURL', false);
+       // Use CURL to fetch remote data instead of PHP built-in fopen()
 
        define('DIGEST_ENABLE', true);
        // Global option to enable daily digests. Also toggles the ability of users
index 4d8e632cb87943dc7570c92ebaec35acb8bb4b16..84738ddb8db2cc8e065cee66185f4ddae84e65c0 100644 (file)
        }
 
        function fetch_file_contents($url, $type = false) {
-               if (USE_CURL_FOR_ICONS) {
+               if (USE_CURL) {
                        $ch = curl_init($url);
 
                        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
                        $favicon_url = rewrite_relative_url($url, "/favicon.ico");
 
                // Run a test to see if what we have attempted to get actually exists.
-               if(USE_CURL_FOR_ICONS || url_validate($favicon_url)) {
+               if(USE_CURL || url_validate($favicon_url)) {
                        return $favicon_url;
                } else {
                        return false;
                        $icon_url = substr($icon_url, 0, 250);
 
                        if ($icon_url && $orig_icon_url != $icon_url) { 
-                               if (USE_CURL_FOR_ICONS || url_validate($icon_url)) {
+                               if (USE_CURL || url_validate($icon_url)) {
                                        db_query($link, "UPDATE ttrss_feeds SET icon_url = '$icon_url' WHERE id = '$feed'");
                                }
                        }
index a33b7c19e50c464ad28de04fbe2a0c500b534731..567be65eed023b7916e8e4a90042c872fc16d5cf 100644 (file)
@@ -41,8 +41,8 @@
                exit;
        }
 
-       if (USE_CURL_FOR_ICONS && ! function_exists("curl_init")) {
-               print "<b>Fatal Error</b>: You have enabled USE_CURL_FOR_ICONS, but your PHP 
+       if (USE_CURL && ! function_exists("curl_init")) {
+               print "<b>Fatal Error</b>: You have enabled USE_CURL, but your PHP 
                        doesn't seem to support CURL functions.";
                exit;
        } 
                $err_msg = "php.ini: Safe mode is not supported. If you wish to continue, remove this test from sanity_check.php and proceeed at your own risk. Please note that your bug reports will not be accepted or reviewed.";
        }
 
+       if (defined('USE_CURL_FOR_ICONS')) {
+               $err_msg = "config: USE_CURL_FOR_ICONS has been renamed to USE_CURL.";
+       }
+
        if ($err_msg) {
                print "<b>Fatal Error</b>: $err_msg\n";
                exit;