diff options
author | plegall <plg@piwigo.org> | 2015-12-03 16:10:50 +0100 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2015-12-03 16:10:50 +0100 |
commit | 5be28962a16ac6a2694d0c0e1c6bff3ef7ec1100 (patch) | |
tree | 33decf311572211a7d535eb751692f3d21d77c26 /admin/include | |
parent | 27389102d1275cdefcaee9c5a4a93297fc797b8c (diff) | |
parent | 2080897f3b87ac1c1653232491c8bba56ede60f7 (diff) |
Merge branch 'feature/377-album-thumbnail'
Diffstat (limited to 'admin/include')
-rw-r--r-- | admin/include/functions.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php index 5cd44b31d..fbbcd8c55 100644 --- a/admin/include/functions.php +++ b/admin/include/functions.php @@ -887,6 +887,25 @@ SELECT uppercats } /** + */ +function get_category_representant_properties($image_id) +{ + $query = ' +SELECT id,representative_ext,path + FROM '.IMAGES_TABLE.' + WHERE id = '.$image_id.' +;'; + $row = pwg_db_fetch_assoc(pwg_query($query)); + $src = DerivativeImage::thumb_url($row); + $url = get_root_url().'admin.php?page=photo-'.$image_id; + + return array( + 'src' => $src, + 'url' => $url + ); +} + +/** * Set a new random representant to the categories. * * @param int[] $categories |