rename USE_CURL_FOR_ICONS to USE_CURL
This commit is contained in:
parent
86027a078d
commit
32a5e3444d
|
@ -71,8 +71,8 @@
|
||||||
define('CHECK_FOR_NEW_VERSION', true);
|
define('CHECK_FOR_NEW_VERSION', true);
|
||||||
// Check for new versions of tt-rss automatically.
|
// Check for new versions of tt-rss automatically.
|
||||||
|
|
||||||
define('USE_CURL_FOR_ICONS', false);
|
define('USE_CURL', false);
|
||||||
// Fetch favicons using CURL, useful if your PHP has disabled remote fopen()
|
// Use CURL to fetch remote data instead of PHP built-in fopen()
|
||||||
|
|
||||||
define('DIGEST_ENABLE', true);
|
define('DIGEST_ENABLE', true);
|
||||||
// Global option to enable daily digests. Also toggles the ability of users
|
// Global option to enable daily digests. Also toggles the ability of users
|
||||||
|
|
|
@ -371,7 +371,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function fetch_file_contents($url, $type = false) {
|
function fetch_file_contents($url, $type = false) {
|
||||||
if (USE_CURL_FOR_ICONS) {
|
if (USE_CURL) {
|
||||||
$ch = curl_init($url);
|
$ch = curl_init($url);
|
||||||
|
|
||||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
|
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
|
||||||
|
@ -435,7 +435,7 @@
|
||||||
$favicon_url = rewrite_relative_url($url, "/favicon.ico");
|
$favicon_url = rewrite_relative_url($url, "/favicon.ico");
|
||||||
|
|
||||||
// Run a test to see if what we have attempted to get actually exists.
|
// 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;
|
return $favicon_url;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
@ -755,7 +755,7 @@
|
||||||
$icon_url = substr($icon_url, 0, 250);
|
$icon_url = substr($icon_url, 0, 250);
|
||||||
|
|
||||||
if ($icon_url && $orig_icon_url != $icon_url) {
|
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'");
|
db_query($link, "UPDATE ttrss_feeds SET icon_url = '$icon_url' WHERE id = '$feed'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,8 +41,8 @@
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (USE_CURL_FOR_ICONS && ! function_exists("curl_init")) {
|
if (USE_CURL && ! function_exists("curl_init")) {
|
||||||
print "<b>Fatal Error</b>: You have enabled USE_CURL_FOR_ICONS, but your PHP
|
print "<b>Fatal Error</b>: You have enabled USE_CURL, but your PHP
|
||||||
doesn't seem to support CURL functions.";
|
doesn't seem to support CURL functions.";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -138,6 +138,10 @@
|
||||||
$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.";
|
$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) {
|
if ($err_msg) {
|
||||||
print "<b>Fatal Error</b>: $err_msg\n";
|
print "<b>Fatal Error</b>: $err_msg\n";
|
||||||
exit;
|
exit;
|
||||||
|
|
Loading…
Reference in New Issue