Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1213
Modified Files:
serendipity_functions.inc.php comment.php NEWS
Log Message:
fixed trackbacks. Why do we always have to see such things after a release? :-)
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -d -r1.122 -r1.123
--- NEWS 13 May 2004 13:10:51 -0000 1.122
+++ NEWS 14 May 2004 08:19:54 -0000 1.123
@@ -3,6 +3,8 @@
Version 0.7 ()
------------------------------------------------------------------------
+ * Fixed trackbacks not associated to the right entry id (garvinhicking)
+
* Redesigned admin interface for editing entries: Adjust items per
page, sort order, filter mode, combined EDIT+DELETE interface into
one. Introduced new css classes "serendipity_admin_list_item_even"
Index: comment.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/comment.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- comment.php 13 Apr 2004 11:09:42 -0000 1.32
+++ comment.php 14 May 2004 08:19:54 -0000 1.33
@@ -24,7 +24,7 @@
$uri = $_SERVER['REQUEST_URI'];
if (isset($_REQUEST['entry_id'])) {
$id = $_REQUEST['entry_id'];
- } else if (preg_match('@\/(\d+)$@', $uri, $matches)) {
+ } else if (preg_match('@/(\d+)_[^/]*$@', $uri, $matches)) {
$id = $matches[1];
}
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.266
retrieving revision 1.267
diff -u -d -r1.266 -r1.267
--- serendipity_functions.inc.php 13 May 2004 13:10:50 -0000 1.266
+++ serendipity_functions.inc.php 14 May 2004 08:19:54 -0000 1.267
@@ -1707,7 +1707,7 @@
function serendipity_trackback_is_success($resp)
{
if (preg_match('@<error>(\d)+</error>@', $resp, $matches)) {
- if ((int) $matches[1]) {
+ if ((int) $matches[1] || (string) $matches[1] === "0") {
return 1;
} else {
if (preg_match('@<message>([^<]+)</message>@', $resp, $matches)) {
@@ -1756,7 +1756,7 @@
global $serendipity;
$target = parse_url($loc);
if ($target['query'] != '') {
- $target['query'] = '?' . $target['query'];
+ $target['query'] = '?' . str_replace('&', '&', $target['query']);
}
if (!is_numeric($target['port'])) {
|