From b09db0ec2a35590cb13cda6ed053edc10e671035 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Fri, 17 Feb 2012 16:19:56 -0800 Subject: Refs #18. Doing an access check on TidypicsAlbum->getImageList() to only return images the current user can access. This is a simple fix, but requires an extra DB call for the first getImageList() call. --- lib/tidypics.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/tidypics.php') diff --git a/lib/tidypics.php b/lib/tidypics.php index 7426a048e..38c6b31a8 100644 --- a/lib/tidypics.php +++ b/lib/tidypics.php @@ -190,6 +190,16 @@ function tidypics_list_photos(array $options = array()) { return elgg_view_entity_list($sorted_entities, $options); } +/** + * Returns just a guid from a database $row. Used in elgg_get_entities()'s callback. + * + * @param stdClass $row + * @return type + */ +function tp_guid_callback($row) { + return ($row->guid) ? $row->guid : false; +} + /********************************************************************* * the functions below replace broken core functions or add functions -- cgit v1.2.3