Ignore:
Timestamp:
May 28, 2014, 6:41:56 PM (10 years ago)
Author:
plg
Message:

feature 2616: better behavior at the end of upload (more like with uploadify, but no page reload)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/ws_functions/pwg.images.php

    r28552 r28554  
    13661366    $image_infos = pwg_db_fetch_assoc(pwg_query($query));
    13671367
     1368    $query = '
     1369SELECT
     1370    COUNT(*) AS nb_photos
     1371  FROM '.IMAGE_CATEGORY_TABLE.'
     1372  WHERE category_id = '.$params['category'][0].'
     1373;';
     1374    $category_infos = pwg_db_fetch_assoc(pwg_query($query));
     1375
     1376    $category_name = get_cat_display_name_from_id($params['category'][0], null);
     1377   
    13681378    return array(
    13691379      'image_id' => $image_id,
    13701380      'src' => DerivativeImage::thumb_url($image_infos),
    13711381      'name' => $image_infos['name'],
     1382      'category' => array(
     1383        'id' => $params['category'][0],
     1384        'nb_photos' => $category_infos['nb_photos'],
     1385        'label' => $category_name,
     1386        )
    13721387      );
    13731388  }
Note: See TracChangeset for help on using the changeset viewer.