]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Attach.php
Fix warnings because of missing field
[friendica.git] / src / Model / Attach.php
index b2cc229c3d00101884dc3c618b1ac0b10fa49c32..a008b3a4d36eb9c9474d973d10388f0bfbe34aaf 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
 {
@@ -46,7 +45,7 @@ class Attach
         */
        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;
@@ -108,7 +107,7 @@ class Attach
        }
 
        /**
-        * Retrive a single record given the ID
+        * Retrieve a single record given the ID
         *
         * @param int $id Row id of the record
         *
@@ -123,7 +122,7 @@ class Attach
        }
 
        /**
-        * Retrive a single record given the ID
+        * Retrieve a single record given the ID
         *
         * @param int $id Row id of the record
         *
@@ -191,9 +190,9 @@ class Attach
         * @param string  $filetype  Mimetype. optional, default = ''
         * @param integer $filesize  File size in bytes. optional, default = null
         * @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  $allow_gid Permissions, allowed circles. optional, default = ''
+        * @param string  $deny_cid  Permissions, denied contacts. optional, default = ''
+        * @param string  $deny_gid  Permissions, denied circle. optional, default = ''
         *
         * @return boolean|integer Row id on success, False on errors
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException