]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Remove spaces
[friendica.git] / boot.php
index b3b560a0963f0be40495966d4a6a5030bb8eee73..7ee023b68a34328e95680f23b558e77c191d7080 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -297,13 +297,11 @@ function notice($s)
                return;
        }
 
-       $a = DI::app();
        if (empty($_SESSION['sysmsg'])) {
                $_SESSION['sysmsg'] = [];
        }
-       if ($a->interactive) {
-               $_SESSION['sysmsg'][] = $s;
-       }
+
+       $_SESSION['sysmsg'][] = $s;
 }
 
 /**
@@ -315,14 +313,15 @@ function notice($s)
  */
 function info($s)
 {
-       $a = DI::app();
+       if (empty($_SESSION)) {
+               return;
+       }
 
        if (empty($_SESSION['sysmsg_info'])) {
                $_SESSION['sysmsg_info'] = [];
        }
-       if ($a->interactive) {
-               $_SESSION['sysmsg_info'][] = $s;
-       }
+
+       $_SESSION['sysmsg_info'][] = $s;
 }
 
 function feed_birthday($uid, $tz)
@@ -380,7 +379,7 @@ function is_site_admin()
 
        $adminlist = explode(',', str_replace(' ', '', $admin_email));
 
-       return local_user() && $admin_email && in_array($a->user['email'] ?? '', $adminlist);
+       return local_user() && $admin_email && DBA::exists('user', ['uid' => $a->getLoggedInUserId(), 'email' => $adminlist]);
 }
 
 /**