* Allow the serendipity_event_trackback additional trackbacks plugin
to send trackbacks even if your entry did not contain at least one
- link (garvinhicking)
+ link. Also fix not sending trackbacks containing "#" fragments
+ (garvinhicking)
* Do not display Sidebar titles if they are not set for the bundled
default, kubrick and wp templates (sidebar.tpl) (garvinhicking)
return $res;
}
-function serendipity_trackback_autodiscover($res, $loc, $url, $author, $title, $text) {
+function serendipity_trackback_autodiscover($res, $loc, $url, $author, $title, $text, $loc2 = '') {
if (!preg_match('@trackback:ping(\s*rdf:resource)?\s*=\s*["\'](https?:[^"\']+)["\']@i', $res, $matches)) {
echo '<div>• ' . sprintf(TRACKBACK_FAILED, TRACKBACK_NOT_FOUND) . '</div>';
return false;
$trackURI = trim($matches[2]);
if (preg_match('@dc:identifier\s*=\s*["\'](https?:[^\'"]+)["\']@i', $res, $test)) {
- if ($loc != $test[1]) {
+ if ($loc != $test[1] && $loc2 != $test[1]) {
echo '<div>• ' . sprintf(TRACKBACK_FAILED, TRACKBACK_URI_MISMATCH) . '</div>';
return false;
}
}
$parsed_loc = $u['scheme'] . '://' . $u['host'] . $port . $u['path'];
+
$res = '';
$fp = @fsockopen($u['host'], $u['port'], $err, $timeout);
}
if (strlen($res) != 0) {
- serendipity_trackback_autodiscover($res, $parsed_loc, $url, $author, $title, $text);
+ serendipity_trackback_autodiscover($res, $parsed_loc, $url, $author, $title, $text, $loc);
serendipity_pingback_autodiscover($loc, $res);
} else {
echo '<div>• ' . TRACKBACK_NO_DATA . '</div>';