From 3bc63bdc8a512a6b4fa39b2378b70669961c62a5 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Thu, 3 Nov 2005 11:51:41 +0000 Subject: [PATCH] Fix entrycache plugin problems --- docs/NEWS | 4 ++++ .../serendipity_event_entryproperties.php | 3 +++ .../serendipity_event_karma/serendipity_event_karma.php | 7 +------ .../serendipity_event_trackexits.php | 5 +++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index 4c5e6eb..a0f4672 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,10 @@ Version 1.0 () ------------------------------------------------------------------------ + * Fix certain plugins to correctly behave when using entry- + properties caching, by re-executing plugins that were not executed + because they "scramble" the true content. (garvinhicking) + Version 0.9.1 () ------------------------------------------------------------------------ diff --git a/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php b/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php index 95f37f5..f9fbcfc 100644 --- a/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php +++ b/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php @@ -504,6 +504,9 @@ 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); $serendipity['POST']['properties']['cache_body'] = $eventData['body']; $serendipity['POST']['properties']['cache_extended'] = $eventData['extended']; } diff --git a/plugins/serendipity_event_karma/serendipity_event_karma.php b/plugins/serendipity_event_karma/serendipity_event_karma.php index 4d6d5fb..0309b18 100644 --- a/plugins/serendipity_event_karma/serendipity_event_karma.php +++ b/plugins/serendipity_event_karma/serendipity_event_karma.php @@ -65,14 +65,13 @@ class serendipity_event_karma extends serendipity_event $propbag->add('description', PLUGIN_KARMA_BLAHBLAH); $propbag->add('stackable', false); $propbag->add('author', 'Garvin Hicking'); - $propbag->add('version', '1.6'); + $propbag->add('version', '1.7'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', 'php' => '4.1.0' )); $propbag->add('event_hooks', array('frontend_configure' => true, 'entry_display' => true, 'css' => true, 'event_additional_statistics' => true)); - $propbag->add('scrambles_true_content', true); $propbag->add('groups', array('STATISTICS')); $propbag->add('configuration', array('karma_active', 'visits_active', 'max_entrytime', 'max_votetime', 'extended_only', 'max_karmatime', 'logging')); } @@ -415,10 +414,6 @@ class serendipity_event_karma extends serendipity_event break; case 'entry_display': - if ($bag->get('scrambles_true_content') && is_array($addData) && isset($addData['no_scramble'])) { - return true; - } - if ($this->get_config('version') != PLUGIN_KARMA_VERSION) { $this->checkScheme(); } diff --git a/plugins/serendipity_event_trackexits/serendipity_event_trackexits.php b/plugins/serendipity_event_trackexits/serendipity_event_trackexits.php index e9d829a..934e220 100644 --- a/plugins/serendipity_event_trackexits/serendipity_event_trackexits.php +++ b/plugins/serendipity_event_trackexits/serendipity_event_trackexits.php @@ -27,14 +27,14 @@ class serendipity_event_trackexits extends serendipity_event $propbag->add('description', PLUGIN_EVENT_TRACKBACK_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '1.4'); + $propbag->add('version', '1.5'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', 'php' => '4.1.0' )); $propbag->add('cachable_events', array('frontend_display' => true)); - $propbag->add('event_hooks', array('frontend_display' => true)); + $propbag->add('event_hooks', array('frontend_display' => true, 'frontend_display_cache' => true)); $propbag->add('scrambles_true_content', true); $propbag->add('groups', array('STATISTICS')); @@ -112,6 +112,7 @@ class serendipity_event_trackexits extends serendipity_event return true; } + case 'frontend_display_cache': $serendipity['encodeExitsCallback_entry_id'] = (int)(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. -- 2.39.5