From: garvinhicking Date: Tue, 27 Feb 2007 12:14:20 +0000 (+0000) Subject: Optimize to avoid duplicate fetch X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ac4be8cf0360c514aa2ebfa6b81cd31f396717de;p=s9y.git Optimize to avoid duplicate fetch --- 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";