diff options
| author | Brett Profitt <brett.profitt@gmail.com> | 2012-02-17 16:19:56 -0800 | 
|---|---|---|
| committer | Brett Profitt <brett.profitt@gmail.com> | 2012-02-17 16:19:56 -0800 | 
| commit | b09db0ec2a35590cb13cda6ed053edc10e671035 (patch) | |
| tree | e6f6c88d1d930ac9894e275910c541ce59d3f253 /lib | |
| parent | 894ea6758f3f99c49807df99ef4bbd95f74273dc (diff) | |
| download | elgg-b09db0ec2a35590cb13cda6ed053edc10e671035.tar.gz elgg-b09db0ec2a35590cb13cda6ed053edc10e671035.tar.bz2  | |
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.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/tidypics.php | 10 | 
1 files changed, 10 insertions, 0 deletions
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   | 
