https://reisub.nsupdate.info/git
/
friendica.git
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #5719 from annando/notices-yeah
[friendica.git/.git]
/
mod
/
attach.php
diff --git
a/mod/attach.php
b/mod/attach.php
index
0b88fe2
..
99f0fc4
100644
(file)
--- a/
mod/attach.php
+++ b/
mod/attach.php
@@
-5,8
+5,7
@@
use Friendica\App;
use Friendica\Core\L10n;
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';
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
// Check for existence, which will also provide us the owner uid
- $r =
dba
::selectFirst('attach', [], ['id' => $item_id]);
- if (!DB
M::is_r
esult($r)) {
+ $r =
DBA
::selectFirst('attach', [], ['id' => $item_id]);
+ if (!DB
A::isR
esult($r)) {
notice(L10n::t('Item was not found.'). EOL);
return;
}
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",
// 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 (!DB
M::is_r
esult($r)) {
+ if (!DB
A::isR
esult($r)) {
notice(L10n::t('Permission denied.') . EOL);
return;
}
notice(L10n::t('Permission denied.') . EOL);
return;
}