Version 0.9-beta2 ()
------------------------------------------------------------------------
+ * Fix track exits plugin to redirect to the right URL when no URL-ID
+ was found. (garvinhicking)
+
* "Recent comments" plugin can be configured whether to show
trackbacks, comments or both. (garvinhicking)
} elseif (isset($_GET['url']) && !empty($_GET['url'])) {
// No entry-link ID was submitted. Possibly a spammer tried to mis-use the script to get into the top-list.
- $url = str_replace('&', '&', base64_decode($_GET['url']));
+ $url = strip_tags(str_replace('&', '&', base64_decode($_GET['url'])));
}
if (serendipity_isResponseClean($url)) {
$propbag->add('description', PLUGIN_EVENT_TRACKBACK_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Serendipity Team');
- $propbag->add('version', '1.2');
+ $propbag->add('version', '1.3');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
$is_over = (stristr($buffer[0], 'onmouseover=') !== false ? true : false);
$is_out = (stristr($buffer[0], 'onmouseout=') !== false ? true : false);
- $link = '<a%shref="%sexit.php?url_id=%s%s" ' . (!$is_title ? 'title="%s" ' : '%s') . (!$is_over ? ' onmouseover="window.status=\'%s\';return true;" ' : '%s') . (!$is_out ? 'onmouseout="window.status=\'\';return true;"' : '') . '%s>';
+ $link = '<a%shref="%sexit.php?url%s=%s%s" ' . (!$is_title ? 'title="%s" ' : '%s') . (!$is_over ? ' onmouseover="window.status=\'%s\';return true;" ' : '%s') . (!$is_out ? 'onmouseout="window.status=\'\';return true;"' : '') . '%s>';
if (is_array($this->links) && isset($this->links[$url])) {
return sprintf(
$link,
$buffer[1],
$serendipity['baseURL'],
+ '_id',
$this->links[$url],
($entry_id != 0) ? '&entry_id=' . $entry_id : '',
(!$is_title ? $url : ''),
$link,
$buffer[1],
$serendipity['baseURL'],
+ '',
base64_encode($url),
($entry_id != 0) ? '&entry_id=' . $entry_id : '',
(!$is_title ? $url : ''),
$propbag->add('description', PLUGIN_REMOTERSS_BLAHBLAH);
$propbag->add('stackable', true);
$propbag->add('author', 'Udo Gerhards, Richard Thomas Harrison');
- $propbag->add('version', '1.3');
+ $propbag->add('version', '1.4');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
return true;
}
+ // Check if a given URI is readable.
+ function urlcheck($uri) {
+ return true;
+ require_once S9Y_PEAR_PATH . 'HTTP/Request.php';
+ $req = &new HTTP_Request($uri);
+
+ if (PEAR::isError($req->sendRequest()) || !preg_match('@^[23]..@', $req->getResponseCode())) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
function generate_content(&$title) {
global $serendipity;
if (trim($rssuri)) {
$feedcache = $serendipity['serendipityPath'] . 'templates_c/remoterss_cache_' . preg_replace('@[^a-z0-9]*@i', '', $rssuri) . '.dat';
if (!file_exists($feedcache) || filesize($feedcache) == 0 || filemtime($feedcache) < (time() - $cachetime)) {
-
- if ($feedtype == 'rss') {
+ if (!$this->urlcheck($rssuri)) {
+ echo '<!-- No valid URL! -->';
+ } elseif ($feedtype == 'rss') {
require_once S9Y_PEAR_PATH . 'Onyx/RSS.php';
$c = &new Onyx_RSS($charset);
$c->parse($rssuri);