Fixes #272 missing md5sum

* dashboard: add warning if missing checksums
* add a "compute all missing md5sum" option in batch manager (inspired by delete orphans)
* progress bar when computing md5sums
This commit is contained in:
Teatek
2019-01-22 10:26:52 +01:00
committed by Pierrick Le Gall
parent 29f938acba
commit b05241f508
10 changed files with 206 additions and 4 deletions
+13 -1
View File
@@ -159,7 +159,7 @@ function ws_addDefaultMethods( $arr )
'pwg.categories.getImages',
'ws_categories_getImages',
array_merge(array(
'cat_id' => array('default'=>null,
'cat_id' => array('default'=>null,
'flags'=>WS_PARAM_FORCE_ARRAY,
'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE),
'recursive' => array('default'=>false,
@@ -510,6 +510,18 @@ function ws_addDefaultMethods( $arr )
array('admin_only'=>true, 'post_only'=>true)
);
$service->addMethod(
'pwg.images.setMd5sum',
'ws_images_setMd5sum',
array(
'block_size' => array('default'=>1000, 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE),
'pwg_token' => array(),
),
'Set md5sum column, by blocks. Returns how many md5sums were added and how many are remaining.',
$ws_functions_root . 'pwg.images.php',
array('admin_only'=>true, 'post_only'=>true)
);
$service->addMethod(
'pwg.images.deleteOrphans',
'ws_images_deleteOrphans',