mirror of
https://github.com/friendica/friendica
synced 2025-04-27 01:10:14 +00:00
Some easy to replace "q" calls have been replaced by "DBA" calls (#5632)
* Some easy to replace "q" calls have been replaced by "DBA" calls * Simplified the GUID creation * And one in the API ... * And OStatus has got some DBA calls more * Just some more replaced database calls * The event query is now simplified * Events are now shown again * subthread is now using the DBA calls as well * Some more replaced database calls * And some more replaced database calls and prevented notices * Better use gravity * Some more replaced database stuff * Some more replaced database calls in DFRN.php * The gcontact class now has got the new DBA functions as well * The Contact class is now changed to new database functions as well * Small correction * We can now delete without cascade * One more functionality is safe for future changes
This commit is contained in:
parent
dfe4413463
commit
7f3fb34c24
21 changed files with 275 additions and 501 deletions
|
@ -56,13 +56,11 @@ class Mail
|
|||
|
||||
if (strlen($replyto)) {
|
||||
$reply = true;
|
||||
$r = q("SELECT `convid` FROM `mail` WHERE `uid` = %d AND (`uri` = '%s' OR `parent-uri` = '%s') LIMIT 1",
|
||||
intval(local_user()),
|
||||
DBA::escape($replyto),
|
||||
DBA::escape($replyto)
|
||||
);
|
||||
if (DBA::isResult($r)) {
|
||||
$convid = $r[0]['convid'];
|
||||
$condition = ["`uid` = ? AND (`uri` = ? OR `parent-uri` = ?)",
|
||||
local_user(), $replyto, $replyto];
|
||||
$mail = DBA::selectFirst('mail', ['convid'], $condition);
|
||||
if (DBA::isResult($mail)) {
|
||||
$convid = $mail['convid'];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue