From ac4be8cf0360c514aa2ebfa6b81cd31f396717de Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Tue, 27 Feb 2007 12:14:20 +0000 Subject: [PATCH] Optimize to avoid duplicate fetch --- .../serendipity_event_entryproperties.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php b/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php index 40cebae..c78b4f9 100644 --- a/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php +++ b/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php @@ -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"; -- 2.39.5