]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Make metadata prefetch respect access
authorSteve Clay <steve@mrclay.org>
Sun, 2 Dec 2012 01:09:11 +0000 (20:09 -0500)
committerSteve Clay <steve@mrclay.org>
Sun, 2 Dec 2012 03:21:53 +0000 (22:21 -0500)
engine/classes/ElggVolatileMetadataCache.php
mod/profile/views/default/profile/details.php

index 24ae58d4216490a04b0d1af2b205d735cf06792b..8a33c198d8a19b88c2c540ad458ee44358f81aa8 100644 (file)
@@ -279,6 +279,9 @@ class ElggVolatileMetadataCache {
                        ),
                        'selects' => array('n.string AS name', 'v.string AS value'),
                        'order_by' => 'n_table.entity_guid, n_table.time_created ASC',
+
+                       // @todo don't know why this is necessary
+                       'wheres' => array(get_access_sql_suffix('n_table')),
                );
                $data = elgg_get_metadata($options);
 
index 3af5cb7567b8f535b7211a4a7fe531525d4cd944..7b05b0e150df25fb23591376f2dd7ca0b1fb2d92 100644 (file)
@@ -28,7 +28,7 @@ if (is_array($profile_fields) && sizeof($profile_fields) > 0) {
                        <div class="<?php echo $even_odd; ?>">
                                <b><?php echo elgg_echo("profile:{$shortname}"); ?>: </b>
                                <?php
-                                       echo elgg_view("output/{$valtype}", array('value' => $user->$shortname));
+                                       echo elgg_view("output/{$valtype}", array('value' => $value));
                                ?>
                        </div>
                        <?php