From be6afad731b965a75d9fe0b254ea72858a4deec4 Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 1 Dec 2015 12:08:10 +0100 Subject: fixes #377 use Ajax calls to refresh/delete album thumbnail --- admin/include/functions.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'admin/include') 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 @@ -886,6 +886,25 @@ SELECT uppercats return $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. * -- cgit v1.2.3