]> git.mjollnir.org Git - s9y.git/commitdiff
also send trackback with event_trackback plugin if not at least one link
authorgarvinhicking <garvinhicking>
Mon, 25 Apr 2005 09:40:08 +0000 (09:40 +0000)
committergarvinhicking <garvinhicking>
Mon, 25 Apr 2005 09:40:08 +0000 (09:40 +0000)
was inserted

docs/NEWS
include/functions_trackbacks.inc.php

index 29b2d65bf056dcdaaa0166edf4bee3ec7cce0af2..9d116e9a60a43f4a8ca880ab2606a9386a522264 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,10 @@
 Version 0.9 ()
 ------------------------------------------------------------------------
 
+    * Allow the serendipity_event_trackback additional trackbacks plugin
+      to send trackbacks even if your entry did not contain at least one
+      link (garvinhicking)
+
     * Do not display Sidebar titles if they are not set for the bundled 
       default, kubrick and wp templates (sidebar.tpl) (garvinhicking)
 
index d6c0518fd1b7af790f1325778422ae5b2acb49e4..711b047668d2243661219acf6e655835bdf33fb8 100644 (file)
@@ -312,12 +312,12 @@ function serendipity_handle_references($id, $author, $title, $text) {
     global $serendipity;
 
     if (!preg_match_all('@<a[^>]+?href\s*=\s*["\']?([^\'" >]+?)[ \'"][^>]*>(.+?)</a>@i', $text, $matches)) {
-        return;
+        $matches = array(0 => array(), 1 => array());
+    } else {
+        // remove full matches
+        array_shift($matches);
     }
 
-    // remove full matches
-    array_shift($matches);
-
     // Make trackback URL
     $url = serendipity_archiveURL($id, $title, 'baseURL');