Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17534
Modified Files:
serendipity_functions.inc.php
Log Message:
* Trackbacks: Display progress/information
* Trackbacks: Fix searching through the right HTML code without exit-tracked
links, even when using Wiki markup (verified working with tobias blog now)
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.294
retrieving revision 1.295
diff -u -d -r1.294 -r1.295
--- serendipity_functions.inc.php 17 Jun 2004 20:36:41 -0000 1.294
+++ serendipity_functions.inc.php 18 Jun 2004 15:43:59 -0000 1.295
@@ -2013,12 +2013,14 @@
function serendipity_trackback_autodiscover($res, $loc, $url, $author, $title, $text)
{
- if(!preg_match('@trackback:ping(\s*rdf:resource)?\s*=\s*"(http:[^"]+)"@i', $res, $matches)) {
+ if (!preg_match('@trackback:ping(\s*rdf:resource)?\s*=\s*"(http:[^"]+)"@i', $res, $matches)) {
+ echo TRACKBACK_NOT_FOUND;
return;
}
if (preg_match('@dc:identifier\s*=\s*"(http:[^"]+)"@i', $res, $test)) {
if ($loc != $test[1]) {
+ echo TRACKBACK_URI_MISMATCH;
return;
}
}
@@ -2028,11 +2030,24 @@
. '&blog_name=' . rawurlencode($author)
. '&excerpt=' . rawurlencode(strip_tags($text));
+ printf(TRACKBACK_SENDING, htmlspecialchars($matches[2]));
+ flush();
$response = serendipity_trackback_is_success(_serendipity_send($matches[2], $data));
+
+ if ($response == 1 || $response == true) {
+ printf(TRACKBACK_SENT, SUCCESS);
+ } else {
+ printf(TRACKBACK_SENT, ERROR . ': ' . $response);
+ }
+ echo '<br />';
+
return $response;
}
function serendipity_reference_autodiscover($loc, $url, $author, $title, $text) {
+ printf(TRACKBACK_CHECKING, $loc);
+ echo '<br />';
+ flush();
$res = @file_get_contents($loc);
if (strlen($res) != 0) {
serendipity_trackback_autodiscover($res, $loc, $url, $author, $title, $text);
@@ -2301,6 +2316,7 @@
}
if ($entry['isdraft'] == 'false') {
+ serendipity_plugin_api::hook_event('frontend_display', $entry, array('no_scramble' => true));
serendipity_handle_references($entry['id'], $serendipity['blogTitle'], $entry['title'], $entry['body'] . $entry['extended'], $newEntry);
}
|