]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Send notifications for each new post of a contact, option for creating a summary...
[friendica.git] / boot.php
index 57414e8fcf933a7dfa28ebf303d808dd6fa137dc..72eaec8fe58db17bb87739926067901bb4e65202 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.1744' );
+define ( 'FRIENDICA_VERSION',      '3.2.1745' );
 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' );
 
@@ -197,6 +197,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 +396,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' => '{{'
@@ -1906,7 +1910,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 +2164,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 +2175,7 @@ function clear_cache($basepath = "", $path = "") {
                }
                closedir($dh);
        }
+       }
 }
 
 function set_template_engine(&$a, $engine = 'internal') {
@@ -2175,3 +2185,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]);
+        }
+}