Grischa and Garvin proudly present: The REAL(tm) solution. :)
authorgarvinhicking <garvinhicking>
Thu, 12 Jul 2007 13:55:23 +0000 (13:55 +0000)
committergarvinhicking <garvinhicking>
Thu, 12 Jul 2007 13:55:23 +0000 (13:55 +0000)
docs/NEWS
include/functions_trackbacks.inc.php

index db2f2d56e5e4a45b45acf7db5dbfa50baf123d84..2b808dcda481bf2a4469670fdc91837c9180bf6c 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,11 +3,8 @@
 Version 1.3 ()
 ------------------------------------------------------------------------
 
-    * Made trackback/pingback functionality independend from link text.
-      Only the link url is relevant now. Now dupe links in entries are
-      not trackbacked/pingbacked twice and images w/o ALT attribute or
-      links with changed text won't be trackbacked again after resaving
-      the article. (brockhaus)
+    * Trackbacks to links without a description now get properly
+      evaluated. (brockhaus)
 
     * serendipity_plugin_comments now also supports Favatars in 
       combination with serendipity_event_gravatar instead of
index 1429a2b54ca0238613a907409ee6a348d3da892b..e4dbb4e6793658b0ec7008f403c9189f8fc1ef6b 100644 (file)
@@ -248,9 +248,6 @@ global $serendipity;
         return; // Trackbacks to HTTPS URLs can only be performed with openssl activated
     }
 
-    echo '<div>&#8226; '. sprintf(TRACKBACK_CHECKING, $loc) .'</div>';
-    flush();
-
     if (empty($u['port'])) {
         $u['port'] = 80;
         $port      = '';
@@ -265,10 +262,13 @@ global $serendipity;
     $parsed_loc = $u['scheme'] . '://' . $u['host'] . $port . $u['path'];
 
     if (preg_match('@\.(jpe?g|aiff?|gif|png|pdf|doc|rtf|wave?|mp2|mp4|mpe?g3|mpe?g4|divx|xvid|bz2|mpe?g|avi|mp3|xl?|ppt|pps|xslt?|xsd|zip|tar|t?gz|swf|rm|ram?|exe|mov|qt|midi?|qcp|emf|wmf|snd|pmg|w?bmp|gcd|mms|ogg|ogm|rv|wmv|wma|jad|3g?|jar)$@i', $u['path'])) {
-        echo '<div>&#8226; ' . TRACKBACK_NO_DATA . '</div>';
+        // echo '<div>&#8226; ' . TRACKBACK_NO_DATA . '</div>';
         return;
     }
 
+    echo '<div>&#8226; '. sprintf(TRACKBACK_CHECKING, $loc) .'</div>';
+    flush();
+
     require_once S9Y_PEAR_PATH . 'HTTP/Request.php';
     $options = array('allowRedirects' => true, 'maxRedirects' => 5, 'method' => 'GET');
     serendipity_plugin_api::hook_event('backend_http_request', $options, 'trackback_detect');
@@ -573,6 +573,10 @@ function serendipity_handle_references($id, $author, $title, $text, $dry_run = f
         if ($debug && is_string($row)) {
             echo $row . "<br />\n";
         }
+        
+        if (empty($names[$i])) {
+            $names[$i] = $locations[$i];
+        }
 
         if ($row[0] > 0 && isset($saved_references[$locations[$i] . $names[$i]])) {
             if ($debug) echo "Found references for $id, skipping rest<br />\n";