Update of /cvsroot/php-blog/serendipity/plugins/serendipity_event_trackexits
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18467
Modified Files:
serendipity_event_trackexits.php
Log Message:
fixes bug when exit tracking items inside a HTML nugget, added missing
translations
Index: serendipity_event_trackexits.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/plugins/serendipity_event_trackexits/serendipity_event_trackexits.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- serendipity_event_trackexits.php 5 Jul 2004 08:25:50 -0000 1.10
+++ serendipity_event_trackexits.php 9 Jul 2004 19:11:26 -0000 1.11
@@ -6,6 +6,9 @@
@define('PLUGIN_EVENT_TRACKBACK_DESC', 'Click auf Externe Links verfolgen');
@define('PLUGIN_EVENT_TRACKBACK_COMMENTREDIRECTION', 'URL von Kommentatoren maskieren?');
@define('PLUGIN_EVENT_TRACKBACK_COMMENTREDIRECTION_BLAHBLA', 'Verhindert Spam-Missbrauch aber auch positiven Nutzen von Verlinkungen innerhalb Blogs. Wenn der Wert auf "s9y" gesetzt wird, werden interne Routinen zur Weiterleitung verwendet. Bei dem Wert "google" wird Google verwendet. Ein leerer Wert schaltet die Weiterleitung aus(Standard).');
+ @define('PLUGIN_EVENT_TRACKBACK_COMMENTREDIRECTION_NONE', 'Keine');
+ @define('PLUGIN_EVENT_TRACKBACK_COMMENTREDIRECTION_S9Y', 'Serendipity Exit-Tracking Routine');
+ @define('PLUGIN_EVENT_TRACKBACK_COMMENTREDIRECTION_GOOGLE', 'Google PageRank Deflector');
break;
case 'en':
@@ -16,7 +19,7 @@
@define('PLUGIN_EVENT_TRACKBACK_COMMENTREDIRECTION_BLAHBLA', 'Reduces Comment-Abuse but also disables positive effects of linking to the URL of a commenting user. Serendipity\'s internal routines will redirect to the target page and log the exit. The Google PageRank Deflector will prevent the link from gaining rack on Google. An empty value disables this feature entriely (default).');
@define('PLUGIN_EVENT_TRACKBACK_COMMENTREDIRECTION_NONE', 'None');
@define('PLUGIN_EVENT_TRACKBACK_COMMENTREDIRECTION_S9Y', 'Serendipity Exit-Tracking Routine');
- @define('PLUGIN_EVENT_TRACKBACK_COMMENTREDIRECTION_GOOGLE', 'Google PageRack Deflector');
+ @define('PLUGIN_EVENT_TRACKBACK_COMMENTREDIRECTION_GOOGLE', 'Google PageRank Deflector');
break;
}
@@ -106,7 +109,11 @@
$serendipity['encodeExitsCallback_entry_id'] = (isset($eventData['entry_id']) ? $eventData['entry_id'] : $eventData['id']);
// Fetch all existing links from the database. They have been inserted there by our trackback-discovery.
- $this->links = serendipity_db_query("SELECT id, link FROM {$serendipity['dbPrefix']}references WHERE entry_id = {$serendipity['encodeExitsCallback_entry_id']}", false, 'both', false, 'link', 'id');
+ if (empty($serendipity['encodeExitsCallback_entry_id'])) {
+ $this->links = array();
+ } else {
+ $this->links = serendipity_db_query("SELECT id, link FROM {$serendipity['dbPrefix']}references WHERE entry_id = {$serendipity['encodeExitsCallback_entry_id']}", false, 'both', false, 'link', 'id');
+ }
$eventData[$element] = preg_replace_callback(
"#<a(.*)href=(\"|')http://([^\"']+)(\"|')#isUm",
|