diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2012-03-16 13:27:03 -0700 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2012-03-16 13:27:03 -0700 |
commit | e6e33ca1a7afb00a855f57df5a5263674b23c93c (patch) | |
tree | 2c6a8c50486da6deecb9a6413b62e734c2cc5c44 /lib | |
parent | 51f020d059980aaa391d90cb9aedbb89286dd620 (diff) | |
download | elgg-e6e33ca1a7afb00a855f57df5a5263674b23c93c.tar.gz elgg-e6e33ca1a7afb00a855f57df5a5263674b23c93c.tar.bz2 |
Fixes #21, #22. Using TidypicsAlbum->viewImages() instead of tidypics_list_photos for listing photos.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tidypics.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/tidypics.php b/lib/tidypics.php index 1b230cbe2..16773f982 100644 --- a/lib/tidypics.php +++ b/lib/tidypics.php @@ -59,6 +59,12 @@ function tp_get_img_dir() { return $file->getFilenameOnFilestore() . 'image/'; } +/** + * Prepare vars for a form, pulling from an entity or sticky forms. + * + * @param type $entity + * @return type + */ function tidypics_prepare_form_vars($entity = null) { // input names => defaults $values = array( @@ -91,6 +97,11 @@ function tidypics_prepare_form_vars($entity = null) { return $values; } +/** + * Returns available image libraries. + * + * @return string + */ function tidypics_get_image_libraries() { $options = array(); if (extension_loaded('gd')) { @@ -144,6 +155,11 @@ function tidypics_is_upgrade_available() { /** * This lists the photos in an album as sorted by metadata * + * @todo this only supports a single album. The only case for use a + * procedural function like this instead of TidypicsAlbum::viewImgaes() is to + * fetch images across albums as a helper to elgg_get_entities(). + * This should function be deprecated or fixed to work across albums. + * * @param array $options * @return string */ @@ -180,6 +196,7 @@ function tidypics_list_photos(array $options = array()) { foreach ($entities as $entity) { $keys[] = $entity->guid; } + var_dump($options); $entities = array_combine($keys, $entities); $sorted_entities = array(); |