X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fapi.php;h=3916636cfd32f02bbdbdbfa1d28d4a1251db792a;hb=8bdc906013461464b475c4f10918adff8730dea6;hp=da2c40c3055a54b566cfd92bdcaf6a40680b65a0;hpb=8ec424325375aa923c7d2d78ac8ddcc352f09cff;p=friendica.git diff --git a/mod/api.php b/mod/api.php index da2c40c305..3916636cfd 100644 --- a/mod/api.php +++ b/mod/api.php @@ -14,15 +14,15 @@ function oauth_get_client($request){ AND `tokens`.`id`='%s' AND `tokens`.`scope`='request'", dbesc($token)); - if (!count($r)) + if (!dbm::is_result($r)) return null; return $r[0]; } -function api_post(&$a) { +function api_post(App $a) { - if(! local_user()) { + if (! local_user()) { notice( t('Permission denied.') . EOL); return; } @@ -34,7 +34,7 @@ function api_post(&$a) { } -function api_content(&$a) { +function api_content(App $a) { if ($a->cmd=='api/oauth/authorize'){ /* * api/oauth/authorize interact with the user. return a standard page @@ -84,7 +84,7 @@ function api_content(&$a) { } - if(! local_user()) { + if (! local_user()) { /// @TODO We need login form to redirect to this page notice( t('Please login to continue.') . EOL ); return login(false,$request->get_parameters());