]> git.mxchange.org Git - friendica.git/commitdiff
Fixes: (#5462)
authorRoland Häder <Quix0r@users.noreply.github.com>
Mon, 23 Jul 2018 01:17:44 +0000 (03:17 +0200)
committerHypolite Petovan <mrpetovan@eml.cc>
Mon, 23 Jul 2018 01:17:44 +0000 (21:17 -0400)
- fixed E_NOTICE about missing array element "page-flags-raw" (should be
  "page_flags_raw"?)
- same with account-type-raw -> account_type_raw
- added spaces to nicely indent code

mod/admin.php

index 3245cde0d7e26c2ec15e7d3f097d8599bcc210d4..971c2890a7a2bfce8627825e066c479d0ac01557 100644 (file)
@@ -1807,25 +1807,23 @@ function admin_page_users(App $a)
        $adminlist = explode(",", str_replace(" ", "", Config::get('config', 'admin_email')));
        $_setup_users = function ($e) use ($adminlist) {
                $page_types = [
-                       PAGE_NORMAL => L10n::t('Normal Account Page'),
-                       PAGE_SOAPBOX => L10n::t('Soapbox Page'),
+                       PAGE_NORMAL    => L10n::t('Normal Account Page'),
+                       PAGE_SOAPBOX   => L10n::t('Soapbox Page'),
                        PAGE_COMMUNITY => L10n::t('Public Forum'),
-                       PAGE_FREELOVE => L10n::t('Automatic Friend Page'),
-                       PAGE_PRVGROUP => L10n::t('Private Forum')
+                       PAGE_FREELOVE  => L10n::t('Automatic Friend Page'),
+                       PAGE_PRVGROUP  => L10n::t('Private Forum')
                ];
                $account_types = [
-                       ACCOUNT_TYPE_PERSON => L10n::t('Personal Page'),
+                       ACCOUNT_TYPE_PERSON       => L10n::t('Personal Page'),
                        ACCOUNT_TYPE_ORGANISATION => L10n::t('Organisation Page'),
-                       ACCOUNT_TYPE_NEWS => L10n::t('News Page'),
-                       ACCOUNT_TYPE_COMMUNITY => L10n::t('Community Forum')
+                       ACCOUNT_TYPE_NEWS         => L10n::t('News Page'),
+                       ACCOUNT_TYPE_COMMUNITY    => L10n::t('Community Forum')
                ];
 
-
-
-               $e['page-flags-raw'] = $e['page-flags'];
+               $e['page_flags_raw'] = $e['page-flags'];
                $e['page-flags'] = $page_types[$e['page-flags']];
 
-               $e['account-type-raw'] = ($e['page_flags_raw'] == 0) ? $e['account-type'] : -1;
+               $e['account_type_raw'] = ($e['page_flags_raw'] == 0) ? $e['account-type'] : -1;
                $e['account-type'] = ($e['page_flags_raw'] == 0) ? $account_types[$e['account-type']] : "";
 
                $e['register_date'] = Temporal::getRelativeDate($e['register_date']);
@@ -1834,8 +1832,10 @@ function admin_page_users(App $a)
                $e['is_admin'] = in_array($e['email'], $adminlist);
                $e['is_deletable'] = (intval($e['uid']) != local_user());
                $e['deleted'] = ($e['account_removed'] ? Temporal::getRelativeDate($e['account_expires_on']) : False);
+
                return $e;
        };
+
        $users = array_map($_setup_users, $users);