mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-27 11:49:56 +03:00
Fix for #2114: Check for photos missing md5sum before trying to update md5sums
This commit is contained in:
parent
a887bce5ba
commit
545e81e96d
1 changed files with 8 additions and 2 deletions
|
@ -2593,8 +2593,14 @@ function ws_images_setMd5sum($params, $service)
|
||||||
|
|
||||||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
||||||
|
|
||||||
$md5sum_ids_to_add = array_slice(get_photos_no_md5sum(), 0, $params['block_size']);
|
$nb_no_md5sum = count(get_photos_no_md5sum());
|
||||||
$added_count = add_md5sum($md5sum_ids_to_add);
|
$added_count = 0;
|
||||||
|
|
||||||
|
if ($nb_no_md5sum > 0)
|
||||||
|
{
|
||||||
|
$md5sum_ids_to_add = array_slice(get_photos_no_md5sum(), 0, $params['block_size']);
|
||||||
|
$added_count = add_md5sum($md5sum_ids_to_add);
|
||||||
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'nb_added' => $added_count,
|
'nb_added' => $added_count,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue