Some more changed calls

This commit is contained in:
Michael 2017-11-22 09:11:44 +00:00
parent 7c3fd2adb5
commit c6c180e8b9
2 changed files with 13 additions and 25 deletions

View file

@ -3435,11 +3435,7 @@ function api_fr_photoalbum_delete($type)
}
// now let's delete all photos from the album
$result = q(
"DELETE FROM `photo` WHERE `uid` = %d AND `album` = '%s'",
intval(api_user()),
dbesc($album)
);
$result = dba::delete('photo', array('uid' => api_user(), 'album' => $album));
// return success of deletion or error message
if ($result) {
@ -3722,11 +3718,7 @@ function api_fr_photo_delete($type)
throw new BadRequestException("photo not available");
}
// now we can perform on the deletion of the photo
$result = q(
"DELETE FROM `photo` WHERE `uid` = %d AND `resource-id` = '%s'",
intval(api_user()),
dbesc($photo_id)
);
$result = dba::delete('photo', array('uid' => api_user(), 'resource-id' => $photo_id));
// return success of deletion or error message
if ($result) {