update to latest simplepie (somewhere between RC2 and RC3)

orig_fof
steveminutillo 2007-07-09 04:51:48 +00:00
parent d6d709ec3c
commit 6192f83701
4 changed files with 867 additions and 639 deletions

View File

@ -12,5 +12,13 @@
*
*/
require_once('simplepie/simplepie.inc');
SimplePie_Misc::display_cached_file($_GET['i'], './cache', 'spi');
if(file_exists("./cache/" . md5($_GET[i]) . ".spi"))
{
SimplePie_Misc::display_cached_file($_GET['i'], './cache', 'spi');
}
else
{
header("Location: image/feed-icon.png");
}
?>

View File

@ -68,7 +68,8 @@ function fof_log($message, $topic="debug")
static $log;
if(!isset($log)) $log = fopen("fof.log", 'a');
$message = str_replace ("\n", " ", $message);
$message = str_replace ("\n", "\\n", $message);
$message = str_replace ("\r", "\\r", $message);
fwrite($log, date('r') . " [$topic] $message\n");
}
@ -744,7 +745,7 @@ function fof_update_feed($id)
if($feed['feed_image_cache_date'] < (time() - (7*24*60*60)))
{
$image = $rss->get_favicon("./image/feed-icon.png");
$image = $rss->get_favicon();
$image_cache_date = time();
}

File diff suppressed because one or more lines are too long

View File

@ -1,16 +1,19 @@
Index: simplepie.inc
===================================================================
--- simplepie.inc (revision 754)
--- simplepie.inc (revision 797)
+++ simplepie.inc (working copy)
@@ -6585,6 +6585,11 @@
@@ -6487,7 +6487,13 @@
curl_setopt($fp, CURLOPT_REFERER, $url);
curl_setopt($fp, CURLOPT_USERAGENT, $useragent);
curl_setopt($fp, CURLOPT_HTTPHEADER, $headers2);
- if (!ini_get('open_basedir') && !ini_get('safe_mode'))
+
+ // added by FoF to enable https and digest authentication
+ curl_setopt($fp, CURLOPT_SSL_VERIFYPEER, false);
+ curl_setopt($fp, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
+
if (!ini_get('open_basedir') && !ini_get('safe_mode'))
+ // also changed by FoF - cURL's redirect handling was busted before 7.15.2
+ if (version_compare(SimplePie_Misc::get_curl_version(), '7.15.2', '>=') && !ini_get('open_basedir') && !ini_get('safe_mode'))
{
curl_setopt($fp, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($fp, CURLOPT_MAXREDIRS, $redirects);