]> git.mxchange.org Git - friendica.git/blobdiff - mod/attach.php
Renamed functions
[friendica.git] / mod / attach.php
index 0b88fe28fc4a769533a9a80a0b3937c8156dc32a..99f0fc46000bdb54c6ef74678a53779bb3a64a1c 100644 (file)
@@ -5,8 +5,7 @@
 
 use Friendica\App;
 use Friendica\Core\L10n;
-use Friendica\Database\dba;
-use Friendica\Database\DBM;
+use Friendica\Database\DBA;
 
 require_once 'include/dba.php';
 require_once 'include/security.php';
@@ -22,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;
        }
@@ -33,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;
        }