]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Attach.php
spelling: protocol
[friendica.git] / src / Model / Attach.php
index e4d58c4b07b6c6a719ee3fc3d249b23aefde432a..8dd837d5d4afb93c5c17c727406e47d896de8a9b 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;
@@ -33,7 +32,7 @@ use Friendica\Util\Mimetype;
 use Friendica\Security\Security;
 
 /**
- * Class to handle attach dabatase table
+ * Class to handle attach database table
  */
 class Attach
 {
@@ -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;
@@ -193,7 +192,7 @@ class Attach
         * @param string  $allow_cid Permissions, allowed contacts. optional, default = ''
         * @param string  $allow_gid Permissions, allowed groups. optional, default = ''
         * @param string  $deny_cid  Permissions, denied contacts.optional, default = ''
-        * @param string  $deny_gid  Permissions, denied greoup.optional, default = ''
+        * @param string  $deny_gid  Permissions, denied group.optional, default = ''
         *
         * @return boolean|integer Row id on success, False on errors
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException