]> git.mjollnir.org Git - s9y.git/commitdiff
Optimize to avoid duplicate fetch
authorgarvinhicking <garvinhicking>
Tue, 27 Feb 2007 12:14:20 +0000 (12:14 +0000)
committergarvinhicking <garvinhicking>
Tue, 27 Feb 2007 12:14:20 +0000 (12:14 +0000)
plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php

index 40cebae47cec3897102f600794383f1f2bf9a459..c78b4f90fb801c4b976519fac75e09ed0ed97536 100644 (file)
@@ -598,6 +598,10 @@ class serendipity_event_entryproperties extends serendipity_event
                     break;
 
                 case 'frontend_entryproperties':
+                    if (is_array($eventData[0]['properties'])) {
+                        // Skip fetching entryproperties again, it has already been done in functions_entries::fetchEntry().
+                        return true;
+                    }
                     $and = $this->returnQueryCondition($is_cache);
                     $q = "SELECT entryid, property, value FROM {$serendipity['dbPrefix']}entryproperties WHERE entryid IN (" . implode(', ', array_keys($addData)) . ") $and";