]> git.mxchange.org Git - friendica.git/blobdiff - include/api.php
NULL_DATE is now a constant
[friendica.git] / include / api.php
index 64a896b55498e2579e475225c08e5d385bfcd8f2..d7fa1d587547f399da085f5861a1f6942d12454e 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');
                // count friends
                $r = q("SELECT count(*) as `count` FROM `contact`
                                WHERE  `uid` = %d AND `rel` IN ( %d, %d )
-                               AND `self`=0 AND NOT `blocked` AND `hidden`=0",
+                               AND `self`=0 AND NOT `blocked` AND NOT `pending` AND `hidden`=0",
                                intval($uinfo[0]['uid']),
                                intval(CONTACT_IS_SHARING),
                                intval(CONTACT_IS_FRIEND)
 
                $r = q("SELECT count(*) as `count` FROM `contact`
                                WHERE  `uid` = %d AND `rel` IN ( %d, %d )
-                               AND `self`=0 AND NOT `blocked` AND `hidden`=0",
+                               AND `self`=0 AND NOT `blocked` AND NOT `pending` AND `hidden`=0",
                                intval($uinfo[0]['uid']),
                                intval(CONTACT_IS_FOLLOWER),
                                intval(CONTACT_IS_FRIEND)
                $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(