From: garvinhicking Date: Sun, 8 Jul 2007 20:07:41 +0000 (+0000) Subject: For the future: Always indicate source of where frontend_display is called. Thanks... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=6c8c13a2f8915c254db8f598f70b383b2a11a9ab;p=s9y.git For the future: Always indicate source of where frontend_display is called. Thanks to Karotte. --- diff --git a/include/functions_comments.inc.php b/include/functions_comments.inc.php index a7a15ab..471536b 100644 --- a/include/functions_comments.inc.php +++ b/include/functions_comments.inc.php @@ -274,7 +274,8 @@ function serendipity_printComments($comments, $parentid = 0, $depth = 0, $trace $comment['url'] = htmlspecialchars($comment['url'], ENT_QUOTES); } - serendipity_plugin_api::hook_event('frontend_display', $comment); + $addData = array('from' => 'functions_entries:printComments'); + serendipity_plugin_api::hook_event('frontend_display', $comment, $addData); if (isset($comment['no_email']) && $comment['no_email']) { $comment['email'] = false; diff --git a/include/functions_rss.inc.php b/include/functions_rss.inc.php index c5337a9..fdbcc84 100644 --- a/include/functions_rss.inc.php +++ b/include/functions_rss.inc.php @@ -64,7 +64,8 @@ function serendipity_printEntries_rss(&$entries, $version, $comments = false, $f $ext = ''; } - serendipity_plugin_api::hook_event('frontend_display', $entry); + $addData = array('from' => 'functions_entries:printEntries_rss'); + serendipity_plugin_api::hook_event('frontend_display', $entry, $addData); // Do some relative -> absolute URI replacing magic. Replaces all HREF/SRC (, , ...) references to only the serendipitypath with the full baseURL URI // garvin: Could impose some problems. Closely watch this one. $entry['body'] = preg_replace('@(href|src)=("|\')(' . preg_quote($serendipity['serendipityHTTPPath']) . ')(.*)("|\')(.*)>@imsU', '\1=\2' . $serendipity['baseURL'] . '\4\2\6>', $entry['body']); diff --git a/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php b/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php index 40cebae..832d26c 100644 --- a/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php +++ b/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php @@ -134,7 +134,8 @@ class serendipity_event_entryproperties extends serendipity_event global $serendipity; serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}entryproperties WHERE entryid = " . (int)$entry['id'] . " AND property LIKE 'ep_cache_%'"); - serendipity_plugin_api::hook_event('frontend_display', $entry); + $addData = array('from' => 'serendipity_event_entryproperties:updateCache'); + serendipity_plugin_api::hook_event('frontend_display', $entry, $addData); serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}entryproperties (entryid, property, value) VALUES (" . (int)$entry['id'] . ", 'ep_cache_body', '" . serendipity_db_escape_string($entry['body']) . "')"); serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}entryproperties (entryid, property, value) VALUES (" . (int)$entry['id'] . ", 'ep_cache_extended', '" . serendipity_db_escape_string($entry['extended']) . "')"); } diff --git a/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php b/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php index bde5c5d..e7da85b 100644 --- a/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php +++ b/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php @@ -196,7 +196,8 @@ class serendipity_plugin_comments extends serendipity_plugin $entry['comment'] = preg_replace('@((\[.*)[\n\r]+(.*\]))+@imsU', '\2\3', $entry['comment']); $entry['comment'] = preg_replace('@((\[.+\].*)[\r\n]+(.*\[/.+\]))+@imsU', '\2\3', $entry['comment']); } - serendipity_plugin_api::hook_event('frontend_display', $entry); + $addData = array('from' => 'serendipity_plugin_comments:generate_content'); + serendipity_plugin_api::hook_event('frontend_display', $entry, $addData); printf( '
' . PLUGIN_COMMENTS_ABOUT . '
',