mirror of
https://github.com/friendica/friendica
synced 2025-04-25 01:50:11 +00:00
Improve dba::selectFirst calls
- Fix remaining $r[0] references - Rename $r to meaningful names
This commit is contained in:
parent
465e1d6a5c
commit
5fc4927764
29 changed files with 228 additions and 250 deletions
|
@ -58,9 +58,9 @@ class OEmbed
|
|||
$a = get_app();
|
||||
|
||||
$condition = ['url' => normalise_link($embedurl), 'maxwidth' => $a->videowidth];
|
||||
$r = dba::selectFirst('oembed', ['content'], $condition);
|
||||
if (DBM::is_result($r)) {
|
||||
$txt = $r["content"];
|
||||
$oembed = dba::selectFirst('oembed', ['content'], $condition);
|
||||
if (DBM::is_result($oembed)) {
|
||||
$txt = $oembed["content"];
|
||||
} else {
|
||||
$txt = Cache::get($a->videowidth . $embedurl);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue