]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Merge pull request #874 from tobiasd/20131231
[friendica.git] / boot.php
index b02ee01c7c598d1d4e024baf13eb4a29112392ab..7dfcc5ce7b71c6b2e4f1b3d8d9130e0c4a1fe2f8 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.1746' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.23'    );
-define ( 'DB_UPDATE_VERSION',      1164      );
+define ( 'DB_UPDATE_VERSION',      1167      );
 define ( 'EOL',                    "<br />\r\n"     );
 define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
 
@@ -1906,7 +1906,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 +2160,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 +2171,7 @@ function clear_cache($basepath = "", $path = "") {
                }
                closedir($dh);
        }
+       }
 }
 
 function set_template_engine(&$a, $engine = 'internal') {