X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fwall_attach.php;h=18125685450c4760929ce37f90926f69f16a4a94;hb=54905a3d81065915418af7f96953f957bf795300;hp=15e3d3f75e2384f8a8030e31d88c58f2280fb3f2;hpb=46ba1a46f5b7b84f6e94fdbdbe87c4f1f320c90f;p=friendica.git diff --git a/mod/wall_attach.php b/mod/wall_attach.php index 15e3d3f75e..1812568545 100644 --- a/mod/wall_attach.php +++ b/mod/wall_attach.php @@ -3,7 +3,7 @@ require_once('include/attach.php'); require_once('include/datetime.php'); -function wall_attach_post(&$a) { +function wall_attach_post(App &$a) { $r_json = (x($_GET,'response') && $_GET['response']=='json'); @@ -12,7 +12,7 @@ function wall_attach_post(&$a) { $r = q("SELECT `user`.*, `contact`.`id` FROM `user` LEFT JOIN `contact` on `user`.`uid` = `contact`.`uid` WHERE `user`.`nickname` = '%s' AND `user`.`blocked` = 0 and `contact`.`self` = 1 LIMIT 1", dbesc($nick) ); - if(! count($r)){ + if (! dbm::is_result($r)) { if ($r_json) { echo json_encode(array('error'=>t('Invalid request.'))); killme(); @@ -55,7 +55,7 @@ function wall_attach_post(&$a) { intval($contact_id), intval($page_owner_uid) ); - if(count($r)) { + if (dbm::is_result($r)) { $can_post = true; $visitor = $contact_id; } @@ -168,7 +168,7 @@ function wall_attach_post(&$a) { dbesc($hash) ); - if(! count($r)) { + if (! dbm::is_result($r)) { $msg = t('File upload failed.'); if ($r_json) { echo json_encode(array('error'=>$msg));