]> git.mxchange.org Git - friendica.git/blobdiff - mod/api.php
Bugfix Diaspora: We exited with the wrong return values and the guid for messages...
[friendica.git] / mod / api.php
index 406ef26c1c76adf22993b14e27da1badd1c87bb8..cd5d5241f86c8faa231407c51b9e6540ce17ac7e 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use Friendica\App;
+
 require_once('include/api.php');
 
 function oauth_get_client($request){
@@ -20,9 +22,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 +36,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 +86,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());
@@ -106,8 +108,6 @@ function api_content(&$a) {
                        '$no'   => t('No'),
                ));
 
-               //echo "<pre>"; var_dump($app); killme();
-
                return $o;
        }