<?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
*
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;
use Friendica\Security\Security;
/**
- * Class to handle attach dabatase table
+ * Class to handle attach database table
*/
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;
}
/**
- * Retrive a single record given the ID
+ * Retrieve a single record given the ID
*
* @param int $id Row id of the record
*
}
/**
- * Retrive a single record given the ID
+ * Retrieve a single record given the ID
*
* @param int $id Row id of the record
*
* @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