]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Item.php
Attach: store, update, delete. Model and views
[friendica.git] / src / Model / Item.php
index 0451e95b370308cf240e86e9f4424e19e928eb31..a6e378034b09cf508442d601c7e9a5078655e80d 100644 (file)
@@ -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']]);
                        }
                }