X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fattach.php;h=99f0fc46000bdb54c6ef74678a53779bb3a64a1c;hb=8841519c0dfae069aff6bee6325fa868e4b9b641;hp=fd428286a6ec9d4ed655e442fe68950e86d2e389;hpb=29f7ebe307c22b275466390937b82ccb3820fb1c;p=friendica.git diff --git a/mod/attach.php b/mod/attach.php index fd428286a6..99f0fc4600 100644 --- a/mod/attach.php +++ b/mod/attach.php @@ -2,9 +2,10 @@ /** * @file mod/attach.php */ + use Friendica\App; use Friendica\Core\L10n; -use Friendica\Database\DBM; +use Friendica\Database\DBA; require_once 'include/dba.php'; require_once 'include/security.php'; @@ -20,8 +21,8 @@ function attach_init(App $a) // Check for existence, which will also provide us the owner uid - $r = dba::selectFirst('attach', [], ['id' => $item_id]); - if (!DBM::is_result($r)) { + $r = DBA::selectFirst('attach', [], ['id' => $item_id]); + if (!DBA::isResult($r)) { notice(L10n::t('Item was not found.'). EOL); return; } @@ -31,10 +32,10 @@ function attach_init(App $a) // Now we'll see if we can access the attachment $r = q("SELECT * FROM `attach` WHERE `id` = '%d' $sql_extra LIMIT 1", - dbesc($item_id) + DBA::escape($item_id) ); - if (!DBM::is_result($r)) { + if (!DBA::isResult($r)) { notice(L10n::t('Permission denied.') . EOL); return; }