]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Post/Thread.php
Merge branch 'develop' into new_image_presentation
[friendica.git] / src / Model / Post / Thread.php
index f5a5345df029bb4153713938b43523bdb6025f6e..002b5ecb58bf8b2e8ae63b4b14a7e7d7f66412bf 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
 namespace Friendica\Model\Post;
 
 use \BadMethodCallException;
-use Friendica\Core\Protocol;
 use Friendica\Database\Database;
 use Friendica\Database\DBA;
 use Friendica\Database\DBStructure;
-use Friendica\Model\Post;
+use Friendica\DI;
 
 class Thread
 {
@@ -44,7 +43,7 @@ class Thread
                        throw new BadMethodCallException('Empty URI_id');
                }
 
-               $fields = DBStructure::getFieldsForTable('post-thread', $data);
+               $fields = DI::dbaDefinition()->truncateFieldsForTable('post-thread', $data);
 
                // Additionally assign the key fields
                $fields['uri-id'] = $uri_id;
@@ -67,7 +66,7 @@ class Thread
                        throw new BadMethodCallException('Empty URI_id');
                }
 
-               $fields = DBStructure::getFieldsForTable('post-thread', $data);
+               $fields = DI::dbaDefinition()->truncateFieldsForTable('post-thread', $data);
 
                // Remove the key fields
                unset($fields['uri-id']);