mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
issue #2114 calculate missing md5sum only once
This commit is contained in:
@@ -2661,12 +2661,12 @@ function ws_images_setMd5sum($params, $service)
|
||||
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
||||
|
||||
$nb_no_md5sum = count(get_photos_no_md5sum());
|
||||
$no_md5sum_ids = get_photos_no_md5sum();
|
||||
$added_count = 0;
|
||||
|
||||
if ($nb_no_md5sum > 0)
|
||||
if (count($no_md5sum_ids) > 0)
|
||||
{
|
||||
$md5sum_ids_to_add = array_slice(get_photos_no_md5sum(), 0, $params['block_size']);
|
||||
$md5sum_ids_to_add = array_slice($no_md5sum_ids, 0, $params['block_size']);
|
||||
$added_count = add_md5sum($md5sum_ids_to_add);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user