]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #4932: Allow plugins to be saved in entity cache
authorSteve Clay <steve@mrclay.org>
Mon, 26 Nov 2012 06:20:30 +0000 (01:20 -0500)
committerSteve Clay <steve@mrclay.org>
Mon, 26 Nov 2012 06:20:30 +0000 (01:20 -0500)
engine/lib/entities.php

index a14160e14c18bb73371d448867829be28d0111e0..0b28750d5b8ee67708800fc0977329de1f57a4ff 100644 (file)
@@ -59,9 +59,9 @@ function invalidate_cache_for_entity($guid) {
 function cache_entity(ElggEntity $entity) {
        global $ENTITY_CACHE;
 
-       // Don't cache entities while access control is off, otherwise they could be
+       // Don't cache non-plugin entities while access control is off, otherwise they could be
        // exposed to users who shouldn't see them when control is re-enabled.
-       if (elgg_get_ignore_access()) {
+       if (!($entity instanceof ElggPlugin) && elgg_get_ignore_access()) {
                return;
        }