]> git.mxchange.org Git - friendica.git/blobdiff - mod/api.php
Merge remote-tracking branch 'upstream/master' into develop
[friendica.git] / mod / api.php
index 67564836e8386b6a58abadc2d4fd51999fe5edbe..da2c40c3055a54b566cfd92bdcaf6a40680b65a0 100644 (file)
@@ -1,8 +1,10 @@
 <?php
+
 require_once('include/api.php');
 
-if(! function_exists('oauth_get_client')) {
 function oauth_get_client($request){
+
+
        $params = $request->get_parameters();
        $token = $params['oauth_token'];
 
@@ -17,10 +19,9 @@ function oauth_get_client($request){
 
        return $r[0];
 }
-}
 
-if(! function_exists('api_post')) {
 function api_post(&$a) {
+
        if(! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
@@ -30,10 +31,9 @@ function api_post(&$a) {
                notice( t('Permission denied.') . EOL);
                return;
        }
-}
+
 }
 
-if(! function_exists('api_content')) {
 function api_content(&$a) {
        if ($a->cmd=='api/oauth/authorize'){
                /*
@@ -114,4 +114,3 @@ function api_content(&$a) {
        echo api_call($a);
        killme();
 }
-}