diff --git a/admin/themes/default/js/batchManagerGlobal.js b/admin/themes/default/js/batchManagerGlobal.js index 26e174b50..803402dbe 100644 --- a/admin/themes/default/js/batchManagerGlobal.js +++ b/admin/themes/default/js/batchManagerGlobal.js @@ -288,8 +288,14 @@ jQuery('#applyAction').click(function(e) { image_id: image_ids.join(',') }, dataType: 'json', - success: ( function(data) { todo += data.result.details.nb_processed; progressDelete(todo, progressBar_max, data.result.success) }), - error: ( function(data) { todo += data.result.details.nb_processed; progressDelete(todo, progressBar_max, false) }) + success: ( function(data) { + todo += data.result.nb_processed; + progressDelete(todo, progressBar_max, true) + }), + error: ( function(data) { + todo += deleteBlockSize; // TODO: might be not exact, if last query + progressDelete(todo, progressBar_max, false) + }) }); image_ids = Array(); @@ -304,9 +310,6 @@ function progressDelete(val, max, success) { boxImage: 'themes/default/images/progressbar.gif', barImage: 'themes/default/images/progressbg_orange.gif' }); - type = success ? 'regenerateSuccess': 'regenerateError' - s = jQuery('[name="'+type+'"]').val(); - jQuery('[name="'+type+'"]').val(++s); if (val == max) { jQuery('#applyAction').click(); diff --git a/include/ws_functions/pwg.images.php b/include/ws_functions/pwg.images.php index 58dae7857..b6647c8b5 100644 --- a/include/ws_functions/pwg.images.php +++ b/include/ws_functions/pwg.images.php @@ -1743,15 +1743,8 @@ function ws_images_delete($params, $service) if ($params['return_details']) { return array( - 'success' => true, - 'details' => array( - 'nb_processed' => count($image_ids), - ), - ); - } - else - { - return true; + 'nb_processed' => count($image_ids), + ); } }