From 1bda48f71e560ccd5d0343239d6548ec3f0e0a2a Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Tue, 2 May 2006 07:59:38 +0000 Subject: [PATCH] fix caching frontend_display --- include/functions_entries.inc.php | 8 ++++++-- .../serendipity_event_entryproperties.php | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php index fb9e675..8b997e3 100644 --- a/include/functions_entries.inc.php +++ b/include/functions_entries.inc.php @@ -902,7 +902,11 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false, $sm $entry['authorid'] = $serendipity['authorid']; } - serendipity_plugin_api::hook_event('frontend_display', $entry); + $addData = array('from' => 'functions_entries:printEntries'); + if ($entry['is_cached']) { + $addData['no_scramble'] = true; + } + serendipity_plugin_api::hook_event('frontend_display', $entry, $addData); if ($preview) { $entry['author'] = $entry['realname']; @@ -1174,7 +1178,7 @@ function serendipity_updertEntry($entry) { } if (!serendipity_db_bool($entry['isdraft'])) { - serendipity_plugin_api::hook_event('frontend_display', $entry, array('no_scramble' => true)); + serendipity_plugin_api::hook_event('frontend_display', $entry, array('no_scramble' => true, 'from' => 'functions_entries:updertEntry')); serendipity_handle_references($entry['id'], $serendipity['blogTitle'], $entry['title'], $entry['body'] . $entry['extended'], $newEntry); } diff --git a/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php b/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php index 9c953ce..83687c1 100644 --- a/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php +++ b/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php @@ -478,7 +478,8 @@ class serendipity_event_entryproperties extends serendipity_event if ($is_cache) { // Previous calls to frontend_display used the "no_scramble" atteribute to not tinker with the data. // We now need to call those plugins that have not yet operated before. - serendipity_plugin_api::hook_event('frontend_display_cache', $eventData); + $to_addData = array('from' => 'entryproperties:' . $event); + serendipity_plugin_api::hook_event('frontend_display_cache', $eventData, $to_addData); $serendipity['POST']['properties']['cache_body'] = $eventData['body']; $serendipity['POST']['properties']['cache_extended'] = $eventData['extended']; } -- 2.39.5