]> git.mxchange.org Git - friendica.git/commitdiff
Merge remote-tracking branch 'upstream/develop' into 1601-api-statuses-lookup
authorMichael <heluecht@pirati.ca>
Wed, 15 Mar 2017 14:37:30 +0000 (14:37 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 15 Mar 2017 14:37:30 +0000 (14:37 +0000)
1  2 
include/api.php

diff --cc include/api.php
index 887b449fc06d381d7bd3cc3ed9c9987185ad287e,701e527cc8236ad86b43aaf04b0d38f500f7f5b4..08bd835f3bf9bc5fa7f47d5c2534da135e3119bd
@@@ -2558,18 -2726,8 +2727,9 @@@ use \Friendica\Core\Config
                // liar
                $fake_statusnet_version = "0.9.7";
  
-               if($type === 'xml') {
-                       header("Content-type: application/xml");
-                       echo '<?xml version="1.0" encoding="UTF-8"?>' . "\r\n" . '<version>'.$fake_statusnet_version.'</version>' . "\r\n";
-                       killme();
-               }
-               elseif($type === 'json') {
-                       header("Content-type: application/json");
-                       echo '"'.$fake_statusnet_version.'"';
-                       killme();
-               }
+               return api_format_data('version', $type, array('version' => $fake_statusnet_version));
        }
 +      api_register_func('api/gnusocial/version','api_statusnet_version',false);
        api_register_func('api/statusnet/version','api_statusnet_version',false);
  
        /**