]> git.mxchange.org Git - friendica.git/blobdiff - include/api.php
Merge remote-tracking branch 'upstream/develop' into 1701-performance
[friendica.git] / include / api.php
index 91a3a34d110f20a926b780bd3db3a7d0cd25fa14..ce7610312947b171a2787831ecad2a979d891a68 100644 (file)
@@ -5,6 +5,9 @@
  *
  * @todo Automatically detect if incoming data is HTML or BBCode
  */
+
+use \Friendica\Core\Config;
+
        require_once('include/HTTPExceptions.php');
 
        require_once('include/bbcode.php');
         *                      dislikes => int count
         */
        function api_format_items_activities(&$item, $type = "json") {
+
+               $a = get_app();
+
                $activities = array(
                        'like' => array(),
                        'dislike' => array(),
 
                        // Retweets are only valid for top postings
                        // It doesn't work reliable with the link if its a feed
-                       #$IsRetweet = ($item['owner-link'] != $item['author-link']);
-                       #if ($IsRetweet)
-                             $IsRetweet = (($item['owner-name'] != $item['author-name']) OR ($item['owner-avatar'] != $item['author-avatar']));
+                       //$IsRetweet = ($item['owner-link'] != $item['author-link']);
+                       //if ($IsRetweet)
+                       //      $IsRetweet = (($item['owner-name'] != $item['author-name']) OR ($item['owner-avatar'] != $item['author-avatar']));
 
 
                        if ($item["id"] == $item["parent"]) {
                $logo = App::get_baseurl() . '/images/friendica-64.png';
                $email = $a->config['admin_email'];
                $closed = (($a->config['register_policy'] == REGISTER_CLOSED) ? 'true' : 'false');
-               $private = (($a->config['system']['block_public']) ? 'true' : 'false');
+               $private = ((Config::get('system', 'block_public')) ? 'true' : 'false');
                $textlimit = (string) (($a->config['max_import_size']) ? $a->config['max_import_size'] : 200000);
                if($a->config['api_import_size'])
                        $texlimit = string($a->config['api_import_size']);
-               $ssl = (($a->config['system']['have_ssl']) ? 'true' : 'false');
+               $ssl = ((Config::get('system', 'have_ssl')) ? 'true' : 'false');
                $sslserver = (($ssl === 'true') ? str_replace('http:','https:',App::get_baseurl()) : '');
 
                $config = array(