]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Attach.php
Merge pull request #12589 from MrPetovan/bug/warnings
[friendica.git] / src / Model / Attach.php
index e4d58c4b07b6c6a719ee3fc3d249b23aefde432a..2cf2d9efcf62c43210b6e765d0ad8bfc2f8a6e2e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -23,7 +23,6 @@ namespace Friendica\Model;
 
 use Friendica\Core\System;
 use Friendica\Database\DBA;
-use Friendica\Database\DBStructure;
 use Friendica\DI;
 use Friendica\Core\Storage\Exception\InvalidClassStorageException;
 use Friendica\Core\Storage\Exception\ReferenceStorageException;
@@ -44,9 +43,9 @@ class Attach
         * @return array field list
         * @throws \Exception
         */
-       private static function getFields()
+       private static function getFields(): array
        {
-               $allfields = DBStructure::definition(DI::app()->getBasePath(), false);
+               $allfields = DI::dbaDefinition()->getAll();
                $fields = array_keys($allfields['attach']['fields']);
                array_splice($fields, array_search('data', $fields), 1);
                return $fields;