From d3c60eef9310e824e995092c1b66e708dbad17c8 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Mon, 25 Apr 2005 09:40:08 +0000 Subject: [PATCH] also send trackback with event_trackback plugin if not at least one link was inserted --- docs/NEWS | 4 ++++ include/functions_trackbacks.inc.php | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index 29b2d65..9d116e9 100644 --- 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) diff --git a/include/functions_trackbacks.inc.php b/include/functions_trackbacks.inc.php index d6c0518..711b047 100644 --- a/include/functions_trackbacks.inc.php +++ b/include/functions_trackbacks.inc.php @@ -312,12 +312,12 @@ function serendipity_handle_references($id, $author, $title, $text) { global $serendipity; if (!preg_match_all('@]+?href\s*=\s*["\']?([^\'" >]+?)[ \'"][^>]*>(.+?)@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'); -- 2.39.5