X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fredir.php;h=d8bb7643965963c7ebe195e04e564bcc22b4a947;hb=c0cc65304b06b027219a9f162deaab90fe2a0487;hp=ab4f3220cd7d1a1ace36ece544828db9ab96d0a6;hpb=23c873fc515d7a6118f18280beba1c5c117d3746;p=friendica.git diff --git a/include/redir.php b/include/redir.php index ab4f3220cd..d8bb764396 100644 --- a/include/redir.php +++ b/include/redir.php @@ -20,7 +20,7 @@ function auto_redir(&$a, $contact_nick) { // // We also have to make sure that I'm a legitimate contact--I'm not blocked or pending. - $baseurl = $a->get_baseurl(); + $baseurl = App::get_baseurl(); $domain_st = strpos($baseurl, "://"); if($domain_st === false) return; @@ -36,9 +36,9 @@ function auto_redir(&$a, $contact_nick) { dbesc($nurl) ); - if((!$r) || (! count($r)) || $r[0]['id'] == remote_user()) + if ((! dbm::is_result($r)) || $r[0]['id'] == remote_user()) { return; - + } $r = q("SELECT * FROM contact WHERE nick = '%s' AND network = '%s' AND uid = %d AND url LIKE '%%%s%%' LIMIT 1", @@ -48,8 +48,9 @@ function auto_redir(&$a, $contact_nick) { dbesc($baseurl) ); - if(! ($r && count($r))) + if (! dbm::is_result($r)) { return; + } $cid = $r[0]['id'];