$propbag->add('description', PLUGIN_REMOTERSS_BLAHBLAH);
$propbag->add('stackable', true);
$propbag->add('author', 'Udo Gerhards, Richard Thomas Harrison');
- $propbag->add('version', '1.4');
+ $propbag->add('version', '1.5');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
// Check if a given URI is readable.
function urlcheck($uri) {
+
+ // These two substring comparisons are faster than one regexp.
+ if ('http://' != substr($uri, 0, 7) || 'https://' != substr($uri, 0, 8)) {
+ return false;
+ }
+
+ // Disabled by now. May get enabled in the future, but for now the extra HTTP call isn't worth trying.
return true;
require_once S9Y_PEAR_PATH . 'HTTP/Request.php';
$req = &new HTTP_Request($uri);
if (!$this->urlcheck($rssuri)) {
echo '<!-- No valid URL! -->';
} elseif ($feedtype == 'rss') {
+ // Touching the feedcache file will prevent loops of death when the RSS target is the same URI than our blog.
+ @touch($feedcache);
require_once S9Y_PEAR_PATH . 'Onyx/RSS.php';
$c = &new Onyx_RSS($charset);
$c->parse($rssuri);
}
}
} elseif ($feedtype == 'opml') {
+ // Touching the feedcache file will prevent loops of death when the RSS target is the same URI than our blog.
+ @touch($feedcache);
+
$opml = new s9y_remoterss_OPML();
$opmltree = $opml->parseOPML($rssuri);