Update of /cvsroot/php-blog/serendipity/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2067/include
Modified Files:
functions_entries.inc.php
Log Message:
Allow to receive trackbacks to the '-guid.html' permalink
I added a new preg matching patter to PAT_COMMENTSUB to catch the filename part. That shouldn't create BC problems, and htaccess doesn't need to be updated. However I think we should find a way to rename PAT_COMMENTSUB to match what it really does - to display an extended entry...?
Index: functions_entries.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/functions_entries.inc.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- functions_entries.inc.php 30 Dec 2004 22:41:27 -0000 1.35
+++ functions_entries.inc.php 3 Jan 2005 12:14:25 -0000 1.36
@@ -556,8 +556,14 @@
$entry = &$properties['entries'][$x]; // PHP4 Compat
serendipity_plugin_api::hook_event('frontend_display', $entry);
+ if (preg_match(PAT_COMMENTSUB, $_SERVER['REQUEST_URI'], $matches) && $matches[2] == 'guid') {
+ // preg_match detection from index.php - check again if we were called with RSS feed 'guid' permalink. Allow trackbacking to those links as well.
+ $entry['rdf_ident'] = serendipity_archiveURL($entry['id'], 'guid', 'baseURL');
+ } else {
+ $entry['rdf_ident'] = serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL');
+ }
+
$entry['link'] = serendipity_archiveURL($entry['id'], $entry['title'], 'serendipityHTTPPath');
- $entry['rdf_ident'] = serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL');
$entry['title'] = htmlspecialchars($entry['title']);
$entry['commURL'] = serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL', false);
|