]> git.mxchange.org Git - friendica.git/commitdiff
The "attach" field is now deprecated
authorMichael <heluecht@pirati.ca>
Sat, 7 Nov 2020 08:22:59 +0000 (08:22 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 7 Nov 2020 08:22:59 +0000 (08:22 +0000)
14 files changed:
database.sql
include/api.php
src/Model/Contact.php
src/Model/Item.php
src/Model/Post/Media.php
src/Module/Diaspora/Fetch.php
src/Module/Like.php
src/Protocol/ActivityPub/Processor.php
src/Protocol/ActivityPub/Transmitter.php
src/Protocol/DFRN.php
src/Protocol/Diaspora.php
src/Protocol/Feed.php
src/Protocol/OStatus.php
static/dbstructure.config.php

index d3e75e753e03d619db62898de691c49cdf7b84cf..5e9104b7a20ff55b2e1b3f4897dfdaf346e9c5de 100644 (file)
@@ -677,7 +677,7 @@ CREATE TABLE IF NOT EXISTS `item` (
        `psid` int unsigned COMMENT 'ID of the permission set of this post',
        `resource-id` varchar(32) NOT NULL DEFAULT '' COMMENT 'Used to link other tables to items, it identifies the linked resource (e.g. photo) and if set must also set resource_type',
        `event-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'Used to link to the event.id',
-       `attach` mediumtext COMMENT 'JSON structure representing attachments to this item',
+       `attach` mediumtext COMMENT 'Deprecated',
        `allow_cid` mediumtext COMMENT 'Deprecated',
        `allow_gid` mediumtext COMMENT 'Deprecated',
        `deny_cid` mediumtext COMMENT 'Deprecated',
index 86fdeead2fb3d88acc367d4e72b907532cf55690..09184dcf9167a0023359a967f8ab4b4f64ed31ab 100644 (file)
@@ -2040,35 +2040,40 @@ function api_statuses_repeat($type)
 
        Logger::log('API: api_statuses_repeat: '.$id);
 
-       $fields = ['uri-id', 'body', 'title', 'attach', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink'];
+       $fields = ['uri-id', 'network', 'body', 'title', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink'];
        $item = Item::selectFirst($fields, ['id' => $id, 'private' => [Item::PUBLIC, Item::UNLISTED]]);
 
        if (DBA::isResult($item) && $item['body'] != "") {
-               if (strpos($item['body'], "[/share]") !== false) {
-                       $pos = strpos($item['body'], "[share");
-                       $post = substr($item['body'], $pos);
+               if (in_array($item['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::TWITTER])) {
+                       if (!Item::performActivity($id, 'announce', local_user())) {
+                               throw new InternalServerErrorException();
+                       }
+               
+                       $item_id = $id;
                } else {
-                       $post = BBCode::getShareOpeningTag($item['author-name'], $item['author-link'], $item['author-avatar'], $item['plink'], $item['created'], $item['guid']);
+                       if (strpos($item['body'], "[/share]") !== false) {
+                               $pos = strpos($item['body'], "[share");
+                               $post = substr($item['body'], $pos);
+                       } else {
+                               $post = BBCode::getShareOpeningTag($item['author-name'], $item['author-link'], $item['author-avatar'], $item['plink'], $item['created'], $item['guid']);
+
+                               if (!empty($item['title'])) {
+                                       $post .= '[h3]' . $item['title'] . "[/h3]\n";
+                               }
 
-                       if (!empty($item['title'])) {
-                               $post .= '[h3]' . $item['title'] . "[/h3]\n";
+                               $post .= $item['body'];
+                               $post .= "[/share]";
                        }
+                       $_REQUEST['body'] = $post;
+                       $_REQUEST['profile_uid'] = api_user();
+                       $_REQUEST['api_source'] = true;
 
-                       $post .= $item['body'];
-                       $post .= "[/share]";
-               }
-               $_REQUEST['body'] = $post;
-               $_REQUEST['attach'] = $item['attach'];
-               $_REQUEST['profile_uid'] = api_user();
-               $_REQUEST['api_source'] = true;
+                       if (empty($_REQUEST['source'])) {
+                               $_REQUEST["source"] = api_source();
+                       }
 
-               if (empty($_REQUEST['source'])) {
-                       $_REQUEST["source"] = api_source();
+                       $item_id = item_post($a);
                }
-
-               $item_id = item_post($a);
-
-               /// @todo Copy tags from the original post to the new one
        } else {
                throw new ForbiddenException();
        }
index 74a9619c2fdeca224e3665b0c91b138b2686bc65..67b9c903831f04abb46f2fbb71add565aefd85d8 100644 (file)
@@ -754,7 +754,6 @@ class Contact
                        $item['title'] = '';
                        $item['guid'] = '';
                        $item['uri-id'] = 0;
-                       $item['attach'] = '';
                        $slap = OStatus::salmon($item, $user);
 
                        if (!empty($contact['notify'])) {
@@ -2233,7 +2232,6 @@ class Contact
                                $item['title'] = '';
                                $item['guid'] = '';
                                $item['uri-id'] = 0;
-                               $item['attach'] = '';
 
                                $slap = OStatus::salmon($item, $owner);
 
index 25af1ce5429d4648fb7ce8c7c55c286264a316d7..834a1c218d206437764143961ae5781eda2fe1e2 100644 (file)
@@ -77,7 +77,7 @@ class Item
        const DISPLAY_FIELDLIST = [
                'uid', 'id', 'parent', 'uri-id', 'uri', 'thr-parent', 'parent-uri', 'guid', 'network', 'gravity',
                'commented', 'created', 'edited', 'received', 'verb', 'object-type', 'postopts', 'plink',
-               'wall', 'private', 'starred', 'origin', 'title', 'body', 'file', 'attach', 'language',
+               'wall', 'private', 'starred', 'origin', 'title', 'body', 'file', 'language',
                'content-warning', 'location', 'coord', 'app', 'rendered-hash', 'rendered-html', 'object',
                'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'item_id',
                'author-id', 'author-link', 'author-name', 'author-avatar', 'author-network',
@@ -95,7 +95,7 @@ class Item
        const DELIVER_FIELDLIST = ['uid', 'id', 'parent', 'uri-id', 'uri', 'thr-parent', 'parent-uri', 'guid',
                        'parent-guid', 'created', 'edited', 'verb', 'object-type', 'object', 'target',
                        'private', 'title', 'body', 'location', 'coord', 'app',
-                       'attach', 'deleted', 'extid', 'post-type', 'gravity',
+                       'deleted', 'extid', 'post-type', 'gravity',
                        'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid',
                        'author-id', 'author-link', 'owner-link', 'contact-uid',
                        'signed_text', 'signature', 'signer', 'network'];
@@ -113,7 +113,7 @@ class Item
                        'guid', 'uri-id', 'parent-uri-id', 'thr-parent-id', 'vid',
                        'contact-id', 'type', 'wall', 'gravity', 'extid', 'icid', 'psid',
                        'created', 'edited', 'commented', 'received', 'changed', 'verb',
-                       'postopts', 'plink', 'resource-id', 'event-id', 'attach', 'inform',
+                       'postopts', 'plink', 'resource-id', 'event-id', 'inform',
                        'file', 'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'post-type',
                        'private', 'pubmail', 'moderated', 'visible', 'starred', 'bookmark',
                        'unseen', 'deleted', 'origin', 'forum_mode', 'mention', 'global', 'network',
@@ -659,7 +659,7 @@ class Item
                        'guid', 'uri-id', 'parent-uri-id', 'thr-parent-id', 'vid', 'causer-id',
                        'contact-id', 'owner-id', 'author-id', 'type', 'wall', 'gravity', 'extid',
                        'created', 'edited', 'commented', 'received', 'changed', 'psid',
-                       'resource-id', 'event-id', 'attach', 'post-type', 'file',
+                       'resource-id', 'event-id', 'post-type', 'file',
                        'private', 'pubmail', 'moderated', 'visible', 'starred', 'bookmark',
                        'unseen', 'deleted', 'origin', 'forum_mode', 'mention', 'global',
                        'id' => 'item_id', 'network', 'icid',
@@ -1087,7 +1087,7 @@ class Item
                Logger::info('Mark item for deletion by id', ['id' => $item_id, 'callstack' => System::callstack()]);
                // locate item to be deleted
                $fields = ['id', 'uri', 'uri-id', 'uid', 'parent', 'parent-uri', 'origin',
-                       'deleted', 'file', 'resource-id', 'event-id', 'attach',
+                       'deleted', 'file', 'resource-id', 'event-id',
                        'verb', 'object-type', 'object', 'target', 'contact-id',
                        'icid', 'psid', 'gravity'];
                $item = self::selectFirst($fields, ['id' => $item_id]);
@@ -1144,10 +1144,9 @@ class Item
                }
 
                // If item has attachments, drop them
-               /// @TODO: this should first check if attachment is used elsewhere
-               foreach (explode(",", $item['attach']) as $attach) {
-                       preg_match("|attach/(\d+)|", $attach, $matches);
-                       if (is_array($matches) && count($matches) > 1) {
+               $attachments = Post\Media::getByURIId($item['uri-id'], [Post\Media::DOCUMENT]);
+               foreach($attachments as $attachment) {
+                       if (preg_match("|attach/(\d+)|", $attachment['url'], $matches)) {
                                Attach::delete(['id' => $matches[1], 'uid' => $item['uid']]);
                        }
                }
@@ -1693,7 +1692,6 @@ class Item
                $item['private']       = intval($item['private'] ?? self::PUBLIC);
                $item['body']          = trim($item['body'] ?? '');
                $item['raw-body']      = trim($item['raw-body'] ?? $item['body']);
-               $item['attach']        = trim($item['attach'] ?? '');
                $item['app']           = trim($item['app'] ?? '');
                $item['origin']        = intval($item['origin'] ?? 0);
                $item['postopts']      = trim($item['postopts'] ?? '');
@@ -2857,14 +2855,19 @@ class Item
                        }
 
                        if ($contact['network'] != Protocol::FEED) {
+                               $old_uri_id = $datarray["uri-id"] ?? 0;
                                $datarray["guid"] = System::createUUID();
                                unset($datarray["plink"]);
                                $datarray["uri"] = self::newURI($contact['uid'], $datarray["guid"]);
+                               $datarray["uri-id"] = ItemURI::getIdByURI($datarray["uri"]);
                                $datarray["parent-uri"] = $datarray["uri"];
                                $datarray["thr-parent"] = $datarray["uri"];
                                $datarray["extid"] = Protocol::DFRN;
                                $urlpart = parse_url($datarray2['author-link']);
                                $datarray["app"] = $urlpart["host"];
+                               if (!empty($old_uri_id)) {
+                                       Post\Media::copy($old_uri_id, $datarray["uri-id"]);
+                               }
                        } else {
                                $datarray['private'] = self::PUBLIC;
                        }
@@ -3921,7 +3924,7 @@ class Item
                $uid = $item['uid'] ?? 0;
 
                // first try to fetch the item via the GUID. This will work for all reshares that had been created on this system
-               $shared_item = self::selectFirst(['title', 'body', 'attach'], ['guid' => $shared['guid'], 'uid' => [0, $uid]]);
+               $shared_item = self::selectFirst(['title', 'body'], ['guid' => $shared['guid'], 'uid' => [0, $uid]]);
                if (!DBA::isResult($shared_item)) {
                        if (empty($shared['link'])) {
                                return $item;
@@ -3934,7 +3937,7 @@ class Item
                                return $item;
                        }
 
-                       $shared_item = self::selectFirst(['title', 'body', 'attach'], ['id' => $id]);
+                       $shared_item = self::selectFirst(['title', 'body'], ['id' => $id]);
                        if (!DBA::isResult($shared_item)) {
                                return $item;
                        }
index 1a9d4a83ea47c54876521bf61a95209490d74ed9..441fd52767d06d5a01fb1ed6a76350c7316e0b30 100644 (file)
@@ -86,6 +86,22 @@ class Media
                }
        }
 
+       /**
+        * Copy attachments from one uri-id to another
+        *
+        * @param integer $from_uri_id
+        * @param integer $to_uri_id
+        * @return void
+        */
+       public static function copy(int $from_uri_id, int $to_uri_id)
+       {
+               $attachments = self::getByURIId($from_uri_id);
+               foreach ($attachments as $attachment) {
+                       $attachment['uri-id'] = $to_uri_id;
+                       self::insert($attachment);
+               }
+       }
+
        /**
         * Creates the "[attach]" element from the given attributes
         *
index 028d7e452e3f010c407fcbec4efc9b9dc8404d12..67f6fd0f7ec3f489f232cf6f13bb7ea08374516a 100644 (file)
@@ -52,7 +52,7 @@ class Fetch extends BaseModule
                // Fetch the item
                $fields = [
                        'uid', 'title', 'body', 'guid', 'contact-id', 'private', 'created', 'received', 'app', 'location', 'coord', 'network',
-                       'event-id', 'resource-id', 'author-link', 'author-avatar', 'author-name', 'plink', 'owner-link', 'attach', 'uri-id'
+                       'event-id', 'resource-id', 'author-link', 'author-avatar', 'author-name', 'plink', 'owner-link', 'uri-id'
                ];
                $condition = ['wall' => true, 'private' => [Item::PUBLIC, Item::UNLISTED], 'guid' => $guid, 'network' => [Protocol::DFRN, Protocol::DIASPORA]];
                $item = Item::selectFirst($fields, $condition);
index ea6f20e1652a235f2e9f381b9766b63f7c234f9e..4a6831b738d3f65fae137533a9e0fc2af1d563e9 100644 (file)
@@ -54,7 +54,7 @@ class Like extends BaseModule
                // @TODO: Replace with parameter from router
                $itemId = (($app->argc > 1) ? Strings::escapeTags(trim($app->argv[1])) : 0);
 
-               if (in_array($verb, [ 'announce', 'unannounce'])) {
+               if (in_array($verb, ['announce', 'unannounce'])) {
                        $item = Item::selectFirst(['network'], ['id' => $itemId]);
                        if ($item['network'] == Protocol::DIASPORA) {
                                self::performDiasporaReshare($itemId);
@@ -85,7 +85,7 @@ class Like extends BaseModule
 
        private static function performDiasporaReshare(int $itemId)
        {
-               $fields = ['uri-id', 'body', 'title', 'attach', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink'];
+               $fields = ['uri-id', 'body', 'title', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink'];
                $item = Item::selectFirst($fields, ['id' => $itemId, 'private' => [Item::PUBLIC, Item::UNLISTED]]);
                if (!DBA::isResult($item) || ($item['body'] == '')) {
                        return;
@@ -105,7 +105,6 @@ class Like extends BaseModule
                        $post .= '[/share]';
                }
                $_REQUEST['body'] = $post;
-               $_REQUEST['attach'] = $item['attach'];
                $_REQUEST['profile_uid'] = local_user();
 
                require_once 'mod/item.php';
index 5af712fc7893a61979c5490e293d14ec0c8a08b5..bd7735f5ae64197bc8e8746eb541a6b0ebbeac05 100644 (file)
@@ -135,8 +135,6 @@ class Processor
                        return $item;
                }
 
-               $item['attach'] = '';
-
                foreach ($activity['attachments'] as $attach) {
                        switch ($attach['type']) {
                                case 'link':
@@ -189,21 +187,6 @@ class Processor
                                                }
 
                                                $item['body'] .= "\n[video]" . $attach['url'] . '[/video]';
-                                       } elseif (!empty($attach['url'])) {
-                                               if (!empty($item['attach'])) {
-                                                       $item['attach'] .= ',';
-                                               } else {
-                                                       $item['attach'] = '';
-                                               }
-
-                                               $item['attach'] .= Post\Media::getAttachElement(
-                                                       $attach['url'],
-                                                       $attach['length'] ?? 0,
-                                                       $attach['mediaType'] ?? '',
-                                                       $attach['name'] ?? ''
-                                               );
-                                       } else {
-                                               Logger::notice('Unknown attachment', ['attach' => $attach]);
                                        }
                        }
                }
@@ -787,6 +770,10 @@ class Processor
                        $object_actor = $object['actor'];
                } elseif (!empty($object['attributedTo'])) {
                        $object_actor = $object['attributedTo'];
+                       if (is_array($object_actor)) {
+                               $compacted = JsonLD::compact($object);
+                               $object_actor = JsonLD::fetchElement($compacted, 'as:attributedTo', '@id');
+                       }
                } else {
                        // Shouldn't happen
                        $object_actor = '';
index bb11019b5beff48ad15dcb41d92df84f501962bf..f5ef35337af8a3964fe5b539a64c47e3480db266 100644 (file)
@@ -829,7 +829,6 @@ class Transmitter
                $mail['gravity'] = ($mail['reply'] ? GRAVITY_COMMENT: GRAVITY_PARENT);
 
                $mail['event-type'] = '';
-               $mail['attach'] = '';
 
                $mail['parent'] = 0;
 
index 629962b97bd35f7ebc8c47633d5838dcc42e1ff6..11c4e3a14d3810f98b2478c13582819cf3b5edf3 100644 (file)
@@ -2146,9 +2146,9 @@ class DFRN
        {
                $rel = "";
                $href = "";
-               $type = "";
-               $length = "0";
-               $title = "";
+               $type = null;
+               $length = null;
+               $title = null;
                foreach ($links as $link) {
                        foreach ($link->attributes as $attributes) {
                                switch ($attributes->name) {
@@ -2165,13 +2165,8 @@ class DFRN
                                                $item["plink"] = $href;
                                                break;
                                        case "enclosure":
-                                               if (!empty($item["attach"])) {
-                                                       $item["attach"] .= ",";
-                                               } else {
-                                                       $item["attach"] = "";
-                                               }
-
-                                               $item["attach"] .= Post\Media::getAttachElement($href, $length, $type, $title);
+                                               Post\Media::insert(['uri-id' => $item['uri-id'], 'type' => Post\Media::DOCUMENT,
+                                                       'url' => $href, 'mimetype' => $type, 'size' => $length, 'description' => $title]);
                                                break;
                                }
                        }
index 1077238f711c6961e9a12b37e58d5df8e9d307e6..8c93d7c0f26ffd664e31ad87bb48b9da52c3b2ad 100644 (file)
@@ -2458,8 +2458,8 @@ class Diaspora
                }
 
                // Do we already have this item?
-               $fields = ['body', 'title', 'attach', 'app', 'created', 'object-type', 'uri', 'guid',
-                       'author-name', 'author-link', 'author-avatar', 'plink'];
+               $fields = ['body', 'title', 'app', 'created', 'object-type', 'uri', 'guid',
+                       'author-name', 'author-link', 'author-avatar', 'plink', 'uri-id'];
                $condition = ['guid' => $guid, 'visible' => true, 'deleted' => false, 'private' => [Item::PUBLIC, Item::UNLISTED]];
                $item = Item::selectFirst($fields, $condition);
 
@@ -2502,8 +2502,8 @@ class Diaspora
                        }
 
                        if ($stored) {
-                               $fields = ['body', 'title', 'attach', 'app', 'created', 'object-type', 'uri', 'guid',
-                                       'author-name', 'author-link', 'author-avatar', 'plink'];
+                               $fields = ['body', 'title', 'app', 'created', 'object-type', 'uri', 'guid',
+                                       'author-name', 'author-link', 'author-avatar', 'plink', 'uri-id'];
                                $condition = ['guid' => $guid, 'visible' => true, 'deleted' => false, 'private' => [Item::PUBLIC, Item::UNLISTED]];
                                $item = Item::selectFirst($fields, $condition);
 
@@ -2646,7 +2646,7 @@ class Diaspora
 
                Tag::storeFromBody($datarray['uri-id'], $datarray["body"]);
 
-               $datarray["attach"] = $original_item["attach"];
+               Post\Media::copy($original_item['uri-id'], $datarray['uri-id']);
                $datarray["app"]  = $original_item["app"];
 
                $datarray["plink"] = self::plink($author, $guid);
index ff35e975052939b0fbb1fa297829eb09fbbd43c1..89e7d75423bf6c5e6ac64edb08b3ad83bae3e73e 100644 (file)
@@ -437,8 +437,8 @@ class Feed
                        $enclosures = $xpath->query("enclosure|atom:link[@rel='enclosure']", $entry);
                        foreach ($enclosures AS $enclosure) {
                                $href = "";
-                               $length = 0;
-                               $type = "";
+                               $length = null;
+                               $type = null;
 
                                foreach ($enclosure->attributes AS $attribute) {
                                        if (in_array($attribute->name, ["url", "href"])) {
@@ -450,15 +450,9 @@ class Feed
                                        }
                                }
 
-                               if (!empty($item["attach"])) {
-                                       $item["attach"] .= ',';
-                               } else {
-                                       $item["attach"] = '';
+                               if (!empty($href)) {
+                                       $attachments[] = ['type' => Post\Media::DOCUMENT, 'url' => $href, 'mimetype' => $type, 'size' => $length];
                                }
-
-                               $attachments[] = ["link" => $href, "type" => $type, "length" => $length];
-
-                               $item["attach"] .= Post\Media::getAttachElement($href, $length, $type);
                        }
 
                        $taglist = [];
@@ -515,8 +509,8 @@ class Feed
                        if (!empty($contact["fetch_further_information"]) && ($contact["fetch_further_information"] < 3)) {
                                // Handle enclosures and treat them as preview picture
                                foreach ($attachments AS $attachment) {
-                                       if ($attachment["type"] == "image/jpeg") {
-                                               $preview = $attachment["link"];
+                                       if ($attachment["mimetype"] == "image/jpeg") {
+                                               $preview = $attachment["url"];
                                        }
                                }
 
@@ -576,7 +570,7 @@ class Feed
                                $item["body"] = $item["body"] . "\n" . PageInfo::getFooterFromData($data, false);
                                $taglist = $contact["fetch_further_information"] == 2 ? PageInfo::getTagsFromUrl($item["plink"], $preview, $contact["ffi_keyword_denylist"] ?? '') : [];
                                $item["object-type"] = Activity\ObjectType::BOOKMARK;
-                               unset($item["attach"]);
+                               $attachments = [];
                        } else {
                                if (!empty($summary)) {
                                        $item["body"] = '[abstract]' . HTML::toBBCode($summary, $basepath) . "[/abstract]\n" . $item["body"];
@@ -616,11 +610,15 @@ class Feed
 
                        Logger::info("Feed for contact " . $contact["url"] . " stored under id " . $id);
 
-                       if (!empty($id) && !empty($taglist)) {
+                       if (!empty($id) && (!empty($taglist) || !empty($attachments))) {
                                $feeditem = Item::selectFirst(['uri-id'], ['id' => $id]);
                                foreach ($taglist as $tag) {
                                        Tag::store($feeditem['uri-id'], Tag::HASHTAG, $tag);
                                }
+                               foreach ($attachments as $attachment) {
+                                       $attachment['uri-id'] = $feeditem['uri-id']; 
+                                       Post\Media::insert($attachment);
+                               }
                        }
                }
 
index e27e34b6b44c40e3ed136223d12266ea55268baf..e394877b354d85319d8e9f902d1720a5a8a3a15a 100644 (file)
@@ -1119,16 +1119,9 @@ class OStatus
                                                if ($filetype == 'image') {
                                                        $link_data['add_body'] .= "\n[img]".$attribute['href'].'[/img]';
                                                } else {
-                                                       if (!empty($item["attach"])) {
-                                                               $item["attach"] .= ',';
-                                                       } else {
-                                                               $item["attach"] = '';
-                                                       }
-                                                       if (!isset($attribute['length'])) {
-                                                               $attribute['length'] = "0";
-                                                       }
-                                                       $item["attach"] .= Post\Media::getAttachElement($attribute['href'],
-                                                               $attribute['length'], $attribute['type'], $attribute['title'] ?? '');
+                                                       Post\Media::insert(['uri-id' => $item['uri-id'], 'type' => Post\Media::DOCUMENT,
+                                                               'url' => $attribute['href'], 'mimetype' => $attribute['type'],
+                                                               'size' => $attribute['length'] ?? null, 'description' => $attribute['title'] ?? null]);
                                                }
                                                break;
                                        case "related":
index a3b94e0b27f69325398fc3007fe5e84527d4e98e..7df84f81ab75ee5b111bd5a8a9734f376ee399dc 100755 (executable)
@@ -747,9 +747,8 @@ return [
                        // It has to be decided whether these fields belong to the user or the structure
                        "resource-id" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => "Used to link other tables to items, it identifies the linked resource (e.g. photo) and if set must also set resource_type"],
                        "event-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "relation" => ["event" => "id"], "comment" => "Used to link to the event.id"],
-                       // Could possibly be replaced by the "attach" table?
-                       "attach" => ["type" => "mediumtext", "comment" => "JSON structure representing attachments to this item"],
                        // Deprecated fields. Will be removed in upcoming versions
+                       "attach" => ["type" => "mediumtext", "comment" => "Deprecated"],
                        "allow_cid" => ["type" => "mediumtext", "comment" => "Deprecated"],
                        "allow_gid" => ["type" => "mediumtext", "comment" => "Deprecated"],
                        "deny_cid" => ["type" => "mediumtext", "comment" => "Deprecated"],