fixes #1381 orphans calculation is done only when needed by ajax call

This commit is contained in:
Matthieu Leproux
2021-07-28 16:52:44 +02:00
parent b9394d967c
commit ddbdbd93bb
4 changed files with 176 additions and 80 deletions
+12
View File
@@ -593,6 +593,18 @@ function ws_addDefaultMethods( $arr )
array('admin_only'=>true, 'post_only'=>true)
);
$service->addMethod(
'pwg.images.calculateOrphansOnAlbumDeletion',
'ws_images_calculateOrphansOnAlbumDeletion',
array(
'category_id' => array('type'=>WS_TYPE_ID,
'flags'=>WS_PARAM_FORCE_ARRAY),
),
'Return the number of orphan photos if an album is deleted.',
$ws_functions_root . 'pwg.php',
array('admin_only'=>true)
);
$service->addMethod(
'pwg.categories.getAdminList',
'ws_categories_getAdminList',