]> git.mjollnir.org Git - s9y.git/commitdiff
Fix entrycache plugin problems
authorgarvinhicking <garvinhicking>
Thu, 3 Nov 2005 11:51:41 +0000 (11:51 +0000)
committergarvinhicking <garvinhicking>
Thu, 3 Nov 2005 11:51:41 +0000 (11:51 +0000)
docs/NEWS
plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php
plugins/serendipity_event_karma/serendipity_event_karma.php
plugins/serendipity_event_trackexits/serendipity_event_trackexits.php

index 4c5e6eb6fbd50d878c7a62082b9a169c351f3c79..a0f4672671f784236fb0f030d17db4dc7c9b4b75 100644 (file)
--- 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 ()
 ------------------------------------------------------------------------
 
index 95f37f54d1a7877471eca5b745157813bf31e481..f9fbcfca0f86f5a50ef53eeb180eabc957ff7363 100644 (file)
@@ -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'];
                     }
index 4d6d5fb6d493762fd4993fb2d613905c3e7af1ad..0309b183e4436e924fcff9412c0c0fab82791fd9 100644 (file)
@@ -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();
                     }
index e9d829af344035cbc1150907d0490c99f6eaf3a6..934e2202d12eece0017f7d2886d7d0bb7ec3be1e 100644 (file)
@@ -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.