]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Merge remote-tracking branch 'upstream/master'
[friendica.git] / boot.php
index 418d46e5a2cb658d334f77f0b5f722cff35575dd..a784b37b05b897001f9e2f2c73f2342922d94d23 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -12,9 +12,9 @@ require_once('library/Mobile_Detect/Mobile_Detect.php');
 require_once('include/features.php');
 
 define ( 'FRIENDICA_PLATFORM',     'Friendica');
-define ( 'FRIENDICA_VERSION',      '3.2' );
+define ( 'FRIENDICA_VERSION',      '3.2.1748' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.23'    );
-define ( 'DB_UPDATE_VERSION',      1163      );
+define ( 'DB_UPDATE_VERSION',      1169      );
 define ( 'EOL',                    "<br />\r\n"     );
 define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
 
@@ -141,6 +141,7 @@ define ( 'NETWORK_MYSPACE',          'mysp');    // MySpace
 define ( 'NETWORK_GPLUS',            'goog');    // Google+
 define ( 'NETWORK_PUMPIO',           'pump');    // pump.io
 define ( 'NETWORK_TWITTER',          'twit');    // Twitter
+define ( 'NETWORK_DIASPORA2',        'dspc');    // Diaspora connector
 
 define ( 'NETWORK_PHANTOM',          'unkn');    // Place holder
 
@@ -165,6 +166,7 @@ $netgroup_ids = array(
        NETWORK_GPLUS    => (-12),
        NETWORK_PUMPIO   => (-13),
        NETWORK_TWITTER  => (-14),
+       NETWORK_DIASPORA2 => (-15),
 
        NETWORK_PHANTOM  => (-127),
 );
@@ -197,6 +199,7 @@ define ( 'NOTIFY_PROFILE',  0x0040 );
 define ( 'NOTIFY_TAGSELF',  0x0080 );
 define ( 'NOTIFY_TAGSHARE', 0x0100 );
 define ( 'NOTIFY_POKE',     0x0200 );
+define ( 'NOTIFY_SHARE',    0x0400 );
 
 define ( 'NOTIFY_SYSTEM',   0x8000 );
 
@@ -395,6 +398,9 @@ if(! class_exists('App')) {
                // array of instanced template engines ('name'=>'instance')
                public $template_engine_instance = array();
 
+               // Used for reducing load to the ostatus completion
+               public $last_ostatus_conversation_url;
+
                private $ldelim = array(
                        'internal' => '',
                        'smarty3' => '{{'
@@ -1154,7 +1160,7 @@ if(! function_exists('login')) {
        
                        '$lname'                => array('username', t('Nickname or Email address: ') , '', ''),
                        '$lpassword'    => array('password', t('Password: '), '', ''),
-                       '$lremember'    => array('remember', t('Remember me'), 0, ''),
+                       '$lremember'    => array('remember', t('Remember me'), 0,  ''),
        
                        '$openid'               => !$noid,
                        '$lopenid'      => array('openid_url', t('Or login using OpenID: '),'',''),
@@ -1624,7 +1630,7 @@ if(! function_exists('get_birthdays')) {
                                                $sparkle = " sparkle";
                                                $url = $a->get_baseurl() . '/redir/'  . $rr['cid'];
                                        }
-       
+
                                        $rr['link'] = $url;
                                        $rr['title'] = $rr['name'];
                                        $rr['date'] = day_translate(datetime_convert('UTC', $a->timezone, $rr['start'], $rr['adjust'] ? $bd_format : $bd_short)) . (($today) ?  ' ' . t('[today]') : '');
@@ -1906,7 +1912,11 @@ if(! function_exists('feed_birthday')) {
 if(! function_exists('is_site_admin')) {
        function is_site_admin() {
                $a = get_app();
-               if(local_user() && x($a->user,'email') && x($a->config,'admin_email') && ($a->user['email'] === $a->config['admin_email']))
+
+               $adminlist = explode(",", str_replace(" ", "", $a->config['admin_email']));
+
+               //if(local_user() && x($a->user,'email') && x($a->config,'admin_email') && ($a->user['email'] === $a->config['admin_email']))
+               if(local_user() && x($a->user,'email') && x($a->config,'admin_email') && in_array($a->user['email'], $adminlist))
                        return true;
                return false;
        }
@@ -2156,6 +2166,7 @@ function clear_cache($basepath = "", $path = "") {
        if ($cachetime == 0)
                $cachetime = 86400;
 
+       if (is_writable($path)){
        if ($dh = opendir($path)) {
                while (($file = readdir($dh)) !== false) {
                        $fullpath = $path."/".$file;
@@ -2166,6 +2177,7 @@ function clear_cache($basepath = "", $path = "") {
                }
                closedir($dh);
        }
+       }
 }
 
 function set_template_engine(&$a, $engine = 'internal') {
@@ -2175,3 +2187,9 @@ function set_template_engine(&$a, $engine = 'internal') {
        $a->set_template_engine($engine);
 }
 
+if(!function_exists('exif_imagetype')) {
+        function exif_imagetype($file) {
+                $size = getimagesize($file);
+                return($size[2]);
+        }
+}