Use Model\Photo as much as possible
Most important is to use `Photo::delete()` to have backend to remove data.
This commit is contained in:
parent
d549787bc1
commit
8c75c26361
8 changed files with 39 additions and 56 deletions
|
@ -344,7 +344,7 @@ function photos_post(App $a)
|
|||
}
|
||||
|
||||
if (DBA::isResult($r)) {
|
||||
Photo::delete(['resource-id' => $r[0]['resource-id'], 'uid' => $page_owner_uid]);
|
||||
Photo::delete(['uid' => $page_owner_uid, 'resource-id' => $r[0]['resource-id']]);
|
||||
|
||||
Item::deleteForUser(['resource-id' => $r[0]['resource-id'], 'uid' => $page_owner_uid], $page_owner_uid);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue