mirror of
https://github.com/friendica/friendica
synced 2025-04-27 21:50:11 +00:00
Attach: store, update, delete. Model and views
This commit is contained in:
parent
fc2b804ccc
commit
b7b3086263
3 changed files with 143 additions and 31 deletions
|
@ -26,6 +26,8 @@ use Friendica\Model\FileTag;
|
|||
use Friendica\Model\PermissionSet;
|
||||
use Friendica\Model\Term;
|
||||
use Friendica\Model\ItemURI;
|
||||
use Friendica\Model\Photo;
|
||||
use Friendica\Model\Attach;
|
||||
use Friendica\Object\Image;
|
||||
use Friendica\Protocol\Diaspora;
|
||||
use Friendica\Protocol\OStatus;
|
||||
|
@ -1039,7 +1041,7 @@ class Item extends BaseObject
|
|||
foreach (explode(", ", $item['attach']) as $attach) {
|
||||
preg_match("|attach/(\d+)|", $attach, $matches);
|
||||
if (is_array($matches) && count($matches) > 1) {
|
||||
DBA::delete('attach', ['id' => $matches[1], 'uid' => $item['uid']]);
|
||||
Attach::delete(['id' => $matches[1], 'uid' => $item['uid']]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue