]> git.mxchange.org Git - friendica.git/blobdiff - mod/api.php
Merge pull request #3397 from tobiasd/20170427-robots
[friendica.git] / mod / api.php
index 406ef26c1c76adf22993b14e27da1badd1c87bb8..3916636cfd32f02bbdbdbfa1d28d4a1251db792a 100644 (file)
@@ -20,9 +20,9 @@ function oauth_get_client($request){
        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());