diff options
author | plegall <plg@piwigo.org> | 2014-05-28 16:41:56 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2014-05-28 16:41:56 +0000 |
commit | 7b3783c9814173d05d5efb216d5b383a4aa2a8fe (patch) | |
tree | afd9c25ae0bc1becaf4ce2bed3467f69152e2219 /include/ws_functions | |
parent | 5ddf8e00f634ab294e15dc9373e764e019cc6c6d (diff) |
feature 2616: better behavior at the end of upload (more like with uploadify, but no page reload)
git-svn-id: http://piwigo.org/svn/trunk@28554 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/ws_functions')
-rw-r--r-- | include/ws_functions/pwg.images.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/ws_functions/pwg.images.php b/include/ws_functions/pwg.images.php index 70a7f694f..bb43be983 100644 --- a/include/ws_functions/pwg.images.php +++ b/include/ws_functions/pwg.images.php @@ -1365,10 +1365,25 @@ SELECT ;'; $image_infos = pwg_db_fetch_assoc(pwg_query($query)); + $query = ' +SELECT + COUNT(*) AS nb_photos + FROM '.IMAGE_CATEGORY_TABLE.' + WHERE category_id = '.$params['category'][0].' +;'; + $category_infos = pwg_db_fetch_assoc(pwg_query($query)); + + $category_name = get_cat_display_name_from_id($params['category'][0], null); + return array( 'image_id' => $image_id, 'src' => DerivativeImage::thumb_url($image_infos), 'name' => $image_infos['name'], + 'category' => array( + 'id' => $params['category'][0], + 'nb_photos' => $category_infos['nb_photos'], + 'label' => $category_name, + ) ); } } |