From: garvinhicking Date: Mon, 25 Apr 2005 09:40:08 +0000 (+0000) Subject: also send trackback with event_trackback plugin if not at least one link X-Git-Tag: 0.8.1~30^2~2 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d3c60eef9310e824e995092c1b66e708dbad17c8;p=s9y.git also send trackback with event_trackback plugin if not at least one link was inserted --- 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');