]> git.mxchange.org Git - friendica.git/commitdiff
Use short form array syntax everywhere
authorHypolite Petovan <mrpetovan@gmail.com>
Mon, 15 Jan 2018 13:05:12 +0000 (08:05 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Mon, 15 Jan 2018 19:07:17 +0000 (14:07 -0500)
- Add short form array syntax to po2php.php generation

212 files changed:
boot.php
htconfig.php
include/acl_selectors.php
include/api.php
include/bb2diaspora.php
include/bbcode.php
include/conversation.php
include/datetime.php
include/dba.php
include/enotify.php
include/event.php
include/friendica_smarty.php
include/html2bbcode.php
include/html2plain.php
include/items.php
include/like.php
include/nav.php
include/network.php
include/pgettext.php
include/plaintext.php
include/plugin.php
include/post_update.php
include/queue_fn.php
include/security.php
include/session.php
include/tags.php
include/text.php
include/threads.php
index.php
mod/_well_known.php
mod/admin.php
mod/allfriends.php
mod/api.php
mod/apps.php
mod/bookmarklet.php
mod/cal.php
mod/common.php
mod/community.php
mod/contactgroup.php
mod/contacts.php
mod/crepair.php
mod/dfrn_poll.php
mod/dfrn_request.php
mod/directory.php
mod/dirfind.php
mod/display.php
mod/editpost.php
mod/events.php
mod/fbrowser.php
mod/fetch.php
mod/filer.php
mod/follow.php
mod/friendica.php
mod/fsuggest.php
mod/group.php
mod/hcard.php
mod/help.php
mod/home.php
mod/hostxrd.php
mod/hovercard.php
mod/install.php
mod/invite.php
mod/item.php
mod/lockview.php
mod/lostpass.php
mod/maintenance.php
mod/manage.php
mod/manifest.php
mod/match.php
mod/message.php
mod/msearch.php
mod/network.php
mod/nodeinfo.php
mod/nogroup.php
mod/noscrape.php
mod/notes.php
mod/notifications.php
mod/notify.php
mod/oexchange.php
mod/opensearch.php
mod/parse_url.php
mod/photo.php
mod/photos.php
mod/ping.php
mod/poco.php
mod/poke.php
mod/pretheme.php
mod/probe.php
mod/profile.php
mod/profile_photo.php
mod/profiles.php
mod/profperm.php
mod/proxy.php
mod/register.php
mod/regmod.php
mod/removeme.php
mod/robots_txt.php
mod/salmon.php
mod/search.php
mod/settings.php
mod/share.php
mod/smilies.php
mod/statistics_json.php
mod/subthread.php
mod/suggest.php
mod/tagger.php
mod/uexport.php
mod/uimport.php
mod/unfollow.php
mod/videos.php
mod/viewcontacts.php
mod/wall_attach.php
mod/wall_upload.php
mod/wallmessage.php
mod/webfinger.php
mod/xrd.php
src/App.php
src/Content/ContactSelector.php
src/Content/Feature.php
src/Content/ForumManager.php
src/Content/OEmbed.php
src/Content/Smilies.php
src/Core/Cache.php
src/Core/Config.php
src/Core/NotificationsManager.php
src/Core/PConfig.php
src/Core/System.php
src/Core/UserImport.php
src/Core/Worker.php
src/Database/DBM.php
src/Database/DBStructure.php
src/Model/Contact.php
src/Model/GContact.php
src/Model/Group.php
src/Model/Photo.php
src/Model/Profile.php
src/Model/User.php
src/Module/Login.php
src/Module/Oembed.php
src/Network/FKOAuthDataStore.php
src/Network/Probe.php
src/Object/Image.php
src/Object/Post.php
src/Object/Thread.php
src/Protocol/DFRN.php
src/Protocol/Diaspora.php
src/Protocol/Email.php
src/Protocol/Feed.php
src/Protocol/OStatus.php
src/Protocol/PortableContact.php
src/Protocol/Salmon.php
src/Util/Crypto.php
src/Util/Emailer.php
src/Util/ExAuth.php
src/Util/Lock.php
src/Util/Map.php
src/Util/ParseUrl.php
src/Util/XML.php
src/Worker/Cron.php
src/Worker/CronJobs.php
src/Worker/DBClean.php
src/Worker/Delivery.php
src/Worker/Directory.php
src/Worker/DiscoverPoCo.php
src/Worker/Expire.php
src/Worker/GProbe.php
src/Worker/Notifier.php
src/Worker/OnePoll.php
src/Worker/PubSubPublish.php
src/Worker/Queue.php
src/Worker/RemoveContact.php
src/Worker/UpdateGContact.php
update.php
util/docblox_errorchecker.php
util/extract.php
util/fpostit/fpostit.php
util/global_community_silence.php
util/php2po.php
util/po2php.php
util/strings.php
view/lang/bg/strings.php
view/lang/ca/strings.php
view/lang/cs/strings.php
view/lang/de/strings.php
view/lang/en-gb/strings.php
view/lang/en-us/strings.php
view/lang/eo/strings.php
view/lang/es/strings.php
view/lang/fr/strings.php
view/lang/is/strings.php
view/lang/it/strings.php
view/lang/nb-no/strings.php
view/lang/nl/strings.php
view/lang/pl/strings.php
view/lang/pt-br/strings.php
view/lang/ro/strings.php
view/lang/ru/strings.php
view/lang/sv/strings.php
view/lang/zh-cn/strings.php
view/theme/duepuntozero/config.php
view/theme/frio/config.php
view/theme/frio/php/Image.php
view/theme/frio/php/PHPColors/Color.php
view/theme/frio/php/frio_boot.php
view/theme/frio/php/schema.php
view/theme/frio/style.php
view/theme/frio/theme.php
view/theme/frost/theme.php
view/theme/quattro/config.php
view/theme/vier/config.php
view/theme/vier/style.php
view/theme/vier/theme.php

index 2fe73bc81224c2880d9e82be82c5ac74cd6851ac..4bfa5c09858acdf0e7d1e9e26e1ccf283bbb6f64 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -288,7 +288,7 @@ define('NETWORK_PHANTOM',          'unkn');    // Place holder
  * and existing allocations MUST NEVER BE CHANGED
  * OR RE-ASSIGNED! You may only add to them.
  */
-$netgroup_ids = array(
+$netgroup_ids = [
        NETWORK_DFRN     => (-1),
        NETWORK_ZOT      => (-2),
        NETWORK_OSTATUS  => (-3),
@@ -310,7 +310,7 @@ $netgroup_ids = array(
        NETWORK_PNUT      => (-20),
 
        NETWORK_PHANTOM  => (-127),
-);
+];
 
 /**
  * Maximum number of "people who like (or don't like) this"  that we will list by name
@@ -504,7 +504,7 @@ function startup()
        ini_set('pcre.backtrack_limit', 500000);
 
        if (get_magic_quotes_gpc()) {
-               $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
+               $process = [&$_GET, &$_POST, &$_COOKIE, &$_REQUEST];
                while (list($key, $val) = each($process)) {
                        foreach ($val as $k => $v) {
                                unset($process[$key][$k]);
@@ -817,11 +817,11 @@ function check_plugins(App $a)
        if (DBM::is_result($r)) {
                $installed = $r;
        } else {
-               $installed = array();
+               $installed = [];
        }
 
        $plugins = Config::get('system', 'addon');
-       $plugins_arr = array();
+       $plugins_arr = [];
 
        if ($plugins) {
                $plugins_arr = explode(',', str_replace(' ', '', $plugins));
@@ -829,7 +829,7 @@ function check_plugins(App $a)
 
        $a->plugins = $plugins_arr;
 
-       $installed_arr = array();
+       $installed_arr = [];
 
        if (count($installed)) {
                foreach ($installed as $i) {
@@ -966,7 +966,7 @@ function notice($s)
 {
        $a = get_app();
        if (!x($_SESSION, 'sysmsg')) {
-               $_SESSION['sysmsg'] = array();
+               $_SESSION['sysmsg'] = [];
        }
        if ($a->interactive) {
                $_SESSION['sysmsg'][] = $s;
@@ -989,7 +989,7 @@ function info($s)
        }
 
        if (!x($_SESSION, 'sysmsg_info')) {
-               $_SESSION['sysmsg_info'] = array();
+               $_SESSION['sysmsg_info'] = [];
        }
        if ($a->interactive) {
                $_SESSION['sysmsg_info'][] = $s;
@@ -1010,7 +1010,7 @@ function get_max_import_size()
 
 function current_theme()
 {
-       $app_base_themes = array('duepuntozero', 'dispy', 'quattro');
+       $app_base_themes = ['duepuntozero', 'dispy', 'quattro'];
 
        $a = get_app();
 
@@ -1238,10 +1238,10 @@ function explode_querystring($query)
                $args = array_values($args);
        }
 
-       return array(
+       return [
                'base' => $base,
                'args' => $args,
-       );
+       ];
 }
 
 /**
@@ -1571,7 +1571,7 @@ function infinite_scroll_data($module)
                        $reload_uri .= "&offset=" . urlencode($a->page_offset);
                }
 
-               $arr = array("pageno" => $pageno, "reload_uri" => $reload_uri);
+               $arr = ["pageno" => $pageno, "reload_uri" => $reload_uri];
 
                return $arr;
        }
index ada7a130b190a45d80057ab1222576efe42bf685..67db66e86fad5b591322d3efe021de041e5290a2 100644 (file)
@@ -86,7 +86,7 @@ $a->config['system']['no_regfullname'] = true;
 $a->config['system']['directory'] = 'https://dir.friendica.social';
 
 // Allowed protocols in link URLs; HTTP protocols always are accepted
-$a->config['system']['allowed_link_protocols'] = array('ftp', 'ftps', 'mailto', 'cid', 'gopher');
+$a->config['system']['allowed_link_protocols'] = ['ftp', 'ftps', 'mailto', 'cid', 'gopher'];
 
 // Authentication cookie lifetime, in days
 $a->config['system']['auth_cookie_lifetime'] = 7;
index a93393d80fd61d6c652a10aaeaaa8c0d25e6e781..5be3fd1f3f6efeda2564ec4a7c3ff501f4b07c67 100644 (file)
@@ -28,7 +28,7 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) {
        );
 
 
-       $arr = array('group' => $r, 'entry' => $o);
+       $arr = ['group' => $r, 'entry' => $o];
 
        // e.g. 'network_pre_group_deny', 'profile_pre_group_allow'
 
@@ -87,20 +87,20 @@ function contact_selector($selname, $selclass, $options, $preselected = false)
                if (x($options, 'networks')) {
                        switch ($options['networks']) {
                                case 'DFRN_ONLY':
-                                       $networks = array(NETWORK_DFRN);
+                                       $networks = [NETWORK_DFRN];
                                        break;
                                case 'PRIVATE':
                                        if (is_array($a->user) && $a->user['prvnets']) {
-                                               $networks = array(NETWORK_DFRN, NETWORK_MAIL, NETWORK_DIASPORA);
+                                               $networks = [NETWORK_DFRN, NETWORK_MAIL, NETWORK_DIASPORA];
                                        } else {
-                                               $networks = array(NETWORK_DFRN, NETWORK_FACEBOOK, NETWORK_MAIL, NETWORK_DIASPORA);
+                                               $networks = [NETWORK_DFRN, NETWORK_FACEBOOK, NETWORK_MAIL, NETWORK_DIASPORA];
                                        }
                                        break;
                                case 'TWO_WAY':
                                        if (is_array($a->user) && $a->user['prvnets']) {
-                                               $networks = array(NETWORK_DFRN, NETWORK_MAIL, NETWORK_DIASPORA);
+                                               $networks = [NETWORK_DFRN, NETWORK_MAIL, NETWORK_DIASPORA];
                                        } else {
-                                               $networks = array(NETWORK_DFRN, NETWORK_FACEBOOK, NETWORK_MAIL, NETWORK_DIASPORA, NETWORK_OSTATUS);
+                                               $networks = [NETWORK_DFRN, NETWORK_FACEBOOK, NETWORK_MAIL, NETWORK_DIASPORA, NETWORK_OSTATUS];
                                        }
                                        break;
                                default: /// @TODO Maybe log this call?
@@ -109,7 +109,7 @@ function contact_selector($selname, $selclass, $options, $preselected = false)
                }
        }
 
-       $x = array('options' => $options, 'size' => $size, 'single' => $single, 'mutual' => $mutual, 'exclude' => $exclude, 'networks' => $networks);
+       $x = ['options' => $options, 'size' => $size, 'single' => $single, 'mutual' => $mutual, 'exclude' => $exclude, 'networks' => $networks];
 
        call_hooks('contact_select_options', $x);
 
@@ -150,7 +150,7 @@ function contact_selector($selname, $selclass, $options, $preselected = false)
        );
 
 
-       $arr = array('contact' => $r, 'entry' => $o);
+       $arr = ['contact' => $r, 'entry' => $o];
 
        // e.g. 'network_pre_contact_deny', 'profile_pre_contact_allow'
 
@@ -228,13 +228,13 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
        );
 
 
-       $arr = array('contact' => $r, 'entry' => $o);
+       $arr = ['contact' => $r, 'entry' => $o];
 
        // e.g. 'network_pre_contact_deny', 'profile_pre_contact_allow'
 
        call_hooks($a->module . '_pre_' . $selname, $arr);
 
-       $receiverlist = array();
+       $receiverlist = [];
 
        if (DBM::is_result($r)) {
                foreach ($r as $rr) {
@@ -270,7 +270,7 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
 
 
 function fixacl(&$item) {
-       $item = intval(str_replace(array('<', '>'), array('', ''), $item));
+       $item = intval(str_replace(['<', '>'], ['', ''], $item));
 }
 
 function prune_deadguys($arr) {
@@ -284,14 +284,14 @@ function prune_deadguys($arr) {
        $r = q("SELECT `id` FROM `contact` WHERE `id` IN ( " . $str . ") AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0 ");
 
        if (DBM::is_result($r)) {
-               $ret = array();
+               $ret = [];
                foreach ($r as $rr) {
                        $ret[] = intval($rr['id']);
                }
                return $ret;
        }
 
-       return array();
+       return [];
 }
 
 
@@ -300,13 +300,13 @@ function get_acl_permissions($user = null) {
 
        if (is_array($user)) {
                $allow_cid = ((strlen($user['allow_cid']))
-                       ? explode('><', $user['allow_cid']) : array() );
+                       ? explode('><', $user['allow_cid']) : [] );
                $allow_gid = ((strlen($user['allow_gid']))
-                       ? explode('><', $user['allow_gid']) : array() );
+                       ? explode('><', $user['allow_gid']) : [] );
                $deny_cid  = ((strlen($user['deny_cid']))
-                       ? explode('><', $user['deny_cid']) : array() );
+                       ? explode('><', $user['deny_cid']) : [] );
                $deny_gid  = ((strlen($user['deny_gid']))
-                       ? explode('><', $user['deny_gid']) : array() );
+                       ? explode('><', $user['deny_gid']) : [] );
                array_walk($allow_cid,'fixacl');
                array_walk($allow_gid,'fixacl');
                array_walk($deny_cid,'fixacl');
@@ -315,12 +315,12 @@ function get_acl_permissions($user = null) {
 
        $allow_cid = prune_deadguys($allow_cid);
 
-       return array(
+       return [
                'allow_cid' => $allow_cid,
                'allow_gid' => $allow_gid,
                'deny_cid' => $deny_cid,
                'deny_gid' => $deny_gid,
-       );
+       ];
 }
 
 
@@ -361,7 +361,7 @@ function populate_acl($user = null, $show_jotnets = false) {
        }
 
        $tpl = get_markup_template("acl_selector.tpl");
-       $o = replace_macros($tpl, array(
+       $o = replace_macros($tpl, [
                '$showall'=> t("Visible to everybody"),
                '$show' => t("show"),
                '$hide'  => t("don't show"),
@@ -375,10 +375,10 @@ function populate_acl($user = null, $show_jotnets = false) {
                '$jotnets' => $jotnets,
                '$aclModalTitle' => t('Permissions'),
                '$aclModalDismiss' => t('Close'),
-               '$features' => array(
+               '$features' => [
                'aclautomention' => (Feature::isEnabled($user['uid'], "aclautomention") ? "true" : "false")
-               ),
-       ));
+               ],
+       ]);
 
 
        return $o;
@@ -475,8 +475,8 @@ function acl_lookup(App $a, $out_type = 'json')
 
        $tot = $group_count + $contact_count;
 
-       $groups = array();
-       $contacts = array();
+       $groups = [];
+       $contacts = [];
 
        if ($type == '' || $type == 'g') {
                /// @todo We should cache this query.
@@ -495,7 +495,7 @@ function acl_lookup(App $a, $out_type = 'json')
                );
 
                foreach ($r as $g) {
-                       $groups[] = array(
+                       $groups[] = [
                                "type"  => "g",
                                "photo" => "images/twopeople.png",
                                "name"  => htmlentities($g['name']),
@@ -503,10 +503,10 @@ function acl_lookup(App $a, $out_type = 'json')
                                "uids"  => array_map("intval", explode(",",$g['uids'])),
                                "link"  => '',
                                "forum" => '0'
-                       );
+                       ];
                }
                if ((count($groups) > 0) && ($search == "")) {
-                       $groups[] = array("separator" => true);
+                       $groups[] = ["separator" => true];
                }
        }
 
@@ -558,34 +558,34 @@ function acl_lookup(App $a, $out_type = 'json')
        } elseif ($type == 'x') {
                // autocomplete for global contact search (e.g. navbar search)
                $r = navbar_complete($a);
-               $contacts = array();
+               $contacts = [];
                if ($r) {
                        foreach ($r as $g) {
-                               $contacts[] = array(
+                               $contacts[] = [
                                        'photo'   => proxy_url($g['photo'], false, PROXY_SIZE_MICRO),
                                        'name'    => $g['name'],
                                        'nick'    => (x($g['addr']) ? $g['addr'] : $g['url']),
                                        'network' => $g['network'],
                                        'link'    => $g['url'],
                                        'forum'   => (x($g['community']) ? 1 : 0),
-                               );
+                               ];
                        }
                }
-               $o = array(
+               $o = [
                        'start' => $start,
                        'count' => $count,
                        'items' => $contacts,
-               );
+               ];
                echo json_encode($o);
                killme();
        } else {
-               $r = array();
+               $r = [];
        }
 
        if (DBM::is_result($r)) {
-               $forums = array();
+               $forums = [];
                foreach ($r as $g) {
-                       $entry = array(
+                       $entry = [
                                'type'    => 'c',
                                'photo'   => proxy_url($g['micro'], false, PROXY_SIZE_MICRO),
                                'name'    => htmlentities($g['name']),
@@ -595,7 +595,7 @@ function acl_lookup(App $a, $out_type = 'json')
                                'nick'    => htmlentities(($g['attag']) ? $g['attag'] : $g['nick']),
                                'addr'    => htmlentities(($g['addr']) ? $g['addr'] : $g['url']),
                                'forum'   => ((x($g, 'forum') || x($g, 'prv')) ? 1 : 0),
-                       );
+                       ];
                        if ($entry['forum']) {
                                $forums[] = $entry;
                        } else {
@@ -604,7 +604,7 @@ function acl_lookup(App $a, $out_type = 'json')
                }
                if (count($forums) > 0) {
                        if ($search == "") {
-                               $forums[] = array("separator" => true);
+                               $forums[] = ["separator" => true];
                        }
                        $contacts = array_merge($forums, $contacts);
                }
@@ -623,7 +623,7 @@ function acl_lookup(App $a, $out_type = 'json')
                        }
                , $contacts);
 
-               $unknown_contacts = array();
+               $unknown_contacts = [];
                $r = q("SELECT `author-link`
                                FROM `item` WHERE `parent` = %d
                                        AND (`author-name` LIKE '%%%s%%' OR `author-link` LIKE '%%%s%%')
@@ -641,7 +641,7 @@ function acl_lookup(App $a, $out_type = 'json')
                                $contact = Contact::getDetailsByURL($row['author-link']);
 
                                if (count($contact) > 0) {
-                                       $unknown_contacts[] = array(
+                                       $unknown_contacts[] = [
                                                'type'    => 'c',
                                                'photo'   => proxy_url($contact['micro'], false, PROXY_SIZE_MICRO),
                                                'name'    => htmlentities($contact['name']),
@@ -651,7 +651,7 @@ function acl_lookup(App $a, $out_type = 'json')
                                                'nick'    => htmlentities($contact['nick'] ? : $contact['addr']),
                                                'addr'    => htmlentities(($contact['addr']) ? $contact['addr'] : $contact['url']),
                                                'forum'   => $contact['forum']
-                                       );
+                                       ];
                                }
                        }
                }
@@ -660,7 +660,7 @@ function acl_lookup(App $a, $out_type = 'json')
                $tot += count($unknown_contacts);
        }
 
-       $results = array(
+       $results = [
                'tot'      => $tot,
                'start'    => $start,
                'count'    => $count,
@@ -669,27 +669,27 @@ function acl_lookup(App $a, $out_type = 'json')
                'items'    => $items,
                'type'     => $type,
                'search'   => $search,
-       );
+       ];
 
        call_hooks('acl_lookup_end', $results);
 
        if ($out_type === 'html') {
-               $o = array(
+               $o = [
                        'tot'      => $results['tot'],
                        'start'    => $results['start'],
                        'count'    => $results['count'],
                        'groups'   => $results['groups'],
                        'contacts' => $results['contacts'],
-               );
+               ];
                return $o;
        }
 
-       $o = array(
+       $o = [
                'tot'   => $results['tot'],
                'start' => $results['start'],
                'count' => $results['count'],
                'items' => $results['items'],
-       );
+       ];
 
        echo json_encode($o);
 
@@ -717,7 +717,7 @@ function navbar_complete(App $a) {
 
        // don't search if search term has less than 2 characters
        if (! $search || mb_strlen($search) < 2) {
-               return array();
+               return [];
        }
 
        if (substr($search,0,1) === '@') {
index da7a83f51c421e5401e287f96dad7f3dd20a56a8..21db40433a88fe1ab46ed1ed30979e33cbd67a5f 100644 (file)
@@ -51,7 +51,7 @@ define('API_METHOD_GET', 'GET');
 define('API_METHOD_POST', 'POST,PUT');
 define('API_METHOD_DELETE', 'POST,DELETE');
 
-$API = array();
+$API = [];
 $called_api = null;
 
 /**
@@ -125,20 +125,20 @@ function api_register_func($path, $func, $auth = false, $method = API_METHOD_ANY
 {
        global $API;
 
-       $API[$path] = array(
+       $API[$path] = [
                'func'   => $func,
                'auth'   => $auth,
                'method' => $method,
-       );
+       ];
 
        // Workaround for hotot
        $path = str_replace("api/", "api/1.1/", $path);
 
-       $API[$path] = array(
+       $API[$path] = [
                'func'   => $func,
                'auth'   => $auth,
                'method' => $method,
-       );
+       ];
 }
 
 /**
@@ -203,12 +203,12 @@ function api_login(App $a)
        // next code from mod/auth.php. needs better solution
        $record = null;
 
-       $addon_auth = array(
+       $addon_auth = [
                'username' => trim($user),
                'password' => trim($password),
                'authenticated' => 0,
                'user_record' => null,
-       );
+       ];
 
        /*
                * A plugin indicates successful login by setting 'authenticated' to non-zero value and returning a user record
@@ -409,11 +409,11 @@ function api_error($type, $e)
        $error = ($e->getMessage() !== "" ? $e->getMessage() : $e->httpdesc);
        /// @TODO:  https://dev.twitter.com/overview/api/response-codes
 
-       $error = array("error" => $error,
+       $error = ["error" => $error,
                        "code" => $e->httpcode . " " . $e->httpdesc,
-                       "request" => $a->query_string);
+                       "request" => $a->query_string];
 
-       $return = api_format_data('status', $type, array('status' => $error));
+       $return = api_format_data('status', $type, ['status' => $error]);
 
        switch ($type) {
                case "xml":
@@ -450,7 +450,7 @@ function api_rss_extra(App $a, $arr, $user_info)
        }
 
        $arr['$user'] = $user_info;
-       $arr['$rss'] = array(
+       $arr['$rss'] = [
                'alternate'    => $user_info['url'],
                'self'         => System::baseUrl() . "/" . $a->query_string,
                'base'         => System::baseUrl(),
@@ -458,7 +458,7 @@ function api_rss_extra(App $a, $arr, $user_info)
                'atom_updated' => datetime_convert('UTC', 'UTC', 'now', ATOM_TIME),
                'language'     => $user_info['language'],
                'logo'         => System::baseUrl() . "/images/friendica-32.png",
-       );
+       ];
 
        return $arr;
 }
@@ -473,7 +473,7 @@ function api_rss_extra(App $a, $arr, $user_info)
  */
 function api_unique_id_to_nurl($id)
 {
-       $r = dba::selectFirst('contact', array('nurl'), array('uid' => 0, 'id' => $id));
+       $r = dba::selectFirst('contact', ['nurl'], ['uid' => 0, 'id' => $id]);
 
        if (DBM::is_result($r)) {
                return $r["nurl"];
@@ -603,7 +603,7 @@ function api_get_user(App $a, $contact_id = null)
 
        // if the contact wasn't found, fetch it from the contacts with uid = 0
        if (!DBM::is_result($uinfo)) {
-               $r = array();
+               $r = [];
 
                if ($url != "") {
                        $r = q("SELECT * FROM `contact` WHERE `uid` = 0 AND `nurl` = '%s' LIMIT 1", dbesc(normalise_link($url)));
@@ -617,7 +617,7 @@ function api_get_user(App $a, $contact_id = null)
                                $r[0]['nick'] = api_get_nick($r[0]["url"]);
                        }
 
-                       $ret = array(
+                       $ret = [
                                'id' => $r[0]["id"],
                                'id_str' => (string) $r[0]["id"],
                                'name' => $r[0]["name"],
@@ -651,7 +651,7 @@ function api_get_user(App $a, $contact_id = null)
                                'cid' => Contact::getIdForURL($r[0]["url"], api_user(), true),
                                'self' => 0,
                                'network' => $r[0]["network"],
-                       );
+                       ];
 
                        return $ret;
                } else {
@@ -752,7 +752,7 @@ function api_get_user(App $a, $contact_id = null)
                $location = $network_name;
        }
 
-       $ret = array(
+       $ret = [
                'id' => intval($pcontact_id),
                'id_str' => (string) intval($pcontact_id),
                'name' => (($uinfo[0]['name']) ? $uinfo[0]['name'] : $uinfo[0]['nick']),
@@ -788,7 +788,7 @@ function api_get_user(App $a, $contact_id = null)
                'cid' => intval($uinfo[0]['cid']),
                'self' => $uinfo[0]['self'],
                'network' => $uinfo[0]['network'],
-       );
+       ];
 
        // If this is a local user and it uses Frio, we can get its color preferences.
        if ($ret['self']) {
@@ -847,7 +847,7 @@ function api_item_get_user(App $a, $item)
                $owner_user = $status_user;
        }
 
-       return (array($status_user, $owner_user));
+       return ([$status_user, $owner_user]);
 }
 
 /**
@@ -860,7 +860,7 @@ function api_item_get_user(App $a, $item)
  */
 function api_walk_recursive(array &$array, callable $callback)
 {
-       $new_array = array();
+       $new_array = [];
 
        foreach ($array as $k => $v) {
                if (is_array($v)) {
@@ -918,14 +918,14 @@ function api_create_xml($data, $root_element)
        $data2 = array_pop($data);
        $key = key($data2);
 
-       $namespaces = array("" => "http://api.twitter.com",
+       $namespaces = ["" => "http://api.twitter.com",
                                "statusnet" => "http://status.net/schema/api/1/",
                                "friendica" => "http://friendi.ca/schema/api/1/",
-                               "georss" => "http://www.georss.org/georss");
+                               "georss" => "http://www.georss.org/georss"];
 
        /// @todo Auto detection of needed namespaces
-       if (in_array($root_element, array("ok", "hash", "config", "version", "ids", "notes", "photos"))) {
-               $namespaces = array();
+       if (in_array($root_element, ["ok", "hash", "config", "version", "ids", "notes", "photos"])) {
+               $namespaces = [];
        }
 
        if (is_array($data2)) {
@@ -933,7 +933,7 @@ function api_create_xml($data, $root_element)
        }
 
        if ($key == "0") {
-               $data4 = array();
+               $data4 = [];
                $i = 1;
 
                foreach ($data2 as $item) {
@@ -943,7 +943,7 @@ function api_create_xml($data, $root_element)
                $data2 = $data4;
        }
 
-       $data3 = array($root_element => $data2);
+       $data3 = [$root_element => $data2];
 
        $ret = XML::fromArray($data3, $xml, false, $namespaces);
        return $ret;
@@ -1021,7 +1021,7 @@ function api_account_verify_credentials($type)
        unset($user_info["uid"]);
        unset($user_info["self"]);
 
-       return api_format_data("user", $type, array('user' => $user_info));
+       return api_format_data("user", $type, ['user' => $user_info]);
 }
 
 /// @TODO move to top of file or somewhere better
@@ -1301,17 +1301,17 @@ function api_media_upload()
                throw new InternalServerErrorException();
        }
 
-       $returndata = array();
+       $returndata = [];
        $returndata["media_id"] = $media["id"];
        $returndata["media_id_string"] = (string)$media["id"];
        $returndata["size"] = $media["size"];
-       $returndata["image"] = array("w" => $media["width"],
+       $returndata["image"] = ["w" => $media["width"],
                                        "h" => $media["height"],
-                                       "image_type" => $media["type"]);
+                                       "image_type" => $media["type"]];
 
        logger("Media uploaded: " . print_r($returndata, true), LOGGER_DEBUG);
 
-       return array("media" => $returndata);
+       return ["media" => $returndata];
 }
 
 /// @TODO move to top of file or somewhere better
@@ -1367,7 +1367,7 @@ function api_status_show($type)
                        $geo = "geo";
                }
 
-               $status_info = array(
+               $status_info = [
                        'created_at' => api_date($lastwall['created']),
                        'id' => intval($lastwall['id']),
                        'id_str' => (string) $lastwall['id'],
@@ -1394,7 +1394,7 @@ function api_status_show($type)
                        'statusnet_html' => $converted["html"],
                        'statusnet_conversation_id' => $lastwall['parent'],
                        'external_url' => System::baseUrl() . "/display/" . $lastwall['guid'],
-               );
+               ];
 
                if (count($converted["attachments"]) > 0) {
                        $status_info["attachments"] = $converted["attachments"];
@@ -1421,7 +1421,7 @@ function api_status_show($type)
                return $status_info;
        }
 
-       return api_format_data("statuses", $type, array('status' => $status_info));
+       return api_format_data("statuses", $type, ['status' => $status_info]);
 }
 
 /**
@@ -1468,7 +1468,7 @@ function api_users_show($type)
                        $geo = "geo";
                }
 
-               $user_info['status'] = array(
+               $user_info['status'] = [
                        'text' => $converted["text"],
                        'truncated' => false,
                        'created_at' => api_date($lastwall['created']),
@@ -1485,7 +1485,7 @@ function api_users_show($type)
                        'statusnet_html' => $converted["html"],
                        'statusnet_conversation_id' => $lastwall['parent'],
                        'external_url' => System::baseUrl() . "/display/" . $lastwall['guid'],
-               );
+               ];
 
                if (count($converted["attachments"]) > 0) {
                        $user_info["status"]["attachments"] = $converted["attachments"];
@@ -1508,7 +1508,7 @@ function api_users_show($type)
        unset($user_info["uid"]);
        unset($user_info["self"]);
 
-       return api_format_data("user", $type, array('user' => $user_info));
+       return api_format_data("user", $type, ['user' => $user_info]);
 }
 
 /// @TODO move to top of file or somewhere better
@@ -1527,7 +1527,7 @@ function api_users_search($type)
 {
        $a = get_app();
 
-       $userlist = array();
+       $userlist = [];
 
        if (x($_GET, 'q')) {
                $r = q("SELECT id FROM `contact` WHERE `uid` = 0 AND `name` = '%s'", dbesc($_GET["q"]));
@@ -1547,7 +1547,7 @@ function api_users_search($type)
                                        $userlist[] = $user_info;
                                }
                        }
-                       $userlist = array("users" => $userlist);
+                       $userlist = ["users" => $userlist];
                } else {
                        throw new BadRequestException("User not found.");
                }
@@ -1573,7 +1573,7 @@ api_register_func('api/users/search', 'api_users_search');
  */
 function api_users_lookup($type)
 {
-       $users = array();
+       $users = [];
 
        if (x($_REQUEST['user_id'])) {
                foreach (explode(',', $_REQUEST['user_id']) as $id) {
@@ -1587,7 +1587,7 @@ function api_users_lookup($type)
                throw new NotFoundException;
        }
 
-       return api_format_data("users", $type, array('users' => $users));
+       return api_format_data("users", $type, ['users' => $users]);
 }
 
 /// @TODO move to top of file or somewhere better
@@ -1605,7 +1605,7 @@ api_register_func('api/users/lookup', 'api_users_lookup', true);
  */
 function api_search($type)
 {
-       $data = array();
+       $data = [];
 
        if (!x($_REQUEST, 'q')) {
                throw new BadRequestException("q parameter is required.");
@@ -1726,7 +1726,7 @@ function api_statuses_home_timeline($type)
        $ret = api_format_items($r, $user_info, false, $type);
 
        // Set all posts from the query above to seen
-       $idarray = array();
+       $idarray = [];
        foreach ($r as $item) {
                $idarray[] = intval($item["id"]);
        }
@@ -1741,7 +1741,7 @@ function api_statuses_home_timeline($type)
                }
        }
 
-       $data = array('status' => $ret);
+       $data = ['status' => $ret];
        switch ($type) {
                case "atom":
                case "rss":
@@ -1848,7 +1848,7 @@ function api_statuses_public_timeline($type)
 
        $ret = api_format_items($r, $user_info, false, $type);
 
-       $data = array('status' => $ret);
+       $data = ['status' => $ret];
        switch ($type) {
                case "atom":
                case "rss":
@@ -1920,7 +1920,7 @@ function api_statuses_networkpublic_timeline($type)
 
        $ret = api_format_items($r, $user_info, false, $type);
 
-       $data = array('status' => $ret);
+       $data = ['status' => $ret];
        switch ($type) {
                case "atom":
                case "rss":
@@ -1998,10 +1998,10 @@ function api_statuses_show($type)
        $ret = api_format_items($r, $user_info, false, $type);
 
        if ($conversation) {
-               $data = array('status' => $ret);
+               $data = ['status' => $ret];
                return api_format_data("statuses", $type, $data);
        } else {
-               $data = array('status' => $ret[0]);
+               $data = ['status' => $ret[0]];
                return api_format_data("status", $type, $data);
        }
 }
@@ -2091,7 +2091,7 @@ function api_conversation_show($type)
 
        $ret = api_format_items($r, $user_info, false, $type);
 
-       $data = array('status' => $ret);
+       $data = ['status' => $ret];
        return api_format_data("statuses", $type, $data);
 }
 
@@ -2294,7 +2294,7 @@ function api_statuses_mentions($type)
 
        $ret = api_format_items($r, $user_info, false, $type);
 
-       $data = array('status' => $ret);
+       $data = ['status' => $ret];
        switch ($type) {
                case "atom":
                case "rss":
@@ -2390,7 +2390,7 @@ function api_statuses_user_timeline($type)
 
        $ret = api_format_items($r, $user_info, true, $type);
 
-       $data = array('status' => $ret);
+       $data = ['status' => $ret];
        switch ($type) {
                case "atom":
                case "rss":
@@ -2468,7 +2468,7 @@ function api_favorites_create_destroy($type)
        $rets = api_format_items($item, $user_info, false, $type);
        $ret = $rets[0];
 
-       $data = array('status' => $ret);
+       $data = ['status' => $ret];
        switch ($type) {
                case "atom":
                case "rss":
@@ -2499,7 +2499,7 @@ function api_favorites($type)
                throw new ForbiddenException();
        }
 
-       $called_api = array();
+       $called_api = [];
 
        $user_info = api_get_user($a);
 
@@ -2508,7 +2508,7 @@ function api_favorites($type)
        logger('api_favorites: self:' . $user_info['self']);
 
        if ($user_info['self'] == 0) {
-               $ret = array();
+               $ret = [];
        } else {
                $sql_extra = "";
 
@@ -2550,7 +2550,7 @@ function api_favorites($type)
                $ret = api_format_items($r, $user_info, false, $type);
        }
 
-       $data = array('status' => $ret);
+       $data = ['status' => $ret];
        switch ($type) {
                case "atom":
                case "rss":
@@ -2574,7 +2574,7 @@ api_register_func('api/favorites', 'api_favorites', true);
 function api_format_messages($item, $recipient, $sender)
 {
        // standard meta information
-       $ret = array(
+       $ret = [
                        'id'                    => $item['id'],
                        'sender_id'             => $sender['id'] ,
                        'text'                  => "",
@@ -2587,7 +2587,7 @@ function api_format_messages($item, $recipient, $sender)
                        'title'                 => "",
                        'friendica_seen'        => $item['seen'],
                        'friendica_parent_uri'  => $item['parent-uri'],
-       );
+       ];
 
        // "uid" and "self" are only needed for some internal stuff, so remove it from here
        unset($ret["sender"]["uid"]);
@@ -2648,14 +2648,14 @@ function api_convert_item($item)
        $statushtml = trim(bbcode($body, false, false));
 
        // Workaround for clients with limited HTML parser functionality
-       $search = array("<br>", "<blockquote>", "</blockquote>",
+       $search = ["<br>", "<blockquote>", "</blockquote>",
                        "<h1>", "</h1>", "<h2>", "</h2>",
                        "<h3>", "</h3>", "<h4>", "</h4>",
-                       "<h5>", "</h5>", "<h6>", "</h6>");
-       $replace = array("<br>", "<br><blockquote>", "</blockquote><br>",
+                       "<h5>", "</h5>", "<h6>", "</h6>"];
+       $replace = ["<br>", "<br><blockquote>", "</blockquote><br>",
                        "<br><h1>", "</h1><br>", "<br><h2>", "</h2><br>",
                        "<br><h3>", "</h3><br>", "<br><h4>", "</h4><br>",
-                       "<br><h5>", "</h5><br>", "<br><h6>", "</h6><br>");
+                       "<br><h5>", "</h5><br>", "<br><h6>", "</h6><br>"];
        $statushtml = str_replace($search, $replace, $statushtml);
 
        if ($item['title'] != "") {
@@ -2682,12 +2682,12 @@ function api_convert_item($item)
 
        $entities = api_get_entitities($statustext, $body);
 
-       return array(
+       return [
                "text" => $statustext,
                "html" => $statushtml,
                "attachments" => $attachments,
                "entities" => $entities
-       );
+       ];
 }
 
 /**
@@ -2708,13 +2708,13 @@ function api_get_attachments(&$body)
                return false;
        }
 
-       $attachments = array();
+       $attachments = [];
 
        foreach ($images[1] as $image) {
                $imagedata = Image::getInfoFromURL($image);
 
                if ($imagedata) {
-                       $attachments[] = array("url" => $image, "mimetype" => $imagedata["mime"], "size" => $imagedata["size"]);
+                       $attachments[] = ["url" => $image, "mimetype" => $imagedata["mime"], "size" => $imagedata["size"]];
                }
        }
 
@@ -2746,7 +2746,7 @@ function api_get_entitities(&$text, $bbcode)
                        $replace = proxy_url($image);
                        $text = str_replace($image, $replace, $text);
                }
-               return array();
+               return [];
        }
 
        $bbcode = bb_CleanPictureLinks($bbcode);
@@ -2754,11 +2754,11 @@ function api_get_entitities(&$text, $bbcode)
        // Change pure links in text to bbcode uris
        $bbcode = preg_replace("/([^\]\='".'"'."]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1[url=$2]$2[/url]', $bbcode);
 
-       $entities = array();
-       $entities["hashtags"] = array();
-       $entities["symbols"] = array();
-       $entities["urls"] = array();
-       $entities["user_mentions"] = array();
+       $entities = [];
+       $entities["hashtags"] = [];
+       $entities["symbols"] = [];
+       $entities["urls"] = [];
+       $entities["user_mentions"] = [];
 
        $URLSearchString = "^\[\]";
 
@@ -2787,12 +2787,12 @@ function api_get_entitities(&$text, $bbcode)
        //preg_match_all("/\[url\]([$URLSearchString]*)\[\/url\]/ism", $bbcode, $urls1);
        preg_match_all("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", $bbcode, $urls);
 
-       $ordered_urls = array();
+       $ordered_urls = [];
        foreach ($urls[1] as $id => $url) {
                //$start = strpos($text, $url, $offset);
                $start = iconv_strpos($text, $url, 0, "UTF-8");
                if (!($start === false)) {
-                       $ordered_urls[$start] = array("url" => $url, "title" => $urls[2][$id]);
+                       $ordered_urls[$start] = ["url" => $url, "title" => $urls[2][$id]];
                }
        }
 
@@ -2806,8 +2806,8 @@ function api_get_entitities(&$text, $bbcode)
                ) {
                        $display_url = $url["title"];
                } else {
-                       $display_url = str_replace(array("http://www.", "https://www."), array("", ""), $url["url"]);
-                       $display_url = str_replace(array("http://", "https://"), array("", ""), $display_url);
+                       $display_url = str_replace(["http://www.", "https://www."], ["", ""], $url["url"]);
+                       $display_url = str_replace(["http://", "https://"], ["", ""], $display_url);
 
                        if (strlen($display_url) > 26) {
                                $display_url = substr($display_url, 0, 25)."…";
@@ -2817,16 +2817,16 @@ function api_get_entitities(&$text, $bbcode)
                //$start = strpos($text, $url, $offset);
                $start = iconv_strpos($text, $url["url"], $offset, "UTF-8");
                if (!($start === false)) {
-                       $entities["urls"][] = array("url" => $url["url"],
+                       $entities["urls"][] = ["url" => $url["url"],
                                                        "expanded_url" => $url["url"],
                                                        "display_url" => $display_url,
-                                                       "indices" => array($start, $start+strlen($url["url"])));
+                                                       "indices" => [$start, $start+strlen($url["url"])]];
                        $offset = $start + 1;
                }
        }
 
        preg_match_all("/\[img](.*?)\[\/img\]/ism", $bbcode, $images);
-       $ordered_images = array();
+       $ordered_images = [];
        foreach ($images[1] as $image) {
                //$start = strpos($text, $url, $offset);
                $start = iconv_strpos($text, $image, 0, "UTF-8");
@@ -2838,8 +2838,8 @@ function api_get_entitities(&$text, $bbcode)
        $offset = 0;
 
        foreach ($ordered_images as $url) {
-               $display_url = str_replace(array("http://www.", "https://www."), array("", ""), $url);
-               $display_url = str_replace(array("http://", "https://"), array("", ""), $display_url);
+               $display_url = str_replace(["http://www.", "https://www."], ["", ""], $url);
+               $display_url = str_replace(["http://", "https://"], ["", ""], $display_url);
 
                if (strlen($display_url) > 26) {
                        $display_url = substr($display_url, 0, 25)."…";
@@ -2854,38 +2854,38 @@ function api_get_entitities(&$text, $bbcode)
                                if (!Config::get("system", "proxy_disabled")) {
                                        $media_url = proxy_url($url);
 
-                                       $sizes = array();
+                                       $sizes = [];
                                        $scale = Image::getScalingDimensions($image[0], $image[1], 150);
-                                       $sizes["thumb"] = array("w" => $scale["width"], "h" => $scale["height"], "resize" => "fit");
+                                       $sizes["thumb"] = ["w" => $scale["width"], "h" => $scale["height"], "resize" => "fit"];
 
                                        if (($image[0] > 150) || ($image[1] > 150)) {
                                                $scale = Image::getScalingDimensions($image[0], $image[1], 340);
-                                               $sizes["small"] = array("w" => $scale["width"], "h" => $scale["height"], "resize" => "fit");
+                                               $sizes["small"] = ["w" => $scale["width"], "h" => $scale["height"], "resize" => "fit"];
                                        }
 
                                        $scale = Image::getScalingDimensions($image[0], $image[1], 600);
-                                       $sizes["medium"] = array("w" => $scale["width"], "h" => $scale["height"], "resize" => "fit");
+                                       $sizes["medium"] = ["w" => $scale["width"], "h" => $scale["height"], "resize" => "fit"];
 
                                        if (($image[0] > 600) || ($image[1] > 600)) {
                                                $scale = Image::getScalingDimensions($image[0], $image[1], 1024);
-                                               $sizes["large"] = array("w" => $scale["width"], "h" => $scale["height"], "resize" => "fit");
+                                               $sizes["large"] = ["w" => $scale["width"], "h" => $scale["height"], "resize" => "fit"];
                                        }
                                } else {
                                        $media_url = $url;
-                                       $sizes["medium"] = array("w" => $image[0], "h" => $image[1], "resize" => "fit");
+                                       $sizes["medium"] = ["w" => $image[0], "h" => $image[1], "resize" => "fit"];
                                }
 
-                               $entities["media"][] = array(
+                               $entities["media"][] = [
                                                        "id" => $start+1,
                                                        "id_str" => (string)$start+1,
-                                                       "indices" => array($start, $start+strlen($url)),
+                                                       "indices" => [$start, $start+strlen($url)],
                                                        "media_url" => normalise_link($media_url),
                                                        "media_url_https" => $media_url,
                                                        "url" => $url,
                                                        "display_url" => $display_url,
                                                        "expanded_url" => $url,
                                                        "type" => "photo",
-                                                       "sizes" => $sizes);
+                                                       "sizes" => $sizes];
                        }
                        $offset = $start + 1;
                }
@@ -2923,18 +2923,18 @@ function api_format_items_embeded_images($item, $text)
  */
 function api_contactlink_to_array($txt)
 {
-       $match = array();
+       $match = [];
        $r = preg_match_all('|<a href="([^"]*)">([^<]*)</a>|', $txt, $match);
        if ($r && count($match)==3) {
-               $res = array(
+               $res = [
                        'name' => $match[2],
                        'url' => $match[1]
-               );
+               ];
        } else {
-               $res = array(
+               $res = [
                        'name' => $text,
                        'url' => ""
-               );
+               ];
        }
        return $res;
 }
@@ -2954,13 +2954,13 @@ function api_format_items_activities(&$item, $type = "json")
 {
        $a = get_app();
 
-       $activities = array(
-               'like' => array(),
-               'dislike' => array(),
-               'attendyes' => array(),
-               'attendno' => array(),
-               'attendmaybe' => array(),
-       );
+       $activities = [
+               'like' => [],
+               'dislike' => [],
+               'attendyes' => [],
+               'attendno' => [],
+               'attendmaybe' => [],
+       ];
 
        $items = q(
                'SELECT * FROM item
@@ -2997,7 +2997,7 @@ function api_format_items_activities(&$item, $type = "json")
        }
 
        if ($type == "xml") {
-               $xml_activities = array();
+               $xml_activities = [];
                foreach ($activities as $k => $v) {
                        // change xml element from "like" to "friendica:like"
                        $xml_activities["friendica:".$k] = $v;
@@ -3022,7 +3022,7 @@ function api_format_items_activities(&$item, $type = "json")
  */
 function api_format_items_profiles($profile_row)
 {
-       $profile = array(
+       $profile = [
                'profile_id'       => $profile_row['id'],
                'profile_name'     => $profile_row['profile-name'],
                'is_default'       => $profile_row['is-default'] ? true : false,
@@ -3062,7 +3062,7 @@ function api_format_items_profiles($profile_row)
                'social_networks'  => bbcode(api_clean_plain_items($profile_row['contact'])  , false, false, 2, false),
                'homepage'         => $profile_row['homepage'],
                'users'            => null
-       );
+       ];
        return $profile;
 }
 
@@ -3078,7 +3078,7 @@ function api_format_items($r, $user_info, $filter_user = false, $type = "json")
 {
        $a = get_app();
 
-       $ret = array();
+       $ret = [];
 
        foreach ($r as $item) {
                localize_item($item);
@@ -3099,7 +3099,7 @@ function api_format_items($r, $user_info, $filter_user = false, $type = "json")
                        $geo = "geo";
                }
 
-               $status = array(
+               $status = [
                        'text'          => $converted["text"],
                        'truncated' => false,
                        'created_at'=> api_date($item['created']),
@@ -3120,7 +3120,7 @@ function api_format_items($r, $user_info, $filter_user = false, $type = "json")
                        'statusnet_conversation_id' => $item['parent'],
                        'external_url' => System::baseUrl() . "/display/" . $item['guid'],
                        'friendica_activities' => api_format_items_activities($item, $type),
-               );
+               ];
 
                if (count($converted["attachments"]) > 0) {
                        $status["attachments"] = $converted["attachments"];
@@ -3153,7 +3153,7 @@ function api_format_items($r, $user_info, $filter_user = false, $type = "json")
                                } catch (BadRequestException $e) {
                                        // user not found. should be found?
                                        /// @todo check if the user should be always found
-                                       $retweeted_status["user"] = array();
+                                       $retweeted_status["user"] = [];
                                }
 
                                $rt_converted = api_convert_item($retweeted_item);
@@ -3174,9 +3174,9 @@ function api_format_items($r, $user_info, $filter_user = false, $type = "json")
                        $coords = explode(' ', $item["coord"]);
                        if (count($coords) == 2) {
                                if ($type == "json") {
-                                       $status["geo"] = array('type' => 'Point',
-                                                       'coordinates' => array((float) $coords[0],
-                                                                               (float) $coords[1]));
+                                       $status["geo"] = ['type' => 'Point',
+                                                       'coordinates' => [(float) $coords[0],
+                                                                               (float) $coords[1]]];
                                } else {// Not sure if this is the official format - if someone founds a documentation we can check
                                        $status["georss:point"] = $item["coord"];
                                }
@@ -3197,26 +3197,26 @@ function api_format_items($r, $user_info, $filter_user = false, $type = "json")
 function api_account_rate_limit_status($type)
 {
        if ($type == "xml") {
-               $hash = array(
+               $hash = [
                                'remaining-hits' => '150',
-                               '@attributes' => array("type" => "integer"),
+                               '@attributes' => ["type" => "integer"],
                                'hourly-limit' => '150',
-                               '@attributes2' => array("type" => "integer"),
+                               '@attributes2' => ["type" => "integer"],
                                'reset-time' => datetime_convert('UTC', 'UTC', 'now + 1 hour', ATOM_TIME),
-                               '@attributes3' => array("type" => "datetime"),
+                               '@attributes3' => ["type" => "datetime"],
                                'reset_time_in_seconds' => strtotime('now + 1 hour'),
-                               '@attributes4' => array("type" => "integer"),
-                       );
+                               '@attributes4' => ["type" => "integer"],
+                       ];
        } else {
-               $hash = array(
+               $hash = [
                                'reset_time_in_seconds' => strtotime('now + 1 hour'),
                                'remaining_hits' => '150',
                                'hourly_limit' => '150',
                                'reset_time' => api_date(datetime_convert('UTC', 'UTC', 'now + 1 hour', ATOM_TIME)),
-                       );
+                       ];
        }
 
-       return api_format_data('hash', $type, array('hash' => $hash));
+       return api_format_data('hash', $type, ['hash' => $hash]);
 }
 
 /// @TODO move to top of file or somewhere better
@@ -3237,7 +3237,7 @@ function api_help_test($type)
                $ok = "ok";
        }
 
-       return api_format_data('ok', $type, array("ok" => $ok));
+       return api_format_data('ok', $type, ["ok" => $ok]);
 }
 
 /// @TODO move to top of file or somewhere better
@@ -3251,9 +3251,9 @@ api_register_func('api/help/test', 'api_help_test', false);
  */
 function api_lists($type)
 {
-       $ret = array();
+       $ret = [];
        /// @TODO $ret is not filled here?
-       return api_format_data('lists', $type, array("lists_list" => $ret));
+       return api_format_data('lists', $type, ["lists_list" => $ret]);
 }
 
 /// @TODO move to top of file or somewhere better
@@ -3269,9 +3269,9 @@ api_register_func('api/lists', 'api_lists', true);
  */
 function api_lists_list($type)
 {
-       $ret = array();
+       $ret = [];
        /// @TODO $ret is not filled here?
-       return api_format_data('lists', $type, array("lists_list" => $ret));
+       return api_format_data('lists', $type, ["lists_list" => $ret]);
 }
 
 /// @TODO move to top of file or somewhere better
@@ -3350,7 +3350,7 @@ function api_statuses_f($qtype)
                intval($count)
        );
 
-       $ret = array();
+       $ret = [];
        foreach ($r as $cid) {
                $user = api_get_user($a, $cid['nurl']);
                // "uid" and "self" are only needed for some internal stuff, so remove it from here
@@ -3362,7 +3362,7 @@ function api_statuses_f($qtype)
                }
        }
 
-       return array('user' => $ret);
+       return ['user' => $ret];
 }
 
 
@@ -3445,12 +3445,12 @@ function api_friendships_incoming($type)
                return false;
        }
 
-       $ids = array();
+       $ids = [];
        foreach ($data['user'] as $user) {
                $ids[] = $user['id'];
        }
 
-       return api_format_data("ids", $type, array('id' => $ids));
+       return api_format_data("ids", $type, ['id' => $ids]);
 }
 
 /// @TODO move to top of file or somewhere better
@@ -3480,22 +3480,22 @@ function api_statusnet_config($type)
        $ssl = ((Config::get('system', 'have_ssl')) ? 'true' : 'false');
        $sslserver = (($ssl === 'true') ? str_replace('http:', 'https:', System::baseUrl()) : '');
 
-       $config = array(
-               'site' => array('name' => $name,'server' => $server, 'theme' => 'default', 'path' => '',
+       $config = [
+               'site' => ['name' => $name,'server' => $server, 'theme' => 'default', 'path' => '',
                        'logo' => $logo, 'fancy' => true, 'language' => 'en', 'email' => $email, 'broughtby' => '',
                        'broughtbyurl' => '', 'timezone' => 'UTC', 'closed' => $closed, 'inviteonly' => false,
                        'private' => $private, 'textlimit' => $textlimit, 'sslserver' => $sslserver, 'ssl' => $ssl,
                        'shorturllength' => '30',
-                       'friendica' => array(
+                       'friendica' => [
                                        'FRIENDICA_PLATFORM' => FRIENDICA_PLATFORM,
                                        'FRIENDICA_VERSION' => FRIENDICA_VERSION,
                                        'DFRN_PROTOCOL_VERSION' => DFRN_PROTOCOL_VERSION,
                                        'DB_UPDATE_VERSION' => DB_UPDATE_VERSION
-                                       )
-               ),
-       );
+                                       ]
+               ],
+       ];
 
-       return api_format_data('config', $type, array('config' => $config));
+       return api_format_data('config', $type, ['config' => $config]);
 }
 
 /// @TODO move to top of file or somewhere better
@@ -3513,7 +3513,7 @@ function api_statusnet_version($type)
        // liar
        $fake_statusnet_version = "0.9.7";
 
-       return api_format_data('version', $type, array('version' => $fake_statusnet_version));
+       return api_format_data('version', $type, ['version' => $fake_statusnet_version]);
 }
 
 /// @TODO move to top of file or somewhere better
@@ -3546,7 +3546,7 @@ function api_ff_ids($type)
                return;
        }
 
-       $ids = array();
+       $ids = [];
        foreach ($r as $rr) {
                if ($stringify_ids) {
                        $ids[] = $rr['id'];
@@ -3555,7 +3555,7 @@ function api_ff_ids($type)
                }
        }
 
-       return api_format_data("ids", $type, array('id' => $ids));
+       return api_format_data("ids", $type, ['id' => $ids]);
 }
 
 /**
@@ -3650,10 +3650,10 @@ function api_direct_messages_new($type)
                $r = q("SELECT * FROM `mail` WHERE id=%d", intval($id));
                $ret = api_format_messages($r[0], $recipient, $sender);
        } else {
-               $ret = array("error"=>$id);
+               $ret = ["error"=>$id];
        }
 
-       $data = array('direct_message'=>$ret);
+       $data = ['direct_message'=>$ret];
 
        switch ($type) {
                case "atom":
@@ -3696,8 +3696,8 @@ function api_direct_messages_destroy($type)
        $uid = $user_info['uid'];
        // error if no id or parenturi specified (for clients posting parent-uri as well)
        if ($verbose == "true" && ($id == 0 || $parenturi == "")) {
-               $answer = array('result' => 'error', 'message' => 'message id or parenturi not specified');
-               return api_format_data("direct_messages_delete", $type, array('$result' => $answer));
+               $answer = ['result' => 'error', 'message' => 'message id or parenturi not specified'];
+               return api_format_data("direct_messages_delete", $type, ['$result' => $answer]);
        }
 
        // BadRequestException if no id specified (for clients using Twitter API)
@@ -3718,8 +3718,8 @@ function api_direct_messages_destroy($type)
        // error message if specified id is not in database
        if (!DBM::is_result($r)) {
                if ($verbose == "true") {
-                       $answer = array('result' => 'error', 'message' => 'message id not in database');
-                       return api_format_data("direct_messages_delete", $type, array('$result' => $answer));
+                       $answer = ['result' => 'error', 'message' => 'message id not in database'];
+                       return api_format_data("direct_messages_delete", $type, ['$result' => $answer]);
                }
                /// @todo BadRequestException ok for Twitter API clients?
                throw new BadRequestException('message id not in database');
@@ -3735,11 +3735,11 @@ function api_direct_messages_destroy($type)
        if ($verbose == "true") {
                if ($result) {
                        // return success
-                       $answer = array('result' => 'ok', 'message' => 'message deleted');
-                       return api_format_data("direct_message_delete", $type, array('$result' => $answer));
+                       $answer = ['result' => 'ok', 'message' => 'message deleted'];
+                       return api_format_data("direct_message_delete", $type, ['$result' => $answer]);
                } else {
-                       $answer = array('result' => 'error', 'message' => 'unknown error');
-                       return api_format_data("direct_messages_delete", $type, array('$result' => $answer));
+                       $answer = ['result' => 'error', 'message' => 'unknown error'];
+                       return api_format_data("direct_messages_delete", $type, ['$result' => $answer]);
                }
        }
        /// @todo return JSON data like Twitter API not yet implemented
@@ -3819,11 +3819,11 @@ function api_direct_messages_box($type, $box, $verbose)
                intval($count)
        );
        if ($verbose == "true" && !DBM::is_result($r)) {
-               $answer = array('result' => 'error', 'message' => 'no mails available');
-               return api_format_data("direct_messages_all", $type, array('$result' => $answer));
+               $answer = ['result' => 'error', 'message' => 'no mails available'];
+               return api_format_data("direct_messages_all", $type, ['$result' => $answer]);
        }
 
-       $ret = array();
+       $ret = [];
        foreach ($r as $item) {
                if ($box == "inbox" || $item['from-url'] != $profile_url) {
                        $recipient = $user_info;
@@ -3837,7 +3837,7 @@ function api_direct_messages_box($type, $box, $verbose)
        }
 
 
-       $data = array('direct_message' => $ret);
+       $data = ['direct_message' => $ret];
        switch ($type) {
                case "atom":
                case "rss":
@@ -3991,12 +3991,12 @@ function api_fr_photoalbum_delete($type)
        }
 
        // now let's delete all photos from the album
-       $result = dba::delete('photo', array('uid' => api_user(), 'album' => $album));
+       $result = dba::delete('photo', ['uid' => api_user(), 'album' => $album]);
 
        // return success of deletion or error message
        if ($result) {
-               $answer = array('result' => 'deleted', 'message' => 'album `' . $album . '` with all containing photos has been deleted.');
-               return api_format_data("photoalbum_delete", $type, array('$result' => $answer));
+               $answer = ['result' => 'deleted', 'message' => 'album `' . $album . '` with all containing photos has been deleted.'];
+               return api_format_data("photoalbum_delete", $type, ['$result' => $answer]);
        } else {
                throw new InternalServerErrorException("unknown error - deleting from database failed");
        }
@@ -4043,8 +4043,8 @@ function api_fr_photoalbum_update($type)
 
        // return success of updating or error message
        if ($result) {
-               $answer = array('result' => 'updated', 'message' => 'album `' . $album . '` with all containing photos has been renamed to `' . $album_new . '`.');
-               return api_format_data("photoalbum_update", $type, array('$result' => $answer));
+               $answer = ['result' => 'updated', 'message' => 'album `' . $album . '` with all containing photos has been renamed to `' . $album_new . '`.'];
+               return api_format_data("photoalbum_update", $type, ['$result' => $answer]);
        } else {
                throw new InternalServerErrorException("unknown error - updating in database failed");
        }
@@ -4068,15 +4068,15 @@ function api_fr_photos_list($type)
                WHERE `uid` = %d AND `album` != 'Contact Photos' GROUP BY `resource-id`",
                intval(local_user())
        );
-       $typetoext = array(
+       $typetoext = [
                'image/jpeg' => 'jpg',
                'image/png' => 'png',
                'image/gif' => 'gif'
-       );
-       $data = array('photo'=>array());
+       ];
+       $data = ['photo'=>[]];
        if (DBM::is_result($r)) {
                foreach ($r as $rr) {
-                       $photo = array();
+                       $photo = [];
                        $photo['id'] = $rr['resource-id'];
                        $photo['album'] = $rr['album'];
                        $photo['filename'] = $rr['filename'];
@@ -4087,7 +4087,7 @@ function api_fr_photos_list($type)
                        $photo['desc'] = $rr['desc'];
 
                        if ($type == "xml") {
-                               $data['photo'][] = array("@attributes" => $photo, "1" => $thumb);
+                               $data['photo'][] = ["@attributes" => $photo, "1" => $thumb];
                        } else {
                                $photo['thumb'] = $thumb;
                                $data['photo'][] = $photo;
@@ -4231,12 +4231,12 @@ function api_fr_photo_create_update($type)
 
                // return success of updating or error message
                if ($result) {
-                       $answer = array('result' => 'updated', 'message' => 'Image id `' . $photo_id . '` has been updated.');
-                       return api_format_data("photo_update", $type, array('$result' => $answer));
+                       $answer = ['result' => 'updated', 'message' => 'Image id `' . $photo_id . '` has been updated.'];
+                       return api_format_data("photo_update", $type, ['$result' => $answer]);
                } else {
                        if ($nothingtodo) {
-                               $answer = array('result' => 'cancelled', 'message' => 'Nothing to update for image id `' . $photo_id . '`.');
-                               return api_format_data("photo_update", $type, array('$result' => $answer));
+                               $answer = ['result' => 'cancelled', 'message' => 'Nothing to update for image id `' . $photo_id . '`.'];
+                               return api_format_data("photo_update", $type, ['$result' => $answer]);
                        }
                        throw new InternalServerErrorException("unknown error - update photo entry in database failed");
                }
@@ -4274,7 +4274,7 @@ function api_fr_photo_delete($type)
                throw new BadRequestException("photo not available");
        }
        // now we can perform on the deletion of the photo
-       $result = dba::delete('photo', array('uid' => api_user(), 'resource-id' => $photo_id));
+       $result = dba::delete('photo', ['uid' => api_user(), 'resource-id' => $photo_id]);
 
        // return success of deletion or error message
        if ($result) {
@@ -4292,8 +4292,8 @@ function api_fr_photo_delete($type)
                // to the user and the contacts of the users (drop_items() do all the necessary magic to avoid orphans in database and federate deletion)
                drop_item($photo_item[0]['id'], false);
 
-               $answer = array('result' => 'deleted', 'message' => 'photo with id `' . $photo_id . '` has been deleted from server.');
-               return api_format_data("photo_delete", $type, array('$result' => $answer));
+               $answer = ['result' => 'deleted', 'message' => 'photo with id `' . $photo_id . '` has been deleted from server.'];
+               return api_format_data("photo_delete", $type, ['$result' => $answer]);
        } else {
                throw new InternalServerErrorException("unknown error on deleting photo from database table");
        }
@@ -4692,7 +4692,7 @@ function post_photo_item($hash, $allow_cid, $deny_cid, $allow_gid, $deny_gid, $f
        $uri = item_new_uri(get_app()->get_hostname(), intval(api_user()));
        $owner_record = q("SELECT * FROM `contact` WHERE `uid`= %d AND `self` LIMIT 1", intval(api_user()));
 
-       $arr = array();
+       $arr = [];
        $arr['guid']          = get_guid(32);
        $arr['uid']           = intval(api_user());
        $arr['uri']           = $uri;
@@ -4716,11 +4716,11 @@ function post_photo_item($hash, $allow_cid, $deny_cid, $allow_gid, $deny_gid, $f
        $arr['visible']       = $visibility;
        $arr['origin']        = 1;
 
-       $typetoext = array(
+       $typetoext = [
                        'image/jpeg' => 'jpg',
                        'image/png' => 'png',
                        'image/gif' => 'gif'
-                       );
+                       ];
 
        // adds link to the thumbnail scale photo
        $arr['body'] = '[url=' . System::baseUrl() . '/photos/' . $owner_record[0]['nick'] . '/image/' . $hash . ']'
@@ -4757,15 +4757,15 @@ function prepare_photo_data($type, $scale, $photo_id)
                $scale_sql
        );
 
-       $typetoext = array(
+       $typetoext = [
                'image/jpeg' => 'jpg',
                'image/png' => 'png',
                'image/gif' => 'gif'
-       );
+       ];
 
        // prepare output data for photo
        if (DBM::is_result($r)) {
-               $data = array('photo' => $r[0]);
+               $data = ['photo' => $r[0]];
                $data['photo']['id'] = $data['photo']['resource-id'];
                if ($scale !== false) {
                        $data['photo']['data'] = base64_encode($data['photo']['data']);
@@ -4773,14 +4773,14 @@ function prepare_photo_data($type, $scale, $photo_id)
                        unset($data['photo']['datasize']); //needed only with scale param
                }
                if ($type == "xml") {
-                       $data['photo']['links'] = array();
+                       $data['photo']['links'] = [];
                        for ($k = intval($data['photo']['minscale']); $k <= intval($data['photo']['maxscale']); $k++) {
-                               $data['photo']['links'][$k . ":link"]["@attributes"] = array("type" => $data['photo']['type'],
+                               $data['photo']['links'][$k . ":link"]["@attributes"] = ["type" => $data['photo']['type'],
                                                                                "scale" => $k,
-                                                                               "href" => System::baseUrl() . "/photo/" . $data['photo']['resource-id'] . "-" . $k . "." . $typetoext[$data['photo']['type']]);
+                                                                               "href" => System::baseUrl() . "/photo/" . $data['photo']['resource-id'] . "-" . $k . "." . $typetoext[$data['photo']['type']]];
                        }
                } else {
-                       $data['photo']['link'] = array();
+                       $data['photo']['link'] = [];
                        // when we have profile images we could have only scales from 4 to 6, but index of array always needs to start with 0
                        $i = 0;
                        for ($k = intval($data['photo']['minscale']); $k <= intval($data['photo']['maxscale']); $k++) {
@@ -4822,7 +4822,7 @@ function prepare_photo_data($type, $scale, $photo_id)
 
        // prepare output of comments
        $commentData = api_format_items($r, api_get_user(get_app()), false, $type);
-       $comments = array();
+       $comments = [];
        if ($type == "xml") {
                $k = 0;
                foreach ($commentData as $comment) {
@@ -5104,7 +5104,7 @@ function api_get_nick($profile)
  */
 function api_in_reply_to($item)
 {
-       $in_reply_to = array();
+       $in_reply_to = [];
 
        $in_reply_to['status_id'] = null;
        $in_reply_to['user_id'] = null;
@@ -5223,7 +5223,7 @@ function api_clean_attachments($body)
  */
 function api_best_nickname(&$contacts)
 {
-       $best_contact = array();
+       $best_contact = [];
 
        if (count($contact) == 0) {
                return;
@@ -5232,14 +5232,14 @@ function api_best_nickname(&$contacts)
        foreach ($contacts as $contact) {
                if ($contact["network"] == "") {
                        $contact["network"] = "dfrn";
-                       $best_contact = array($contact);
+                       $best_contact = [$contact];
                }
        }
 
        if (sizeof($best_contact) == 0) {
                foreach ($contacts as $contact) {
                        if ($contact["network"] == "dfrn") {
-                               $best_contact = array($contact);
+                               $best_contact = [$contact];
                        }
                }
        }
@@ -5247,7 +5247,7 @@ function api_best_nickname(&$contacts)
        if (sizeof($best_contact) == 0) {
                foreach ($contacts as $contact) {
                        if ($contact["network"] == "dspr") {
-                               $best_contact = array($contact);
+                               $best_contact = [$contact];
                        }
                }
        }
@@ -5255,7 +5255,7 @@ function api_best_nickname(&$contacts)
        if (sizeof($best_contact) == 0) {
                foreach ($contacts as $contact) {
                        if ($contact["network"] == "stat") {
-                               $best_contact = array($contact);
+                               $best_contact = [$contact];
                        }
                }
        }
@@ -5263,7 +5263,7 @@ function api_best_nickname(&$contacts)
        if (sizeof($best_contact) == 0) {
                foreach ($contacts as $contact) {
                        if ($contact["network"] == "pump") {
-                               $best_contact = array($contact);
+                               $best_contact = [$contact];
                        }
                }
        }
@@ -5271,7 +5271,7 @@ function api_best_nickname(&$contacts)
        if (sizeof($best_contact) == 0) {
                foreach ($contacts as $contact) {
                        if ($contact["network"] == "twit") {
-                               $best_contact = array($contact);
+                               $best_contact = [$contact];
                        }
                }
        }
@@ -5279,7 +5279,7 @@ function api_best_nickname(&$contacts)
        if (sizeof($best_contact) == 1) {
                $contacts = $best_contact;
        } else {
-               $contacts = array($contacts[0]);
+               $contacts = [$contacts[0]];
        }
 }
 
@@ -5324,7 +5324,7 @@ function api_friendica_group_show($type)
        // loop through all groups and retrieve all members for adding data in the user array
        foreach ($r as $rr) {
                $members = Contact::getByGroupId($rr['id']);
-               $users = array();
+               $users = [];
 
                if ($type == "xml") {
                        $user_element = "users";
@@ -5340,9 +5340,9 @@ function api_friendica_group_show($type)
                                $users[] = $user;
                        }
                }
-               $grps[] = array('name' => $rr['name'], 'gid' => $rr['id'], $user_element => $users);
+               $grps[] = ['name' => $rr['name'], 'gid' => $rr['id'], $user_element => $users];
        }
-       return api_format_data("groups", $type, array('group' => $grps));
+       return api_format_data("groups", $type, ['group' => $grps]);
 }
 api_register_func('api/friendica/group_show', 'api_friendica_group_show', true);
 
@@ -5400,8 +5400,8 @@ function api_friendica_group_delete($type)
        $ret = Group::removeByName($uid, $name);
        if ($ret) {
                // return success
-               $success = array('success' => $ret, 'gid' => $gid, 'name' => $name, 'status' => 'deleted', 'wrong users' => array());
-               return api_format_data("group_delete", $type, array('result' => $success));
+               $success = ['success' => $ret, 'gid' => $gid, 'name' => $name, 'status' => 'deleted', 'wrong users' => []];
+               return api_format_data("group_delete", $type, ['result' => $success]);
        } else {
                throw new BadRequestException('other API error');
        }
@@ -5468,7 +5468,7 @@ function api_friendica_group_create($type)
 
        // add members
        $erroraddinguser = false;
-       $errorusers = array();
+       $errorusers = [];
        foreach ($users as $user) {
                $cid = $user['cid'];
                // check if user really exists as contact
@@ -5487,8 +5487,8 @@ function api_friendica_group_create($type)
 
        // return success message incl. missing users in array
        $status = ($erroraddinguser ? "missing user" : ($reactivate_group ? "reactivated" : "ok"));
-       $success = array('success' => true, 'gid' => $gid, 'name' => $name, 'status' => $status, 'wrong users' => $errorusers);
-       return api_format_data("group_create", $type, array('result' => $success));
+       $success = ['success' => true, 'gid' => $gid, 'name' => $name, 'status' => $status, 'wrong users' => $errorusers];
+       return api_format_data("group_create", $type, ['result' => $success]);
 }
 api_register_func('api/friendica/group_create', 'api_friendica_group_create', true, API_METHOD_POST);
 
@@ -5540,7 +5540,7 @@ function api_friendica_group_update($type)
 
        // add members
        $erroraddinguser = false;
-       $errorusers = array();
+       $errorusers = [];
        foreach ($users as $user) {
                $cid = $user['cid'];
                // check if user really exists as contact
@@ -5560,8 +5560,8 @@ function api_friendica_group_update($type)
 
        // return success message incl. missing users in array
        $status = ($erroraddinguser ? "missing user" : "ok");
-       $success = array('success' => true, 'gid' => $gid, 'name' => $name, 'status' => $status, 'wrong users' => $errorusers);
-       return api_format_data("group_update", $type, array('result' => $success));
+       $success = ['success' => true, 'gid' => $gid, 'name' => $name, 'status' => $status, 'wrong users' => $errorusers];
+       return api_format_data("group_update", $type, ['result' => $success]);
 }
 
 api_register_func('api/friendica/group_update', 'api_friendica_group_update', true, API_METHOD_POST);
@@ -5592,7 +5592,7 @@ function api_friendica_activity($type)
                } else {
                        $ok = "ok";
                }
-               return api_format_data('ok', $type, array('ok' => $ok));
+               return api_format_data('ok', $type, ['ok' => $ok]);
        } else {
                throw new BadRequestException('Error adding activity');
        }
@@ -5628,18 +5628,18 @@ function api_friendica_notification($type)
        }
        $nm = new NotificationsManager();
 
-       $notes = $nm->getAll(array(), "+seen -date", 50);
+       $notes = $nm->getAll([], "+seen -date", 50);
 
        if ($type == "xml") {
-               $xmlnotes = array();
+               $xmlnotes = [];
                foreach ($notes as $note) {
-                       $xmlnotes[] = array("@attributes" => $note);
+                       $xmlnotes[] = ["@attributes" => $note];
                }
 
                $notes = $xmlnotes;
        }
 
-       return api_format_data("notes", $type, array('note' => $notes));
+       return api_format_data("notes", $type, ['note' => $notes]);
 }
 
 /**
@@ -5681,12 +5681,12 @@ function api_friendica_notification_seen($type)
                        // we found the item, return it to the user
                        $user_info = api_get_user($a);
                        $ret = api_format_items($r, $user_info, false, $type);
-                       $data = array('status' => $ret);
+                       $data = ['status' => $ret];
                        return api_format_data("status", $type, $data);
                }
                // the item can't be found, but we set the note as seen, so we count this as a success
        }
-       return api_format_data('result', $type, array('result' => "success"));
+       return api_format_data('result', $type, ['result' => "success"]);
 }
 
 /// @TODO move to top of file or somewhere better
@@ -5713,8 +5713,8 @@ function api_friendica_direct_messages_setseen($type)
 
        // return error if id is zero
        if ($id == "") {
-               $answer = array('result' => 'error', 'message' => 'message id not specified');
-               return api_format_data("direct_messages_setseen", $type, array('$result' => $answer));
+               $answer = ['result' => 'error', 'message' => 'message id not specified'];
+               return api_format_data("direct_messages_setseen", $type, ['$result' => $answer]);
        }
 
        // get data of the specified message id
@@ -5726,8 +5726,8 @@ function api_friendica_direct_messages_setseen($type)
 
        // error message if specified id is not in database
        if (!DBM::is_result($r)) {
-               $answer = array('result' => 'error', 'message' => 'message id not in database');
-               return api_format_data("direct_messages_setseen", $type, array('$result' => $answer));
+               $answer = ['result' => 'error', 'message' => 'message id not in database'];
+               return api_format_data("direct_messages_setseen", $type, ['$result' => $answer]);
        }
 
        // update seen indicator
@@ -5739,11 +5739,11 @@ function api_friendica_direct_messages_setseen($type)
 
        if ($result) {
                // return success
-               $answer = array('result' => 'ok', 'message' => 'message set to seen');
-               return api_format_data("direct_message_setseen", $type, array('$result' => $answer));
+               $answer = ['result' => 'ok', 'message' => 'message set to seen'];
+               return api_format_data("direct_message_setseen", $type, ['$result' => $answer]);
        } else {
-               $answer = array('result' => 'error', 'message' => 'unknown error');
-               return api_format_data("direct_messages_setseen", $type, array('$result' => $answer));
+               $answer = ['result' => 'error', 'message' => 'unknown error'];
+               return api_format_data("direct_messages_setseen", $type, ['$result' => $answer]);
        }
 }
 
@@ -5773,8 +5773,8 @@ function api_friendica_direct_messages_search($type)
 
        // error if no searchstring specified
        if ($searchstring == "") {
-               $answer = array('result' => 'error', 'message' => 'searchstring not specified');
-               return api_format_data("direct_messages_search", $type, array('$result' => $answer));
+               $answer = ['result' => 'error', 'message' => 'searchstring not specified'];
+               return api_format_data("direct_messages_search", $type, ['$result' => $answer]);
        }
 
        // get data for the specified searchstring
@@ -5788,11 +5788,11 @@ function api_friendica_direct_messages_search($type)
 
        // message if nothing was found
        if (!DBM::is_result($r)) {
-               $success = array('success' => false, 'search_results' => 'problem with query');
+               $success = ['success' => false, 'search_results' => 'problem with query'];
        } elseif (count($r) == 0) {
-               $success = array('success' => false, 'search_results' => 'nothing found');
+               $success = ['success' => false, 'search_results' => 'nothing found'];
        } else {
-               $ret = array();
+               $ret = [];
                foreach ($r as $item) {
                        if ($box == "inbox" || $item['from-url'] != $profile_url) {
                                $recipient = $user_info;
@@ -5804,10 +5804,10 @@ function api_friendica_direct_messages_search($type)
 
                        $ret[] = api_format_messages($item, $recipient, $sender);
                }
-               $success = array('success' => true, 'search_results' => $ret);
+               $success = ['success' => true, 'search_results' => $ret];
        }
 
-       return api_format_data("direct_message_search", $type, array('$result' => $success));
+       return api_format_data("direct_message_search", $type, ['$result' => $success]);
 }
 
 /// @TODO move to top of file or somewhere better
@@ -5858,7 +5858,7 @@ function api_friendica_profile_show($type)
                $profile = api_format_items_profiles($rr);
 
                // select all users from contact table, loop and prepare standard return for user data
-               $users = array();
+               $users = [];
                $r = q(
                        "SELECT `id`, `nurl` FROM `contact` WHERE `uid`= %d AND `profile-id` = %d",
                        intval(api_user()),
@@ -5882,11 +5882,11 @@ function api_friendica_profile_show($type)
        // return settings, authenticated user and profiles data
        $self = q("SELECT `nurl` FROM `contact` WHERE `uid`= %d AND `self` LIMIT 1", intval(api_user()));
 
-       $result = array('multi_profiles' => $multi_profiles ? true : false,
+       $result = ['multi_profiles' => $multi_profiles ? true : false,
                                        'global_dir' => $directory,
                                        'friendica_owner' => api_get_user($a, $self[0]['nurl']),
-                                       'profiles' => $profiles);
-       return api_format_data("friendica_profiles", $type, array('$result' => $result));
+                                       'profiles' => $profiles];
+       return api_format_data("friendica_profiles", $type, ['$result' => $result]);
 }
 api_register_func('api/friendica/profile/show', 'api_friendica_profile_show', true, API_METHOD_GET);
 
@@ -5901,21 +5901,21 @@ api_register_func('api/friendica/profile/show', 'api_friendica_profile_show', tr
  */
 function api_saved_searches_list($type)
 {
-       $terms = dba::select('search', array('id', 'term'), array('uid' => local_user()));
+       $terms = dba::select('search', ['id', 'term'], ['uid' => local_user()]);
 
-       $result = array();
+       $result = [];
        while ($term = $terms->fetch()) {
-               $result[] = array(
+               $result[] = [
                        'name' => $term['term'],
                        'query' => $term['term'],
                        'id_str' => $term['id'],
                        'id' => intval($term['id'])
-               );
+               ];
        }
 
        dba::close($terms);
 
-       return api_format_data("terms", $type, array('terms' => $result));
+       return api_format_data("terms", $type, ['terms' => $result]);
 }
 
 /// @TODO move to top of file or somewhere better
index 73210860d2668f63604264b849f2319949274c17..fc25a584a91b44ffd3513722ebe9683cacf4b5e3 100644 (file)
@@ -51,7 +51,7 @@ function diaspora2bb($s) {
        $s = preg_replace('/^([^\*]+)\*([^\*]*)$/im', '$1\*$2', $s);
 
        // The parser cannot handle paragraphs correctly
-       $s = str_replace(array('</p>', '<p>', '<p dir="ltr">'), array('<br>', '<br>', '<br>'), $s);
+       $s = str_replace(['</p>', '<p>', '<p dir="ltr">'], ['<br>', '<br>', '<br>'], $s);
 
        // Escaping the hash tags
        $s = preg_replace('/\#([^\s\#])/', '&#35;$1', $s);
@@ -178,11 +178,11 @@ function bb2diaspora($Text, $preserve_nl = false, $fordiaspora = true) {
        }
 
        // mask some special HTML chars from conversation to markdown
-       $Text = str_replace(array('&lt;', '&gt;', '&amp;'), array('&_lt_;', '&_gt_;', '&_amp_;'), $Text);
+       $Text = str_replace(['&lt;', '&gt;', '&amp;'], ['&_lt_;', '&_gt_;', '&_amp_;'], $Text);
 
        // If a link is followed by a quote then there should be a newline before it
        // Maybe we should make this newline at every time before a quote.
-       $Text = str_replace(array("</a><blockquote>"), array("</a><br><blockquote>"), $Text);
+       $Text = str_replace(["</a><blockquote>"], ["</a><br><blockquote>"], $Text);
 
        $stamp1 = microtime(true);
 
@@ -191,12 +191,12 @@ function bb2diaspora($Text, $preserve_nl = false, $fordiaspora = true) {
        $Text = $converter->convert($Text);
 
        // unmask the special chars back to HTML
-       $Text = str_replace(array('&\_lt\_;', '&\_gt\_;', '&\_amp\_;'), array('&lt;', '&gt;', '&amp;'), $Text);
+       $Text = str_replace(['&\_lt\_;', '&\_gt\_;', '&\_amp\_;'], ['&lt;', '&gt;', '&amp;'], $Text);
 
        $a->save_timestamp($stamp1, "parser");
 
        // Libertree has a problem with escaped hashtags.
-       $Text = str_replace(array('\#'), array('#'), $Text);
+       $Text = str_replace(['\#'], ['#'], $Text);
 
        // Remove any leading or trailing whitespace, as this will mess up
        // the Diaspora signature verification and cause the item to disappear
index 47c40182122759f1b06f70d8866673ed3fbf0fc2..a6ffc39c18744c4dd999d994766aede3ae4c1841 100644 (file)
@@ -60,7 +60,7 @@ function bb_attachment($return, $simplehtml = false, $tryoembed = true)
 
        if (isset($data["title"])) {
                $data["title"] = strip_tags($data["title"]);
-               $data["title"] = str_replace(array("http://", "https://"), "", $data["title"]);
+               $data["title"] = str_replace(["http://", "https://"], "", $data["title"]);
        }
 
        if (((strpos($data["text"], "[img=") !== false) || (strpos($data["text"], "[img]") !== false) || Config::get('system', 'always_show_preview')) && ($data["image"] != "")) {
@@ -280,7 +280,7 @@ function bb_find_open_close($s, $open, $close, $occurence = 1) {
                return false;
        }
 
-       $res = array( 'start' => $start_pos, 'end' => $end_pos );
+       $res = [ 'start' => $start_pos, 'end' => $end_pos ];
 
        return $res;
 }
@@ -316,16 +316,16 @@ function get_bb_tag_pos($s, $name, $occurence = 1) {
                return false;
        }
 
-       $res = array(
-               'start' => array(
+       $res = [
+               'start' => [
                        'open'  => $start_open,
                        'close' => $start_close
-               ),
-               'end'   => array(
+               ],
+               'end'   => [
                        'open'  => $end_open,
                        'close' => $end_open + strlen('[/' . $name . ']')
-               ),
-       );
+               ],
+       ];
 
        if ($start_equal !== false) {
                $res['start']['equal'] = $start_equal + 1;
@@ -360,7 +360,7 @@ function bb_tag_preg_replace($pattern, $replace, $name, $s) {
 
 function bb_extract_images($body) {
 
-       $saved_image = array();
+       $saved_image = [];
        $orig_body = $body;
        $new_body = '';
 
@@ -398,7 +398,7 @@ function bb_extract_images($body) {
 
        $new_body = $new_body . $orig_body;
 
-       return array('body' => $new_body, 'images' => $saved_image);
+       return ['body' => $new_body, 'images' => $saved_image];
 }
 
 function bb_replace_images($body, $images) {
@@ -595,14 +595,14 @@ function bb_ShareAttributes($share, $simplehtml)
                                $avatar = proxy_url($avatar, false, PROXY_SIZE_THUMB);
 
                                $tpl = get_markup_template('shared_content.tpl');
-                               $text .= replace_macros($tpl, array(
+                               $text .= replace_macros($tpl, [
                                        '$profile' => $profile,
                                        '$avatar' => $avatar,
                                        '$author' => $author,
                                        '$link' => $link,
                                        '$posted' => $posted,
                                        '$content' => trim($share[3])
-                               ));
+                               ]);
                        }
                        break;
        }
@@ -752,7 +752,7 @@ function bb_RemovePictureLinks($match) {
                        $xpath = new DomXPath($doc);
                        $list = $xpath->query("//meta[@name]");
                        foreach ($list as $node) {
-                               $attr = array();
+                               $attr = [];
 
                                if ($node->attributes->length)
                                        foreach ($node->attributes as $attribute)
@@ -809,7 +809,7 @@ function bb_CleanPictureLinksSub($match) {
                        $xpath = new DomXPath($doc);
                        $list = $xpath->query("//meta[@name]");
                        foreach ($list as $node) {
-                               $attr = array();
+                               $attr = [];
 
                                if ($node->attributes->length)
                                        foreach ($node->attributes as $attribute)
@@ -951,10 +951,10 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa
 
        // removing multiplicated newlines
        if (Config::get("system", "remove_multiplicated_lines")) {
-               $search = array("\n\n\n", "\n ", " \n", "[/quote]\n\n", "\n[/quote]", "[/li]\n", "\n[li]", "\n[ul]", "[/ul]\n", "\n\n[share ", "[/attachment]\n",
-                               "\n[h1]", "[/h1]\n", "\n[h2]", "[/h2]\n", "\n[h3]", "[/h3]\n", "\n[h4]", "[/h4]\n", "\n[h5]", "[/h5]\n", "\n[h6]", "[/h6]\n");
-               $replace = array("\n\n", "\n", "\n", "[/quote]\n", "[/quote]", "[/li]", "[li]", "[ul]", "[/ul]", "\n[share ", "[/attachment]",
-                               "[h1]", "[/h1]", "[h2]", "[/h2]", "[h3]", "[/h3]", "[h4]", "[/h4]", "[h5]", "[/h5]", "[h6]", "[/h6]");
+               $search = ["\n\n\n", "\n ", " \n", "[/quote]\n\n", "\n[/quote]", "[/li]\n", "\n[li]", "\n[ul]", "[/ul]\n", "\n\n[share ", "[/attachment]\n",
+                               "\n[h1]", "[/h1]\n", "\n[h2]", "[/h2]\n", "\n[h3]", "[/h3]\n", "\n[h4]", "[/h4]\n", "\n[h5]", "[/h5]\n", "\n[h6]", "[/h6]\n"];
+               $replace = ["\n\n", "\n", "\n", "[/quote]\n", "[/quote]", "[/li]", "[li]", "[ul]", "[/ul]", "\n[share ", "[/attachment]",
+                               "[h1]", "[/h1]", "[h2]", "[/h2]", "[h3]", "[/h3]", "[h4]", "[/h4]", "[h5]", "[/h5]", "[h6]", "[/h6]"];
                do {
                        $oldtext = $Text;
                        $Text = str_replace($search, $replace, $Text);
@@ -986,14 +986,14 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa
        // Handle attached links or videos
        $Text = bb_attachment($Text, $simplehtml, $tryoembed);
 
-       $Text = str_replace(array("\r","\n"), array('<br />', '<br />'), $Text);
+       $Text = str_replace(["\r","\n"], ['<br />', '<br />'], $Text);
 
        if ($preserve_nl) {
-               $Text = str_replace(array("\n", "\r"), array('', ''), $Text);
+               $Text = str_replace(["\n", "\r"], ['', ''], $Text);
        }
 
        // Remove all hashtag addresses
-       if ((!$tryoembed || $simplehtml) && !in_array($simplehtml, array(3, 7))) {
+       if ((!$tryoembed || $simplehtml) && !in_array($simplehtml, [3, 7])) {
                $Text = preg_replace("/([#@!])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '$1$3', $Text);
        } elseif ($simplehtml == 3) {
                $Text = preg_replace("/([@!])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
@@ -1015,7 +1015,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa
        $Text = preg_replace("/#\[url\=[$URLSearchString]*\]\^\[\/url\]\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/i",
                                "[bookmark=$1]$2[/bookmark]", $Text);
 
-       if (in_array($simplehtml, array(2, 6, 7, 8, 9))) {
+       if (in_array($simplehtml, [2, 6, 7, 8, 9])) {
                $Text = preg_replace_callback("/([^#@!])\[url\=([^\]]*)\](.*?)\[\/url\]/ism", "bb_expand_links", $Text);
                //$Text = preg_replace("/[^#@!]\[url\=([^\]]*)\](.*?)\[\/url\]/ism", ' $2 [url]$1[/url]', $Text);
                $Text = preg_replace("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism", ' $2 [url]$1[/url]',$Text);
@@ -1353,13 +1353,13 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa
        $Text = preg_replace('/\<([^>]*?)(src|href)=(.*?)\&amp\;(.*?)\>/ism', '<$1$2=$3&$4>', $Text);
 
        // sanitizes src attributes (http and redir URLs for displaying in a web page, cid used for inline images in emails)
-       static $allowed_src_protocols = array('http', 'redir', 'cid');
+       static $allowed_src_protocols = ['http', 'redir', 'cid'];
        $Text = preg_replace('#<([^>]*?)(src)="(?!' . implode('|', $allowed_src_protocols) . ')(.*?)"(.*?)>#ism',
                             '<$1$2=""$4 data-original-src="$3" class="invalid-src" title="' . t('Invalid source protocol') . '">', $Text);
 
        // sanitize href attributes (only whitelisted protocols URLs)
        // default value for backward compatibility
-       $allowed_link_protocols = Config::get('system', 'allowed_link_protocols', array('ftp', 'mailto', 'gopher', 'cid'));
+       $allowed_link_protocols = Config::get('system', 'allowed_link_protocols', ['ftp', 'mailto', 'gopher', 'cid']);
 
        // Always allowed protocol even if config isn't set or not including it
        $allowed_link_protocols[] = 'http';
@@ -1386,7 +1386,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa
                @$doc->loadHTML($encoding.$doctype."<html><body>".$Text."</body></html>");
                $doc->encoding = 'UTF-8';
                $Text = $doc->saveHTML();
-               $Text = str_replace(array("<html><body>", "</body></html>", $doctype, $encoding), array("", "", "", ""), $Text);
+               $Text = str_replace(["<html><body>", "</body></html>", $doctype, $encoding], ["", "", "", ""], $Text);
 
                $Text = str_replace('<br></li>', '</li>', $Text);
 
@@ -1427,7 +1427,7 @@ function remove_abstract($text) {
  */
 function fetch_abstract($text, $addon = "") {
        $abstract = "";
-       $abstracts = array();
+       $abstracts = [];
        $addon = strtolower($addon);
 
        if (preg_match_all("/\[abstract=(.*?)\](.*?)\[\/abstract\]/ism",$text, $results, PREG_SET_ORDER))
index 80ea6a90022aff0c72b5dec71866f92029fd54bf..d93b744d91a4c34dfca5dd9eb24eef3cb1dc1eaa 100644 (file)
@@ -19,7 +19,7 @@ require_once "include/acl_selectors.php";
 
 function item_extract_images($body) {
 
-       $saved_image = array();
+       $saved_image = [];
        $orig_body = $body;
        $new_body = '';
 
@@ -57,7 +57,7 @@ function item_extract_images($body) {
 
        $new_body = $new_body . $orig_body;
 
-       return array('body' => $new_body, 'images' => $saved_image);
+       return ['body' => $new_body, 'images' => $saved_image];
 }
 
 function item_redir_and_replace_images($body, $images, $cid) {
@@ -145,7 +145,7 @@ function localize_item(&$item) {
                        default:
                                if ($obj['resource-id']) {
                                        $post_type = t('photo');
-                                       $m = array();
+                                       $m = [];
                                        preg_match("/\[url=([^]]*)\]/", $obj['body'], $m);
                                        $rr['plink'] = $m[1];
                                } else {
@@ -283,7 +283,7 @@ function localize_item(&$item) {
                        default:
                                if ($obj['resource-id']) {
                                        $post_type = t('photo');
-                                       $m=array(); preg_match("/\[url=([^]]*)\]/", $obj['body'], $m);
+                                       $m=[]; preg_match("/\[url=([^]]*)\]/", $obj['body'], $m);
                                        $rr['plink'] = $m[1];
                                } else {
                                        $post_type = t('status');
@@ -382,7 +382,7 @@ function visible_activity($item) {
         * likes (etc.) can apply to other things besides posts. Check if they are post children,
         * in which case we handle them specially
         */
-       $hidden_activities = array(ACTIVITY_LIKE, ACTIVITY_DISLIKE, ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE);
+       $hidden_activities = [ACTIVITY_LIKE, ACTIVITY_DISLIKE, ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE];
        foreach ($hidden_activities as $act) {
                if (activity_match($item['verb'], $act)) {
                        return false;
@@ -595,18 +595,18 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                $_SESSION['return_url'] = $a->query_string;
        }
 
-       $cb = array('items' => $items, 'mode' => $mode, 'update' => $update, 'preview' => $preview);
+       $cb = ['items' => $items, 'mode' => $mode, 'update' => $update, 'preview' => $preview];
        call_hooks('conversation_start',$cb);
 
        $items = $cb['items'];
 
-       $conv_responses = array(
-               'like' => array('title' => t('Likes','title')), 'dislike' => array('title' => t('Dislikes','title')),
-               'attendyes' => array('title' => t('Attending','title')), 'attendno' => array('title' => t('Not attending','title')), 'attendmaybe' => array('title' => t('Might attend','title'))
-       );
+       $conv_responses = [
+               'like' => ['title' => t('Likes','title')], 'dislike' => ['title' => t('Dislikes','title')],
+               'attendyes' => ['title' => t('Attending','title')], 'attendno' => ['title' => t('Not attending','title')], 'attendmaybe' => ['title' => t('Might attend','title')]
+       ];
 
        // array with html for each thread (parent+comments)
-       $threads = array();
+       $threads = [];
        $threadsid = -1;
 
        $page_template = get_markup_template("conversation.tpl");
@@ -620,7 +620,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                                $community_readonly = false;
                                $writable = true;
                        } else {
-                               $writable = ($items[0]['uid'] == 0) && in_array($items[0]['network'], array(NETWORK_OSTATUS, NETWORK_DIASPORA, NETWORK_DFRN));
+                               $writable = ($items[0]['uid'] == 0) && in_array($items[0]['network'], [NETWORK_OSTATUS, NETWORK_DIASPORA, NETWORK_DFRN]);
                        }
                } else {
                        $writable = false;
@@ -673,15 +673,15 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                                        $profile_name = $item['author-link'];
                                }
 
-                               $tags = array();
-                               $hashtags = array();
-                               $mentions = array();
+                               $tags = [];
+                               $hashtags = [];
+                               $mentions = [];
 
                                $searchpath = System::baseUrl()."/search?tag=";
 
-                               $taglist = dba::select('term', array('type', 'term', 'url'),
-                                                       array("`otype` = ? AND `oid` = ? AND `type` IN (?, ?)", TERM_OBJ_POST, $item['id'], TERM_HASHTAG, TERM_MENTION),
-                                                       array('order' => array('tid')));
+                               $taglist = dba::select('term', ['type', 'term', 'url'],
+                                                       ["`otype` = ? AND `oid` = ? AND `type` IN (?, ?)", TERM_OBJ_POST, $item['id'], TERM_HASHTAG, TERM_MENTION],
+                                                       ['order' => ['tid']]);
 
                                while ($tag = dba::fetch($taglist)) {
                                        if ($tag["url"] == "") {
@@ -731,7 +731,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                                        }
                                }
 
-                               $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
+                               $locate = ['location' => $item['location'], 'coord' => $item['coord'], 'html' => ''];
                                call_hooks('render_location',$locate);
 
                                $location = ((strlen($locate['html'])) ? $locate['html'] : render_location_dummy($locate));
@@ -743,12 +743,12 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                                        $dropping = false;
                                }
 
-                               $drop = array(
+                               $drop = [
                                        'dropping' => $dropping,
                                        'pagedrop' => $page_dropping,
                                        'select' => t('Select'),
                                        'delete' => t('Delete'),
-                               );
+                               ];
 
                                $star = false;
                                $isstarred = "unstarred";
@@ -773,7 +773,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                                        $item['item_network'] = $item['network'];
                                }
 
-                               $tmp_item = array(
+                               $tmp_item = [
                                        'template' => $tpl,
                                        'id' => (($preview) ? 'P0' : $item['item_id']),
                                        'guid' => (($preview) ? 'Q0' : $item['guid']),
@@ -814,18 +814,18 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                                        'like' => '',
                                        'dislike' => '',
                                        'comment' => '',
-                                       'conv' => (($preview) ? '' : array('href'=> 'display/'.$item['guid'], 'title'=> t('View in context'))),
+                                       'conv' => (($preview) ? '' : ['href'=> 'display/'.$item['guid'], 'title'=> t('View in context')]),
                                        'previewing' => $previewing,
                                        'wait' => t('Please wait'),
                                        'thread_level' => 1,
-                               );
+                               ];
 
-                               $arr = array('item' => $item, 'output' => $tmp_item);
+                               $arr = ['item' => $item, 'output' => $tmp_item];
                                call_hooks('display_item', $arr);
 
                                $threads[$threadsid]['id'] = $item['item_id'];
                                $threads[$threadsid]['network'] = $item['item_network'];
-                               $threads[$threadsid]['items'] = array($arr['output']);
+                               $threads[$threadsid]['items'] = [$arr['output']];
 
                        }
                } else {
@@ -878,12 +878,12 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                        $threads = $conv->getTemplateData($conv_responses);
                        if (!$threads) {
                                logger('[ERROR] conversation : Failed to get template data.', LOGGER_DEBUG);
-                               $threads = array();
+                               $threads = [];
                        }
                }
        }
 
-       $o = replace_macros($page_template, array(
+       $o = replace_macros($page_template, [
                '$baseurl' => System::baseUrl($ssl_state),
                '$return_path' => $a->query_string,
                '$live_update' => $live_update_div,
@@ -892,7 +892,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                '$user' => $a->user,
                '$threads' => $threads,
                '$dropping' => ($page_dropping && Feature::isEnabled(local_user(), 'multi_delete') ? t('Delete Selected Items') : False),
-       ));
+       ]);
 
        return $o;
 }
@@ -910,7 +910,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
 function community_add_items($parents) {
        $max_comments = Config::get("system", "max_comments", 100);
 
-       $items = array();
+       $items = [];
 
        foreach ($parents AS $parent) {
                $thread_items = dba::p(item_query()." AND `item`.`uid` = ?
@@ -932,7 +932,7 @@ function community_add_items($parents) {
                                }
                        }
                        if (!$parent_found) {
-                               $comments = array();
+                               $comments = [];
                        }
                }
 
@@ -1046,13 +1046,13 @@ function item_photo_menu($item) {
                $contact_url = 'contacts/' . $cid;
                $posts_link = 'contacts/' . $cid . '/posts';
 
-               if (in_array($network, array(NETWORK_DFRN, NETWORK_DIASPORA))) {
+               if (in_array($network, [NETWORK_DFRN, NETWORK_DIASPORA])) {
                        $pm_url = 'message/new/' . $cid;
                }
        }
 
        if (local_user()) {
-               $menu = array(
+               $menu = [
                        t('Follow Thread') => $sub_link,
                        t('View Status') => $status_link,
                        t('View Profile') => $profile_link,
@@ -1060,21 +1060,21 @@ function item_photo_menu($item) {
                        t('Network Posts') => $posts_link,
                        t('View Contact') => $contact_url,
                        t('Send PM') => $pm_url
-               );
+               ];
 
                if ($network == NETWORK_DFRN) {
                        $menu[t("Poke")] = $poke_link;
                }
 
                if ((($cid == 0) || ($rel == CONTACT_IS_FOLLOWER)) &&
-                       in_array($item['network'], array(NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA))) {
+                       in_array($item['network'], [NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA])) {
                        $menu[t('Connect/Follow')] = 'follow?url=' . urlencode($item['author-link']);
                }
        } else {
-               $menu = array(t('View Profile') => $item['author-link']);
+               $menu = [t('View Profile') => $item['author-link']];
        }
 
-       $args = array('item' => $item, 'menu' => $menu);
+       $args = ['item' => $item, 'menu' => $menu];
 
        call_hooks('item_photo_menu', $args);
 
@@ -1142,7 +1142,7 @@ function builtin_activity_puller($item, &$conv_responses) {
 
                        if (! ((isset($conv_responses[$mode][$item['thr-parent'] . '-l']))
                                && (is_array($conv_responses[$mode][$item['thr-parent'] . '-l'])))) {
-                               $conv_responses[$mode][$item['thr-parent'] . '-l'] = array();
+                               $conv_responses[$mode][$item['thr-parent'] . '-l'] = [];
                        }
 
                        // only list each unique author once
@@ -1250,11 +1250,11 @@ function format_like($cnt, array $arr, $type, $id) {
        }
 
        $phrase .= EOL ;
-       $o .= replace_macros(get_markup_template('voting_fakelink.tpl'), array(
+       $o .= replace_macros(get_markup_template('voting_fakelink.tpl'), [
                '$phrase' => $phrase,
                '$type' => $type,
                '$id' => $id
-       ));
+       ]);
        $o .= $expanded;
 
        return $o;
@@ -1264,10 +1264,10 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false)
 {
        $o = '';
 
-       $geotag = x($x, 'allow_location') ? replace_macros(get_markup_template('jot_geotag.tpl'), array()) : '';
+       $geotag = x($x, 'allow_location') ? replace_macros(get_markup_template('jot_geotag.tpl'), []) : '';
 
        $tpl = get_markup_template('jot-header.tpl');
-       $a->page['htmlhead'] .= replace_macros($tpl, array(
+       $a->page['htmlhead'] .= replace_macros($tpl, [
                '$newpost'   => 'true',
                '$baseurl'   => System::baseUrl(true),
                '$geotag'    => $geotag,
@@ -1280,10 +1280,10 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false)
                '$fileas'    => t('Save to Folder:'),
                '$whereareu' => t('Where are you right now?'),
                '$delitems'  => t('Delete item(s)?')
-       ));
+       ]);
 
        $tpl = get_markup_template('jot-end.tpl');
-       $a->page['end'] .= replace_macros($tpl, array(
+       $a->page['end'] .= replace_macros($tpl, [
                '$newpost'   => 'true',
                '$baseurl'   => System::baseUrl(true),
                '$geotag'    => $geotag,
@@ -1295,7 +1295,7 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false)
                '$term'      => t('Tag term:'),
                '$fileas'    => t('Save to Folder:'),
                '$whereareu' => t('Where are you right now?')
-       ));
+       ]);
 
        $jotplugins = '';
        call_hooks('jot_tool', $jotplugins);
@@ -1308,7 +1308,7 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false)
 
        $query_str = $a->query_string;
        if (strpos($query_str, 'public=1') !== false) {
-               $query_str = str_replace(array('?public=1', '&public=1'), array('', ''), $query_str);
+               $query_str = str_replace(['?public=1', '&public=1'], ['', ''], $query_str);
        }
 
        /*
@@ -1325,7 +1325,7 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false)
        // $tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins));
        $tpl = get_markup_template("jot.tpl");
 
-       $o .= replace_macros($tpl,array(
+       $o .= replace_macros($tpl,[
                '$return_path'  => $query_str,
                '$action'       => 'item',
                '$share'        => defaults($x, 'button', t('Share')),
@@ -1379,7 +1379,7 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false)
                //jot nav tab (used in some themes)
                '$message' => t('Message'),
                '$browser' => t('Browser'),
-       ));
+       ]);
 
 
        if ($popup == true) {
@@ -1636,9 +1636,9 @@ function render_location_dummy($item) {
 
 /// @TODO Add type-hint
 function get_responses($conv_responses, $response_verbs, $ob, $item) {
-       $ret = array();
+       $ret = [];
        foreach ($response_verbs as $v) {
-               $ret[$v] = array();
+               $ret[$v] = [];
                $ret[$v]['count'] = defaults($conv_responses[$v], $item['uri'], '');
                $ret[$v]['list']  = defaults($conv_responses[$v], $item['uri'] . '-l', '');
                $ret[$v]['self']  = defaults($conv_responses[$v], $item['uri'] . '-self', '0');
index 1c9510c3303bfab6b472f17023c0665e3cc2a68f..0faea8c90e5fd9e4b8caa31242021f5fb88e584e 100644 (file)
@@ -102,9 +102,9 @@ function field_timezone($name='timezone', $label='', $current = 'America/Los_Ang
        $options = str_replace('</select>','', $options);
 
        $tpl = get_markup_template('field_select_raw.tpl');
-       return replace_macros($tpl, array(
-               '$field' => array($name, $label, $current, $help, $options),
-       ));
+       return replace_macros($tpl, [
+               '$field' => [$name, $label, $current, $help, $options],
+       ]);
 
 }
 
@@ -189,16 +189,16 @@ function dob($dob)
 
        $age = ((intval($value)) ? age($value, $a->user["timezone"], $a->user["timezone"]) : "");
 
-       $o = replace_macros(get_markup_template("field_input.tpl"), array(
-               '$field' => array(
+       $o = replace_macros(get_markup_template("field_input.tpl"), [
+               '$field' => [
                        'dob',
                        t('Birthday:'),
                        $value,
                        (((intval($age)) > 0 ) ? t('Age: ') . $age : ""),
                        '',
                        'placeholder="' . t('YYYY-MM-DD or MM-DD') . '"'
-               )
-       ));
+               ]
+       ]);
 
        /// @TODO Old-lost code?
 //     if ($dob && $dob > '0001-01-01')
@@ -279,7 +279,7 @@ function datetimesel($min, $max, $default, $label, $id = 'datetimepicker', $pick
        $lang = substr(get_browser_language(), 0, 2);
 
        // Check if the detected language is supported by the picker
-       if (!in_array($lang, array("ar", "ro", "id", "bg", "fa", "ru", "uk", "en", "el", "de", "nl", "tr", "fr", "es", "th", "pl", "pt", "ch", "se", "kr", "it", "da", "no", "ja", "vi", "sl", "cs", "hu"))) {
+       if (!in_array($lang, ["ar", "ro", "id", "bg", "fa", "ru", "uk", "en", "el", "de", "nl", "tr", "fr", "es", "th", "pl", "pt", "ch", "se", "kr", "it", "da", "no", "ja", "vi", "sl", "cs", "hu"])) {
                $lang = Config::get('system', 'language', 'en');
        }
 
@@ -327,9 +327,9 @@ function datetimesel($min, $max, $default, $label, $id = 'datetimepicker', $pick
        $readable_format = str_replace('i','MM',$readable_format);
 
        $tpl = get_markup_template('field_input.tpl');
-       $o .= replace_macros($tpl, array(
-                       '$field' => array($id, $label, $input_text, '', (($required) ? '*' : ''), 'placeholder="' . $readable_format . '"'),
-               ));
+       $o .= replace_macros($tpl, [
+                       '$field' => [$id, $label, $input_text, '', (($required) ? '*' : ''), 'placeholder="' . $readable_format . '"'],
+               ]);
 
        $o .= "<script type='text/javascript'>";
        $o .= "\$(function () {var picker = \$('#id_$id').datetimepicker({step:5,format:'$dateformat' $minjs $maxjs $pickers $defaultdatejs}); $extra_js})";
@@ -368,14 +368,14 @@ function relative_date($posted_date, $format = null) {
                return t('less than a second ago');
        }
 
-       $a = array( 12 * 30 * 24 * 60 * 60  =>  array( t('year'),   t('years')),
-                               30 * 24 * 60 * 60       =>  array( t('month'),  t('months')),
-                               7  * 24 * 60 * 60       =>  array( t('week'),   t('weeks')),
-                               24 * 60 * 60            =>  array( t('day'),    t('days')),
-                               60 * 60                 =>  array( t('hour'),   t('hours')),
-                               60                      =>  array( t('minute'), t('minutes')),
-                               1                       =>  array( t('second'), t('seconds'))
-       );
+       $a = [ 12 * 30 * 24 * 60 * 60  =>  [ t('year'),   t('years')],
+                               30 * 24 * 60 * 60       =>  [ t('month'),  t('months')],
+                               7  * 24 * 60 * 60       =>  [ t('week'),   t('weeks')],
+                               24 * 60 * 60            =>  [ t('day'),    t('days')],
+                               60 * 60                 =>  [ t('hour'),   t('hours')],
+                               60                      =>  [ t('minute'), t('minutes')],
+                               1                       =>  [ t('second'), t('seconds')]
+       ];
 
        foreach ($a as $secs => $str) {
                $d = $etime / $secs;
@@ -449,9 +449,9 @@ function age($dob, $owner_tz = '', $viewer_tz = '') {
  */
 function get_dim($y, $m) {
 
-       $dim = array( 0,
+       $dim = [ 0,
                31, 28, 31, 30, 31, 30,
-               31, 31, 30, 31, 30, 31);
+               31, 31, 30, 31, 30, 31];
 
        if ($m != 2) {
                return $dim[$m];
@@ -498,12 +498,12 @@ function get_first_dim($y,$m) {
 function cal($y = 0, $m = 0, $links = null, $class = '')
 {
        // month table - start at 1 to match human usage.
-       $mtab = array(' ',
+       $mtab = [' ',
                'January', 'February', 'March',
                'April'  , 'May'     , 'June',
                'July'   , 'August'  , 'September',
                'October', 'November', 'December'
-       );
+       ];
 
        $thisyear = datetime_convert('UTC', date_default_timezone_get(), 'now', 'Y');
        $thismonth = datetime_convert('UTC', date_default_timezone_get(), 'now', 'm');
@@ -515,7 +515,7 @@ function cal($y = 0, $m = 0, $links = null, $class = '')
                $m = intval($thismonth);
        }
 
-       $dn = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
+       $dn = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
        $f = get_first_dim($y, $m);
        $l = get_dim($y, $m);
        $d = 1;
index 986509369acd76ebd79db429c746db0f52cff36e..6471d364514884cf98a77f970676b10583715093 100644 (file)
@@ -21,7 +21,7 @@ class dba {
        private static $errorno = 0;
        private static $affected_rows = 0;
        private static $in_transaction = false;
-       private static $relation = array();
+       private static $relation = [];
 
        public static function connect($serveraddr, $user, $pass, $db, $install = false) {
                if (!is_null(self::$db)) {
@@ -157,7 +157,7 @@ class dba {
                }
 
                // Only do the explain on "select", "update" and "delete"
-               if (!in_array(strtolower(substr($query, 0, 6)), array("select", "update", "delete"))) {
+               if (!in_array(strtolower(substr($query, 0, 6)), ["select", "update", "delete"])) {
                        return;
                }
 
@@ -253,8 +253,8 @@ class dba {
         * @return string The input SQL string modified if necessary.
         */
        public static function clean_query($sql) {
-               $search = array("\t", "\n", "\r", "  ");
-               $replace = array(' ', ' ', ' ', ' ');
+               $search = ["\t", "\n", "\r", "  "];
+               $replace = [' ', ' ', ' ', ' '];
                do {
                        $oldsql = $sql;
                        $sql = str_replace($search, $replace, $sql);
@@ -324,7 +324,7 @@ class dba {
 
                // Renumber the array keys to be sure that they fit
                $i = 0;
-               $args = array();
+               $args = [];
                foreach ($params AS $param) {
                        // Avoid problems with some MySQL servers and boolean values. See issue #3645
                        if (is_bool($param)) {
@@ -408,7 +408,7 @@ class dba {
                                // There are SQL statements that cannot be executed with a prepared statement
                                $parts = explode(' ', $orig_sql);
                                $command = strtolower($parts[0]);
-                               $can_be_prepared = in_array($command, array('select', 'update', 'insert', 'delete'));
+                               $can_be_prepared = in_array($command, ['select', 'update', 'insert', 'delete']);
 
                                // The fallback routine is called as well when there are no arguments
                                if (!$can_be_prepared || (count($args) == 0)) {
@@ -437,7 +437,7 @@ class dba {
                                }
 
                                $params = '';
-                               $values = array();
+                               $values = [];
                                foreach ($args AS $param => $value) {
                                        if (is_int($args[$param])) {
                                                $params .= 'i';
@@ -453,7 +453,7 @@ class dba {
 
                                if (count($values) > 0) {
                                        array_unshift($values, $params);
-                                       call_user_func_array(array($stmt, 'bind_param'), $values);
+                                       call_user_func_array([$stmt, 'bind_param'], $values);
                                }
 
                                if (!$stmt->execute()) {
@@ -564,12 +564,12 @@ class dba {
                        return false;
                }
 
-               $fields = array();
+               $fields = [];
 
                $array_element = each($condition);
                $array_key = $array_element['key'];
                if (!is_int($array_key)) {
-                       $fields = array($array_key);
+                       $fields = [$array_key];
                }
 
                $stmt = self::select($table, $fields, $condition, ['limit' => 1]);
@@ -678,14 +678,14 @@ class dba {
                                // This code works, but is slow
 
                                // Bind the result to a result array
-                               $cols = array();
+                               $cols = [];
 
-                               $cols_num = array();
+                               $cols_num = [];
                                for ($x = 0; $x < $stmt->field_count; $x++) {
                                        $cols[] = &$cols_num[$x];
                                }
 
-                               call_user_func_array(array($stmt, 'bind_result'), $cols);
+                               call_user_func_array([$stmt, 'bind_result'], $cols);
 
                                if (!$stmt->fetch()) {
                                        return false;
@@ -697,7 +697,7 @@ class dba {
                                $result = $stmt->result_metadata();
                                $fields = $result->fetch_fields();
 
-                               $columns = array();
+                               $columns = [];
                                foreach ($cols_num AS $param => $col) {
                                        $columns[$fields[$param]->name] = $col;
                                }
@@ -901,7 +901,7 @@ class dba {
                        if ((count($conditions) == 1) && ($field == array_keys($conditions)[0])) {
                                foreach ($rel_def AS $rel_table => $rel_fields) {
                                        foreach ($rel_fields AS $rel_field) {
-                                               $retval = self::delete($rel_table, array($rel_field => array_values($conditions)[0]), true, $callstack);
+                                               $retval = self::delete($rel_table, [$rel_field => array_values($conditions)[0]], true, $callstack);
                                                $commands = array_merge($commands, $retval);
                                        }
                                }
@@ -911,11 +911,11 @@ class dba {
                                $callstack[$qkey] = true;
 
                                // Fetch all rows that are to be deleted
-                               $data = self::select($table, array($field), $conditions);
+                               $data = self::select($table, [$field], $conditions);
 
                                while ($row = self::fetch($data)) {
                                        // Now we accumulate the delete commands
-                                       $retval = self::delete($table, array($field => $row[$field]), true, $callstack);
+                                       $retval = self::delete($table, [$field => $row[$field]], true, $callstack);
                                        $commands = array_merge($commands, $retval);
                                }
 
@@ -1027,7 +1027,7 @@ class dba {
         *
         * @return boolean was the update successfull?
         */
-       public static function update($table, $fields, $condition, $old_fields = array()) {
+       public static function update($table, $fields, $condition, $old_fields = []) {
 
                if (empty($table) || empty($fields) || empty($condition)) {
                        logger('Table, fields and condition have to be set');
@@ -1054,7 +1054,7 @@ class dba {
                                        $values = array_merge($condition, $fields);
                                        return self::insert($table, $values, $do_insert);
                                }
-                               $old_fields = array();
+                               $old_fields = [];
                        }
                }
 
@@ -1249,7 +1249,7 @@ class dba {
                        return $stmt;
                }
 
-               $data = array();
+               $data = [];
                while ($row = self::fetch($stmt)) {
                        $data[] = $row;
                }
index 60c5b0ca77c04d07179ae63326ff5f613c4a8916..286a372e9cb6ea5c1d2fa342e582c35e88f7e05b 100644 (file)
@@ -54,7 +54,7 @@ function notification($params)
                        ['uid' => $params['uid']]);
 
                // There is no need to create notifications for forum accounts
-               if (!DBM::is_result($user) || in_array($user["page-flags"], array(PAGE_COMMUNITY, PAGE_PRVGROUP))) {
+               if (!DBM::is_result($user) || in_array($user["page-flags"], [PAGE_COMMUNITY, PAGE_PRVGROUP])) {
                        return;
                }
        }
@@ -386,7 +386,7 @@ function notification($params)
 
        $subject .= " (".$nickname."@".$hostname.")";
 
-       $h = array(
+       $h = [
                'params'    => $params,
                'subject'   => $subject,
                'preamble'  => $preamble,
@@ -396,7 +396,7 @@ function notification($params)
                'tsitelink' => $tsitelink,
                'hsitelink' => $hsitelink,
                'itemlink'  => $itemlink
-       );
+       ];
 
        call_hooks('enotify', $h);
 
@@ -424,7 +424,7 @@ function notification($params)
                } while ($dups == true);
 
                /// @TODO One statement is enough
-               $datarray = array();
+               $datarray = [];
                $datarray['hash']  = $hash;
                $datarray['name']  = $params['source_name'];
                $datarray['name_cache'] = strip_tags(bbcode($params['source_name']));
@@ -486,7 +486,7 @@ function notification($params)
                );
                if ($p && (count($p) > 1)) {
                        for ($d = 1; $d < count($p); $d ++) {
-                               dba::delete('notify', array('id' => $p[$d]['id']));
+                               dba::delete('notify', ['id' => $p[$d]['id']]);
                        }
 
                        // only continue on if we stored the first one
@@ -497,7 +497,7 @@ function notification($params)
                }
 
                $itemlink = System::baseUrl().'/notify/view/'.$notify_id;
-               $msg = replace_macros($epreamble, array('$itemlink' => $itemlink));
+               $msg = replace_macros($epreamble, ['$itemlink' => $itemlink]);
                $msg_cache = format_notification_message($datarray['name_cache'], strip_tags(bbcode($msg)));
                q("UPDATE `notify` SET `msg` = '%s', `msg_cache` = '%s' WHERE `id` = %d AND `uid` = %d",
                        dbesc($msg),
@@ -546,12 +546,12 @@ function notification($params)
                }
 
                // textversion keeps linebreaks
-               $textversion = strip_tags(str_replace("<br>", "\n", html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r", "\\n"), "\n",
+               $textversion = strip_tags(str_replace("<br>", "\n", html_entity_decode(bbcode(stripslashes(str_replace(["\\r\\n", "\\r", "\\n"], "\n",
                        $body))),ENT_QUOTES, 'UTF-8')));
-               $htmlversion = html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r", "\\n\\n", "\\n"),
+               $htmlversion = html_entity_decode(bbcode(stripslashes(str_replace(["\\r\\n", "\\r", "\\n\\n", "\\n"],
                        "<br />\n", $body))), ENT_QUOTES, 'UTF-8');
 
-               $datarray = array();
+               $datarray = [];
                $datarray['banner'] = $banner;
                $datarray['product'] = $product;
                $datarray['preamble'] = $preamble;
@@ -584,7 +584,7 @@ function notification($params)
 
                // load the template for private message notifications
                $tpl = get_markup_template('email_notify_html.tpl');
-               $email_html_body = replace_macros($tpl, array(
+               $email_html_body = replace_macros($tpl, [
                        '$banner'       => $datarray['banner'],
                        '$product'      => $datarray['product'],
                        '$preamble'     => str_replace("\n", "<br>\n", $datarray['preamble']),
@@ -601,11 +601,11 @@ function notification($params)
                        '$title'        => $datarray['title'],
                        '$htmlversion'  => $datarray['htmlversion'],
                        '$content_allowed'      => $content_allowed,
-               ));
+               ]);
 
                // load the template for private message notifications
                $tpl = get_markup_template('email_notify_text.tpl');
-               $email_text_body = replace_macros($tpl, array(
+               $email_text_body = replace_macros($tpl, [
                        '$banner'       => $datarray['banner'],
                        '$product'      => $datarray['product'],
                        '$preamble'     => $datarray['preamble'],
@@ -622,11 +622,11 @@ function notification($params)
                        '$title'        => $datarray['title'],
                        '$textversion'  => $datarray['textversion'],
                        '$content_allowed'      => $content_allowed,
-               ));
+               ]);
 
                // use the Emailer class to send the message
                return Emailer::send(
-                       array(
+                       [
                        'uid' => $params['uid'],
                        'fromName' => $sender_name,
                        'fromEmail' => $sender_email,
@@ -635,7 +635,7 @@ function notification($params)
                        'messageSubject' => $datarray['subject'],
                        'htmlVersion' => $email_html_body,
                        'textVersion' => $email_text_body,
-                       'additionalMailHeader' => $datarray['headers'])
+                       'additionalMailHeader' => $datarray['headers']]
                );
        }
 
@@ -666,7 +666,7 @@ function check_user_notification($itemid) {
  * @param str $defaulttype (Optional) Forces a notification with this type.
  */
 function check_item_notification($itemid, $uid, $defaulttype = "") {
-       $notification_data = array("uid" => $uid, "profiles" => array());
+       $notification_data = ["uid" => $uid, "profiles" => []];
        call_hooks('check_item_notification', $notification_data);
 
        $profiles = $notification_data["profiles"];
@@ -688,7 +688,7 @@ function check_item_notification($itemid, $uid, $defaulttype = "") {
        // Notifications from Diaspora are often with an URL in the Diaspora format
        $profiles[] = System::baseUrl()."/u/".$user["nickname"];
 
-       $profiles2 = array();
+       $profiles2 = [];
 
        foreach ($profiles AS $profile) {
                // Check for invalid profile urls. 13 should be the shortest possible profile length:
@@ -732,7 +732,7 @@ function check_item_notification($itemid, $uid, $defaulttype = "") {
                return false;
 
        // Generate the notification array
-       $params = array();
+       $params = [];
        $params["uid"] = $uid;
        $params["notify_flags"] = $user["notify-flags"];
        $params["language"] = $user["language"];
index b8b60a86da7d7f15acf0643539f3a81e75e490ce..76044cf981936d89353aaa96a40e163167c6f591 100644 (file)
@@ -150,7 +150,7 @@ function bbtovcal($s) {
  */
 function bbtoevent($s) {
 
-       $ev = array();
+       $ev = [];
 
        $match = '';
        if (preg_match("/\[event\-summary\](.*?)\[\/event\-summary\]/is", $s, $match)) {
@@ -219,7 +219,7 @@ function event_delete($event_id) {
                return;
        }
 
-       dba::delete('event', array('id' => $event_id));
+       dba::delete('event', ['id' => $event_id]);
        logger("Deleted event ".$event_id, LOGGER_DEBUG);
 }
 
@@ -364,7 +364,7 @@ function event_store($arr) {
                        $event = $r[0];
                }
 
-               $item_arr = array();
+               $item_arr = [];
 
                $item_arr['uid']           = $arr['uid'];
                $item_arr['contact-id']    = $arr['cid'];
@@ -423,7 +423,7 @@ function get_event_strings() {
        // First day of the week (0 = Sunday).
        $firstDay = PConfig::get(local_user(), 'system', 'first_day_of_week', 0);
 
-       $i18n = array(
+       $i18n = [
                        "firstDay" => $firstDay,
                        "allday"   => t("all-day"),
 
@@ -479,7 +479,7 @@ function get_event_strings() {
                        "dtstart_label"  => t("Starts:"),
                        "dtend_label"    => t("Finishes:"),
                        "location_label" => t("Location:")
-               );
+               ];
 
        return $i18n;
 }
@@ -493,7 +493,7 @@ function get_event_strings() {
  * @todo We should replace this with a separate update function if there is some time left.
  */
 function event_remove_duplicates($dates) {
-       $dates2 = array();
+       $dates2 = [];
 
        foreach ($dates as $date) {
                if ($date['type'] == 'birthday') {
@@ -585,7 +585,7 @@ function events_by_date($owner_uid = 0, $event_params, $sql_extra = '') {
  * @return array Event array for the template.
  */
 function process_events($arr) {
-       $events=array();
+       $events=[];
 
        $last_date = '';
        $fmt = t('l, F j');
@@ -612,9 +612,9 @@ function process_events($arr) {
                        $copy = null;
                        $drop = null;
                        if (local_user() && local_user() == $rr['uid'] && $rr['type'] == 'event') {
-                               $edit = ((! $rr['cid']) ? array(System::baseUrl() . '/events/event/' . $rr['id'], t('Edit event'), '', '') : null);
-                               $copy = ((! $rr['cid']) ? array(System::baseUrl() . '/events/copy/' . $rr['id'], t('Duplicate event'), '', '') : null);
-                               $drop = array(System::baseUrl() . '/events/drop/' . $rr['id'], t('Delete event'), '', '');
+                               $edit = ((! $rr['cid']) ? [System::baseUrl() . '/events/event/' . $rr['id'], t('Edit event'), '', ''] : null);
+                               $copy = ((! $rr['cid']) ? [System::baseUrl() . '/events/copy/' . $rr['id'], t('Duplicate event'), '', ''] : null);
+                               $drop = [System::baseUrl() . '/events/drop/' . $rr['id'], t('Delete event'), '', ''];
                        }
 
                        $title = strip_tags(html_entity_decode(bbcode($rr['summary']), ENT_QUOTES, 'UTF-8'));
@@ -626,7 +626,7 @@ function process_events($arr) {
                        $html = format_event_html($rr);
                        $rr['desc'] = bbcode($rr['desc']);
                        $rr['location'] = bbcode($rr['location']);
-                       $events[] = array(
+                       $events[] = [
                                'id'     => $rr['id'],
                                'start'  => $start,
                                'end'    => $end,
@@ -641,8 +641,8 @@ function process_events($arr) {
                                'is_first' => $is_first,
                                'item'     => $rr,
                                'html'     => $html,
-                               'plink'    => array($rr['plink'], t('link to source'), '', ''),
-                       );
+                               'plink'    => [$rr['plink'], t('link to source'), '', ''],
+                       ];
                }
        }
 
@@ -849,12 +849,12 @@ function event_export($uid, $format = 'ical') {
                        $file_ext = "";
        }
 
-       $arr = array(
+       $arr = [
                'success'   => $process,
                'format'    => $format,
                'extension' => $file_ext,
                'content'   => $res,
-       );
+       ];
 
        return $arr;
 }
@@ -900,12 +900,12 @@ function widget_events() {
                return;
        }
 
-       return replace_macros(get_markup_template("events_aside.tpl"), array(
+       return replace_macros(get_markup_template("events_aside.tpl"), [
                '$etitle' => t("Export"),
                '$export_ical' => t("Export calendar as ical"),
                '$export_csv' => t("Export calendar as csv"),
                '$user' => $user
-       ));
+       ]);
 }
 
 /**
@@ -948,7 +948,7 @@ function format_event_item($item) {
 
        // Format the event location.
        $evloc = event_location2array($item['event-location']);
-       $location = array();
+       $location = [];
 
        if (isset($evloc['name'])) {
                $location['name'] = prepare_text($evloc['name']);
@@ -968,7 +968,7 @@ function format_event_item($item) {
                $profile_link = Profile::zrl($profile_link);
        }
 
-       $event = replace_macros(get_markup_template('event_stream_item.tpl'), array(
+       $event = replace_macros(get_markup_template('event_stream_item.tpl'), [
                '$id'             => $item['event-id'],
                '$title'          => prepare_text($item['event-summary']),
                '$dtstart_label'  => t('Starts:'),
@@ -994,7 +994,7 @@ function format_event_item($item) {
                '$hide_map_label' => t('Hide map'),
                '$map_btn_label'  => t('Show map'),
                '$location'       => $location
-       ));
+       ]);
 
        return $event;
 }
@@ -1017,7 +1017,7 @@ function event_location2array($s = '') {
                return;
        }
 
-       $location = array('name' => $s);
+       $location = ['name' => $s];
 
        // Map tag with location name - e.g. [map]Paris[/map].
        if (strpos($s, '[/map]') !== false) {
index f95bb69aaae2ef292f6cd79f209d55b09b82589a..1992a3716ee5e159fc995af1972af210f04c06f2 100644 (file)
@@ -19,10 +19,10 @@ class FriendicaSmarty extends Smarty
 
                // setTemplateDir can be set to an array, which Smarty will parse in order.
                // The order is thus very important here
-               $template_dirs = array('theme' => "view/theme/$theme/" . SMARTY3_TEMPLATE_FOLDER . "/");
+               $template_dirs = ['theme' => "view/theme/$theme/" . SMARTY3_TEMPLATE_FOLDER . "/"];
                if (x($a->theme_info, "extends"))
-                       $template_dirs = $template_dirs + array('extends' => "view/theme/" . $a->theme_info["extends"] . "/" . SMARTY3_TEMPLATE_FOLDER . "/");
-               $template_dirs = $template_dirs + array('base' => "view/" . SMARTY3_TEMPLATE_FOLDER . "/");
+                       $template_dirs = $template_dirs + ['extends' => "view/theme/" . $a->theme_info["extends"] . "/" . SMARTY3_TEMPLATE_FOLDER . "/"];
+               $template_dirs = $template_dirs + ['base' => "view/" . SMARTY3_TEMPLATE_FOLDER . "/"];
                $this->setTemplateDir($template_dirs);
 
                $this->setCompileDir('view/smarty3/compiled/');
@@ -70,10 +70,10 @@ class FriendicaSmartyEngine implements ITemplateEngine
                $r['$APP'] = get_app();
 
                // "middleware": inject variables into templates
-               $arr = array(
+               $arr = [
                        "template" => basename($s->filename),
                        "vars" => $r
-               );
+               ];
                call_hooks("template_vars", $arr);
                $r = $arr['vars'];
 
index 936bce338476fa26b265201bfd051a95b76e879e..75f05f453dc2538cf6041e3b562f3a1c75c6ebc4 100644 (file)
@@ -26,7 +26,7 @@ function node2bbcodesub(&$doc, $oldnode, $attributes, $startbb, $endbb)
 
        $list = $xpath->query("//".$oldnode);
        foreach ($list as $oldNode) {
-               $attr = array();
+               $attr = [];
                if ($oldNode->attributes->length) {
                        foreach ($oldNode->attributes as $attribute) {
                                $attr[$attribute->name] = $attribute->value;
@@ -102,14 +102,14 @@ function html2bbcode($message, $basepath = '')
        );
 
        $message = str_replace(
-               array(
+               [
                        "<li><p>",
                        "</p></li>",
-               ),
-               array(
+               ],
+               [
                        "<li>",
                        "</li>",
-               ),
+               ],
                $message
        );
 
@@ -138,23 +138,23 @@ function html2bbcode($message, $basepath = '')
        }
 
        $message = $doc->saveHTML();
-       $message = str_replace(array("\n<", ">\n", "\r", "\n", "\xC3\x82\xC2\xA0"), array("<", ">", "<br />", " ", ""), $message);
+       $message = str_replace(["\n<", ">\n", "\r", "\n", "\xC3\x82\xC2\xA0"], ["<", ">", "<br />", " ", ""], $message);
        $message = preg_replace('= [\s]*=i', " ", $message);
        @$doc->loadHTML($message);
 
-       node2bbcode($doc, 'html', array(), "", "");
-       node2bbcode($doc, 'body', array(), "", "");
+       node2bbcode($doc, 'html', [], "", "");
+       node2bbcode($doc, 'body', [], "", "");
 
        // Outlook-Quote - Variant 1
-       node2bbcode($doc, 'p', array('class'=>'MsoNormal', 'style'=>'margin-left:35.4pt'), '[quote]', '[/quote]');
+       node2bbcode($doc, 'p', ['class'=>'MsoNormal', 'style'=>'margin-left:35.4pt'], '[quote]', '[/quote]');
 
        // Outlook-Quote - Variant 2
-       node2bbcode($doc, 'div', array('style'=>'border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'), '[quote]', '[/quote]');
+       node2bbcode($doc, 'div', ['style'=>'border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'], '[quote]', '[/quote]');
 
        // MyBB-Stuff
-       node2bbcode($doc, 'span', array('style'=>'text-decoration: underline;'), '[u]', '[/u]');
-       node2bbcode($doc, 'span', array('style'=>'font-style: italic;'), '[i]', '[/i]');
-       node2bbcode($doc, 'span', array('style'=>'font-weight: bold;'), '[b]', '[/b]');
+       node2bbcode($doc, 'span', ['style'=>'text-decoration: underline;'], '[u]', '[/u]');
+       node2bbcode($doc, 'span', ['style'=>'font-style: italic;'], '[i]', '[/i]');
+       node2bbcode($doc, 'span', ['style'=>'font-weight: bold;'], '[b]', '[/b]');
 
        /*node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/', 'size'=>'/(\d+)/', 'color'=>'/(.+)/'), '[font=$1][size=$2][color=$3]', '[/color][/size][/font]');
        node2bbcode($doc, 'font', array('size'=>'/(\d+)/', 'color'=>'/(.+)/'), '[size=$1][color=$2]', '[/color][/size]');
@@ -169,7 +169,7 @@ function html2bbcode($message, $basepath = '')
        //node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(\d+)[,;].*/'), '[size=$1]', '[/size]');
        //node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(.+?)[,;].*/'), '[size=$1]', '[/size]');
 
-       node2bbcode($doc, 'span', array('style'=>'/.*color:\s*(.+?)[,;].*/'), '[color="$1"]', '[/color]');
+       node2bbcode($doc, 'span', ['style'=>'/.*color:\s*(.+?)[,;].*/'], '[color="$1"]', '[/color]');
 
        //node2bbcode($doc, 'span', array('style'=>'/.*font-family:\s*(.+?)[,;].*/'), '[font=$1]', '[/font]');
 
@@ -180,42 +180,42 @@ function html2bbcode($message, $basepath = '')
        // Importing the classes - interesting for importing of posts from third party networks that were exported from friendica
        // Test
        //node2bbcode($doc, 'span', array('class'=>'/([\w ]+)/'), '[class=$1]', '[/class]');
-       node2bbcode($doc, 'span', array('class'=>'type-link'), '[class=type-link]', '[/class]');
-       node2bbcode($doc, 'span', array('class'=>'type-video'), '[class=type-video]', '[/class]');
+       node2bbcode($doc, 'span', ['class'=>'type-link'], '[class=type-link]', '[/class]');
+       node2bbcode($doc, 'span', ['class'=>'type-video'], '[class=type-video]', '[/class]');
 
-       node2bbcode($doc, 'strong', array(), '[b]', '[/b]');
-       node2bbcode($doc, 'em', array(), '[i]', '[/i]');
-       node2bbcode($doc, 'b', array(), '[b]', '[/b]');
-       node2bbcode($doc, 'i', array(), '[i]', '[/i]');
-       node2bbcode($doc, 'u', array(), '[u]', '[/u]');
+       node2bbcode($doc, 'strong', [], '[b]', '[/b]');
+       node2bbcode($doc, 'em', [], '[i]', '[/i]');
+       node2bbcode($doc, 'b', [], '[b]', '[/b]');
+       node2bbcode($doc, 'i', [], '[i]', '[/i]');
+       node2bbcode($doc, 'u', [], '[u]', '[/u]');
 
-       node2bbcode($doc, 'big', array(), "[size=large]", "[/size]");
-       node2bbcode($doc, 'small', array(), "[size=small]", "[/size]");
+       node2bbcode($doc, 'big', [], "[size=large]", "[/size]");
+       node2bbcode($doc, 'small', [], "[size=small]", "[/size]");
 
-       node2bbcode($doc, 'blockquote', array(), '[quote]', '[/quote]');
+       node2bbcode($doc, 'blockquote', [], '[quote]', '[/quote]');
 
-       node2bbcode($doc, 'br', array(), "\n", '');
+       node2bbcode($doc, 'br', [], "\n", '');
 
-       node2bbcode($doc, 'p', array('class'=>'MsoNormal'), "\n", "");
-       node2bbcode($doc, 'div', array('class'=>'MsoNormal'), "\r", "");
+       node2bbcode($doc, 'p', ['class'=>'MsoNormal'], "\n", "");
+       node2bbcode($doc, 'div', ['class'=>'MsoNormal'], "\r", "");
 
-       node2bbcode($doc, 'span', array(), "", "");
+       node2bbcode($doc, 'span', [], "", "");
 
-       node2bbcode($doc, 'span', array(), "", "");
-       node2bbcode($doc, 'pre', array(), "", "");
+       node2bbcode($doc, 'span', [], "", "");
+       node2bbcode($doc, 'pre', [], "", "");
 
-       node2bbcode($doc, 'div', array(), "\r", "\r");
-       node2bbcode($doc, 'p', array(), "\n", "\n");
+       node2bbcode($doc, 'div', [], "\r", "\r");
+       node2bbcode($doc, 'p', [], "\n", "\n");
 
-       node2bbcode($doc, 'ul', array(), "[list]", "[/list]");
-       node2bbcode($doc, 'ol', array(), "[list=1]", "[/list]");
-       node2bbcode($doc, 'li', array(), "[*]", "");
+       node2bbcode($doc, 'ul', [], "[list]", "[/list]");
+       node2bbcode($doc, 'ol', [], "[list=1]", "[/list]");
+       node2bbcode($doc, 'li', [], "[*]", "");
 
-       node2bbcode($doc, 'hr', array(), "[hr]", "");
+       node2bbcode($doc, 'hr', [], "[hr]", "");
 
-       node2bbcode($doc, 'table', array(), "", "");
-       node2bbcode($doc, 'tr', array(), "\n", "");
-       node2bbcode($doc, 'td', array(), "\t", "");
+       node2bbcode($doc, 'table', [], "", "");
+       node2bbcode($doc, 'tr', [], "\n", "");
+       node2bbcode($doc, 'td', [], "\t", "");
        //node2bbcode($doc, 'table', array(), "[table]", "[/table]");
        //node2bbcode($doc, 'th', array(), "[th]", "[/th]");
        //node2bbcode($doc, 'tr', array(), "[tr]", "[/tr]");
@@ -228,26 +228,26 @@ function html2bbcode($message, $basepath = '')
        //node2bbcode($doc, 'h5', array(), "\n\n[size=small][b]", "[/b][/size]\n");
        //node2bbcode($doc, 'h6', array(), "\n\n[size=x-small][b]", "[/b][/size]\n");
 
-       node2bbcode($doc, 'h1', array(), "\n\n[h1]", "[/h1]\n");
-       node2bbcode($doc, 'h2', array(), "\n\n[h2]", "[/h2]\n");
-       node2bbcode($doc, 'h3', array(), "\n\n[h3]", "[/h3]\n");
-       node2bbcode($doc, 'h4', array(), "\n\n[h4]", "[/h4]\n");
-       node2bbcode($doc, 'h5', array(), "\n\n[h5]", "[/h5]\n");
-       node2bbcode($doc, 'h6', array(), "\n\n[h6]", "[/h6]\n");
+       node2bbcode($doc, 'h1', [], "\n\n[h1]", "[/h1]\n");
+       node2bbcode($doc, 'h2', [], "\n\n[h2]", "[/h2]\n");
+       node2bbcode($doc, 'h3', [], "\n\n[h3]", "[/h3]\n");
+       node2bbcode($doc, 'h4', [], "\n\n[h4]", "[/h4]\n");
+       node2bbcode($doc, 'h5', [], "\n\n[h5]", "[/h5]\n");
+       node2bbcode($doc, 'h6', [], "\n\n[h6]", "[/h6]\n");
 
-       node2bbcode($doc, 'a', array('href'=>'/mailto:(.+)/'), '[mail=$1]', '[/mail]');
-       node2bbcode($doc, 'a', array('href'=>'/(.+)/'), '[url=$1]', '[/url]');
+       node2bbcode($doc, 'a', ['href'=>'/mailto:(.+)/'], '[mail=$1]', '[/mail]');
+       node2bbcode($doc, 'a', ['href'=>'/(.+)/'], '[url=$1]', '[/url]');
 
-       node2bbcode($doc, 'img', array('src'=>'/(.+)/', 'width'=>'/(\d+)/', 'height'=>'/(\d+)/'), '[img=$2x$3]$1', '[/img]');
-       node2bbcode($doc, 'img', array('src'=>'/(.+)/'), '[img]$1', '[/img]');
+       node2bbcode($doc, 'img', ['src'=>'/(.+)/', 'width'=>'/(\d+)/', 'height'=>'/(\d+)/'], '[img=$2x$3]$1', '[/img]');
+       node2bbcode($doc, 'img', ['src'=>'/(.+)/'], '[img]$1', '[/img]');
 
 
-       node2bbcode($doc, 'video', array('src'=>'/(.+)/'), '[video]$1', '[/video]');
-       node2bbcode($doc, 'audio', array('src'=>'/(.+)/'), '[audio]$1', '[/audio]');
-       node2bbcode($doc, 'iframe', array('src'=>'/(.+)/'), '[iframe]$1', '[/iframe]');
+       node2bbcode($doc, 'video', ['src'=>'/(.+)/'], '[video]$1', '[/video]');
+       node2bbcode($doc, 'audio', ['src'=>'/(.+)/'], '[audio]$1', '[/audio]');
+       node2bbcode($doc, 'iframe', ['src'=>'/(.+)/'], '[iframe]$1', '[/iframe]');
 
-       node2bbcode($doc, 'key', array(), '[code]', '[/code]');
-       node2bbcode($doc, 'code', array(), '[code]', '[/code]');
+       node2bbcode($doc, 'key', [], '[code]', '[/code]');
+       node2bbcode($doc, 'code', [], '[code]', '[/code]');
 
        $message = $doc->saveHTML();
 
@@ -267,7 +267,7 @@ function html2bbcode($message, $basepath = '')
 
        $message = html_entity_decode($message, ENT_QUOTES, 'UTF-8');
 
-       $message = str_replace(array("<"), array("&lt;"), $message);
+       $message = str_replace(["<"], ["&lt;"], $message);
 
        // remove quotes if they don't make sense
        $message = preg_replace('=\[/quote\][\s]*\[quote\]=i', "\n", $message);
@@ -288,7 +288,7 @@ function html2bbcode($message, $basepath = '')
        do {
                $oldmessage = $message;
                $message = str_replace(
-                       array(
+                       [
                                "[/size]\n\n",
                                "\n[hr]",
                                "[hr]\n",
@@ -297,8 +297,8 @@ function html2bbcode($message, $basepath = '')
                                "\n[/",
                                "[list]\n",
                                "[list=1]\n",
-                               "\n[*]"),
-                       array(
+                               "\n[*]"],
+                       [
                                "[/size]\n",
                                "[hr]",
                                "[hr]",
@@ -307,14 +307,14 @@ function html2bbcode($message, $basepath = '')
                                "[/",
                                "[list]",
                                "[list=1]",
-                               "[*]"),
+                               "[*]"],
                        $message
                );
        } while ($message != $oldmessage);
 
        $message = str_replace(
-               array('[b][b]', '[/b][/b]', '[i][i]', '[/i][/i]'),
-               array('[b]', '[/b]', '[i]', '[/i]'),
+               ['[b][b]', '[/b][/b]', '[i][i]', '[/i][/i]'],
+               ['[b]', '[/b]', '[i]', '[/i]'],
                $message
        );
 
@@ -378,7 +378,7 @@ function addHostname($body, $basepath)
 {
        $URLSearchString = "^\[\]";
 
-       $matches = array("/\[url\=([$URLSearchString]*)\].*?\[\/url\]/ism",
+       $matches = ["/\[url\=([$URLSearchString]*)\].*?\[\/url\]/ism",
                        "/\[url\]([$URLSearchString]*)\[\/url\]/ism",
                        "/\[img\=[0-9]*x[0-9]*\](.*?)\[\/img\]/ism",
                        "/\[img\](.*?)\[\/img\]/ism",
@@ -386,7 +386,7 @@ function addHostname($body, $basepath)
                        "/\[zmg\](.*?)\[\/zmg\]/ism",
                        "/\[video\](.*?)\[\/video\]/ism",
                        "/\[audio\](.*?)\[\/audio\]/ism",
-                       );
+                       ];
 
        foreach ($matches as $match) {
                $body = preg_replace_callback(
index 83aa05ed565691029e463b6d7160156849e4a1ef..626f5e45edd125444cd8383e3363355213bae511 100644 (file)
@@ -10,7 +10,7 @@ function breaklines($line, $level, $wraplength = 75)
 
        $wraplen = $wraplength - $level;
 
-       $newlines = array();
+       $newlines = [];
 
        do {
                $oldline = $line;
@@ -47,7 +47,7 @@ function quotelevel($message, $wraplength = 75)
 {
        $lines = explode("\n", $message);
 
-       $newlines = array();
+       $newlines = [];
        $level = 0;
        foreach ($lines as $line) {
                $line = trim($line);
@@ -84,13 +84,13 @@ function collecturls($message)
        $pattern = '/<a.*?href="(.*?)".*?>(.*?)<\/a>/is';
        preg_match_all($pattern, $message, $result, PREG_SET_ORDER);
 
-       $urls = array();
+       $urls = [];
        foreach ($result as $treffer) {
                $ignore = false;
 
                // A list of some links that should be ignored
-               $list = array("/user/", "/tag/", "/group/", "/profile/", "/search?search=", "/search?tag=", "mailto:", "/u/", "/node/",
-                       "//facebook.com/profile.php?id=", "//plus.google.com/", "//twitter.com/");
+               $list = ["/user/", "/tag/", "/group/", "/profile/", "/search?search=", "/search?tag=", "mailto:", "/u/", "/node/",
+                       "//facebook.com/profile.php?id=", "//plus.google.com/", "//twitter.com/"];
                foreach ($list as $listitem) {
                        if (strpos($treffer[1], $listitem) !== false) {
                                $ignore = true;
@@ -137,7 +137,7 @@ function html2plain($html, $wraplength = 75, $compact = false)
        }
 
        $message = $doc->saveHTML();
-       $message = str_replace(array("\n<", ">\n", "\r", "\n", "\xC3\x82\xC2\xA0"), array("<", ">", "<br>", " ", ""), $message);
+       $message = str_replace(["\n<", ">\n", "\r", "\n", "\xC3\x82\xC2\xA0"], ["<", ">", "<br>", " ", ""], $message);
        $message = preg_replace('= [\s]*=i', " ", $message);
 
        // Collecting all links
@@ -145,8 +145,8 @@ function html2plain($html, $wraplength = 75, $compact = false)
 
        @$doc->loadHTML($message);
 
-       node2bbcode($doc, 'html', array(), '', '');
-       node2bbcode($doc, 'body', array(), '', '');
+       node2bbcode($doc, 'html', [], '', '');
+       node2bbcode($doc, 'body', [], '', '');
 
        // MyBB-Auszeichnungen
        /*
@@ -161,33 +161,33 @@ function html2plain($html, $wraplength = 75, $compact = false)
         */
 
        if ($compact) {
-               node2bbcode($doc, 'blockquote', array(), "»", "«");
+               node2bbcode($doc, 'blockquote', [], "»", "«");
        } else {
-               node2bbcode($doc, 'blockquote', array(), '[quote]', "[/quote]\n");
+               node2bbcode($doc, 'blockquote', [], '[quote]', "[/quote]\n");
        }
 
-       node2bbcode($doc, 'br', array(), "\n", '');
+       node2bbcode($doc, 'br', [], "\n", '');
 
-       node2bbcode($doc, 'span', array(), "", "");
-       node2bbcode($doc, 'pre', array(), "", "");
-       node2bbcode($doc, 'div', array(), "\r", "\r");
-       node2bbcode($doc, 'p', array(), "\n", "\n");
+       node2bbcode($doc, 'span', [], "", "");
+       node2bbcode($doc, 'pre', [], "", "");
+       node2bbcode($doc, 'div', [], "\r", "\r");
+       node2bbcode($doc, 'p', [], "\n", "\n");
 
        //node2bbcode($doc, 'ul', array(), "\n[list]", "[/list]\n");
        //node2bbcode($doc, 'ol', array(), "\n[list=1]", "[/list]\n");
-       node2bbcode($doc, 'li', array(), "\n* ", "\n");
+       node2bbcode($doc, 'li', [], "\n* ", "\n");
 
-       node2bbcode($doc, 'hr', array(), "\n" . str_repeat("-", 70) . "\n", "");
+       node2bbcode($doc, 'hr', [], "\n" . str_repeat("-", 70) . "\n", "");
 
-       node2bbcode($doc, 'tr', array(), "\n", "");
-       node2bbcode($doc, 'td', array(), "\t", "");
+       node2bbcode($doc, 'tr', [], "\n", "");
+       node2bbcode($doc, 'td', [], "\t", "");
 
-       node2bbcode($doc, 'h1', array(), "\n\n*", "*\n");
-       node2bbcode($doc, 'h2', array(), "\n\n*", "*\n");
-       node2bbcode($doc, 'h3', array(), "\n\n*", "*\n");
-       node2bbcode($doc, 'h4', array(), "\n\n*", "*\n");
-       node2bbcode($doc, 'h5', array(), "\n\n*", "*\n");
-       node2bbcode($doc, 'h6', array(), "\n\n*", "*\n");
+       node2bbcode($doc, 'h1', [], "\n\n*", "*\n");
+       node2bbcode($doc, 'h2', [], "\n\n*", "*\n");
+       node2bbcode($doc, 'h3', [], "\n\n*", "*\n");
+       node2bbcode($doc, 'h4', [], "\n\n*", "*\n");
+       node2bbcode($doc, 'h5', [], "\n\n*", "*\n");
+       node2bbcode($doc, 'h6', [], "\n\n*", "*\n");
 
        // Problem: there is no reliable way to detect if it is a link to a tag or profile
        //node2bbcode($doc, 'a', array('href'=>'/(.+)/'), ' $1 ', ' ', true);
@@ -196,12 +196,12 @@ function html2plain($html, $wraplength = 75, $compact = false)
        //node2bbcode($doc, 'img', array('title'=>'/(.+)/'), '$1', '');
        //node2bbcode($doc, 'img', array(), '', '');
        if (!$compact) {
-               node2bbcode($doc, 'img', array('src' => '/(.+)/'), ' [img]$1', '[/img] ');
+               node2bbcode($doc, 'img', ['src' => '/(.+)/'], ' [img]$1', '[/img] ');
        } else {
-               node2bbcode($doc, 'img', array('src' => '/(.+)/'), ' ', ' ');
+               node2bbcode($doc, 'img', ['src' => '/(.+)/'], ' ', ' ');
        }
 
-       node2bbcode($doc, 'iframe', array('src' => '/(.+)/'), ' $1 ', '');
+       node2bbcode($doc, 'iframe', ['src' => '/(.+)/'], ' $1 ', '');
 
        $message = $doc->saveHTML();
 
index f1ce70d46bade40dc26ae731fa837944488c74e7..4a76cb9090da63c911bba305fab427aa31c7eaa5 100644 (file)
@@ -133,12 +133,12 @@ function title_is_body($title, $body) {
        $title = strip_tags($title);
        $title = trim($title);
        $title = html_entity_decode($title, ENT_QUOTES, 'UTF-8');
-       $title = str_replace(array("\n", "\r", "\t", " "), array("", "", "", ""), $title);
+       $title = str_replace(["\n", "\r", "\t", " "], ["", "", "", ""], $title);
 
        $body = strip_tags($body);
        $body = trim($body);
        $body = html_entity_decode($body, ENT_QUOTES, 'UTF-8');
-       $body = str_replace(array("\n", "\r", "\t", " "), array("", "", "", ""), $body);
+       $body = str_replace(["\n", "\r", "\t", " "], ["", "", "", ""], $body);
 
        if (strlen($title) < strlen($body)) {
                $body = substr($body, 0, strlen($title));
@@ -174,8 +174,8 @@ function add_page_info_data($data) {
        }
 
        // Escape some bad characters
-       $data["url"] = str_replace(array("[", "]"), array("&#91;", "&#93;"), htmlentities($data["url"], ENT_QUOTES, 'UTF-8', false));
-       $data["title"] = str_replace(array("[", "]"), array("&#91;", "&#93;"), htmlentities($data["title"], ENT_QUOTES, 'UTF-8', false));
+       $data["url"] = str_replace(["[", "]"], ["&#91;", "&#93;"], htmlentities($data["url"], ENT_QUOTES, 'UTF-8', false));
+       $data["title"] = str_replace(["[", "]"], ["&#91;", "&#93;"], htmlentities($data["title"], ENT_QUOTES, 'UTF-8', false));
 
        $text = "[attachment type='".$data["type"]."'";
 
@@ -196,7 +196,7 @@ function add_page_info_data($data) {
        }
 
        if (sizeof($data["images"]) > 0) {
-               $preview = str_replace(array("[", "]"), array("&#91;", "&#93;"), htmlentities($data["images"][0]["src"], ENT_QUOTES, 'UTF-8', false));
+               $preview = str_replace(["[", "]"], ["&#91;", "&#93;"], htmlentities($data["images"][0]["src"], ENT_QUOTES, 'UTF-8', false));
                // if the preview picture is larger than 500 pixels then show it in a larger mode
                // But only, if the picture isn't higher than large (To prevent huge posts)
                if (!Config::get('system', 'always_show_preview') && ($data["images"][0]["width"] >= 500)
@@ -214,8 +214,8 @@ function add_page_info_data($data) {
                $hashtags = "\n";
                foreach ($data["keywords"] AS $keyword) {
                        /// @todo make a positive list of allowed characters
-                       $hashtag = str_replace(array(" ", "+", "/", ".", "#", "'", "’", "`", "(", ")", "„", "“"),
-                                               array("", "", "", "", "", "", "", "", "", "", "", ""), $keyword);
+                       $hashtag = str_replace([" ", "+", "/", ".", "#", "'", "’", "`", "(", ")", "„", "“"],
+                                               ["", "", "", "", "", "", "", "", "", "", "", ""], $keyword);
                        $hashtags .= "#[url=" . System::baseUrl() . "/search?tag=" . rawurlencode($hashtag) . "]" . $hashtag . "[/url] ";
                }
        }
@@ -257,8 +257,8 @@ function add_page_keywords($url, $no_photos = false, $photo = "", $keywords = fa
        $tags = "";
        if (isset($data["keywords"]) && count($data["keywords"])) {
                foreach ($data["keywords"] AS $keyword) {
-                       $hashtag = str_replace(array(" ", "+", "/", ".", "#", "'"),
-                               array("", "", "", "", "", ""), $keyword);
+                       $hashtag = str_replace([" ", "+", "/", ".", "#", "'"],
+                               ["", "", "", "", "", ""], $keyword);
 
                        if ($tags != "") {
                                $tags .= ", ";
@@ -317,7 +317,7 @@ function add_page_info_to_body($body, $texturl = false, $no_photos = false) {
                        $body = $removedlink;
                }
 
-               $url = str_replace(array('/', '.'), array('\/', '\.'), $matches[1]);
+               $url = str_replace(['/', '.'], ['\/', '\.'], $matches[1]);
                $removedlink = preg_replace("/\[url\=" . $url . "\](.*?)\[\/url\]/ism", '', $body);
                if (($removedlink == "") || strstr($body, $removedlink)) {
                        $body = $removedlink;
@@ -419,8 +419,8 @@ function uri_to_guid($uri, $host = "") {
  * @return array Item array with removed conversation data
  */
 function store_conversation($arr) {
-       if (in_array(defaults($arr, 'network', NETWORK_PHANTOM), array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS)) && !empty($arr['uri'])) {
-               $conversation = array('item-uri' => $arr['uri'], 'received' => DBM::date());
+       if (in_array(defaults($arr, 'network', NETWORK_PHANTOM), [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS]) && !empty($arr['uri'])) {
+               $conversation = ['item-uri' => $arr['uri'], 'received' => DBM::date()];
 
                if (isset($arr['parent-uri']) && ($arr['parent-uri'] != $arr['uri'])) {
                        $conversation['reply-to-uri'] = $arr['parent-uri'];
@@ -458,7 +458,7 @@ function store_conversation($arr) {
                                unset($conversation['protocol']);
                                unset($conversation['source']);
                        }
-                       if (!dba::update('conversation', $conversation, array('item-uri' => $conversation['item-uri']), $old_conv)) {
+                       if (!dba::update('conversation', $conversation, ['item-uri' => $conversation['item-uri']], $old_conv)) {
                                logger('Conversation: update for '.$conversation['item-uri'].' from '.$conv['protocol'].' to '.$conversation['protocol'].' failed', LOGGER_DEBUG);
                        }
                } else {
@@ -581,7 +581,7 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
         * We have to check several networks since Friendica posts could be repeated
         * via OStatus (maybe Diasporsa as well)
         */
-       if (in_array($arr['network'], array(NETWORK_DIASPORA, NETWORK_DFRN, NETWORK_OSTATUS, ""))) {
+       if (in_array($arr['network'], [NETWORK_DIASPORA, NETWORK_DFRN, NETWORK_OSTATUS, ""])) {
                $r = q("SELECT `id`, `network` FROM `item` WHERE `uri` = '%s' AND `uid` = %d AND `network` IN ('%s', '%s', '%s')  LIMIT 1",
                                dbesc(trim($arr['uri'])),
                                intval($uid),
@@ -740,11 +740,11 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
                 * On comments the author is the better choice.
                 */
                if ($arr['parent-uri'] === $arr['uri']) {
-                       $arr["gcontact-id"] = GContact::getId(array("url" => $arr['owner-link'], "network" => $arr['network'],
-                                                                "photo" => $arr['owner-avatar'], "name" => $arr['owner-name']));
+                       $arr["gcontact-id"] = GContact::getId(["url" => $arr['owner-link'], "network" => $arr['network'],
+                                                                "photo" => $arr['owner-avatar'], "name" => $arr['owner-name']]);
                } else {
-                       $arr["gcontact-id"] = GContact::getId(array("url" => $arr['author-link'], "network" => $arr['network'],
-                                                                "photo" => $arr['author-avatar'], "name" => $arr['author-name']));
+                       $arr["gcontact-id"] = GContact::getId(["url" => $arr['author-link'], "network" => $arr['network'],
+                                                                "photo" => $arr['author-avatar'], "name" => $arr['author-name']]);
                }
        }
 
@@ -855,7 +855,7 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
                                $self = normalise_link(System::baseUrl() . '/profile/' . $u[0]['nickname']);
                                logger("item_store: 'myself' is ".$self." for parent ".$parent_id." checking against ".$arr['author-link']." and ".$arr['owner-link'], LOGGER_DEBUG);
                                if ((normalise_link($arr['author-link']) == $self) || (normalise_link($arr['owner-link']) == $self)) {
-                                       dba::update('thread', array('mention' => true), array('iid' => $parent_id));
+                                       dba::update('thread', ['mention' => true], ['iid' => $parent_id]);
                                        logger("item_store: tagged thread ".$parent_id." as mention for user ".$self, LOGGER_DEBUG);
                                }
                        }
@@ -890,7 +890,7 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
        }
 
        // On Friendica and Diaspora the GUID is unique
-       if (in_array($arr['network'], array(NETWORK_DFRN, NETWORK_DIASPORA))) {
+       if (in_array($arr['network'], [NETWORK_DFRN, NETWORK_DIASPORA])) {
                $r = q("SELECT `id` FROM `item` WHERE `guid` = '%s' AND `uid` = %d LIMIT 1",
                        dbesc($arr['guid']),
                        intval($arr['uid'])
@@ -919,7 +919,7 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
                $arr["global"] = true;
 
                // Set the global flag on all items if this was a global item entry
-               dba::update('item', array('global' => true), array('uri' => $arr["uri"]));
+               dba::update('item', ['global' => true], ['uri' => $arr["uri"]]);
        } else {
                $isglobal = q("SELECT `global` FROM `item` WHERE `uid` = 0 AND `uri` = '%s'", dbesc($arr["uri"]));
 
@@ -1030,7 +1030,7 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
                logger('Duplicated post occurred. uri = ' . $arr['uri'] . ' uid = ' . $arr['uid']);
 
                // Yes, we could do a rollback here - but we are having many users with MyISAM.
-               dba::delete('item', array('id' => $current_post));
+               dba::delete('item', ['id' => $current_post]);
                dba::commit();
                return 0;
        } elseif ($r[0]["entries"] == 0) {
@@ -1048,7 +1048,7 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
        }
 
        // Set parent id
-       dba::update('item', array('parent' => $parent_id), array('id' => $current_post));
+       dba::update('item', ['parent' => $parent_id], ['id' => $current_post]);
 
        $arr['id'] = $current_post;
        $arr['parent'] = $parent_id;
@@ -1056,9 +1056,9 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
        // update the commented timestamp on the parent
        // Only update "commented" if it is really a comment
        if (($arr['verb'] == ACTIVITY_POST) || !Config::get("system", "like_no_comment")) {
-               dba::update('item', array('commented' => datetime_convert(), 'changed' => datetime_convert()), array('id' => $parent_id));
+               dba::update('item', ['commented' => datetime_convert(), 'changed' => datetime_convert()], ['id' => $parent_id]);
        } else {
-               dba::update('item', array('changed' => datetime_convert()), array('id' => $parent_id));
+               dba::update('item', ['changed' => datetime_convert()], ['id' => $parent_id]);
        }
 
        if ($dsprsig) {
@@ -1072,8 +1072,8 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
                        logger("Repaired double encoded signature from handle ".$dsprsig->signer, LOGGER_DEBUG);
                }
 
-               dba::insert('sign', array('iid' => $current_post, 'signed_text' => $dsprsig->signed_text,
-                                       'signature' => $dsprsig->signature, 'signer' => $dsprsig->signer));
+               dba::insert('sign', ['iid' => $current_post, 'signed_text' => $dsprsig->signed_text,
+                                       'signature' => $dsprsig->signature, 'signer' => $dsprsig->signer]);
        }
 
        $deleted = tag_deliver($arr['uid'], $current_post);
@@ -1132,7 +1132,7 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
        check_user_notification($current_post);
 
        if ($notify) {
-               Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), "Notifier", $notify_type, $current_post);
+               Worker::add(['priority' => PRIORITY_HIGH, 'dont_fork' => true], "Notifier", $notify_type, $current_post);
        }
 
        return $current_post;
@@ -1174,17 +1174,17 @@ function item_set_last_item($arr) {
        }
 
        if ($update) {
-               dba::update('contact', array('success_update' => $arr['received'], 'last-item' => $arr['received']),
-                       array('id' => $arr['contact-id']));
+               dba::update('contact', ['success_update' => $arr['received'], 'last-item' => $arr['received']],
+                       ['id' => $arr['contact-id']]);
        }
        // Now do the same for the system wide contacts with uid=0
        if (!$arr['private']) {
-               dba::update('contact', array('success_update' => $arr['received'], 'last-item' => $arr['received']),
-                       array('id' => $arr['owner-id']));
+               dba::update('contact', ['success_update' => $arr['received'], 'last-item' => $arr['received']],
+                       ['id' => $arr['owner-id']]);
 
                if ($arr['owner-id'] != $arr['author-id']) {
-                       dba::update('contact', array('success_update' => $arr['received'], 'last-item' => $arr['received']),
-                               array('id' => $arr['author-id']));
+                       dba::update('contact', ['success_update' => $arr['received'], 'last-item' => $arr['received']],
+                               ['id' => $arr['author-id']]);
                }
        }
 }
@@ -1299,7 +1299,7 @@ function get_item_id($guid, $uid = 0) {
                        $nick = $r[0]["nickname"];
                }
        }
-       return array("nick" => $nick, "id" => $id);
+       return ["nick" => $nick, "id" => $id];
 }
 
 // return - test
@@ -1369,13 +1369,13 @@ function tag_deliver($uid, $item_id)
                        // mmh.. no mention.. community page or private group... no wall.. no origin.. top-post (not a comment)
                        // delete it!
                        logger("tag_deliver: no-mention top-level post to communuty or private group. delete.");
-                       dba::delete('item', array('id' => $item_id));
+                       dba::delete('item', ['id' => $item_id]);
                        return true;
                }
                return;
        }
 
-       $arr = array('item' => $item, 'user' => $u[0], 'contact' => $r[0]);
+       $arr = ['item' => $item, 'user' => $u[0], 'contact' => $r[0]];
 
        call_hooks('tagged', $arr);
 
@@ -1421,7 +1421,7 @@ function tag_deliver($uid, $item_id)
        );
        update_thread($item_id);
 
-       Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), 'Notifier', 'tgroup', $item_id);
+       Worker::add(['priority' => PRIORITY_HIGH, 'dont_fork' => true], 'Notifier', 'tgroup', $item_id);
 
 }
 
@@ -1664,8 +1664,8 @@ function new_follower($importer, $contact, $datarray, $item, $sharing = false) {
        if (is_array($contact)) {
                if (($contact['network'] == NETWORK_OSTATUS && $contact['rel'] == CONTACT_IS_SHARING)
                        || ($sharing && $contact['rel'] == CONTACT_IS_FOLLOWER)) {
-                       dba::update('contact', array('rel' => CONTACT_IS_FRIEND, 'writable' => true),
-                                       array('id' => $contact['id'], 'uid' => $importer['uid']));
+                       dba::update('contact', ['rel' => CONTACT_IS_FRIEND, 'writable' => true],
+                                       ['id' => $contact['id'], 'uid' => $importer['uid']]);
                }
                // send email notification to owner?
        } else {
@@ -1697,22 +1697,22 @@ function new_follower($importer, $contact, $datarray, $item, $sharing = false) {
                $r = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
                        intval($importer['uid'])
                );
-               if (DBM::is_result($r) && !in_array($r[0]['page-flags'], array(PAGE_SOAPBOX, PAGE_FREELOVE, PAGE_COMMUNITY))) {
+               if (DBM::is_result($r) && !in_array($r[0]['page-flags'], [PAGE_SOAPBOX, PAGE_FREELOVE, PAGE_COMMUNITY])) {
                        // create notification
                        $hash = random_string();
 
                        if (is_array($contact_record)) {
-                               dba::insert('intro', array('uid' => $importer['uid'], 'contact-id' => $contact_record['id'],
+                               dba::insert('intro', ['uid' => $importer['uid'], 'contact-id' => $contact_record['id'],
                                                        'blocked' => false, 'knowyou' => false,
-                                                       'hash' => $hash, 'datetime' => datetime_convert()));
+                                                       'hash' => $hash, 'datetime' => datetime_convert()]);
                        }
 
                        Group::addMember(User::getDefaultGroup($importer['uid'], $contact_record["network"]), $contact_record['id']);
 
                        if (($r[0]['notify-flags'] & NOTIFY_INTRO) &&
-                               in_array($r[0]['page-flags'], array(PAGE_NORMAL))) {
+                               in_array($r[0]['page-flags'], [PAGE_NORMAL])) {
 
-                               notification(array(
+                               notification([
                                        'type'         => NOTIFY_INTRO,
                                        'notify_flags' => $r[0]['notify-flags'],
                                        'language'     => $r[0]['language'],
@@ -1725,10 +1725,10 @@ function new_follower($importer, $contact, $datarray, $item, $sharing = false) {
                                        'source_photo' => $contact_record['photo'],
                                        'verb'         => ($sharing ? ACTIVITY_FRIEND : ACTIVITY_FOLLOW),
                                        'otype'        => 'intro'
-                               ));
+                               ]);
 
                        }
-               } elseif (DBM::is_result($r) && in_array($r[0]['page-flags'], array(PAGE_SOAPBOX, PAGE_FREELOVE, PAGE_COMMUNITY))) {
+               } elseif (DBM::is_result($r) && in_array($r[0]['page-flags'], [PAGE_SOAPBOX, PAGE_FREELOVE, PAGE_COMMUNITY])) {
                        q("UPDATE `contact` SET `pending` = 0 WHERE `uid` = %d AND `url` = '%s' AND `pending` LIMIT 1",
                                        intval($importer['uid']),
                                        dbesc($url)
@@ -1738,19 +1738,19 @@ function new_follower($importer, $contact, $datarray, $item, $sharing = false) {
        }
 }
 
-function lose_follower($importer, $contact, array $datarray = array(), $item = "") {
+function lose_follower($importer, $contact, array $datarray = [], $item = "") {
 
        if (($contact['rel'] == CONTACT_IS_FRIEND) || ($contact['rel'] == CONTACT_IS_SHARING)) {
-               dba::update('contact', array('rel' => CONTACT_IS_SHARING), array('id' => $contact['id']));
+               dba::update('contact', ['rel' => CONTACT_IS_SHARING], ['id' => $contact['id']]);
        } else {
                Contact::remove($contact['id']);
        }
 }
 
-function lose_sharer($importer, $contact, array $datarray = array(), $item = "") {
+function lose_sharer($importer, $contact, array $datarray = [], $item = "") {
 
        if (($contact['rel'] == CONTACT_IS_FRIEND) || ($contact['rel'] == CONTACT_IS_FOLLOWER)) {
-               dba::update('contact', array('rel' => CONTACT_IS_FOLLOWER), array('id' => $contact['id']));
+               dba::update('contact', ['rel' => CONTACT_IS_FOLLOWER], ['id' => $contact['id']]);
        } else {
                Contact::remove($contact['id']);
        }
@@ -1785,7 +1785,7 @@ function subscribe_to_hub($url, $importer, $contact, $hubmode = 'subscribe') {
        logger('subscribe_to_hub: ' . $hubmode . ' ' . $contact['name'] . ' to hub ' . $url . ' endpoint: '  . $push_url . ' with verifier ' . $verify_token);
 
        if (!strlen($contact['hub-verify']) || ($contact['hub-verify'] != $verify_token)) {
-               dba::update('contact', array('hub-verify' => $verify_token), array('id' => $contact['id']));
+               dba::update('contact', ['hub-verify' => $verify_token], ['id' => $contact['id']]);
        }
 
        post_url($url, $params);
@@ -1830,7 +1830,7 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0)
                        // Only embed locally hosted photos
                        $replace = false;
                        $i = basename($image);
-                       $i = str_replace(array('.jpg', '.png', '.gif'), array('', '', ''), $i);
+                       $i = str_replace(['.jpg', '.png', '.gif'], ['', '', ''], $i);
                        $x = strpos($i, '-');
 
                        if ($x) {
@@ -1955,13 +1955,13 @@ function enumerate_permissions($obj) {
 }
 
 function item_getfeedtags($item) {
-       $ret = array();
+       $ret = [];
        $matches = false;
        $cnt = preg_match_all('|\#\[url\=(.*?)\](.*?)\[\/url\]|', $item['tag'], $matches);
        if ($cnt) {
                for ($x = 0; $x < $cnt; $x ++) {
                        if ($matches[1][$x]) {
-                               $ret[$matches[2][$x]] = array('#', $matches[1][$x], $matches[2][$x]);
+                               $ret[$matches[2][$x]] = ['#', $matches[1][$x], $matches[2][$x]];
                        }
                }
        }
@@ -1970,7 +1970,7 @@ function item_getfeedtags($item) {
        if ($cnt) {
                for ($x = 0; $x < $cnt; $x ++) {
                        if ($matches[1][$x]) {
-                               $ret[] = array('@', $matches[1][$x], $matches[2][$x]);
+                               $ret[] = ['@', $matches[1][$x], $matches[2][$x]];
                        }
                }
        }
@@ -2052,7 +2052,7 @@ function item_expire($uid, $days, $network = "", $force = false) {
                drop_item($item['id'], false);
        }
 
-       Worker::add(array('priority' => PRIORITY_LOW, 'dont_fork' => true), "Notifier", "expire", $uid);
+       Worker::add(['priority' => PRIORITY_LOW, 'dont_fork' => true], "Notifier", "expire", $uid);
 }
 
 /// @TODO type-hint is array
@@ -2074,7 +2074,7 @@ function drop_items($items) {
        // multiple threads may have been deleted, send an expire notification
 
        if ($uid) {
-               Worker::add(array('priority' => PRIORITY_LOW, 'dont_fork' => true), "Notifier", "expire", $uid);
+               Worker::add(['priority' => PRIORITY_LOW, 'dont_fork' => true], "Notifier", "expire", $uid);
        }
 }
 
@@ -2126,15 +2126,15 @@ function drop_item($id, $interactive = true) {
                        // <form> can't take arguments in its "action" parameter
                        // so add any arguments as hidden inputs
                        $query = explode_querystring($a->query_string);
-                       $inputs = array();
+                       $inputs = [];
                        foreach ($query['args'] as $arg) {
                                if (strpos($arg, 'confirm=') === false) {
                                        $arg_parts = explode('=', $arg);
-                                       $inputs[] = array('name' => $arg_parts[0], 'value' => $arg_parts[1]);
+                                       $inputs[] = ['name' => $arg_parts[0], 'value' => $arg_parts[1]];
                                }
                        }
 
-                       return replace_macros(get_markup_template('confirm.tpl'), array(
+                       return replace_macros(get_markup_template('confirm.tpl'), [
                                '$method' => 'get',
                                '$message' => t('Do you really want to delete this item?'),
                                '$extra_inputs' => $inputs,
@@ -2142,7 +2142,7 @@ function drop_item($id, $interactive = true) {
                                '$confirm_url' => $query['base'],
                                '$confirm_name' => 'confirmed',
                                '$cancel' => t('Cancel'),
-                       ));
+                       ]);
                }
                // Now check how the user responded to the confirmation query
                if ($_REQUEST['canceled']) {
@@ -2152,9 +2152,9 @@ function drop_item($id, $interactive = true) {
                logger('delete item: ' . $item['id'], LOGGER_DEBUG);
 
                // delete the item
-               dba::update('item', array('deleted' => true, 'title' => '', 'body' => '',
-                                       'edited' => datetime_convert(), 'changed' => datetime_convert()),
-                               array('id' => $item['id']));
+               dba::update('item', ['deleted' => true, 'title' => '', 'body' => '',
+                                       'edited' => datetime_convert(), 'changed' => datetime_convert()],
+                               ['id' => $item['id']]);
 
                create_tags_from_item($item['id']);
                Term::createFromItem($item['id']);
@@ -2186,18 +2186,18 @@ function drop_item($id, $interactive = true) {
                 * generate a resource-id and therefore aren't intimately linked to the item.
                 */
                if (strlen($item['resource-id'])) {
-                       dba::delete('photo', array('resource-id' => $item['resource-id'], 'uid' => $item['uid']));
+                       dba::delete('photo', ['resource-id' => $item['resource-id'], 'uid' => $item['uid']]);
                }
 
                // If item is a link to an event, nuke the event record.
                if (intval($item['event-id'])) {
-                       dba::delete('event', array('id' => $item['event-id'], 'uid' => $item['uid']));
+                       dba::delete('event', ['id' => $item['event-id'], 'uid' => $item['uid']]);
                }
 
                // If item has attachments, drop them
                foreach (explode(", ", $item['attach']) as $attach) {
                        preg_match("|attach/(\d+)|", $attach, $matches);
-                       dba::delete('attach', array('id' => $matches[1], 'uid' => $item['uid']));
+                       dba::delete('attach', ['id' => $matches[1], 'uid' => $item['uid']]);
                }
 
                // The new code splits the queries since the mysql optimizer really has bad problems with subqueries
@@ -2225,9 +2225,9 @@ function drop_item($id, $interactive = true) {
 
                // If it's the parent of a comment thread, kill all the kids
                if ($item['uri'] == $item['parent-uri']) {
-                       dba::update('item', array('deleted' => true, 'title' => '', 'body' => '',
-                                       'edited' => datetime_convert(), 'changed' => datetime_convert()),
-                               array('parent-uri' => $item['parent-uri'], 'uid' => $item['uid']));
+                       dba::update('item', ['deleted' => true, 'title' => '', 'body' => '',
+                                       'edited' => datetime_convert(), 'changed' => datetime_convert()],
+                               ['parent-uri' => $item['parent-uri'], 'uid' => $item['uid']]);
 
                        create_tags_from_itemuri($item['parent-uri'], $item['uid']);
                        Term::createFromItemURI($item['parent-uri'], $item['uid']);
@@ -2235,8 +2235,8 @@ function drop_item($id, $interactive = true) {
                        // ignore the result
                } else {
                        // ensure that last-child is set in case the comment that had it just got wiped.
-                       dba::update('item', array('last-child' => false, 'changed' => datetime_convert()),
-                                       array('parent-uri' => $item['parent-uri'], 'uid' => $item['uid']));
+                       dba::update('item', ['last-child' => false, 'changed' => datetime_convert()],
+                                       ['parent-uri' => $item['parent-uri'], 'uid' => $item['uid']]);
 
                        // who is the last child now?
                        $r = q("SELECT `id` FROM `item` WHERE `parent-uri` = '%s' AND `type` != 'activity' AND `deleted` = 0 AND `uid` = %d ORDER BY `edited` DESC LIMIT 1",
@@ -2244,7 +2244,7 @@ function drop_item($id, $interactive = true) {
                                intval($item['uid'])
                        );
                        if (DBM::is_result($r)) {
-                               dba::update('item', array('last-child' => true), array('id' => $r[0]['id']));
+                               dba::update('item', ['last-child' => true], ['id' => $r[0]['id']]);
                        }
                }
 
@@ -2253,7 +2253,7 @@ function drop_item($id, $interactive = true) {
                $drop_id = intval($item['id']);
                $priority = ($interactive ? PRIORITY_HIGH : PRIORITY_LOW);
 
-               Worker::add(array('priority' => $priority, 'dont_fork' => true), "Notifier", "drop", $drop_id);
+               Worker::add(['priority' => $priority, 'dont_fork' => true], "Notifier", "drop", $drop_id);
 
                if (! $interactive) {
                        return $owner;
@@ -2293,14 +2293,14 @@ function list_post_dates($uid, $wall) {
 
        $dthen = first_post_date($uid, $wall);
        if (! $dthen) {
-               return array();
+               return [];
        }
 
        // Set the start and end date to the beginning of the month
        $dnow = substr($dnow, 0, 8) . '01';
        $dthen = substr($dthen, 0, 8) . '01';
 
-       $ret = array();
+       $ret = [];
 
        /*
         * Starting with the current month, get the first and last days of every
@@ -2314,9 +2314,9 @@ function list_post_dates($uid, $wall) {
                $end_month = datetime_convert('', '', $dend, 'Y-m-d');
                $str = day_translate(datetime_convert('', '', $dnow, 'F'));
                if (!$ret[$dyear]) {
-                       $ret[$dyear] = array();
+                       $ret[$dyear] = [];
                }
-               $ret[$dyear][] = array($str, $end_month, $start_month);
+               $ret[$dyear][] = [$str, $end_month, $start_month];
                $dnow = datetime_convert('', '', $dnow . ' -1 month', 'Y-m-d');
        }
        return $ret;
@@ -2327,14 +2327,14 @@ function posted_dates($uid, $wall) {
 
        $dthen = first_post_date($uid, $wall);
        if (! $dthen) {
-               return array();
+               return [];
        }
 
        // Set the start and end date to the beginning of the month
        $dnow = substr($dnow, 0, 8) . '01';
        $dthen = substr($dthen, 0, 8) . '01';
 
-       $ret = array();
+       $ret = [];
        /*
         * Starting with the current month, get the first and last days of every
         * month down to and including the month of the first post
@@ -2345,7 +2345,7 @@ function posted_dates($uid, $wall) {
                $start_month = datetime_convert('', '', $dstart, 'Y-m-d');
                $end_month = datetime_convert('', '', $dend, 'Y-m-d');
                $str = day_translate(datetime_convert('', '', $dnow, 'F Y'));
-               $ret[] = array($str, $end_month, $start_month);
+               $ret[] = [$str, $end_month, $start_month];
                $dnow = datetime_convert('', '', $dnow . ' -1 month', 'Y-m-d');
        }
        return $ret;
@@ -2380,7 +2380,7 @@ function posted_date_widget($url, $uid, $wall) {
        $cutoff_year = intval(datetime_convert('',date_default_timezone_get(), 'now', 'Y')) - $visible_years;
        $cutoff = ((array_key_exists($cutoff_year, $ret))? true : false);
 
-       $o = replace_macros(get_markup_template('posted_date_widget.tpl'),array(
+       $o = replace_macros(get_markup_template('posted_date_widget.tpl'),[
                '$title' => t('Archives'),
                '$size' => $visible_years,
                '$cutoff_year' => $cutoff_year,
@@ -2389,6 +2389,6 @@ function posted_date_widget($url, $uid, $wall) {
                '$dates' => $ret,
                '$showmore' => t('show more')
 
-       ));
+       ]);
        return $o;
 }
index 793ea04215e62b0be9607b667d70373c7f5ce7fd..27832896a57ae86d0c2dee7250790b844632531d 100644 (file)
@@ -168,7 +168,7 @@ function do_like($item_id, $verb) {
                // Clean up the Diaspora signatures for this like
                // Go ahead and do it even if Diaspora support is disabled. We still want to clean up
                // if it had been enabled in the past
-               dba::delete('sign', array('iid' => $like_item['id']));
+               dba::delete('sign', ['iid' => $like_item['id']]);
 
                $like_item_id = $like_item['id'];
                Worker::add(PRIORITY_HIGH, "Notifier", "like", $like_item_id);
@@ -208,7 +208,7 @@ EOT;
        $alink = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]';
        $plink = '[url=' . System::baseUrl() . '/display/' . $owner_self_contact['nick'] . '/' . $item['id'] . ']' . $post_type . '[/url]';
 
-       $new_item = array(
+       $new_item = [
                'guid'          => get_guid(32),
                'uri'           => item_new_uri($a->get_hostname(), $item['uid']),
                'uid'           => $item['uid'],
@@ -239,7 +239,7 @@ EOT;
                'visible'       => 1,
                'unseen'        => 1,
                'last-child'    => 0
-       );
+       ];
 
        $new_item_id = item_store($new_item);
 
index 5c2d6efa0edf431ba8627b93c538386a24a805b8..3cee38b3427291c48476f69bb766df88b4fd3c38 100644 (file)
@@ -20,7 +20,7 @@ function nav(App $a) {
        if (!(x($a->page,'nav')))
                $a->page['nav'] = '';
 
-       $a->page['htmlhead'] .= replace_macros(get_markup_template('nav_head.tpl'), array());
+       $a->page['htmlhead'] .= replace_macros(get_markup_template('nav_head.tpl'), []);
 
        /*
         * Placeholder div for popup panel
@@ -36,7 +36,7 @@ function nav(App $a) {
 
        $tpl = get_markup_template('nav.tpl');
 
-       $a->page['nav'] .= replace_macros($tpl, array(
+       $a->page['nav'] .= replace_macros($tpl, [
                '$baseurl' => System::baseUrl(),
                '$sitelocation' => $nav_info['sitelocation'],
                '$nav' => $nav_info['nav'],
@@ -47,7 +47,7 @@ function nav(App $a) {
                '$apps' => $a->apps,
                '$clear_notifs' => t('Clear notifications'),
                '$search_hint' => t('@name, !forum, #tags, content')
-       ));
+       ]);
 
        call_hooks('page_header', $a->page['nav']);
 }
@@ -77,31 +77,31 @@ function nav_info(App $a)
        $sitelocation = $myident . substr(System::baseUrl($ssl_state), strpos(System::baseUrl($ssl_state), '//') + 2 );
 
        // nav links: array of array('href', 'text', 'extra css classes', 'title')
-       $nav = array();
+       $nav = [];
 
        // Display login or logout
-       $nav['usermenu'] = array();
+       $nav['usermenu'] = [];
        $userinfo = null;
 
        if (local_user()) {
-               $nav['logout'] = array('logout', t('Logout'), '', t('End this session'));
+               $nav['logout'] = ['logout', t('Logout'), '', t('End this session')];
 
                // user menu
-               $nav['usermenu'][] = array('profile/' . $a->user['nickname'], t('Status'), '', t('Your posts and conversations'));
-               $nav['usermenu'][] = array('profile/' . $a->user['nickname'] . '?tab=profile', t('Profile'), '', t('Your profile page'));
-               $nav['usermenu'][] = array('photos/' . $a->user['nickname'], t('Photos'), '', t('Your photos'));
-               $nav['usermenu'][] = array('videos/' . $a->user['nickname'], t('Videos'), '', t('Your videos'));
-               $nav['usermenu'][] = array('events/', t('Events'), '', t('Your events'));
-               $nav['usermenu'][] = array('notes/', t('Personal notes'), '', t('Your personal notes'));
+               $nav['usermenu'][] = ['profile/' . $a->user['nickname'], t('Status'), '', t('Your posts and conversations')];
+               $nav['usermenu'][] = ['profile/' . $a->user['nickname'] . '?tab=profile', t('Profile'), '', t('Your profile page')];
+               $nav['usermenu'][] = ['photos/' . $a->user['nickname'], t('Photos'), '', t('Your photos')];
+               $nav['usermenu'][] = ['videos/' . $a->user['nickname'], t('Videos'), '', t('Your videos')];
+               $nav['usermenu'][] = ['events/', t('Events'), '', t('Your events')];
+               $nav['usermenu'][] = ['notes/', t('Personal notes'), '', t('Your personal notes')];
 
                // user info
                $contact = dba::selectFirst('contact', ['micro'], ['uid' => $a->user['uid'], 'self' => true]);
-               $userinfo = array(
+               $userinfo = [
                        'icon' => (DBM::is_result($contact) ? $a->remove_baseurl($contact['micro']) : 'images/person-48.jpg'),
                        'name' => $a->user['username'],
-               );
+               ];
        } else {
-               $nav['login'] = array('login', t('Login'), ($a->module == 'login' ? 'selected' : ''), t('Sign in'));
+               $nav['login'] = ['login', t('Login'), ($a->module == 'login' ? 'selected' : ''), t('Sign in')];
        }
 
        // "Home" should also take you home from an authenticated remote profile connection
@@ -111,30 +111,30 @@ function nav_info(App $a)
        }
 
        if (($a->module != 'home') && (! (local_user()))) {
-               $nav['home'] = array($homelink, t('Home'), '', t('Home Page'));
+               $nav['home'] = [$homelink, t('Home'), '', t('Home Page')];
        }
 
        if (($a->config['register_policy'] == REGISTER_OPEN) && (! local_user()) && (! remote_user())) {
-               $nav['register'] = array('register', t('Register'), '', t('Create an account'));
+               $nav['register'] = ['register', t('Register'), '', t('Create an account')];
        }
 
        $help_url = 'help';
 
        if (!Config::get('system', 'hide_help')) {
-               $nav['help'] = array($help_url, t('Help'), '', t('Help and documentation'));
+               $nav['help'] = [$help_url, t('Help'), '', t('Help and documentation')];
        }
 
        if (count($a->apps) > 0) {
-               $nav['apps'] = array('apps', t('Apps'), '', t('Addon applications, utilities, games'));
+               $nav['apps'] = ['apps', t('Apps'), '', t('Addon applications, utilities, games')];
        }
 
        if (local_user() || !Config::get('system', 'local_search')) {
-               $nav['search'] = array('search', t('Search'), '', t('Search site content'));
+               $nav['search'] = ['search', t('Search'), '', t('Search site content')];
 
-               $nav['searchoption'] = array(
+               $nav['searchoption'] = [
                                                t('Full Text'),
                                                t('Tags'),
-                                               t('Contacts'));
+                                               t('Contacts')];
 
                if (Config::get('system', 'poco_local_search')) {
                        $nav['searchoption'][] = t('Forums');
@@ -151,62 +151,62 @@ function nav_info(App $a)
        }
 
        if (local_user() || Config::get('system', 'community_page_style') != CP_NO_COMMUNITY_PAGE) {
-               $nav['community'] = array('community', t('Community'), '', t('Conversations on this and other servers'));
+               $nav['community'] = ['community', t('Community'), '', t('Conversations on this and other servers')];
        }
 
        if (local_user()) {
-               $nav['events'] = array('events', t('Events'), '', t('Events and Calendar'));
+               $nav['events'] = ['events', t('Events'), '', t('Events and Calendar')];
        }
 
-       $nav['directory'] = array($gdirpath, t('Directory'), '', t('People directory'));
+       $nav['directory'] = [$gdirpath, t('Directory'), '', t('People directory')];
 
-       $nav['about'] = array('friendica', t('Information'), '', t('Information about this friendica instance'));
+       $nav['about'] = ['friendica', t('Information'), '', t('Information about this friendica instance')];
 
        // The following nav links are only show to logged in users
        if (local_user()) {
-               $nav['network'] = array('network', t('Network'), '', t('Conversations from your friends'));
-               $nav['net_reset'] = array('network/0?f=&order=comment&nets=all', t('Network Reset'), '', t('Load Network page with no filters'));
+               $nav['network'] = ['network', t('Network'), '', t('Conversations from your friends')];
+               $nav['net_reset'] = ['network/0?f=&order=comment&nets=all', t('Network Reset'), '', t('Load Network page with no filters')];
 
-               $nav['home'] = array('profile/' . $a->user['nickname'], t('Home'), '', t('Your posts and conversations'));
+               $nav['home'] = ['profile/' . $a->user['nickname'], t('Home'), '', t('Your posts and conversations')];
 
-               if (in_array($_SESSION['page_flags'], array(PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE, PAGE_PRVGROUP))) {
+               if (in_array($_SESSION['page_flags'], [PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE, PAGE_PRVGROUP])) {
                        // only show friend requests for normal pages. Other page types have automatic friendship.
-                       if (in_array($_SESSION['page_flags'], array(PAGE_NORMAL, PAGE_SOAPBOX, PAGE_PRVGROUP))) {
-                               $nav['introductions'] = array('notifications/intros', t('Introductions'), '', t('Friend Requests'));
+                       if (in_array($_SESSION['page_flags'], [PAGE_NORMAL, PAGE_SOAPBOX, PAGE_PRVGROUP])) {
+                               $nav['introductions'] = ['notifications/intros', t('Introductions'), '', t('Friend Requests')];
                        }
-                       if (in_array($_SESSION['page_flags'], array(PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE))) {
-                               $nav['notifications'] = array('notifications',  t('Notifications'), '', t('Notifications'));
-                               $nav['notifications']['all'] = array('notifications/system', t('See all notifications'), '', '');
-                               $nav['notifications']['mark'] = array('', t('Mark as seen'), '', t('Mark all system notifications seen'));
+                       if (in_array($_SESSION['page_flags'], [PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE])) {
+                               $nav['notifications'] = ['notifications',       t('Notifications'), '', t('Notifications')];
+                               $nav['notifications']['all'] = ['notifications/system', t('See all notifications'), '', ''];
+                               $nav['notifications']['mark'] = ['', t('Mark as seen'), '', t('Mark all system notifications seen')];
                        }
                }
 
-               $nav['messages'] = array('message', t('Messages'), '', t('Private mail'));
-               $nav['messages']['inbox'] = array('message', t('Inbox'), '', t('Inbox'));
-               $nav['messages']['outbox'] = array('message/sent', t('Outbox'), '', t('Outbox'));
-               $nav['messages']['new'] = array('message/new', t('New Message'), '', t('New Message'));
+               $nav['messages'] = ['message', t('Messages'), '', t('Private mail')];
+               $nav['messages']['inbox'] = ['message', t('Inbox'), '', t('Inbox')];
+               $nav['messages']['outbox'] = ['message/sent', t('Outbox'), '', t('Outbox')];
+               $nav['messages']['new'] = ['message/new', t('New Message'), '', t('New Message')];
 
                if (is_array($a->identities) && count($a->identities) > 1) {
-                       $nav['manage'] = array('manage', t('Manage'), '', t('Manage other pages'));
+                       $nav['manage'] = ['manage', t('Manage'), '', t('Manage other pages')];
                }
 
-               $nav['delegations'] = array('delegate', t('Delegations'), '', t('Delegate Page Management'));
+               $nav['delegations'] = ['delegate', t('Delegations'), '', t('Delegate Page Management')];
 
-               $nav['settings'] = array('settings', t('Settings'), '', t('Account settings'));
+               $nav['settings'] = ['settings', t('Settings'), '', t('Account settings')];
 
                if (Feature::isEnabled(local_user(), 'multi_profiles')) {
-                       $nav['profiles'] = array('profiles', t('Profiles'), '', t('Manage/Edit Profiles'));
+                       $nav['profiles'] = ['profiles', t('Profiles'), '', t('Manage/Edit Profiles')];
                }
 
-               $nav['contacts'] = array('contacts', t('Contacts'), '', t('Manage/edit friends and contacts'));
+               $nav['contacts'] = ['contacts', t('Contacts'), '', t('Manage/edit friends and contacts')];
        }
 
        // Show the link to the admin configuration page if user is admin
        if (is_site_admin()) {
-               $nav['admin'] = array('admin/', t('Admin'), '', t('Site setup and configuration'));
+               $nav['admin'] = ['admin/', t('Admin'), '', t('Site setup and configuration')];
        }
 
-       $nav['navigation'] = array('navigation/', t('Navigation'), '', t('Site map'));
+       $nav['navigation'] = ['navigation/', t('Navigation'), '', t('Site map')];
 
        // Provide a banner/logo/whatever
        $banner = Config::get('system', 'banner');
@@ -216,12 +216,12 @@ function nav_info(App $a)
 
        call_hooks('nav_info', $nav);
 
-       return array(
+       return [
                'sitelocation' => $sitelocation,
                'nav' => $nav,
                'banner' => $banner,
                'userinfo' => $userinfo,
-       );
+       ];
 }
 
 /**
@@ -230,7 +230,7 @@ function nav_info(App $a)
  */
 function nav_set_selected($item){
        $a = get_app();
-       $a->nav_sel = array(
+       $a->nav_sel = [
                'global'        => null,
                'community'     => null,
                'network'       => null,
@@ -245,6 +245,6 @@ function nav_set_selected($item){
                'manage'        => null,
                'events'        => null,
                'register'      => null,
-       );
+       ];
        $a->nav_sel[$item] = 'selected';
 }
index 413048d5b8057992d731b5e489b7ba8bfb8be02a..fe502bdb54f8e71653819263318698add57273bf 100644 (file)
@@ -32,10 +32,10 @@ function fetch_url($url, $binary = false, &$redirects = 0, $timeout = 0, $accept
                $url,
                $binary,
                $redirects,
-               array('timeout'=>$timeout,
+               ['timeout'=>$timeout,
                'accept_content'=>$accept_content,
                'cookiejar'=>$cookiejar
-               )
+               ]
        );
 
        return($ret['body']);
@@ -63,9 +63,9 @@ function fetch_url($url, $binary = false, &$redirects = 0, $timeout = 0, $accept
  *    string 'header' => HTTP headers
  *    string 'body' => fetched content
  */
-function z_fetch_url($url, $binary = false, &$redirects = 0, $opts = array())
+function z_fetch_url($url, $binary = false, &$redirects = 0, $opts = [])
 {
-       $ret = array('return_code' => 0, 'success' => false, 'header' => '', 'info' => '', 'body' => '');
+       $ret = ['return_code' => 0, 'success' => false, 'header' => '', 'info' => '', 'body' => ''];
 
        $stamp1 = microtime(true);
 
@@ -97,7 +97,7 @@ function z_fetch_url($url, $binary = false, &$redirects = 0, $opts = array())
                curl_setopt(
                        $ch,
                        CURLOPT_HTTPHEADER,
-                       array('Accept: ' . $opts['accept_content'])
+                       ['Accept: ' . $opts['accept_content']]
                );
        }
 
@@ -213,7 +213,7 @@ function z_fetch_url($url, $binary = false, &$redirects = 0, $opts = array())
                        $newurl = $new_location_info['scheme'] . '://' . $new_location_info['host'] . $old_location_info['path'];
                }
 
-               $matches = array();
+               $matches = [];
 
                if (preg_match('/(Location:|URI:)(.*?)\n/i', $header, $matches)) {
                        $newurl = trim(array_pop($matches));
@@ -306,7 +306,7 @@ function post_url($url, $params, $headers = null, &$redirects = 0, $timeout = 0)
 
        if (defined('LIGHTTPD')) {
                if (!is_array($headers)) {
-                       $headers = array('Expect:');
+                       $headers = ['Expect:'];
                } else {
                        if (!in_array('Expect:', $headers)) {
                                array_push($headers, 'Expect:');
@@ -361,7 +361,7 @@ function post_url($url, $params, $headers = null, &$redirects = 0, $timeout = 0)
        }
 
        if ($http_code == 301 || $http_code == 302 || $http_code == 303 || $http_code == 307) {
-               $matches = array();
+               $matches = [];
                preg_match('/(Location:|URI:)(.*?)\n/', $header, $matches);
                $newurl = trim(array_pop($matches));
 
@@ -397,7 +397,7 @@ function post_url($url, $params, $headers = null, &$redirects = 0, $timeout = 0)
 
 function xml_status($st, $message = '')
 {
-       $result = array('status' => $st);
+       $result = ['status' => $st];
 
        if ($message != '') {
                $result['message'] = $message;
@@ -409,7 +409,7 @@ function xml_status($st, $message = '')
 
        header("Content-type: text/xml");
 
-       $xmldata = array("result" => $result);
+       $xmldata = ["result" => $result];
 
        echo XML::fromArray($xmldata, $xml);
 
@@ -433,7 +433,7 @@ function xml_status($st, $message = '')
  *                             'title' => header title
  *                             'description' => optional message
  */
-function http_status_exit($val, $description = array())
+function http_status_exit($val, $description = [])
 {
        $err = '';
        if ($val >= 400) {
@@ -452,9 +452,9 @@ function http_status_exit($val, $description = array())
                $tpl = get_markup_template('http_status.tpl');
                echo replace_macros(
                        $tpl,
-                       array(
+                       [
                                '$title' => $description["title"],
-                               '$description' => $description["description"])
+                               '$description' => $description["description"]]
                );
        }
 
@@ -581,7 +581,7 @@ function blocked_url($url)
                return true;
        }
 
-       $domain_blocklist = Config::get('system', 'blocklist', array());
+       $domain_blocklist = Config::get('system', 'blocklist', []);
        if (! $domain_blocklist) {
                return false;
        }
@@ -777,10 +777,10 @@ function fix_contact_ssl_policy(&$contact, $new_policy)
        }
 
        if ($ssl_changed) {
-               $fields = array('url' => $contact['url'], 'request' => $contact['request'],
+               $fields = ['url' => $contact['url'], 'request' => $contact['request'],
                                'notify' => $contact['notify'], 'poll' => $contact['poll'],
-                               'confirm' => $contact['confirm'], 'poco' => $contact['poco']);
-               dba::update('contact', $fields, array('id' => $contact['id']));
+                               'confirm' => $contact['confirm'], 'poco' => $contact['poco']];
+               dba::update('contact', $fields, ['id' => $contact['id']]);
        }
 }
 
@@ -801,12 +801,12 @@ function strip_tracking_query_params($url)
                        foreach ($querydata as $param => $value) {
                                if (in_array(
                                        $param,
-                                       array(
+                                       [
                                                "utm_source", "utm_medium", "utm_term", "utm_content", "utm_campaign",
                                                "wt_mc", "pk_campaign", "pk_kwd", "mc_cid", "mc_eid",
                                                "fb_action_ids", "fb_action_types", "fb_ref",
                                                "awesm", "wtrid",
-                                               "woo_campaign", "woo_source", "woo_medium", "woo_content", "woo_term")
+                                               "woo_campaign", "woo_source", "woo_medium", "woo_content", "woo_term"]
                                        )
                                ) {
                                        $pair = $param . "=" . urlencode($value);
@@ -820,7 +820,7 @@ function strip_tracking_query_params($url)
                                        $pair = $param . "=" . $value;
                                        $url = str_replace($pair, "", $url);
 
-                                       $url = str_replace(array("?&", "&&"), array("?", ""), $url);
+                                       $url = str_replace(["?&", "&&"], ["?", ""], $url);
                                }
                        }
                }
@@ -932,7 +932,7 @@ function original_url($url, $depth = 1, $fetchbody = false)
 
        $list = $xpath->query("//meta[@content]");
        foreach ($list as $node) {
-               $attr = array();
+               $attr = [];
                if ($node->attributes->length) {
                        foreach ($node->attributes as $attribute) {
                                $attr[$attribute->name] = $attribute->value;
@@ -967,12 +967,12 @@ function short_link($url)
                $yourls->set('password', $yourls_password);
                $yourls->set('ssl', $yourls_ssl);
                $yourls->set('yourls-url', $yourls_url);
-               $slinky->set_cascade(array($yourls, new Slinky_Ur1ca(), new Slinky_TinyURL()));
+               $slinky->set_cascade([$yourls, new Slinky_Ur1ca(), new Slinky_TinyURL()]);
        } else {
                // setup a cascade of shortening services
                // try to get a short link from these services
                // in the order ur1.ca, tinyurl
-               $slinky->set_cascade(array(new Slinky_Ur1ca(), new Slinky_TinyURL()));
+               $slinky->set_cascade([new Slinky_Ur1ca(), new Slinky_TinyURL()]);
        }
        return $slinky->short();
 }
index 3a89c024d77c851b7245c7483ae1801e6eab9517..6ffed3ba35da72f205065f678b7726c34e45d034 100644 (file)
@@ -69,7 +69,7 @@ function push_lang($language) {
        if (isset($a->strings) && count($a->strings)) {
                $a->stringsave = $a->strings;
        }
-       $a->strings = array();
+       $a->strings = [];
        load_translation_table($language);
        $lang = $language;
 }
@@ -84,7 +84,7 @@ function pop_lang() {
        if (isset($a->stringsave)) {
                $a->strings = $a->stringsave;
        } else {
-               $a->strings = array();
+               $a->strings = [];
        }
 
        $lang = $a->langsave;
@@ -102,9 +102,9 @@ function pop_lang() {
 function load_translation_table($lang) {
        $a = get_app();
 
-       $a->strings = array();
+       $a->strings = [];
        // load enabled plugins strings
-       $plugins = dba::select('addon', array('name'), array('installed' => true));
+       $plugins = dba::select('addon', ['name'], ['installed' => true]);
        while ($p = dba::fetch($plugins)) {
                $name = $p['name'];
                if (file_exists("addon/$name/lang/$lang/strings.php")) {
@@ -217,7 +217,7 @@ function string_plural_select_default($n)
  * @return array
  */
 function get_available_languages() {
-       $langs = array();
+       $langs = [];
        $strings_file_paths = glob('view/lang/*/strings.php');
 
        if (is_array($strings_file_paths) && count($strings_file_paths)) {
index 2f7823a0588cca58a499a570053e3da44e698a31..a5031e7d81ce2ae0f7ede3e947af1f3effad4677 100644 (file)
@@ -26,14 +26,14 @@ require_once "include/network.php";
  */
 function get_old_attachment_data($body) {
 
-       $post = array();
+       $post = [];
 
        // Simplify image codes
        $body = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $body);
 
        if (preg_match_all("(\[class=(.*?)\](.*?)\[\/class\])ism",$body, $attached,  PREG_SET_ORDER)) {
                foreach ($attached AS $data) {
-                       if (!in_array($data[1], array("type-link", "type-video", "type-photo")))
+                       if (!in_array($data[1], ["type-link", "type-video", "type-photo"]))
                                continue;
 
                        $post["type"] = substr($data[1], 5);
@@ -63,7 +63,7 @@ function get_old_attachment_data($body) {
                                $post["url"] = $matches[1];
                                $post["title"] = $matches[2];
                        }
-                       if (($post["url"] == "") && (in_array($post["type"], array("link", "video")))
+                       if (($post["url"] == "") && (in_array($post["type"], ["link", "video"]))
                                && preg_match("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", $attacheddata, $matches)) {
                                $post["url"] = $matches[1];
                        }
@@ -195,7 +195,7 @@ function get_attachment_data($body)
        return $data;
 }
 
-function get_attached_data($body, $item = array()) {
+function get_attached_data($body, $item = []) {
 /*
  - text:
  - type: link, video, photo
index 34f8c13716b44e65495b939da40b8761a920dba1..0059b7d86e18e5e1c9a1b36704dbe70ad93937d1 100644 (file)
@@ -18,7 +18,7 @@ use Friendica\Database\DBM;
  */
 function uninstall_plugin($plugin) {
        logger("Addons: uninstalling " . $plugin);
-       dba::delete('addon', array('name' => $plugin));
+       dba::delete('addon', ['name' => $plugin]);
 
        @include_once('addon/' . $plugin . '/' . $plugin . '.php');
        if (function_exists($plugin . '_uninstall')) {
@@ -48,15 +48,15 @@ function install_plugin($plugin) {
 
                $plugin_admin = (function_exists($plugin."_plugin_admin") ? 1 : 0);
 
-               dba::insert('addon', array('name' => $plugin, 'installed' => true,
-                                       'timestamp' => $t, 'plugin_admin' => $plugin_admin));
+               dba::insert('addon', ['name' => $plugin, 'installed' => true,
+                                       'timestamp' => $t, 'plugin_admin' => $plugin_admin]);
 
                // we can add the following with the previous SQL
                // once most site tables have been updated.
                // This way the system won't fall over dead during the update.
 
                if (file_exists('addon/' . $plugin . '/.hidden')) {
-                       dba::update('addon', array('hidden' => true), array('name' => $plugin));
+                       dba::update('addon', ['hidden' => true], ['name' => $plugin]);
                }
                return true;
        } else {
@@ -75,7 +75,7 @@ function reload_plugins() {
                if (DBM::is_result($r)) {
                        $installed = $r;
                } else {
-                       $installed = array();
+                       $installed = [];
                }
 
                $parr = explode(',',$plugins);
@@ -102,7 +102,7 @@ function reload_plugins() {
                                                                $func = $pl . '_install';
                                                                $func();
                                                        }
-                                                       dba::update('addon', array('timestamp' => $t), array('id' => $i['id']));
+                                                       dba::update('addon', ['timestamp' => $t], ['id' => $i['id']]);
                                                }
                                        }
                                }
@@ -119,7 +119,7 @@ function reload_plugins() {
  * @return boolean
  */
 function plugin_enabled($plugin) {
-       return dba::exists('addon', array('installed' => true, 'name' => $plugin));
+       return dba::exists('addon', ['installed' => true, 'name' => $plugin]);
 }
 
 
@@ -133,13 +133,13 @@ function plugin_enabled($plugin) {
  * @return mixed|bool
  */
 function register_hook($hook, $file, $function, $priority=0) {
-       $condition = array('hook' => $hook, 'file' => $file, 'function' => $function);
+       $condition = ['hook' => $hook, 'file' => $file, 'function' => $function];
        $exists = dba::exists('hook', $condition);
        if ($exists) {
                return true;
        }
 
-       $r = dba::insert('hook', array('hook' => $hook, 'file' => $file, 'function' => $function, 'priority' => $priority));
+       $r = dba::insert('hook', ['hook' => $hook, 'file' => $file, 'function' => $function, 'priority' => $priority]);
 
        return $r;
 }
@@ -153,7 +153,7 @@ function register_hook($hook, $file, $function, $priority=0) {
  * @return array
  */
 function unregister_hook($hook, $file, $function) {
-       $condition = array('hook' => $hook, 'file' => $file, 'function' => $function);
+       $condition = ['hook' => $hook, 'file' => $file, 'function' => $function];
        $r = dba::delete('hook', $condition);
        return $r;
 }
@@ -161,14 +161,14 @@ function unregister_hook($hook, $file, $function) {
 
 function load_hooks() {
        $a = get_app();
-       $a->hooks = array();
-       $r = dba::select('hook', array('hook', 'file', 'function'), array(), array('order' => array('priority' => 'desc', 'file')));
+       $a->hooks = [];
+       $r = dba::select('hook', ['hook', 'file', 'function'], [], ['order' => ['priority' => 'desc', 'file']]);
 
        while ($rr = dba::fetch($r)) {
                if (! array_key_exists($rr['hook'],$a->hooks)) {
-                       $a->hooks[$rr['hook']] = array();
+                       $a->hooks[$rr['hook']] = [];
                }
-               $a->hooks[$rr['hook']][] = array($rr['file'],$rr['function']);
+               $a->hooks[$rr['hook']][] = [$rr['file'],$rr['function']];
        }
        dba::close($r);
 }
@@ -211,7 +211,7 @@ function call_single_hook($a, $name, $hook, &$data = null) {
                $func($a, $data);
        } else {
                // remove orphan hooks
-               $condition = array('hook' => $name, 'file' => $hook[0], 'function' => $hook[1]);
+               $condition = ['hook' => $name, 'file' => $hook[0], 'function' => $hook[1]];
                dba::delete('hook', $condition);
        }
 }
@@ -251,13 +251,13 @@ function get_plugin_info($plugin) {
 
        $a = get_app();
 
-       $info=Array(
+       $info=[
                'name' => $plugin,
                'description' => "",
-               'author' => array(),
+               'author' => [],
                'version' => "",
                'status' => ""
-       );
+       ];
 
        if (!is_file("addon/$plugin/$plugin.php")) return $info;
 
@@ -277,9 +277,9 @@ function get_plugin_info($plugin) {
                                if ($k == "author") {
                                        $r=preg_match("|([^<]+)<([^>]+)>|", $v, $m);
                                        if ($r) {
-                                               $info['author'][] = array('name'=>$m[1], 'link'=>$m[2]);
+                                               $info['author'][] = ['name'=>$m[1], 'link'=>$m[2]];
                                        } else {
-                                               $info['author'][] = array('name'=>$v);
+                                               $info['author'][] = ['name'=>$v];
                                        }
                                } else {
                                        if (array_key_exists($k,$info)) {
@@ -312,16 +312,16 @@ function get_plugin_info($plugin) {
  */
 
 function get_theme_info($theme) {
-       $info=Array(
+       $info=[
                'name' => $theme,
                'description' => "",
-               'author' => array(),
-               'maintainer' => array(),
+               'author' => [],
+               'maintainer' => [],
                'version' => "",
                'credits' => "",
                'experimental' => false,
                'unsupported' => false
-       );
+       ];
 
        if (file_exists("view/theme/$theme/experimental"))
                $info['experimental'] = true;
@@ -348,16 +348,16 @@ function get_theme_info($theme) {
 
                                        $r=preg_match("|([^<]+)<([^>]+)>|", $v, $m);
                                        if ($r) {
-                                               $info['author'][] = array('name'=>$m[1], 'link'=>$m[2]);
+                                               $info['author'][] = ['name'=>$m[1], 'link'=>$m[2]];
                                        } else {
-                                               $info['author'][] = array('name'=>$v);
+                                               $info['author'][] = ['name'=>$v];
                                        }
                                } elseif ($k == "maintainer") {
                                        $r=preg_match("|([^<]+)<([^>]+)>|", $v, $m);
                                        if ($r) {
-                                               $info['maintainer'][] = array('name'=>$m[1], 'link'=>$m[2]);
+                                               $info['maintainer'][] = ['name'=>$m[1], 'link'=>$m[2]];
                                        } else {
-                                               $info['maintainer'][] = array('name'=>$v);
+                                               $info['maintainer'][] = ['name'=>$v];
                                        }
                                } else {
                                        if (array_key_exists($k,$info)) {
@@ -381,7 +381,7 @@ function get_theme_info($theme) {
  * @return string
  */
 function get_theme_screenshot($theme) {
-       $exts = array('.png','.jpg');
+       $exts = ['.png','.jpg'];
        foreach ($exts as $ext) {
                if (file_exists('view/theme/' . $theme . '/screenshot' . $ext)) {
                        return(System::baseUrl() . '/view/theme/' . $theme . '/screenshot' . $ext);
@@ -450,11 +450,11 @@ function theme_include($file, $root = '') {
        $theme = current_theme();
        $thname = $theme;
        $ext = substr($file,strrpos($file,'.')+1);
-       $paths = array(
+       $paths = [
                "{$root}view/theme/$thname/$ext/$file",
                "{$root}view/theme/$parent/$ext/$file",
                "{$root}view/$ext/$file",
-       );
+       ];
        foreach ($paths as $p) {
                // strpos() is faster than strstr when checking if one string is in another (http://php.net/manual/en/function.strstr.php)
                if (strpos($p,'NOPATH') !== false) {
index fd72d888e5b6604a31596380fc2f8428b103e50e..44e0a717c2765aee0e8f2c1038aa52c41a5703b4 100644 (file)
@@ -64,18 +64,18 @@ function post_update_1192() {
                return false;
        }
 
-       $item_arr = array();
+       $item_arr = [];
        foreach ($r AS $item) {
                $index = $item["author-link"]."-".$item["uid"];
-               $item_arr[$index] = array("author-link" => $item["author-link"],
+               $item_arr[$index] = ["author-link" => $item["author-link"],
                                                "uid" => $item["uid"],
-                                               "network" => $item["network"]);
+                                               "network" => $item["network"]];
        }
 
        // Set the "gcontact-id" in the item table and add a new gcontact entry if needed
        foreach ($item_arr AS $item) {
-               $gcontact_id = GContact::getId(array("url" => $item['author-link'], "network" => $item['network'],
-                                               "photo" => $item['author-avatar'], "name" => $item['author-name']));
+               $gcontact_id = GContact::getId(["url" => $item['author-link'], "network" => $item['network'],
+                                               "photo" => $item['author-avatar'], "name" => $item['author-name']]);
                q("UPDATE `item` SET `gcontact-id` = %d WHERE `uid` = %d AND `author-link` = '%s' AND `gcontact-id` = 0",
                        intval($gcontact_id), intval($item["uid"]), dbesc($item["author-link"]));
        }
@@ -200,12 +200,12 @@ function post_update_1198() {
 
        logger("Query done", LOGGER_DEBUG);
 
-       $item_arr = array();
+       $item_arr = [];
        foreach ($r AS $item) {
                $index = $item["author-link"]."-".$item["owner-link"]."-".$item["uid"];
-               $item_arr[$index] = array("author-link" => $item["author-link"],
+               $item_arr[$index] = ["author-link" => $item["author-link"],
                                                "owner-link" => $item["owner-link"],
-                                               "uid" => $item["uid"]);
+                                               "uid" => $item["uid"]];
        }
 
        // Set the "gcontact-id" in the item table and add a new gcontact entry if needed
index a9e0522011c1d5b41fe3ccfd00a0f2493c9f8312..f5375258bf140a4de57600ef6188fe51dee19941 100644 (file)
@@ -13,7 +13,7 @@ function update_queue_time($id) {
 
 function remove_queue_item($id) {
        logger('queue: remove queue item ' . $id);
-       dba::delete('queue', array('id' => $id));
+       dba::delete('queue', ['id' => $id]);
 }
 
 /**
index 3cdfb4f28d83ab6921d6f3f152def8b886cacbf3..5c393cbb62e9c29ab3e667f430764fe7d15d016e 100644 (file)
@@ -27,16 +27,16 @@ function cookie_hash($user)
  * @param int $time
  * @param array $user Record from "user" table
  */
-function new_cookie($time, $user = array())
+function new_cookie($time, $user = [])
 {
        if ($time != 0) {
                $time = $time + time();
        }
 
        if ($user) {
-               $value = json_encode(array("uid" => $user["uid"],
+               $value = json_encode(["uid" => $user["uid"],
                        "hash" => cookie_hash($user),
-                       "ip" => $_SERVER['REMOTE_ADDR']));
+                       "ip" => $_SERVER['REMOTE_ADDR']]);
        } else {
                $value = "";
        }
@@ -102,12 +102,12 @@ function authenticate_success($user_record, $login_initial = false, $interactive
                }
        }
 
-       $r = dba::select('user', array('uid', 'username', 'nickname'),
-               array('password' => $master_record['password'], 'email' => $master_record['email'], 'account_removed' => false));
+       $r = dba::select('user', ['uid', 'username', 'nickname'],
+               ['password' => $master_record['password'], 'email' => $master_record['email'], 'account_removed' => false]);
        if (DBM::is_result($r)) {
                $a->identities = dba::inArray($r);
        } else {
-               $a->identities = array();
+               $a->identities = [];
        }
 
        $r = dba::p("SELECT `user`.`uid`, `user`.`username`, `user`.`nickname`
@@ -137,11 +137,11 @@ function authenticate_success($user_record, $login_initial = false, $interactive
        header('X-Account-Management-Status: active; name="' . $a->user['username'] . '"; id="' . $a->user['nickname'] . '"');
 
        if ($login_initial || $login_refresh) {
-               dba::update('user', array('login_date' => datetime_convert()), array('uid' => $_SESSION['uid']));
+               dba::update('user', ['login_date' => datetime_convert()], ['uid' => $_SESSION['uid']]);
 
                // Set the login date for all identities of the user
-               dba::update('user', array('login_date' => datetime_convert()),
-                       array('password' => $master_record['password'], 'email' => $master_record['email'], 'account_removed' => false));
+               dba::update('user', ['login_date' => datetime_convert()],
+                       ['password' => $master_record['password'], 'email' => $master_record['email'], 'account_removed' => false]);
        }
 
        if ($login_initial) {
index 3e58623cc0fda3ba5251f82bd886e5929908bd30..0e8fe836f319b7a2549d5ff3cdc5e4f1231b702b 100644 (file)
@@ -80,11 +80,11 @@ function ref_session_write($id, $data)
        }
 
        if ($session_exists) {
-               $fields = array('data' => $data, 'expire' => $expire);
-               $condition = array("`sid` = ? AND (`data` != ? OR `expire` != ?)", $id, $data, $expire);
+               $fields = ['data' => $data, 'expire' => $expire];
+               $condition = ["`sid` = ? AND (`data` != ? OR `expire` != ?)", $id, $data, $expire];
                dba::update('session', $fields, $condition);
        } else {
-               $fields = array('sid' => $id, 'expire' => $default_expire, 'data' => $data);
+               $fields = ['sid' => $id, 'expire' => $default_expire, 'data' => $data];
                dba::insert('session', $fields);
        }
 
@@ -105,13 +105,13 @@ function ref_session_destroy($id)
                return true;
        }
 
-       dba::delete('session', array('sid' => $id));
+       dba::delete('session', ['sid' => $id]);
        return true;
 }
 
 function ref_session_gc()
 {
-       dba::delete('session', array("`expire` < ?", time()));
+       dba::delete('session', ["`expire` < ?", time()]);
        return true;
 }
 
index 02091f169d3e75f6456d23530df232f32ea7993d..4b45510b200d1a45c2d8b840e221e03bdd79eb30 100644 (file)
@@ -51,7 +51,7 @@ function create_tags_from_item($itemid)
        // ignore anything in a code block
        $data = preg_replace('/\[code\](.*?)\[\/code\]/sm', '', $data);
 
-       $tags = array();
+       $tags = [];
 
        $pattern = '/\W\#([^\[].*?)[\s\'".,:;\?!\[\]\/]/ism';
        if (preg_match_all($pattern, $data, $matches)) {
@@ -204,7 +204,7 @@ function tagadelic($uid, $count = 0, $owner_id = 0, $flags = '', $type = TERM_HA
                TERM_OBJ_POST
        );
        if (!DBM::is_result($r)) {
-               return array();
+               return [];
        }
 
        return tag_calc($r);
@@ -238,10 +238,10 @@ function wtagblock($uid, $count = 0, $owner_id = 0, $flags = '', $type = TERM_HA
                }
 
                $tpl = get_markup_template('tagblock_widget.tpl');
-               $o = replace_macros($tpl, array(
+               $o = replace_macros($tpl, [
                        '$title' => t('Tags'),
                        '$tags' => $tags
-               ));
+               ]);
        }
        return $o;
 }
@@ -254,13 +254,13 @@ function wtagblock($uid, $count = 0, $owner_id = 0, $flags = '', $type = TERM_HA
  */
 function tag_calc($arr)
 {
-       $tags = array();
+       $tags = [];
        $min = 1e9;
        $max = -1e9;
        $x = 0;
 
        if (!$arr) {
-               return array();
+               return [];
        }
 
        foreach ($arr as $rr) {
index 66918e9a66e1c1fae6412acf91d0d07b7d25a093..5ce0b850efdab64f3632782aab356d3c913d6a90 100644 (file)
@@ -83,7 +83,7 @@ function random_string($size = 64)
  * @return string Filtered string
  */
 function notags($string) {
-       return str_replace(array("<", ">"), array('[', ']'), $string);
+       return str_replace(["<", ">"], ['[', ']'], $string);
 
 //  High-bit filter no longer used
 //     return str_replace(array("<",">","\xBA","\xBC","\xBE"), array('[',']','','',''), $string);
@@ -113,12 +113,12 @@ function autoname($len) {
                return '';
        }
 
-       $vowels = array('a','a','ai','au','e','e','e','ee','ea','i','ie','o','ou','u');
+       $vowels = ['a','a','ai','au','e','e','e','ee','ea','i','ie','o','ou','u'];
        if (mt_rand(0, 5) == 4) {
                $vowels[] = 'y';
        }
 
-       $cons = array(
+       $cons = [
                        'b','bl','br',
                        'c','ch','cl','cr',
                        'd','dr',
@@ -139,13 +139,13 @@ function autoname($len) {
                        'w','wh',
                        'x',
                        'z','zh'
-                       );
+                       ];
 
-       $midcons = array('ck','ct','gn','ld','lf','lm','lt','mb','mm', 'mn','mp',
-                               'nd','ng','nk','nt','rn','rp','rt');
+       $midcons = ['ck','ct','gn','ld','lf','lm','lt','mb','mm', 'mn','mp',
+                               'nd','ng','nk','nt','rn','rp','rt'];
 
-       $noend = array('bl', 'br', 'cl','cr','dr','fl','fr','gl','gr',
-                               'kh', 'kl','kr','mn','pl','pr','rh','tr','qu','wh');
+       $noend = ['bl', 'br', 'cl','cr','dr','fl','fr','gl','gr',
+                               'kh', 'kl','kr','mn','pl','pr','rh','tr','qu','wh'];
 
        $start = mt_rand(0,2);
        if ($start == 0) {
@@ -280,14 +280,14 @@ function paginate_data(App $a, $count = null) {
        }
 
        $url = $stripped;
-       $data = array();
+       $data = [];
 
        function _l(&$d, $name, $url, $text, $class = '') {
                if (strpos($url, '?') === false && ($pos = strpos($url, '&')) !== false) {
                        $url = substr($url, 0, $pos) . '?' . substr($url, $pos + 1);
                }
 
-               $d[$name] = array('url' => $url, 'text' => $text, 'class' => $class);
+               $d[$name] = ['url' => $url, 'text' => $text, 'class' => $class];
        }
 
        if (!is_null($count)) {
@@ -313,7 +313,7 @@ function paginate_data(App $a, $count = null) {
                                $numstop = (($pagenum > ($numpages - 7)) ? $numpages : ($numstart + 8));
                        }
 
-                       $pages = array();
+                       $pages = [];
 
                        for ($i = $numstart; $i <= $numstop; $i++) {
                                if ($i == $a->pager['page']) {
@@ -362,7 +362,7 @@ function paginate(App $a) {
 
        $data = paginate_data($a);
        $tpl = get_markup_template("paginate.tpl");
-       return replace_macros($tpl, array("pager" => $data));
+       return replace_macros($tpl, ["pager" => $data]);
 
 }
 
@@ -377,7 +377,7 @@ function alt_pager(App $a, $i) {
 
        $data = paginate_data($a, $i);
        $tpl = get_markup_template("paginate.tpl");
-       return replace_macros($tpl, array('pager' => $data));
+       return replace_macros($tpl, ['pager' => $data]);
 
 }
 
@@ -388,10 +388,10 @@ function alt_pager(App $a, $i) {
  */
 function scroll_loader() {
        $tpl = get_markup_template("scroll_loader.tpl");
-       return replace_macros($tpl, array(
+       return replace_macros($tpl, [
                'wait' => t('Loading more entries...'),
                'end' => t('The end')
-       ));
+       ]);
 }
 
 
@@ -404,7 +404,7 @@ function scroll_loader() {
 function expand_acl($s) {
        // turn string array of angle-bracketed elements into numeric array
        // e.g. "<1><2><3>" => array(1,2,3);
-       $ret = array();
+       $ret = [];
 
        if (strlen($s)) {
                $t = str_replace('<', '', $s);
@@ -477,7 +477,7 @@ function item_new_uri($hostname, $uid, $guid = "") {
 
                $uri = "urn:X-dfrn:" . $hostname . ':' . $uid . ':' . $hash;
 
-               $dups = dba::exists('item', array('uri' => $uri));
+               $dups = dba::exists('item', ['uri' => $uri]);
        } while ($dups == true);
 
        return $uri;
@@ -663,7 +663,7 @@ function attribute_contains($attr, $s) {
 
 
 /* setup int->string log level map */
-$LOGGER_LEVELS = array();
+$LOGGER_LEVELS = [];
 
 /**
  * @brief Logs the given message at the given log level
@@ -825,7 +825,7 @@ function activity_match($haystack,$needle) {
  * @return array List of tag and person names
  */
 function get_tags($string) {
-       $ret = array();
+       $ret = [];
 
        // Convert hashtag links to hashtags
        $string = preg_replace('/#\[url\=([^\[\]]*)\](.*?)\[\/url\]/ism', '#$2', $string);
@@ -834,7 +834,7 @@ function get_tags($string) {
        $string = preg_replace('/\[code\](.*?)\[\/code\]/sm', '', $string);
 
        // Force line feeds at bbtags
-       $string = str_replace(array('[', ']'), array("\n[", "]\n"), $string);
+       $string = str_replace(['[', ']'], ["\n[", "]\n"], $string);
 
        // ignore anything in a bbtag
        $string = preg_replace('/\[(.*?)\]/sm', '', $string);
@@ -942,7 +942,7 @@ function contact_block() {
                                intval($shown)
                );
                if (DBM::is_result($r)) {
-                       $contacts = array();
+                       $contacts = [];
                        foreach ($r AS $contact) {
                                $contacts[] = $contact["id"];
                        }
@@ -951,7 +951,7 @@ function contact_block() {
 
                        if (DBM::is_result($r)) {
                                $contacts = sprintf(tt('%d Contact','%d Contacts', $total),$total);
-                               $micropro = Array();
+                               $micropro = [];
                                foreach ($r as $rr) {
                                        $micropro[] = micropro($rr,true,'mpfriend');
                                }
@@ -960,14 +960,14 @@ function contact_block() {
        }
 
        $tpl = get_markup_template('contact_block.tpl');
-       $o = replace_macros($tpl, array(
+       $o = replace_macros($tpl, [
                '$contacts' => $contacts,
                '$nickname' => $a->profile['nickname'],
                '$viewcontacts' => t('View Contacts'),
                '$micropro' => $micropro,
-       ));
+       ]);
 
-       $arr = array('contacts' => $r, 'output' => $o);
+       $arr = ['contacts' => $r, 'output' => $o];
 
        call_hooks('contact_block_end', $arr);
        return $o;
@@ -1021,7 +1021,7 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
                $url = '';
        }
 
-       return replace_macros(get_markup_template(($textmode)?'micropro_txt.tpl':'micropro_img.tpl'),array(
+       return replace_macros(get_markup_template(($textmode)?'micropro_txt.tpl':'micropro_img.tpl'),[
                '$click' => defaults($contact, 'click', ''),
                '$class' => $class,
                '$url' => $url,
@@ -1031,7 +1031,7 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
                '$parkle' => $sparkle,
                '$redir' => $redir,
 
-       ));
+       ]);
 }
 
 /**
@@ -1054,7 +1054,7 @@ function search($s, $id = 'search-box', $url = 'search', $save = false, $aside =
        }
        $save_label = $mode === 'text' ? t('Save') : t('Follow');
 
-       $values = array(
+       $values = [
                        '$s' => htmlspecialchars($s),
                        '$id' => $id,
                        '$action_url' => $url,
@@ -1063,13 +1063,13 @@ function search($s, $id = 'search-box', $url = 'search', $save = false, $aside =
                        '$savedsearch' => Feature::isEnabled(local_user(),'savedsearch'),
                        '$search_hint' => t('@name, !forum, #tags, content'),
                        '$mode' => $mode
-               );
+               ];
 
        if (!$aside) {
-               $values['$searchoption'] = array(
+               $values['$searchoption'] = [
                                        t("Full Text"),
                                        t("Tags"),
-                                       t("Contacts"));
+                                       t("Contacts")];
 
                if (Config::get('system','poco_local_search')) {
                        $values['$searchoption'][] = t("Forums");
@@ -1115,14 +1115,14 @@ function get_poke_verbs() {
        // index is present tense verb
        // value is array containing past tense verb, translation of present, translation of past
 
-       $arr = array(
-               'poke' => array('poked', t('poke'), t('poked')),
-               'ping' => array('pinged', t('ping'), t('pinged')),
-               'prod' => array('prodded', t('prod'), t('prodded')),
-               'slap' => array('slapped', t('slap'), t('slapped')),
-               'finger' => array('fingered', t('finger'), t('fingered')),
-               'rebuff' => array('rebuffed', t('rebuff'), t('rebuffed')),
-       );
+       $arr = [
+               'poke' => ['poked', t('poke'), t('poked')],
+               'ping' => ['pinged', t('ping'), t('pinged')],
+               'prod' => ['prodded', t('prod'), t('prodded')],
+               'slap' => ['slapped', t('slap'), t('slapped')],
+               'finger' => ['fingered', t('finger'), t('fingered')],
+               'rebuff' => ['rebuffed', t('rebuff'), t('rebuffed')],
+       ];
        call_hooks('poke_verbs', $arr);
        return $arr;
 }
@@ -1134,12 +1134,12 @@ function get_poke_verbs() {
  * @return string Translated string.
  */
 function day_translate($s) {
-       $ret = str_replace(array('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'),
-               array(t('Monday'), t('Tuesday'), t('Wednesday'), t('Thursday'), t('Friday'), t('Saturday'), t('Sunday')),
+       $ret = str_replace(['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'],
+               [t('Monday'), t('Tuesday'), t('Wednesday'), t('Thursday'), t('Friday'), t('Saturday'), t('Sunday')],
                $s);
 
-       $ret = str_replace(array('January','February','March','April','May','June','July','August','September','October','November','December'),
-               array(t('January'), t('February'), t('March'), t('April'), t('May'), t('June'), t('July'), t('August'), t('September'), t('October'), t('November'), t('December')),
+       $ret = str_replace(['January','February','March','April','May','June','July','August','September','October','November','December'],
+               [t('January'), t('February'), t('March'), t('April'), t('May'), t('June'), t('July'), t('August'), t('September'), t('October'), t('November'), t('December')],
                $ret);
 
        return $ret;
@@ -1152,11 +1152,11 @@ function day_translate($s) {
  * @return string Translated string.
  */
 function day_short_translate($s) {
-       $ret = str_replace(array('Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'),
-               array(t('Mon'), t('Tue'), t('Wed'), t('Thu'), t('Fri'), t('Sat'), t('Sun')),
+       $ret = str_replace(['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
+               [t('Mon'), t('Tue'), t('Wed'), t('Thu'), t('Fri'), t('Sat'), t('Sun')],
                $s);
-       $ret = str_replace(array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov','Dec'),
-               array(t('Jan'), t('Feb'), t('Mar'), t('Apr'), t('May'), ('Jun'), t('Jul'), t('Aug'), t('Sep'), t('Oct'), t('Nov'), t('Dec')),
+       $ret = str_replace(['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov','Dec'],
+               [t('Jan'), t('Feb'), t('Mar'), t('Apr'), t('May'), ('Jun'), t('Jul'), t('Aug'), t('Sep'), t('Oct'), t('Nov'), t('Dec')],
                $ret);
        return $ret;
 }
@@ -1169,7 +1169,7 @@ function day_short_translate($s) {
  * @return string
  */
 function normalise_link($url) {
-       $ret = str_replace(array('https:', '//www.'), array('http:', '//'), $url);
+       $ret = str_replace(['https:', '//www.'], ['http:', '//'], $url);
        return rtrim($ret,'/');
 }
 
@@ -1235,8 +1235,8 @@ function put_item_in_cache(&$item, $update = false)
                $item["body"] = $body;
 
                if ($update && ($item["id"] > 0)) {
-                       dba::update('item', array('rendered-html' => $item["rendered-html"], 'rendered-hash' => $item["rendered-hash"]),
-                                       array('id' => $item["id"]), false);
+                       dba::update('item', ['rendered-html' => $item["rendered-html"], 'rendered-hash' => $item["rendered-hash"]],
+                                       ['id' => $item["id"]], false);
                }
        }
 }
@@ -1259,9 +1259,9 @@ function prepare_body(&$item, $attach = false, $preview = false) {
 
        $searchpath = System::baseUrl() . "/search?tag=";
 
-       $tags = array();
-       $hashtags = array();
-       $mentions = array();
+       $tags = [];
+       $hashtags = [];
+       $mentions = [];
 
        // In order to provide theme developers more possibilities, event items
        // are treated differently.
@@ -1313,14 +1313,14 @@ function prepare_body(&$item, $attach = false, $preview = false) {
        put_item_in_cache($item, $update);
        $s = $item["rendered-html"];
 
-       $prep_arr = array('item' => $item, 'html' => $s, 'preview' => $preview);
+       $prep_arr = ['item' => $item, 'html' => $s, 'preview' => $preview];
        call_hooks('prepare_body', $prep_arr);
        $s = $prep_arr['html'];
 
        if (! $attach) {
                // Replace the blockquotes with quotes that are used in mails.
                $mailquote = '<blockquote type="cite" class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">';
-               $s = str_replace(array('<blockquote>', '<blockquote class="spoiler">', '<blockquote class="author">'), array($mailquote, $mailquote, $mailquote), $s);
+               $s = str_replace(['<blockquote>', '<blockquote class="spoiler">', '<blockquote class="author">'], [$mailquote, $mailquote, $mailquote], $s);
                return $s;
        }
 
@@ -1345,23 +1345,23 @@ function prepare_body(&$item, $attach = false, $preview = false) {
                                        if (strpos($mime, 'video') !== false) {
                                                if (!$vhead) {
                                                        $vhead = true;
-                                                       $a->page['htmlhead'] .= replace_macros(get_markup_template('videos_head.tpl'), array(
+                                                       $a->page['htmlhead'] .= replace_macros(get_markup_template('videos_head.tpl'), [
                                                                '$baseurl' => System::baseUrl(),
-                                                       ));
-                                                       $a->page['end'] .= replace_macros(get_markup_template('videos_end.tpl'), array(
+                                                       ]);
+                                                       $a->page['end'] .= replace_macros(get_markup_template('videos_end.tpl'), [
                                                                '$baseurl' => System::baseUrl(),
-                                                       ));
+                                                       ]);
                                                }
 
                                                $id = end(explode('/', $the_url));
-                                               $as .= replace_macros(get_markup_template('video_top.tpl'), array(
-                                                       '$video' => array(
+                                               $as .= replace_macros(get_markup_template('video_top.tpl'), [
+                                                       '$video' => [
                                                                'id'     => $id,
                                                                'title'  => t('View Video'),
                                                                'src'    => $the_url,
                                                                'mime'   => $mime,
-                                                       ),
-                                               ));
+                                                       ],
+                                               ]);
                                        }
 
                                        $filetype = strtolower(substr($mime, 0, strpos($mime, '/')));
@@ -1431,7 +1431,7 @@ function prepare_body(&$item, $attach = false, $preview = false) {
                $s = preg_replace('|(<img[^>]+src="[^"]+/photo/[0-9a-f]+)-[0-9]|', "$1-" . $ps, $s);
        }
 
-       $prep_arr = array('item' => $item, 'html' => $s);
+       $prep_arr = ['item' => $item, 'html' => $s];
        call_hooks('prepare_body_final', $prep_arr);
 
        return $prep_arr['html'];
@@ -1485,21 +1485,21 @@ function prepare_text($text) {
  */
 function get_cats_and_terms($item)
 {
-       $categories = array();
-       $folders = array();
+       $categories = [];
+       $folders = [];
 
        $matches = false;
        $first = true;
        $cnt = preg_match_all('/<(.*?)>/', $item['file'], $matches, PREG_SET_ORDER);
        if ($cnt) {
                foreach ($matches as $mtch) {
-                       $categories[] = array(
+                       $categories[] = [
                                'name' => xmlify(file_tag_decode($mtch[1])),
                                'url' =>  "#",
                                'removeurl' => ((local_user() == $item['uid'])?'filerm/' . $item['id'] . '?f=&cat=' . xmlify(file_tag_decode($mtch[1])):""),
                                'first' => $first,
                                'last' => false
-                       );
+                       ];
                        $first = false;
                }
        }
@@ -1514,13 +1514,13 @@ function get_cats_and_terms($item)
                $cnt = preg_match_all('/\[(.*?)\]/', $item['file'], $matches, PREG_SET_ORDER);
                if ($cnt) {
                        foreach ($matches as $mtch) {
-                               $folders[] = array(
+                               $folders[] = [
                                        'name' => xmlify(file_tag_decode($mtch[1])),
                                        'url' =>  "#",
                                        'removeurl' => ((local_user() == $item['uid']) ? 'filerm/' . $item['id'] . '?f=&term=' . xmlify(file_tag_decode($mtch[1])) : ""),
                                        'first' => $first,
                                        'last' => false
-                               );
+                               ];
                                $first = false;
                        }
                }
@@ -1530,7 +1530,7 @@ function get_cats_and_terms($item)
                $folders[count($folders) - 1]['last'] = true;
        }
 
-       return array($categories, $folders);
+       return [$categories, $folders];
 }
 
 
@@ -1543,13 +1543,13 @@ function get_plink($item) {
        $a = get_app();
 
        if ($a->user['nickname'] != "") {
-               $ret = array(
+               $ret = [
                                //'href' => "display/" . $a->user['nickname'] . "/" . $item['id'],
                                'href' => "display/" . $item['guid'],
                                'orig' => "display/" . $item['guid'],
                                'title' => t('View on separate page'),
                                'orig_title' => t('view on separate page'),
-                       );
+                       ];
 
                if (x($item, 'plink')) {
                        $ret["href"] = $a->remove_baseurl($item['plink']);
@@ -1557,13 +1557,13 @@ function get_plink($item) {
                }
 
        } elseif (x($item, 'plink') && ($item['private'] != 1)) {
-               $ret = array(
+               $ret = [
                                'href' => $item['plink'],
                                'orig' => $item['plink'],
                                'title' => t('link to source'),
-                       );
+                       ];
        } else {
-               $ret = array();
+               $ret = [];
        }
 
        return $ret;
@@ -1780,11 +1780,11 @@ function item_post_type($item) {
 // To do this we need to escape these characters if they appear in our tag.
 
 function file_tag_encode($s) {
-       return str_replace(array('<','>','[',']'),array('%3c','%3e','%5b','%5d'),$s);
+       return str_replace(['<','>','[',']'],['%3c','%3e','%5b','%5d'],$s);
 }
 
 function file_tag_decode($s) {
-       return str_replace(array('%3c', '%3e', '%5b', '%5d'), array('<', '>', '[', ']'), $s);
+       return str_replace(['%3c', '%3e', '%5b', '%5d'], ['<', '>', '[', ']'], $s);
 }
 
 function file_tag_file_query($table,$s,$type = 'file') {
@@ -1866,7 +1866,7 @@ function file_tag_update_pconfig($uid, $file_old, $file_new, $type = 'file') {
                $filetags_updated = $saved;
 
                // check for new tags to be added as filetags in pconfig
-               $new_tags = array();
+               $new_tags = [];
                $check_new_tags = explode(",",file_tag_file_to_list($file_new,$type));
 
                foreach ($check_new_tags as $tag) {
@@ -1877,7 +1877,7 @@ function file_tag_update_pconfig($uid, $file_old, $file_new, $type = 'file') {
                $filetags_updated .= file_tag_list_to_file(implode(",",$new_tags),$type);
 
                // check for deleted tags to be removed from filetags in pconfig
-               $deleted_tags = array();
+               $deleted_tags = [];
                $check_deleted_tags = explode(",",file_tag_file_to_list($file_old,$type));
 
                foreach ($check_deleted_tags as $tag) {
@@ -1984,7 +1984,7 @@ function file_tag_unsave_file($uid, $item, $file, $cat = false)
 }
 
 function normalise_openid($s) {
-       return trim(str_replace(array('http://', 'https://'), array('', ''), $s), '/');
+       return trim(str_replace(['http://', 'https://'], ['', ''], $s), '/');
 }
 
 
@@ -2023,7 +2023,7 @@ function is_a_date_arg($s) {
 function deindent($text, $chr = "[\t ]", $count = NULL) {
        $lines = explode("\n", $text);
        if (is_null($count)) {
-               $m = array();
+               $m = [];
                $k = 0;
                while ($k < count($lines) && strlen($lines[$k]) == 0) {
                        $k++;
@@ -2039,7 +2039,7 @@ function deindent($text, $chr = "[\t ]", $count = NULL) {
 }
 
 function formatBytes($bytes, $precision = 2) {
-       $units = array('B', 'KB', 'MB', 'GB', 'TB');
+       $units = ['B', 'KB', 'MB', 'GB', 'TB'];
 
        $bytes = max($bytes, 0);
        $pow = floor(($bytes ? log($bytes) : 0) / log(1024));
@@ -2087,10 +2087,10 @@ function text_highlight($s, $lang) {
        // Autoload the library to make constants available
        class_exists('Text_Highlighter_Renderer_Html');
 
-       $options = array(
+       $options = [
                'numbers' => HL_NUMBERS_LI,
                'tabsize' => 4,
-       );
+       ];
 
        $tag_added = false;
        $s = trim(html_entity_decode($s, ENT_COMPAT));
index 494fbe1ce33a0ccdecd127e13d52a0efa50c4e0b..7c20018259e005a0ea4d2a10a6b359f74460e896 100644 (file)
@@ -54,7 +54,7 @@ function add_shadow_thread($itemid) {
        }
 
        // is it an entry from a connector? Only add an entry for natively connected networks
-       if (!in_array($item["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""))) {
+       if (!in_array($item["network"], [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""])) {
                return;
        }
 
@@ -106,7 +106,7 @@ function add_shadow_thread($itemid) {
                        $item[0]['wall'] = 0;
                        $item[0]['contact-id'] = Contact::getIdForURL($item[0]['author-link'], 0);
 
-                       if (in_array($item[0]['type'], array("net-comment", "wall-comment"))) {
+                       if (in_array($item[0]['type'], ["net-comment", "wall-comment"])) {
                                $item[0]['type'] = 'remote-comment';
                        } elseif ($item[0]['type'] == 'wall') {
                                $item[0]['type'] = 'remote';
@@ -165,7 +165,7 @@ function add_shadow_entry($itemid) {
        $item['wall'] = 0;
        $item['contact-id'] = Contact::getIdForURL($item['author-link'], 0);
 
-       if (in_array($item['type'], array("net-comment", "wall-comment"))) {
+       if (in_array($item['type'], ["net-comment", "wall-comment"])) {
                $item['type'] = 'remote-comment';
        } elseif ($item['type'] == 'wall') {
                $item['type'] = 'remote';
@@ -203,7 +203,7 @@ function update_thread($itemid, $setmention = false) {
        $sql = "";
 
        foreach ($item AS $field => $data)
-               if (!in_array($field, array("guid", "title", "body", "rendered-html", "rendered-hash"))) {
+               if (!in_array($field, ["guid", "title", "body", "rendered-html", "rendered-hash"])) {
                        if ($sql != "") {
                                $sql .= ", ";
                        }
@@ -261,7 +261,7 @@ function delete_thread($itemid, $itemuri = "") {
                                intval($item["uid"])
                        );
                if (!DBM::is_result($r)) {
-                       dba::delete('item', array('uri' => $itemuri, 'uid' => 0));
+                       dba::delete('item', ['uri' => $itemuri, 'uid' => 0]);
                        logger("delete_thread: Deleted shadow for item ".$itemuri, LOGGER_DEBUG);
                }
        }
@@ -270,7 +270,7 @@ function delete_thread($itemid, $itemuri = "") {
 function update_threads() {
        logger("update_threads: start");
 
-       $messages = dba::select('item', array('id'), array("`id` = `parent`"));
+       $messages = dba::select('item', ['id'], ["`id` = `parent`"]);
 
        logger("update_threads: fetched messages: ".dba::num_rows($messages));
 
@@ -301,8 +301,8 @@ function update_shadow_copy() {
        logger("start");
 
        $condition = "`uid` != 0 AND `network` IN ('', ?, ?, ?) AND `visible` AND NOT `deleted` AND NOT `moderated` AND NOT `private`";
-       $messages = dba::select('thread', array('iid'), array($condition, NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS),
-                               array('order' => 'created'));
+       $messages = dba::select('thread', ['iid'], [$condition, NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS],
+                               ['order' => 'created']);
 
        logger("fetched messages: ".dba::num_rows($messages));
        while ($message = dba::fetch($messages))
index 74a88eb7eb111ab56d50e02a08aadc1def8a8ad9..fd41cbe0dabd8f679bd24f05e8990817eaf90512 100644 (file)
--- a/index.php
+++ b/index.php
@@ -163,16 +163,16 @@ $a->page['end'] = '';
 
 
 if (! x($_SESSION, 'sysmsg')) {
-       $_SESSION['sysmsg'] = array();
+       $_SESSION['sysmsg'] = [];
 }
 
 if (! x($_SESSION, 'sysmsg_info')) {
-       $_SESSION['sysmsg_info'] = array();
+       $_SESSION['sysmsg_info'] = [];
 }
 
 // Array for informations about last received items
 if (! x($_SESSION, 'last_updated')) {
-       $_SESSION['last_updated'] = array();
+       $_SESSION['last_updated'] = [];
 }
 /*
  * check_config() is responsible for running update scripts. These automatically
@@ -197,7 +197,7 @@ nav_set_selected('nothing');
 //Don't populate apps_menu if apps are private
 $privateapps = Config::get('config', 'private_addons');
 if ((local_user()) || (! $privateapps === "1")) {
-       $arr = array('app_menu' => $a->apps);
+       $arr = ['app_menu' => $a->apps];
 
        call_hooks('app_menu', $arr);
 
@@ -294,8 +294,8 @@ if (strlen($a->module)) {
                $tpl = get_markup_template("404.tpl");
                $a->page['content'] = replace_macros(
                        $tpl,
-                       array(
-                       '$message' =>  t('Page not found.'))
+                       [
+                       '$message' =>  t('Page not found.')]
                );
        }
 }
@@ -362,14 +362,14 @@ if ($a->module_loaded) {
        }
 
        if (! $a->error) {
-               $arr = array('content' => $a->page['content']);
+               $arr = ['content' => $a->page['content']];
                call_hooks($a->module . '_mod_content', $arr);
                $a->page['content'] = $arr['content'];
                if ($a->module_class) {
-                       $arr = array('content' => call_user_func([$a->module_class, 'content']));
+                       $arr = ['content' => call_user_func([$a->module_class, 'content'])];
                } else if (function_exists($a->module . '_content')) {
                        $func = $a->module . '_content';
-                       $arr = array('content' => $func($a));
+                       $arr = ['content' => $func($a)];
                }
                call_hooks($a->module . '_mod_aftercontent', $arr);
                $a->page['content'] .= $arr['content'];
@@ -440,9 +440,9 @@ if ($a->is_mobile || $a->is_tablet) {
        }
        $a->page['footer'] = replace_macros(
                get_markup_template("toggle_mobile_footer.tpl"),
-               array(
+               [
                        '$toggle_link' => $link,
-                       '$toggle_text' => t('toggle mobile'))
+                       '$toggle_text' => t('toggle mobile')]
        );
 }
 
index 5d1c1f4311fe1a124d836cd17e45e1428bfee3e8..4b37c0b97f05fb162fd424a27c94d7144dcecba8 100644 (file)
@@ -39,7 +39,7 @@ function wk_social_relay()
                $scope = SR_SCOPE_NONE;
        }
 
-       $tags = array();
+       $tags = [];
 
        if ($scope == SR_SCOPE_TAGS) {
                $server_tags = Config::get('system', 'relay_server_tags');
@@ -59,16 +59,16 @@ function wk_social_relay()
                }
        }
 
-       $taglist = array();
+       $taglist = [];
        foreach ($tags AS $tag) {
                $taglist[] = $tag;
        }
 
-       $relay = array(
+       $relay = [
                "subscribe" => $subscribe,
                "scope" => $scope,
                "tags" => $taglist
-       );
+       ];
 
        header('Content-type: application/json; charset=utf-8');
        echo json_encode($relay, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
index 81ede51c03e6157417aaf4be39b125967d2e9af5..fc3fb5819aca5bd9576d64a63078eb19d0f044cf 100644 (file)
@@ -158,46 +158,46 @@ function admin_content(App $a)
        //      apc_delete($toDelete);
        //}
        // Header stuff
-       $a->page['htmlhead'] .= replace_macros(get_markup_template('admin/settings_head.tpl'), array());
+       $a->page['htmlhead'] .= replace_macros(get_markup_template('admin/settings_head.tpl'), []);
 
        /*
         * Side bar links
         */
-       $aside_tools = array();
+       $aside_tools = [];
        // array(url, name, extra css classes)
        // not part of $aside to make the template more adjustable
-       $aside_sub = array(
-               'site'         => array("admin/site/"        , t("Site")                 , "site"),
-               'users'        => array("admin/users/"       , t("Users")                , "users"),
-               'plugins'      => array("admin/plugins/"     , t("Plugins")              , "plugins"),
-               'themes'       => array("admin/themes/"      , t("Themes")               , "themes"),
-               'features'     => array("admin/features/"    , t("Additional features")  , "features"),
-               'dbsync'       => array("admin/dbsync/"      , t('DB updates')           , "dbsync"),
-               'queue'        => array("admin/queue/"       , t('Inspect Queue')        , "queue"),
-               'contactblock' => array("admin/contactblock/", t('Contact Blocklist')    , "contactblock"),
-               'blocklist'    => array("admin/blocklist/"   , t('Server Blocklist')     , "blocklist"),
-               'federation'   => array("admin/federation/"  , t('Federation Statistics'), "federation"),
-               'deleteitem'   => array("admin/deleteitem/"  , t('Delete Item')          , 'deleteitem'),
-       );
+       $aside_sub = [
+               'site'         => ["admin/site/"        , t("Site")                 , "site"],
+               'users'        => ["admin/users/"       , t("Users")                , "users"],
+               'plugins'      => ["admin/plugins/"     , t("Plugins")              , "plugins"],
+               'themes'       => ["admin/themes/"      , t("Themes")               , "themes"],
+               'features'     => ["admin/features/"    , t("Additional features")  , "features"],
+               'dbsync'       => ["admin/dbsync/"      , t('DB updates')           , "dbsync"],
+               'queue'        => ["admin/queue/"       , t('Inspect Queue')        , "queue"],
+               'contactblock' => ["admin/contactblock/", t('Contact Blocklist')    , "contactblock"],
+               'blocklist'    => ["admin/blocklist/"   , t('Server Blocklist')     , "blocklist"],
+               'federation'   => ["admin/federation/"  , t('Federation Statistics'), "federation"],
+               'deleteitem'   => ["admin/deleteitem/"  , t('Delete Item')          , 'deleteitem'],
+       ];
 
        /* get plugins admin page */
 
        $r = q("SELECT `name` FROM `addon` WHERE `plugin_admin` = 1 ORDER BY `name`");
-       $aside_tools['plugins_admin'] = array();
+       $aside_tools['plugins_admin'] = [];
        foreach ($r as $h) {
                $plugin = $h['name'];
-               $aside_tools['plugins_admin'][] = array("admin/plugins/" . $plugin, $plugin, "plugin");
+               $aside_tools['plugins_admin'][] = ["admin/plugins/" . $plugin, $plugin, "plugin"];
                // temp plugins with admin
                $a->plugins_admin[] = $plugin;
        }
 
-       $aside_tools['logs'] = array("admin/logs/", t("Logs"), "logs");
-       $aside_tools['viewlogs'] = array("admin/viewlogs/", t("View Logs"), 'viewlogs');
-       $aside_tools['diagnostics_probe'] = array('probe/', t('probe address'), 'probe');
-       $aside_tools['diagnostics_webfinger'] = array('webfinger/', t('check webfinger'), 'webfinger');
+       $aside_tools['logs'] = ["admin/logs/", t("Logs"), "logs"];
+       $aside_tools['viewlogs'] = ["admin/viewlogs/", t("View Logs"), 'viewlogs'];
+       $aside_tools['diagnostics_probe'] = ['probe/', t('probe address'), 'probe'];
+       $aside_tools['diagnostics_webfinger'] = ['webfinger/', t('check webfinger'), 'webfinger'];
 
        $t = get_markup_template('admin/aside.tpl');
-       $a->page['aside'] .= replace_macros($t, array(
+       $a->page['aside'] .= replace_macros($t, [
                '$admin' => $aside_tools,
                '$subpages' => $aside_sub,
                '$admtxt' => t('Admin'),
@@ -206,7 +206,7 @@ function admin_content(App $a)
                '$diagnosticstxt' => t('diagnostics'),
                '$h_pending' => t('User registrations waiting for confirmation'),
                '$admurl' => "admin/"
-       ));
+       ]);
 
        // Page content
        $o = '';
@@ -282,25 +282,25 @@ function admin_content(App $a)
 function admin_page_blocklist(App $a)
 {
        $blocklist = Config::get('system', 'blocklist');
-       $blocklistform = array();
+       $blocklistform = [];
        if (is_array($blocklist)) {
                foreach ($blocklist as $id => $b) {
-                       $blocklistform[] = array(
-                               'domain' => array("domain[$id]", t('Blocked domain'), $b['domain'], '', t('The blocked domain'), 'required', '', ''),
-                               'reason' => array("reason[$id]", t("Reason for the block"), $b['reason'], t('The reason why you blocked this domain.') . '(' . $b['domain'] . ')', 'required', '', ''),
-                               'delete' => array("delete[$id]", t("Delete domain") . ' (' . $b['domain'] . ')', False, t("Check to delete this entry from the blocklist"))
-                       );
+                       $blocklistform[] = [
+                               'domain' => ["domain[$id]", t('Blocked domain'), $b['domain'], '', t('The blocked domain'), 'required', '', ''],
+                               'reason' => ["reason[$id]", t("Reason for the block"), $b['reason'], t('The reason why you blocked this domain.') . '(' . $b['domain'] . ')', 'required', '', ''],
+                               'delete' => ["delete[$id]", t("Delete domain") . ' (' . $b['domain'] . ')', False, t("Check to delete this entry from the blocklist")]
+                       ];
                }
        }
        $t = get_markup_template('admin/blocklist.tpl');
-       return replace_macros($t, array(
+       return replace_macros($t, [
                '$title' => t('Administration'),
                '$page' => t('Server Blocklist'),
                '$intro' => t('This page can be used to define a black list of servers from the federated network that are not allowed to interact with your node. For all entered domains you should also give a reason why you have blocked the remote server.'),
                '$public' => t('The list of blocked servers will be made publically available on the /friendica page so that your users and people investigating communication problems can find the reason easily.'),
                '$addtitle' => t('Add new entry to block list'),
-               '$newdomain' => array('newentry_domain', t('Server Domain'), '', t('The domain of the new server to add to the block list. Do not include the protocol.'), 'required', '', ''),
-               '$newreason' => array('newentry_reason', t('Block reason'), '', t('The reason why you blocked this domain.'), 'required', '', ''),
+               '$newdomain' => ['newentry_domain', t('Server Domain'), '', t('The domain of the new server to add to the block list. Do not include the protocol.'), 'required', '', ''],
+               '$newreason' => ['newentry_reason', t('Block reason'), '', t('The reason why you blocked this domain.'), 'required', '', ''],
                '$submit' => t('Add Entry'),
                '$savechanges' => t('Save changes to the blocklist'),
                '$currenttitle' => t('Current Entries in the Blocklist'),
@@ -311,7 +311,7 @@ function admin_page_blocklist(App $a)
                '$baseurl' => System::baseUrl(true),
                '$confirm_delete' => t('Delete entry from blocklist?'),
                '$form_security_token' => get_form_security_token("admin_blocklist")
-       ));
+       ]);
 }
 
 /**
@@ -330,24 +330,24 @@ function admin_page_blocklist_post(App $a)
        if (x($_POST['page_blocklist_save'])) {
                //  Add new item to blocklist
                $blocklist = Config::get('system', 'blocklist');
-               $blocklist[] = array(
+               $blocklist[] = [
                        'domain' => notags(trim($_POST['newentry_domain'])),
                        'reason' => notags(trim($_POST['newentry_reason']))
-               );
+               ];
                Config::set('system', 'blocklist', $blocklist);
                info(t('Server added to blocklist.') . EOL);
        } else {
                // Edit the entries from blocklist
-               $blocklist = array();
+               $blocklist = [];
                foreach ($_POST['domain'] as $id => $domain) {
                        // Trimming whitespaces as well as any lingering slashes
                        $domain = notags(trim($domain, "\x00..\x1F/"));
                        $reason = notags(trim($_POST['reason'][$id]));
                        if (!x($_POST['delete'][$id])) {
-                               $blocklist[] = array(
+                               $blocklist[] = [
                                        'domain' => $domain,
                                        'reason' => $reason
-                               );
+                               ];
                        }
                }
                Config::set('system', 'blocklist', $blocklist);
@@ -409,7 +409,7 @@ function admin_page_contactblock(App $a)
        $contacts = dba::inArray($statement);
 
        $t = get_markup_template('admin/contactblock.tpl');
-       $o = replace_macros($t, array(
+       $o = replace_macros($t, [
                // strings //
                '$title'       => t('Administration'),
                '$page'        => t('Remote Contact Blocklist'),
@@ -434,7 +434,7 @@ function admin_page_contactblock(App $a)
                '$total_contacts' => tt('%s total blocked contact', '%s total blocked contacts', $total),
                '$paginate'   => paginate($a),
                '$contacturl' => ['contact_url', t("Profile URL"), '', t("URL of the remote contact to block.")],
-       ));
+       ]);
        return $o;
 }
 
@@ -452,16 +452,16 @@ function admin_page_deleteitem(App $a)
 {
        $t = get_markup_template('admin/deleteitem.tpl');
 
-       return replace_macros($t, array(
+       return replace_macros($t, [
                '$title' => t('Administration'),
                '$page' => t('Delete Item'),
                '$submit' => t('Delete this Item'),
                '$intro1' => t('On this page you can delete an item from your node. If the item is a top level posting, the entire thread will be deleted.'),
                '$intro2' => t('You need to know the GUID of the item. You can find it e.g. by looking at the display URL. The last part of http://example.com/display/123456 is the GUID, here 123456.'),
-               '$deleteitemguid' => array('deleteitemguid', t("GUID"), '', t("The GUID of the item you want to delete."), 'required', 'autofocus'),
+               '$deleteitemguid' => ['deleteitemguid', t("GUID"), '', t("The GUID of the item you want to delete."), 'required', 'autofocus'],
                '$baseurl' => System::baseUrl(),
                '$form_security_token' => get_form_security_token("admin_deleteitem")
-       ));
+       ]);
 }
 
 /**
@@ -490,7 +490,7 @@ function admin_page_deleteitem_post(App $a)
                // Now that we have the GUID get all IDs of the associated entries in the
                // item table of the DB and drop those items, which will also delete the
                // associated threads.
-               $r = dba::select('item', array('id'), array('guid' => $guid));
+               $r = dba::select('item', ['id'], ['guid' => $guid]);
                while ($row = dba::fetch($r)) {
                        drop_item($row['id'], false);
                }
@@ -526,8 +526,8 @@ function admin_page_federation(App $a)
        // off one % two of them are needed in the query
        // Add more platforms if you like, when one returns 0 known nodes it is not
        // displayed on the stats page.
-       $platforms = array('Friendi%%a', 'Diaspora', '%%red%%', 'Hubzilla', 'BlaBlaNet', 'GNU Social', 'StatusNet', 'Mastodon', 'Pleroma', 'socialhome');
-       $colors = array(
+       $platforms = ['Friendi%%a', 'Diaspora', '%%red%%', 'Hubzilla', 'BlaBlaNet', 'GNU Social', 'StatusNet', 'Mastodon', 'Pleroma', 'socialhome'];
+       $colors = [
                'Friendi%%a' => '#ffc018', // orange from the logo
                'Diaspora'   => '#a1a1a1', // logo is black and white, makes a gray
                '%%red%%'    => '#c50001', // fire red from the logo
@@ -538,8 +538,8 @@ function admin_page_federation(App $a)
                'Mastodon'   => '#1a9df9', // blue from the Mastodon logo
                'Pleroma'    => '#E46F0F', // Orange from the text that is used on Pleroma instances
                'socialhome' => '#52056b'  // lilac from the Django Image used at the Socialhome homepage
-       );
-       $counts = array();
+       ];
+       $counts = [];
        $total = 0;
        $users = 0;
 
@@ -567,15 +567,15 @@ function admin_page_federation(App $a)
                // to the version string for the displayed list.
                foreach ($v as $key => $value) {
                        if ($v[$key]['version'] == '') {
-                               $v[$key] = array('total' => $v[$key]['total'], 'version' => t('unknown'));
+                               $v[$key] = ['total' => $v[$key]['total'], 'version' => t('unknown')];
                        }
                }
                // in the DB the Diaspora versions have the format x.x.x.x-xx the last
                // part (-xx) should be removed to clean up the versions from the "head
                // commit" information and combined into a single entry for x.x.x.x
                if ($p == 'Diaspora') {
-                       $newV = array();
-                       $newVv = array();
+                       $newV = [];
+                       $newVv = [];
                        foreach ($v as $vv) {
                                $newVC = $vv['total'];
                                $newVV = $vv['version'];
@@ -590,7 +590,7 @@ function admin_page_federation(App $a)
                                }
                        }
                        foreach ($newV as $key => $value) {
-                               array_push($newVv, array('total' => $value, 'version' => $key));
+                               array_push($newVv, ['total' => $value, 'version' => $key]);
                        }
                        $v = $newVv;
                }
@@ -599,8 +599,8 @@ function admin_page_federation(App $a)
                // DB version stamp; those should be operated out and versions be
                // conbined
                if ($p == 'Friendi%%a') {
-                       $newV = array();
-                       $newVv = array();
+                       $newV = [];
+                       $newVv = [];
                        foreach ($v as $vv) {
                                $newVC = $vv['total'];
                                $newVV = $vv['version'];
@@ -616,7 +616,7 @@ function admin_page_federation(App $a)
                                }
                        }
                        foreach ($newV as $key => $value) {
-                               array_push($newVv, array('total' => $value, 'version' => $key));
+                               array_push($newVv, ['total' => $value, 'version' => $key]);
                        }
                        $v = $newVv;
                }
@@ -626,7 +626,7 @@ function admin_page_federation(App $a)
 
                // the 3rd array item is needed for the JavaScript graphs as JS does
                // not like some characters in the names of variables...
-               $counts[$p] = array($c[0], $v, str_replace(array(' ', '%'), '', $p), $colors[$p]);
+               $counts[$p] = [$c[0], $v, str_replace([' ', '%'], '', $p), $colors[$p]];
        }
 
        // some helpful text
@@ -635,7 +635,7 @@ function admin_page_federation(App $a)
 
        // load the template, replace the macros and return the page content
        $t = get_markup_template('admin/federation.tpl');
-       return replace_macros($t, array(
+       return replace_macros($t, [
                '$title' => t('Administration'),
                '$page' => t('Federation Statistics'),
                '$intro' => $intro,
@@ -645,7 +645,7 @@ function admin_page_federation(App $a)
                '$version' => FRIENDICA_VERSION,
                '$legendtext' => t('Currently this node is aware of %d nodes with %d registered users from the following platforms:', $total, $users),
                '$baseurl' => System::baseUrl(),
-       ));
+       ]);
 }
 
 /**
@@ -670,7 +670,7 @@ function admin_page_queue(App $a)
                        ORDER BY `q`.`cid`, `q`.`created`;");
 
        $t = get_markup_template('admin/queue.tpl');
-       return replace_macros($t, array(
+       return replace_macros($t, [
                '$title' => t('Administration'),
                '$page' => t('Inspect Queue'),
                '$count' => count($r),
@@ -682,7 +682,7 @@ function admin_page_queue(App $a)
                '$last_header' => t('Last Tried'),
                '$info' => t('This page lists the content of the queue for outgoing postings. These are postings the initial delivery failed for. They will be resend later and eventually deleted if the delivery fails permanently.'),
                '$entries' => $r,
-       ));
+       ]);
 }
 
 /**
@@ -701,7 +701,7 @@ function admin_page_summary(App $a)
        // are there MyISAM tables in the DB? If so, trigger a warning message
        $r = q("SELECT `engine` FROM `information_schema`.`tables` WHERE `engine` = 'myisam' AND `table_schema` = '%s' LIMIT 1", dbesc(dba::database_name()));
        $showwarning = false;
-       $warningtext = array();
+       $warningtext = [];
        if (DBM::is_result($r)) {
                $showwarning = true;
                $warningtext[] = t('Your DB still runs with MyISAM tables. You should change the engine type to InnoDB. As Friendica will use InnoDB only features in the future, you should change this! See <a href="%s">here</a> for a guide that may be helpful converting the table engines. You may also use the command <tt>php scripts/dbstructure.php toinnodb</tt> of your Friendica installation for an automatic conversion.<br />', 'https://dev.mysql.com/doc/refman/5.7/en/converting-tables-to-innodb.html');
@@ -734,14 +734,14 @@ function admin_page_summary(App $a)
        }
 
        $r = q("SELECT `page-flags`, COUNT(`uid`) AS `count` FROM `user` GROUP BY `page-flags`");
-       $accounts = array(
-               array(t('Normal Account'), 0),
-               array(t('Automatic Follower Account'), 0),
-               array(t('Public Forum Account'), 0),
-               array(t('Automatic Friend Account'), 0),
-               array(t('Blog Account'), 0),
-               array(t('Private Forum Account'), 0)
-       );
+       $accounts = [
+               [t('Normal Account'), 0],
+               [t('Automatic Follower Account'), 0],
+               [t('Public Forum Account'), 0],
+               [t('Automatic Friend Account'), 0],
+               [t('Blog Account'), 0],
+               [t('Private Forum Account'), 0]
+       ];
 
        $users = 0;
        foreach ($r as $u) {
@@ -762,26 +762,26 @@ function admin_page_summary(App $a)
 
        // We can do better, but this is a quick queue status
 
-       $queues = array('label' => t('Message queues'), 'queue' => $queue, 'workerq' => $workerqueue);
+       $queues = ['label' => t('Message queues'), 'queue' => $queue, 'workerq' => $workerqueue];
 
 
        $t = get_markup_template('admin/summary.tpl');
-       return replace_macros($t, array(
+       return replace_macros($t, [
                '$title' => t('Administration'),
                '$page' => t('Summary'),
                '$queues' => $queues,
-               '$users' => array(t('Registered users'), $users),
+               '$users' => [t('Registered users'), $users],
                '$accounts' => $accounts,
-               '$pending' => array(t('Pending registrations'), $pending),
-               '$version' => array(t('Version'), FRIENDICA_VERSION),
+               '$pending' => [t('Pending registrations'), $pending],
+               '$version' => [t('Version'), FRIENDICA_VERSION],
                '$baseurl' => System::baseUrl(),
                '$platform' => FRIENDICA_PLATFORM,
                '$codename' => FRIENDICA_CODENAME,
                '$build' => Config::get('system', 'build'),
-               '$plugins' => array(t('Active plugins'), $a->plugins),
+               '$plugins' => [t('Active plugins'), $a->plugins],
                '$showwarning' => $showwarning,
                '$warningtext' => $warningtext
-       ));
+       ]);
 }
 
 /**
@@ -831,7 +831,7 @@ function admin_page_site_post(App $a)
                        $dbold = dbesc($old_url);
                        $dbnew = dbesc($new_url);
 
-                       $upd = array();
+                       $upd = [];
                        foreach ($fields as $f) {
                                $upd[] = "`$f` = REPLACE(`$f`, '$dbold', '$dbnew')";
                        }
@@ -846,15 +846,15 @@ function admin_page_site_post(App $a)
                }
                // update tables
                // update profile links in the format "http://server.tld"
-               update_table("profile", array('photo', 'thumb'), $old_url, $new_url);
-               update_table("term", array('url'), $old_url, $new_url);
-               update_table("contact", array('photo', 'thumb', 'micro', 'url', 'nurl', 'alias', 'request', 'notify', 'poll', 'confirm', 'poco', 'avatar'), $old_url, $new_url);
-               update_table("gcontact", array('url', 'nurl', 'photo', 'server_url', 'notify', 'alias'), $old_url, $new_url);
-               update_table("item", array('owner-link', 'owner-avatar', 'author-link', 'author-avatar', 'body', 'plink', 'tag'), $old_url, $new_url);
+               update_table("profile", ['photo', 'thumb'], $old_url, $new_url);
+               update_table("term", ['url'], $old_url, $new_url);
+               update_table("contact", ['photo', 'thumb', 'micro', 'url', 'nurl', 'alias', 'request', 'notify', 'poll', 'confirm', 'poco', 'avatar'], $old_url, $new_url);
+               update_table("gcontact", ['url', 'nurl', 'photo', 'server_url', 'notify', 'alias'], $old_url, $new_url);
+               update_table("item", ['owner-link', 'owner-avatar', 'author-link', 'author-avatar', 'body', 'plink', 'tag'], $old_url, $new_url);
 
                // update profile addresses in the format "user@server.tld"
-               update_table("contact", array('addr'), $old_host, $new_host);
-               update_table("gcontact", array('connect', 'addr'), $old_host, $new_host);
+               update_table("contact", ['addr'], $old_host, $new_host);
+               update_table("gcontact", ['connect', 'addr'], $old_host, $new_host);
 
                // update config
                $a->set_baseurl($new_url);
@@ -1135,8 +1135,8 @@ function admin_page_site(App $a)
        }
 
        /* Installed themes */
-       $theme_choices = array();
-       $theme_choices_mobile = array();
+       $theme_choices = [];
+       $theme_choices_mobile = [];
        $theme_choices_mobile["---"] = t("No special theme for mobile devices");
        $files = glob('view/theme/*');
        if (is_array($files)) {
@@ -1165,29 +1165,29 @@ function admin_page_site(App $a)
        }
 
        /* Community page style */
-       $community_page_style_choices = array(
+       $community_page_style_choices = [
                CP_NO_COMMUNITY_PAGE => t("No community page"),
                CP_USERS_ON_SERVER => t("Public postings from users of this site"),
                CP_GLOBAL_COMMUNITY => t("Public postings from the federated network"),
                CP_USERS_AND_GLOBAL => t("Public postings from local users and the federated network")
-       );
+       ];
 
-       $poco_discovery_choices = array(
+       $poco_discovery_choices = [
                "0" => t("Disabled"),
                "1" => t("Users"),
                "2" => t("Users, Global Contacts"),
                "3" => t("Users, Global Contacts/fallback"),
-       );
+       ];
 
-       $poco_discovery_since_choices = array(
+       $poco_discovery_since_choices = [
                "30" => t("One month"),
                "91" => t("Three months"),
                "182" => t("Half a year"),
                "365" => t("One year"),
-       );
+       ];
 
        /* get user names to make the install a personal install of X */
-       $user_names = array();
+       $user_names = [];
        $user_names['---'] = t('Multi user instance');
        $users = q("SELECT `username`, `nickname` FROM `user`");
        foreach ($users as $user) {
@@ -1210,23 +1210,23 @@ function admin_page_site(App $a)
        //echo "<pre>"; var_dump($lang_choices); die("</pre>");
 
        /* Register policy */
-       $register_choices = array(
+       $register_choices = [
                REGISTER_CLOSED => t("Closed"),
                REGISTER_APPROVE => t("Requires approval"),
                REGISTER_OPEN => t("Open")
-       );
+       ];
 
-       $ssl_choices = array(
+       $ssl_choices = [
                SSL_POLICY_NONE => t("No SSL policy, links will track page SSL state"),
                SSL_POLICY_FULL => t("Force all links to use SSL"),
                SSL_POLICY_SELFSIGN => t("Self-signed certificate, use SSL for local links only (discouraged)")
-       );
+       ];
 
-       $check_git_version_choices = array(
+       $check_git_version_choices = [
                "none" => t("Don't check"),
                "master" => t("check the stable version"),
                "develop" => t("check the development version")
-       );
+       ];
 
        if ($a->config['hostname'] == "") {
                $a->config['hostname'] = $a->get_hostname();
@@ -1244,7 +1244,7 @@ function admin_page_site(App $a)
        }
 
        $t = get_markup_template('admin/site.tpl');
-       return replace_macros($t, array(
+       return replace_macros($t, [
                '$title' => t('Administration'),
                '$page' => t('Site'),
                '$submit' => t('Save Settings'),
@@ -1259,91 +1259,91 @@ function admin_page_site(App $a)
                '$relocate' => t('Relocate - WARNING: advanced function. Could make this server unreachable.'),
                '$baseurl' => System::baseUrl(true),
                // name, label, value, help string, extra data...
-               '$sitename'             => array('sitename', t("Site name"), $a->config['sitename'],''),
-               '$hostname'             => array('hostname', t("Host name"), $a->config['hostname'], ""),
-               '$sender_email'         => array('sender_email', t("Sender Email"), $a->config['sender_email'], t("The email address your server shall use to send notification emails from."), "", "", "email"),
-               '$banner'               => array('banner', t("Banner/Logo"), $banner, ""),
-               '$shortcut_icon'        => array('shortcut_icon', t("Shortcut icon"), Config::get('system','shortcut_icon'),  t("Link to an icon that will be used for browsers.")),
-               '$touch_icon'           => array('touch_icon', t("Touch icon"), Config::get('system','touch_icon'),  t("Link to an icon that will be used for tablets and mobiles.")),
-               '$info'                 => array('info', t('Additional Info'), $info, t('For public servers: you can add additional information here that will be listed at %s/servers.', get_server())),
-               '$language'             => array('language', t("System language"), Config::get('system','language'), "", $lang_choices),
-               '$theme'                => array('theme', t("System theme"), Config::get('system','theme'), t("Default system theme - may be over-ridden by user profiles - <a href='#' id='cnftheme'>change theme settings</a>"), $theme_choices),
-               '$theme_mobile'         => array('theme_mobile', t("Mobile system theme"), Config::get('system', 'mobile-theme', '---'), t("Theme for mobile devices"), $theme_choices_mobile),
-               '$ssl_policy'           => array('ssl_policy', t("SSL link policy"), (string) intval(Config::get('system','ssl_policy')), t("Determines whether generated links should be forced to use SSL"), $ssl_choices),
-               '$force_ssl'            => array('force_ssl', t("Force SSL"), Config::get('system','force_ssl'), t("Force all Non-SSL requests to SSL - Attention: on some systems it could lead to endless loops.")),
-               '$hide_help'            => array('hide_help', t("Hide help entry from navigation menu"), Config::get('system','hide_help'), t("Hides the menu entry for the Help pages from the navigation menu. You can still access it calling /help directly.")),
-               '$singleuser'           => array('singleuser', t("Single user instance"), Config::get('system', 'singleuser', '---'), t("Make this instance multi-user or single-user for the named user"), $user_names),
-               '$maximagesize'         => array('maximagesize', t("Maximum image size"), Config::get('system','maximagesize'), t("Maximum size in bytes of uploaded images. Default is 0, which means no limits.")),
-               '$maximagelength'       => array('maximagelength', t("Maximum image length"), Config::get('system','max_image_length'), t("Maximum length in pixels of the longest side of uploaded images. Default is -1, which means no limits.")),
-               '$jpegimagequality'     => array('jpegimagequality', t("JPEG image quality"), Config::get('system','jpeg_quality'), t("Uploaded JPEGS will be saved at this quality setting [0-100]. Default is 100, which is full quality.")),
-
-               '$register_policy'      => array('register_policy', t("Register policy"), $a->config['register_policy'], "", $register_choices),
-               '$daily_registrations'  => array('max_daily_registrations', t("Maximum Daily Registrations"), Config::get('system', 'max_daily_registrations'), t("If registration is permitted above, this sets the maximum number of new user registrations to accept per day.  If register is set to closed, this setting has no effect.")),
-               '$register_text'        => array('register_text', t("Register text"), $a->config['register_text'], t("Will be displayed prominently on the registration page.")),
-               '$abandon_days'         => array('abandon_days', t('Accounts abandoned after x days'), Config::get('system','account_abandon_days'), t('Will not waste system resources polling external sites for abandonded accounts. Enter 0 for no time limit.')),
-               '$allowed_sites'        => array('allowed_sites', t("Allowed friend domains"), Config::get('system','allowed_sites'), t("Comma separated list of domains which are allowed to establish friendships with this site. Wildcards are accepted. Empty to allow any domains")),
-               '$allowed_email'        => array('allowed_email', t("Allowed email domains"), Config::get('system','allowed_email'), t("Comma separated list of domains which are allowed in email addresses for registrations to this site. Wildcards are accepted. Empty to allow any domains")),
-               '$no_oembed_rich_content' => array('no_oembed_rich_content', t("No OEmbed rich content"), Config::get('system','no_oembed_rich_content'), t("Don't show the rich content (e.g. embedded PDF), except from the domains listed below.")),
-               '$allowed_oembed'       => array('allowed_oembed', t("Allowed OEmbed domains"), Config::get('system','allowed_oembed'), t("Comma separated list of domains which oembed content is allowed to be displayed. Wildcards are accepted.")),
-               '$block_public'         => array('block_public', t("Block public"), Config::get('system','block_public'), t("Check to block public access to all otherwise public personal pages on this site unless you are currently logged in.")),
-               '$force_publish'        => array('publish_all', t("Force publish"), Config::get('system','publish_all'), t("Check to force all profiles on this site to be listed in the site directory.")),
-               '$global_directory'     => array('directory', t("Global directory URL"), Config::get('system','directory'), t("URL to the global directory. If this is not set, the global directory is completely unavailable to the application.")),
-               '$newuser_private'      => array('newuser_private', t("Private posts by default for new users"), Config::get('system','newuser_private'), t("Set default post permissions for all new members to the default privacy group rather than public.")),
-               '$enotify_no_content'   => array('enotify_no_content', t("Don't include post content in email notifications"), Config::get('system','enotify_no_content'), t("Don't include the content of a post/comment/private message/etc. in the email notifications that are sent out from this site, as a privacy measure.")),
-               '$private_addons'       => array('private_addons', t("Disallow public access to addons listed in the apps menu."), Config::get('config','private_addons'), t("Checking this box will restrict addons listed in the apps menu to members only.")),
-               '$disable_embedded'     => array('disable_embedded', t("Don't embed private images in posts"), Config::get('system','disable_embedded'), t("Don't replace locally-hosted private photos in posts with an embedded copy of the image. This means that contacts who receive posts containing private photos will have to authenticate and load each image, which may take a while.")),
-               '$allow_users_remote_self' => array('allow_users_remote_self', t('Allow Users to set remote_self'), Config::get('system','allow_users_remote_self'), t('With checking this, every user is allowed to mark every contact as a remote_self in the repair contact dialog. Setting this flag on a contact causes mirroring every posting of that contact in the users stream.')),
-               '$no_multi_reg'         => array('no_multi_reg', t("Block multiple registrations"),  Config::get('system','block_extended_register'), t("Disallow users to register additional accounts for use as pages.")),
-               '$no_openid'            => array('no_openid', t("OpenID support"), !Config::get('system','no_openid'), t("OpenID support for registration and logins.")),
-               '$no_regfullname'       => array('no_regfullname', t("Fullname check"), !Config::get('system','no_regfullname'), t("Force users to register with a space between firstname and lastname in Full name, as an antispam measure")),
-               '$community_page_style' => array('community_page_style', t("Community pages for visitors"), Config::get('system','community_page_style'), t("Which community pages should be available for visitors. Local users always see both pages."), $community_page_style_choices),
-               '$max_author_posts_community_page' => array('max_author_posts_community_page', t("Posts per user on community page"), Config::get('system','max_author_posts_community_page'), t("The maximum number of posts per user on the community page. (Not valid for 'Global Community')")),
-               '$ostatus_disabled'     => array('ostatus_disabled', t("Enable OStatus support"), !Config::get('system','ostatus_disabled'), t("Provide built-in OStatus \x28StatusNet, GNU Social etc.\x29 compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed.")),
-               '$ostatus_full_threads' => array('ostatus_full_threads', t("Only import OStatus threads from our contacts"), Config::get('system','ostatus_full_threads'), t("Normally we import every content from our OStatus contacts. With this option we only store threads that are started by a contact that is known on our system.")),
+               '$sitename'             => ['sitename', t("Site name"), $a->config['sitename'],''],
+               '$hostname'             => ['hostname', t("Host name"), $a->config['hostname'], ""],
+               '$sender_email'         => ['sender_email', t("Sender Email"), $a->config['sender_email'], t("The email address your server shall use to send notification emails from."), "", "", "email"],
+               '$banner'               => ['banner', t("Banner/Logo"), $banner, ""],
+               '$shortcut_icon'        => ['shortcut_icon', t("Shortcut icon"), Config::get('system','shortcut_icon'),  t("Link to an icon that will be used for browsers.")],
+               '$touch_icon'           => ['touch_icon', t("Touch icon"), Config::get('system','touch_icon'),  t("Link to an icon that will be used for tablets and mobiles.")],
+               '$info'                 => ['info', t('Additional Info'), $info, t('For public servers: you can add additional information here that will be listed at %s/servers.', get_server())],
+               '$language'             => ['language', t("System language"), Config::get('system','language'), "", $lang_choices],
+               '$theme'                => ['theme', t("System theme"), Config::get('system','theme'), t("Default system theme - may be over-ridden by user profiles - <a href='#' id='cnftheme'>change theme settings</a>"), $theme_choices],
+               '$theme_mobile'         => ['theme_mobile', t("Mobile system theme"), Config::get('system', 'mobile-theme', '---'), t("Theme for mobile devices"), $theme_choices_mobile],
+               '$ssl_policy'           => ['ssl_policy', t("SSL link policy"), (string) intval(Config::get('system','ssl_policy')), t("Determines whether generated links should be forced to use SSL"), $ssl_choices],
+               '$force_ssl'            => ['force_ssl', t("Force SSL"), Config::get('system','force_ssl'), t("Force all Non-SSL requests to SSL - Attention: on some systems it could lead to endless loops.")],
+               '$hide_help'            => ['hide_help', t("Hide help entry from navigation menu"), Config::get('system','hide_help'), t("Hides the menu entry for the Help pages from the navigation menu. You can still access it calling /help directly.")],
+               '$singleuser'           => ['singleuser', t("Single user instance"), Config::get('system', 'singleuser', '---'), t("Make this instance multi-user or single-user for the named user"), $user_names],
+               '$maximagesize'         => ['maximagesize', t("Maximum image size"), Config::get('system','maximagesize'), t("Maximum size in bytes of uploaded images. Default is 0, which means no limits.")],
+               '$maximagelength'       => ['maximagelength', t("Maximum image length"), Config::get('system','max_image_length'), t("Maximum length in pixels of the longest side of uploaded images. Default is -1, which means no limits.")],
+               '$jpegimagequality'     => ['jpegimagequality', t("JPEG image quality"), Config::get('system','jpeg_quality'), t("Uploaded JPEGS will be saved at this quality setting [0-100]. Default is 100, which is full quality.")],
+
+               '$register_policy'      => ['register_policy', t("Register policy"), $a->config['register_policy'], "", $register_choices],
+               '$daily_registrations'  => ['max_daily_registrations', t("Maximum Daily Registrations"), Config::get('system', 'max_daily_registrations'), t("If registration is permitted above, this sets the maximum number of new user registrations to accept per day.  If register is set to closed, this setting has no effect.")],
+               '$register_text'        => ['register_text', t("Register text"), $a->config['register_text'], t("Will be displayed prominently on the registration page.")],
+               '$abandon_days'         => ['abandon_days', t('Accounts abandoned after x days'), Config::get('system','account_abandon_days'), t('Will not waste system resources polling external sites for abandonded accounts. Enter 0 for no time limit.')],
+               '$allowed_sites'        => ['allowed_sites', t("Allowed friend domains"), Config::get('system','allowed_sites'), t("Comma separated list of domains which are allowed to establish friendships with this site. Wildcards are accepted. Empty to allow any domains")],
+               '$allowed_email'        => ['allowed_email', t("Allowed email domains"), Config::get('system','allowed_email'), t("Comma separated list of domains which are allowed in email addresses for registrations to this site. Wildcards are accepted. Empty to allow any domains")],
+               '$no_oembed_rich_content' => ['no_oembed_rich_content', t("No OEmbed rich content"), Config::get('system','no_oembed_rich_content'), t("Don't show the rich content (e.g. embedded PDF), except from the domains listed below.")],
+               '$allowed_oembed'       => ['allowed_oembed', t("Allowed OEmbed domains"), Config::get('system','allowed_oembed'), t("Comma separated list of domains which oembed content is allowed to be displayed. Wildcards are accepted.")],
+               '$block_public'         => ['block_public', t("Block public"), Config::get('system','block_public'), t("Check to block public access to all otherwise public personal pages on this site unless you are currently logged in.")],
+               '$force_publish'        => ['publish_all', t("Force publish"), Config::get('system','publish_all'), t("Check to force all profiles on this site to be listed in the site directory.")],
+               '$global_directory'     => ['directory', t("Global directory URL"), Config::get('system','directory'), t("URL to the global directory. If this is not set, the global directory is completely unavailable to the application.")],
+               '$newuser_private'      => ['newuser_private', t("Private posts by default for new users"), Config::get('system','newuser_private'), t("Set default post permissions for all new members to the default privacy group rather than public.")],
+               '$enotify_no_content'   => ['enotify_no_content', t("Don't include post content in email notifications"), Config::get('system','enotify_no_content'), t("Don't include the content of a post/comment/private message/etc. in the email notifications that are sent out from this site, as a privacy measure.")],
+               '$private_addons'       => ['private_addons', t("Disallow public access to addons listed in the apps menu."), Config::get('config','private_addons'), t("Checking this box will restrict addons listed in the apps menu to members only.")],
+               '$disable_embedded'     => ['disable_embedded', t("Don't embed private images in posts"), Config::get('system','disable_embedded'), t("Don't replace locally-hosted private photos in posts with an embedded copy of the image. This means that contacts who receive posts containing private photos will have to authenticate and load each image, which may take a while.")],
+               '$allow_users_remote_self' => ['allow_users_remote_self', t('Allow Users to set remote_self'), Config::get('system','allow_users_remote_self'), t('With checking this, every user is allowed to mark every contact as a remote_self in the repair contact dialog. Setting this flag on a contact causes mirroring every posting of that contact in the users stream.')],
+               '$no_multi_reg'         => ['no_multi_reg', t("Block multiple registrations"),  Config::get('system','block_extended_register'), t("Disallow users to register additional accounts for use as pages.")],
+               '$no_openid'            => ['no_openid', t("OpenID support"), !Config::get('system','no_openid'), t("OpenID support for registration and logins.")],
+               '$no_regfullname'       => ['no_regfullname', t("Fullname check"), !Config::get('system','no_regfullname'), t("Force users to register with a space between firstname and lastname in Full name, as an antispam measure")],
+               '$community_page_style' => ['community_page_style', t("Community pages for visitors"), Config::get('system','community_page_style'), t("Which community pages should be available for visitors. Local users always see both pages."), $community_page_style_choices],
+               '$max_author_posts_community_page' => ['max_author_posts_community_page', t("Posts per user on community page"), Config::get('system','max_author_posts_community_page'), t("The maximum number of posts per user on the community page. (Not valid for 'Global Community')")],
+               '$ostatus_disabled'     => ['ostatus_disabled', t("Enable OStatus support"), !Config::get('system','ostatus_disabled'), t("Provide built-in OStatus \x28StatusNet, GNU Social etc.\x29 compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed.")],
+               '$ostatus_full_threads' => ['ostatus_full_threads', t("Only import OStatus threads from our contacts"), Config::get('system','ostatus_full_threads'), t("Normally we import every content from our OStatus contacts. With this option we only store threads that are started by a contact that is known on our system.")],
                '$ostatus_not_able'     => t("OStatus support can only be enabled if threading is enabled."),
                '$diaspora_able'        => $diaspora_able,
                '$diaspora_not_able'    => t("Diaspora support can't be enabled because Friendica was installed into a sub directory."),
-               '$diaspora_enabled'     => array('diaspora_enabled', t("Enable Diaspora support"), Config::get('system','diaspora_enabled'), t("Provide built-in Diaspora network compatibility.")),
-               '$dfrn_only'            => array('dfrn_only', t('Only allow Friendica contacts'), Config::get('system','dfrn_only'), t("All contacts must use Friendica protocols. All other built-in communication protocols disabled.")),
-               '$verifyssl'            => array('verifyssl', t("Verify SSL"), Config::get('system','verifyssl'), t("If you wish, you can turn on strict certificate checking. This will mean you cannot connect (at all) to self-signed SSL sites.")),
-               '$proxyuser'            => array('proxyuser', t("Proxy user"), Config::get('system','proxyuser'), ""),
-               '$proxy'                => array('proxy', t("Proxy URL"), Config::get('system','proxy'), ""),
-               '$timeout'              => array('timeout', t("Network timeout"), (x(Config::get('system','curl_timeout'))?Config::get('system','curl_timeout'):60), t("Value is in seconds. Set to 0 for unlimited (not recommended).")),
-               '$maxloadavg'           => array('maxloadavg', t("Maximum Load Average"), ((intval(Config::get('system','maxloadavg')) > 0)?Config::get('system','maxloadavg'):50), t("Maximum system load before delivery and poll processes are deferred - default 50.")),
-               '$maxloadavg_frontend'  => array('maxloadavg_frontend', t("Maximum Load Average (Frontend)"), ((intval(Config::get('system','maxloadavg_frontend')) > 0)?Config::get('system','maxloadavg_frontend'):50), t("Maximum system load before the frontend quits service - default 50.")),
-               '$min_memory'           => array('min_memory', t("Minimal Memory"), ((intval(Config::get('system','min_memory')) > 0)?Config::get('system','min_memory'):0), t("Minimal free memory in MB for the worker. Needs access to /proc/meminfo - default 0 (deactivated).")),
-               '$optimize_max_tablesize'=> array('optimize_max_tablesize', t("Maximum table size for optimization"), $optimize_max_tablesize, t("Maximum table size (in MB) for the automatic optimization - default 100 MB. Enter -1 to disable it.")),
-               '$optimize_fragmentation'=> array('optimize_fragmentation', t("Minimum level of fragmentation"), ((intval(Config::get('system','optimize_fragmentation')) > 0)?Config::get('system','optimize_fragmentation'):30), t("Minimum fragmenation level to start the automatic optimization - default value is 30%.")),
-
-               '$poco_completion'      => array('poco_completion', t("Periodical check of global contacts"), Config::get('system','poco_completion'), t("If enabled, the global contacts are checked periodically for missing or outdated data and the vitality of the contacts and servers.")),
-               '$poco_requery_days'    => array('poco_requery_days', t("Days between requery"), Config::get('system','poco_requery_days'), t("Number of days after which a server is requeried for his contacts.")),
-               '$poco_discovery'       => array('poco_discovery', t("Discover contacts from other servers"), (string) intval(Config::get('system','poco_discovery')), t("Periodically query other servers for contacts. You can choose between 'users': the users on the remote system, 'Global Contacts': active contacts that are known on the system. The fallback is meant for Redmatrix servers and older friendica servers, where global contacts weren't available. The fallback increases the server load, so the recommened setting is 'Users, Global Contacts'."), $poco_discovery_choices),
-               '$poco_discovery_since' => array('poco_discovery_since', t("Timeframe for fetching global contacts"), (string) intval(Config::get('system','poco_discovery_since')), t("When the discovery is activated, this value defines the timeframe for the activity of the global contacts that are fetched from other servers."), $poco_discovery_since_choices),
-               '$poco_local_search'    => array('poco_local_search', t("Search the local directory"), Config::get('system','poco_local_search'), t("Search the local directory instead of the global directory. When searching locally, every search will be executed on the global directory in the background. This improves the search results when the search is repeated.")),
-
-               '$nodeinfo'             => array('nodeinfo', t("Publish server information"), Config::get('system','nodeinfo'), t("If enabled, general server and usage data will be published. The data contains the name and version of the server, number of users with public profiles, number of posts and the activated protocols and connectors. See <a href='http://the-federation.info/'>the-federation.info</a> for details.")),
-
-               '$check_new_version_url' => array('check_new_version_url', t("Check upstream version"), Config::get('system', 'check_new_version_url'), t("Enables checking for new Friendica versions at github. If there is a new version, you will be informed in the admin panel overview."), $check_git_version_choices),
-               '$suppress_tags'        => array('suppress_tags', t("Suppress Tags"), Config::get('system','suppress_tags'), t("Suppress showing a list of hashtags at the end of the posting.")),
-               '$itemcache'            => array('itemcache', t("Path to item cache"), Config::get('system','itemcache'), t("The item caches buffers generated bbcode and external images.")),
-               '$itemcache_duration'   => array('itemcache_duration', t("Cache duration in seconds"), Config::get('system','itemcache_duration'), t("How long should the cache files be hold? Default value is 86400 seconds (One day). To disable the item cache, set the value to -1.")),
-               '$max_comments'         => array('max_comments', t("Maximum numbers of comments per post"), Config::get('system','max_comments'), t("How much comments should be shown for each post? Default value is 100.")),
-               '$temppath'             => array('temppath', t("Temp path"), Config::get('system','temppath'), t("If you have a restricted system where the webserver can't access the system temp path, enter another path here.")),
-               '$basepath'             => array('basepath', t("Base path to installation"), Config::get('system','basepath'), t("If the system cannot detect the correct path to your installation, enter the correct path here. This setting should only be set if you are using a restricted system and symbolic links to your webroot.")),
-               '$proxy_disabled'       => array('proxy_disabled', t("Disable picture proxy"), Config::get('system','proxy_disabled'), t("The picture proxy increases performance and privacy. It shouldn't be used on systems with very low bandwith.")),
-               '$only_tag_search'      => array('only_tag_search', t("Only search in tags"), Config::get('system','only_tag_search'), t("On large systems the text search can slow down the system extremely.")),
-
-               '$relocate_url'         => array('relocate_url', t("New base url"), System::baseUrl(), t("Change base url for this server. Sends relocate message to all Friendica and Diaspora* contacts of all users.")),
-
-               '$rino'                 => array('rino', t("RINO Encryption"), intval(Config::get('system','rino_encrypt')), t("Encryption layer between nodes."), array("Disabled", "RINO1 (deprecated)", "RINO2")),
-
-               '$worker_queues'        => array('worker_queues', t("Maximum number of parallel workers"), Config::get('system','worker_queues'), t("On shared hosters set this to 2. On larger systems, values of 10 are great. Default value is 4.")),
-               '$worker_dont_fork'     => array('worker_dont_fork', t("Don't use 'proc_open' with the worker"), Config::get('system','worker_dont_fork'), t("Enable this if your system doesn't allow the use of 'proc_open'. This can happen on shared hosters. If this is enabled you should increase the frequency of worker calls in your crontab.")),
-               '$worker_fastlane'      => array('worker_fastlane', t("Enable fastlane"), Config::get('system','worker_fastlane'), t("When enabed, the fastlane mechanism starts an additional worker if processes with higher priority are blocked by processes of lower priority.")),
-               '$worker_frontend'      => array('worker_frontend', t('Enable frontend worker'), Config::get('system','frontend_worker'), t('When enabled the Worker process is triggered when backend access is performed (e.g. messages being delivered). On smaller sites you might want to call %s/worker on a regular basis via an external cron job. You should only enable this option if you cannot utilize cron/scheduled jobs on your server.', System::baseUrl())),
+               '$diaspora_enabled'     => ['diaspora_enabled', t("Enable Diaspora support"), Config::get('system','diaspora_enabled'), t("Provide built-in Diaspora network compatibility.")],
+               '$dfrn_only'            => ['dfrn_only', t('Only allow Friendica contacts'), Config::get('system','dfrn_only'), t("All contacts must use Friendica protocols. All other built-in communication protocols disabled.")],
+               '$verifyssl'            => ['verifyssl', t("Verify SSL"), Config::get('system','verifyssl'), t("If you wish, you can turn on strict certificate checking. This will mean you cannot connect (at all) to self-signed SSL sites.")],
+               '$proxyuser'            => ['proxyuser', t("Proxy user"), Config::get('system','proxyuser'), ""],
+               '$proxy'                => ['proxy', t("Proxy URL"), Config::get('system','proxy'), ""],
+               '$timeout'              => ['timeout', t("Network timeout"), (x(Config::get('system','curl_timeout'))?Config::get('system','curl_timeout'):60), t("Value is in seconds. Set to 0 for unlimited (not recommended).")],
+               '$maxloadavg'           => ['maxloadavg', t("Maximum Load Average"), ((intval(Config::get('system','maxloadavg')) > 0)?Config::get('system','maxloadavg'):50), t("Maximum system load before delivery and poll processes are deferred - default 50.")],
+               '$maxloadavg_frontend'  => ['maxloadavg_frontend', t("Maximum Load Average (Frontend)"), ((intval(Config::get('system','maxloadavg_frontend')) > 0)?Config::get('system','maxloadavg_frontend'):50), t("Maximum system load before the frontend quits service - default 50.")],
+               '$min_memory'           => ['min_memory', t("Minimal Memory"), ((intval(Config::get('system','min_memory')) > 0)?Config::get('system','min_memory'):0), t("Minimal free memory in MB for the worker. Needs access to /proc/meminfo - default 0 (deactivated).")],
+               '$optimize_max_tablesize'=> ['optimize_max_tablesize', t("Maximum table size for optimization"), $optimize_max_tablesize, t("Maximum table size (in MB) for the automatic optimization - default 100 MB. Enter -1 to disable it.")],
+               '$optimize_fragmentation'=> ['optimize_fragmentation', t("Minimum level of fragmentation"), ((intval(Config::get('system','optimize_fragmentation')) > 0)?Config::get('system','optimize_fragmentation'):30), t("Minimum fragmenation level to start the automatic optimization - default value is 30%.")],
+
+               '$poco_completion'      => ['poco_completion', t("Periodical check of global contacts"), Config::get('system','poco_completion'), t("If enabled, the global contacts are checked periodically for missing or outdated data and the vitality of the contacts and servers.")],
+               '$poco_requery_days'    => ['poco_requery_days', t("Days between requery"), Config::get('system','poco_requery_days'), t("Number of days after which a server is requeried for his contacts.")],
+               '$poco_discovery'       => ['poco_discovery', t("Discover contacts from other servers"), (string) intval(Config::get('system','poco_discovery')), t("Periodically query other servers for contacts. You can choose between 'users': the users on the remote system, 'Global Contacts': active contacts that are known on the system. The fallback is meant for Redmatrix servers and older friendica servers, where global contacts weren't available. The fallback increases the server load, so the recommened setting is 'Users, Global Contacts'."), $poco_discovery_choices],
+               '$poco_discovery_since' => ['poco_discovery_since', t("Timeframe for fetching global contacts"), (string) intval(Config::get('system','poco_discovery_since')), t("When the discovery is activated, this value defines the timeframe for the activity of the global contacts that are fetched from other servers."), $poco_discovery_since_choices],
+               '$poco_local_search'    => ['poco_local_search', t("Search the local directory"), Config::get('system','poco_local_search'), t("Search the local directory instead of the global directory. When searching locally, every search will be executed on the global directory in the background. This improves the search results when the search is repeated.")],
+
+               '$nodeinfo'             => ['nodeinfo', t("Publish server information"), Config::get('system','nodeinfo'), t("If enabled, general server and usage data will be published. The data contains the name and version of the server, number of users with public profiles, number of posts and the activated protocols and connectors. See <a href='http://the-federation.info/'>the-federation.info</a> for details.")],
+
+               '$check_new_version_url' => ['check_new_version_url', t("Check upstream version"), Config::get('system', 'check_new_version_url'), t("Enables checking for new Friendica versions at github. If there is a new version, you will be informed in the admin panel overview."), $check_git_version_choices],
+               '$suppress_tags'        => ['suppress_tags', t("Suppress Tags"), Config::get('system','suppress_tags'), t("Suppress showing a list of hashtags at the end of the posting.")],
+               '$itemcache'            => ['itemcache', t("Path to item cache"), Config::get('system','itemcache'), t("The item caches buffers generated bbcode and external images.")],
+               '$itemcache_duration'   => ['itemcache_duration', t("Cache duration in seconds"), Config::get('system','itemcache_duration'), t("How long should the cache files be hold? Default value is 86400 seconds (One day). To disable the item cache, set the value to -1.")],
+               '$max_comments'         => ['max_comments', t("Maximum numbers of comments per post"), Config::get('system','max_comments'), t("How much comments should be shown for each post? Default value is 100.")],
+               '$temppath'             => ['temppath', t("Temp path"), Config::get('system','temppath'), t("If you have a restricted system where the webserver can't access the system temp path, enter another path here.")],
+               '$basepath'             => ['basepath', t("Base path to installation"), Config::get('system','basepath'), t("If the system cannot detect the correct path to your installation, enter the correct path here. This setting should only be set if you are using a restricted system and symbolic links to your webroot.")],
+               '$proxy_disabled'       => ['proxy_disabled', t("Disable picture proxy"), Config::get('system','proxy_disabled'), t("The picture proxy increases performance and privacy. It shouldn't be used on systems with very low bandwith.")],
+               '$only_tag_search'      => ['only_tag_search', t("Only search in tags"), Config::get('system','only_tag_search'), t("On large systems the text search can slow down the system extremely.")],
+
+               '$relocate_url'         => ['relocate_url', t("New base url"), System::baseUrl(), t("Change base url for this server. Sends relocate message to all Friendica and Diaspora* contacts of all users.")],
+
+               '$rino'                 => ['rino', t("RINO Encryption"), intval(Config::get('system','rino_encrypt')), t("Encryption layer between nodes."), ["Disabled", "RINO1 (deprecated)", "RINO2"]],
+
+               '$worker_queues'        => ['worker_queues', t("Maximum number of parallel workers"), Config::get('system','worker_queues'), t("On shared hosters set this to 2. On larger systems, values of 10 are great. Default value is 4.")],
+               '$worker_dont_fork'     => ['worker_dont_fork', t("Don't use 'proc_open' with the worker"), Config::get('system','worker_dont_fork'), t("Enable this if your system doesn't allow the use of 'proc_open'. This can happen on shared hosters. If this is enabled you should increase the frequency of worker calls in your crontab.")],
+               '$worker_fastlane'      => ['worker_fastlane', t("Enable fastlane"), Config::get('system','worker_fastlane'), t("When enabed, the fastlane mechanism starts an additional worker if processes with higher priority are blocked by processes of lower priority.")],
+               '$worker_frontend'      => ['worker_frontend', t('Enable frontend worker'), Config::get('system','frontend_worker'), t('When enabled the Worker process is triggered when backend access is performed (e.g. messages being delivered). On smaller sites you might want to call %s/worker on a regular basis via an external cron job. You should only enable this option if you cannot utilize cron/scheduled jobs on your server.', System::baseUrl())],
 
                '$form_security_token'  => get_form_security_token("admin_site")
-       ));
+       ]);
 }
 
 /**
@@ -1405,7 +1405,7 @@ function admin_page_dbsync(App $a)
                return $o;
        }
 
-       $failed = array();
+       $failed = [];
        $r = q("SELECT `k`, `v` FROM `config` WHERE `cat` = 'database' ");
        if (DBM::is_result($r)) {
                foreach ($r as $rr) {
@@ -1417,20 +1417,20 @@ function admin_page_dbsync(App $a)
                }
        }
        if (!count($failed)) {
-               $o = replace_macros(get_markup_template('structure_check.tpl'), array(
+               $o = replace_macros(get_markup_template('structure_check.tpl'), [
                        '$base' => System::baseUrl(true),
                        '$banner' => t('No failed updates.'),
                        '$check' => t('Check database structure'),
-               ));
+               ]);
        } else {
-               $o = replace_macros(get_markup_template('failed_updates.tpl'), array(
+               $o = replace_macros(get_markup_template('failed_updates.tpl'), [
                        '$base' => System::baseUrl(true),
                        '$banner' => t('Failed Updates'),
                        '$desc' => t('This does not include updates prior to 1139, which did not return a status.'),
                        '$mark' => t('Mark success (if update was manually applied)'),
                        '$apply' => t('Attempt to execute this update step automatically'),
                        '$failed' => $failed
-               ));
+               ]);
        }
 
        return $o;
@@ -1443,8 +1443,8 @@ function admin_page_dbsync(App $a)
  */
 function admin_page_users_post(App $a)
 {
-       $pending     = defaults($_POST, 'pending'          , array());
-       $users       = defaults($_POST, 'user'             , array());
+       $pending     = defaults($_POST, 'pending'          , []);
+       $users       = defaults($_POST, 'user'             , []);
        $nu_name     = defaults($_POST, 'new_user_name'    , '');
        $nu_nickname = defaults($_POST, 'new_user_nickname', '');
        $nu_email    = defaults($_POST, 'new_user_email'   , '');
@@ -1499,12 +1499,12 @@ function admin_page_users_post(App $a)
                $preamble = sprintf($preamble, $user['username'], $a->config['sitename']);
                $body = sprintf($body, System::baseUrl(), $user['email'], $result['password'], $a->config['sitename']);
 
-               notification(array(
+               notification([
                        'type' => SYSTEM_EMAIL,
                        'to_email' => $user['email'],
                        'subject' => t('Registration details for %s', $a->config['sitename']),
                        'preamble' => $preamble,
-                       'body' => $body));
+                       'body' => $body]);
        }
 
        if (x($_POST, 'page_users_block')) {
@@ -1595,14 +1595,14 @@ function admin_page_users(App $a)
        }
 
        /* ordering */
-       $valid_orders = array(
+       $valid_orders = [
                'contact.name',
                'user.email',
                'user.register_date',
                'user.login_date',
                'lastitem_date',
                'user.page-flags'
-       );
+       ];
 
        $order = "contact.name";
        $order_direction = "+";
@@ -1629,12 +1629,12 @@ function admin_page_users(App $a)
 
        $adminlist = explode(",", str_replace(" ", "", $a->config['admin_email']));
        $_setup_users = function ($e) use ($adminlist) {
-               $accounts = array(
+               $accounts = [
                        t('Normal Account'),
                        t('Automatic Follower Account'),
                        t('Public Forum Account'),
                        t('Automatic Friend Account')
-               );
+               ];
                $e['page-flags'] = $accounts[$e['page-flags']];
                $e['register_date'] = relative_date($e['register_date']);
                $e['login_date'] = relative_date($e['login_date']);
@@ -1651,11 +1651,11 @@ function admin_page_users(App $a)
        // Get rid of dashes in key names, Smarty3 can't handle them
        // and extracting deleted users
 
-       $tmp_users = array();
-       $deleted = array();
+       $tmp_users = [];
+       $deleted = [];
 
        while (count($users)) {
-               $new_user = array();
+               $new_user = [];
                foreach (array_pop($users) as $k => $v) {
                        $k = str_replace('-', '_', $k);
                        $new_user[$k] = $v;
@@ -1672,11 +1672,11 @@ function admin_page_users(App $a)
                array_push($users, array_pop($tmp_users));
        }
 
-       $th_users = array_map(null, array(t('Name'), t('Email'), t('Register date'), t('Last login'), t('Last item'), t('Account')), $valid_orders
+       $th_users = array_map(null, [t('Name'), t('Email'), t('Register date'), t('Last login'), t('Last item'), t('Account')], $valid_orders
        );
 
        $t = get_markup_template('admin/users.tpl');
-       $o = replace_macros($t, array(
+       $o = replace_macros($t, [
                // strings //
                '$title' => t('Administration'),
                '$page' => t('Users'),
@@ -1684,7 +1684,7 @@ function admin_page_users(App $a)
                '$select_all' => t('select all'),
                '$h_pending' => t('User registrations waiting for confirm'),
                '$h_deleted' => t('User waiting for permanent deletion'),
-               '$th_pending' => array(t('Request date'), t('Name'), t('Email')),
+               '$th_pending' => [t('Request date'), t('Name'), t('Email')],
                '$no_pending' => t('No registrations.'),
                '$pendingnotetext' => t('Note from the user'),
                '$approve' => t('Approve'),
@@ -1697,7 +1697,7 @@ function admin_page_users(App $a)
 
                '$h_users' => t('Users'),
                '$h_newuser' => t('New User'),
-               '$th_deleted' => array(t('Name'), t('Email'), t('Register date'), t('Last login'), t('Last item'), t('Deleted since')),
+               '$th_deleted' => [t('Name'), t('Email'), t('Register date'), t('Last login'), t('Last item'), t('Deleted since')],
                '$th_users' => $th_users,
                '$order_users' => $order,
                '$order_direction_users' => $order_direction,
@@ -1713,10 +1713,10 @@ function admin_page_users(App $a)
                '$pending' => $pending,
                'deleted' => $deleted,
                '$users' => $users,
-               '$newusername' => array('new_user_name', t("Name"), '', t("Name of the new user.")),
-               '$newusernickname' => array('new_user_nickname', t("Nickname"), '', t("Nickname of the new user.")),
-               '$newuseremail' => array('new_user_email', t("Email"), '', t("Email address of the new user."), '', '', 'email'),
-       ));
+               '$newusername' => ['new_user_name', t("Name"), '', t("Name of the new user.")],
+               '$newusernickname' => ['new_user_nickname', t("Nickname"), '', t("Nickname of the new user.")],
+               '$newuseremail' => ['new_user_email', t("Email"), '', t("Email address of the new user."), '', '', 'email'],
+       ]);
        $o .= paginate($a);
        return $o;
 }
@@ -1793,7 +1793,7 @@ function admin_page_plugins(App $a)
 
                $t = get_markup_template('admin/plugins_details.tpl');
 
-               return replace_macros($t, array(
+               return replace_macros($t, [
                        '$title' => t('Administration'),
                        '$page' => t('Plugins'),
                        '$toggle' => t('Toggle'),
@@ -1813,7 +1813,7 @@ function admin_page_plugins(App $a)
                        '$readme' => $readme,
 
                        '$form_security_token' => get_form_security_token("admin_themes"),
-               ));
+               ]);
        }
 
        /*
@@ -1826,7 +1826,7 @@ function admin_page_plugins(App $a)
                goaway(System::baseUrl() . '/admin/plugins');
        }
 
-       $plugins = array();
+       $plugins = [];
        $files = glob("addon/*/");
        if (is_array($files)) {
                foreach ($files as $file) {
@@ -1846,14 +1846,14 @@ function admin_page_plugins(App $a)
                                }
 
                                if ($show_plugin) {
-                                       $plugins[] = array($id, (in_array($id, $a->plugins) ? "on" : "off"), $info);
+                                       $plugins[] = [$id, (in_array($id, $a->plugins) ? "on" : "off"), $info];
                                }
                        }
                }
        }
 
        $t = get_markup_template('admin/plugins.tpl');
-       return replace_macros($t, array(
+       return replace_macros($t, [
                '$title' => t('Administration'),
                '$page' => t('Plugins'),
                '$submit' => t('Save Settings'),
@@ -1864,7 +1864,7 @@ function admin_page_plugins(App $a)
                '$pcount' => count($plugins),
                '$noplugshint' => t('There are currently no plugins available on your node. You can find the official plugin repository at %1$s and might find other interesting plugins in the open plugin registry at %2$s', 'https://github.com/friendica/friendica-addons', 'http://addons.friendi.ca'),
                '$form_security_token' => get_form_security_token("admin_themes"),
-       ));
+       ]);
 }
 
 /**
@@ -1948,7 +1948,7 @@ function admin_page_themes(App $a)
 {
        $allowed_themes_str = Config::get('system', 'allowed_themes');
        $allowed_themes_raw = explode(',', $allowed_themes_str);
-       $allowed_themes = array();
+       $allowed_themes = [];
        if (count($allowed_themes_raw)) {
                foreach ($allowed_themes_raw as $x) {
                        if (strlen(trim($x))) {
@@ -1957,7 +1957,7 @@ function admin_page_themes(App $a)
                }
        }
 
-       $themes = array();
+       $themes = [];
        $files = glob('view/theme/*');
        if (is_array($files)) {
                foreach ($files as $file) {
@@ -1976,7 +1976,7 @@ function admin_page_themes(App $a)
                        $is_allowed = intval(in_array($f, $allowed_themes));
 
                        if ($is_allowed || $is_supported || Config::get("system", "show_unsupported_themes")) {
-                               $themes[] = array('name' => $f, 'experimental' => $is_experimental, 'supported' => $is_supported, 'allowed' => $is_allowed);
+                               $themes[] = ['name' => $f, 'experimental' => $is_experimental, 'supported' => $is_supported, 'allowed' => $is_allowed];
                        }
                }
        }
@@ -2056,13 +2056,13 @@ function admin_page_themes(App $a)
                        $a->page = $orig_page;
                }
 
-               $screenshot = array(get_theme_screenshot($theme), t('Screenshot'));
+               $screenshot = [get_theme_screenshot($theme), t('Screenshot')];
                if (!stristr($screenshot[0], $theme)) {
                        $screenshot = null;
                }
 
                $t = get_markup_template('admin/plugins_details.tpl');
-               return replace_macros($t, array(
+               return replace_macros($t, [
                        '$title' => t('Administration'),
                        '$page' => t('Themes'),
                        '$toggle' => t('Toggle'),
@@ -2080,7 +2080,7 @@ function admin_page_themes(App $a)
                        '$readme' => $readme,
 
                        '$form_security_token' => get_form_security_token("admin_themes"),
-               ));
+               ]);
        }
 
 
@@ -2101,13 +2101,13 @@ function admin_page_themes(App $a)
         * List themes
         */
 
-       $plugins = array();
+       $plugins = [];
        foreach ($themes as $th) {
-               $plugins[] = array($th['name'], (($th['allowed']) ? "on" : "off"), get_theme_info($th['name']));
+               $plugins[] = [$th['name'], (($th['allowed']) ? "on" : "off"), get_theme_info($th['name'])];
        }
 
        $t = get_markup_template('admin/plugins.tpl');
-       return replace_macros($t, array(
+       return replace_macros($t, [
                '$title'               => t('Administration'),
                '$page'                => t('Themes'),
                '$submit'              => t('Save Settings'),
@@ -2120,7 +2120,7 @@ function admin_page_themes(App $a)
                '$experimental'        => t('[Experimental]'),
                '$unsupported'         => t('[Unsupported]'),
                '$form_security_token' => get_form_security_token("admin_themes"),
-       ));
+       ]);
 }
 
 /**
@@ -2165,13 +2165,13 @@ function admin_page_logs_post(App $a)
  */
 function admin_page_logs(App $a)
 {
-       $log_choices = array(
+       $log_choices = [
                LOGGER_NORMAL   => 'Normal',
                LOGGER_TRACE    => 'Trace',
                LOGGER_DEBUG    => 'Debug',
                LOGGER_DATA     => 'Data',
                LOGGER_ALL      => 'All'
-       );
+       ];
 
        if (ini_get('log_errors')) {
                $phplogenabled = t('PHP log currently enabled.');
@@ -2181,7 +2181,7 @@ function admin_page_logs(App $a)
 
        $t = get_markup_template('admin/logs.tpl');
 
-       return replace_macros($t, array(
+       return replace_macros($t, [
                '$title' => t('Administration'),
                '$page' => t('Logs'),
                '$submit' => t('Save Settings'),
@@ -2189,15 +2189,15 @@ function admin_page_logs(App $a)
                '$baseurl' => System::baseUrl(true),
                '$logname' => Config::get('system', 'logfile'),
                // name, label, value, help string, extra data...
-               '$debugging' => array('debugging', t("Enable Debugging"), Config::get('system', 'debugging'), ""),
-               '$logfile' => array('logfile', t("Log file"), Config::get('system', 'logfile'), t("Must be writable by web server. Relative to your Friendica top-level directory.")),
-               '$loglevel' => array('loglevel', t("Log level"), Config::get('system', 'loglevel'), "", $log_choices),
+               '$debugging' => ['debugging', t("Enable Debugging"), Config::get('system', 'debugging'), ""],
+               '$logfile' => ['logfile', t("Log file"), Config::get('system', 'logfile'), t("Must be writable by web server. Relative to your Friendica top-level directory.")],
+               '$loglevel' => ['loglevel', t("Log level"), Config::get('system', 'loglevel'), "", $log_choices],
                '$form_security_token' => get_form_security_token("admin_logs"),
                '$phpheader' => t("PHP logging"),
                '$phphint' => t("To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."),
                '$phplogcode' => "error_reporting(E_ERROR | E_WARNING | E_PARSE);\nini_set('error_log','php.out');\nini_set('log_errors','1');\nini_set('display_errors', '1');",
                '$phplogenabled' => $phplogenabled,
-       ));
+       ]);
 }
 
 /**
@@ -2248,12 +2248,12 @@ function admin_page_viewlogs(App $a)
                        fclose($fp);
                }
        }
-       return replace_macros($t, array(
+       return replace_macros($t, [
                '$title' => t('Administration'),
                '$page' => t('View Logs'),
                '$data' => $data,
                '$logname' => Config::get('system', 'logfile')
-       ));
+       ]);
 }
 
 /**
@@ -2311,28 +2311,28 @@ function admin_page_features_post(App $a)
 function admin_page_features(App $a)
 {
        if ((argc() > 1) && (argv(1) === 'features')) {
-               $arr = array();
+               $arr = [];
                $features = Feature::get(false);
 
                foreach ($features as $fname => $fdata) {
-                       $arr[$fname] = array();
+                       $arr[$fname] = [];
                        $arr[$fname][0] = $fdata[0];
                        foreach (array_slice($fdata, 1) as $f) {
                                $set = Config::get('feature', $f[0], $f[3]);
-                               $arr[$fname][1][] = array(
-                                       array('feature_' . $f[0], $f[1], $set, $f[2], array(t('Off'), t('On'))),
-                                       array('featurelock_' . $f[0], t('Lock feature %s', $f[1]), (($f[4] !== false) ? "1" : ''), '', array(t('Off'), t('On')))
-                               );
+                               $arr[$fname][1][] = [
+                                       ['feature_' . $f[0], $f[1], $set, $f[2], [t('Off'), t('On')]],
+                                       ['featurelock_' . $f[0], t('Lock feature %s', $f[1]), (($f[4] !== false) ? "1" : ''), '', [t('Off'), t('On')]]
+                               ];
                        }
                }
 
                $tpl = get_markup_template('admin/settings_features.tpl');
-               $o = replace_macros($tpl, array(
+               $o = replace_macros($tpl, [
                        '$form_security_token' => get_form_security_token("admin_manage_features"),
                        '$title' => t('Manage Additional Features'),
                        '$features' => $arr,
                        '$submit' => t('Save Settings'),
-               ));
+               ]);
 
                return $o;
        }
index 86f3f27e280529267c6fb4cce88c3f482efc76ee..0d8be35cd36414574db2bc8cd2c4e7a07939ee78 100644 (file)
@@ -69,13 +69,13 @@ function allfriends_content(App $a)
                        $photo_menu = Contact::photoMenu($rr);
                } else {
                        $connlnk = System::baseUrl() . '/follow/?url=' . $rr['url'];
-                       $photo_menu = array(
-                               'profile' => array(t("View Profile"), Profile::zrl($rr['url'])),
-                               'follow' => array(t("Connect/Follow"), $connlnk)
-                       );
+                       $photo_menu = [
+                               'profile' => [t("View Profile"), Profile::zrl($rr['url'])],
+                               'follow' => [t("Connect/Follow"), $connlnk]
+                       ];
                }
 
-               $entry = array(
+               $entry = [
                        'url'          => $rr['url'],
                        'itemurl'      => defaults($contact_details, 'addr', $rr['url']),
                        'name'         => htmlentities($contact_details['name']),
@@ -90,7 +90,7 @@ function allfriends_content(App $a)
                        'conntxt'      => t('Connect'),
                        'connlnk'      => $connlnk,
                        'id'           => ++$id,
-               );
+               ];
                $entries[] = $entry;
        }
 
@@ -98,12 +98,12 @@ function allfriends_content(App $a)
 
        $tpl = get_markup_template('viewcontact_template.tpl');
 
-       $o .= replace_macros($tpl, array(
+       $o .= replace_macros($tpl, [
                //'$title' => sprintf( t('Friends of %s'), htmlentities($c[0]['name'])),
                '$tab_str' => $tab_str,
                '$contacts' => $entries,
                '$paginate' => paginate($a),
-       ));
+       ]);
 
        return $o;
 }
index 69d7311a0b80572e2c76feb8ead8d1254cc07f01..a402bc99342ae936d5407e442cc59b6d2aa4aa00 100644 (file)
@@ -77,11 +77,11 @@ function api_content(App $a)
                        }
 
                        $tpl = get_markup_template("oauth_authorize_done.tpl");
-                       $o = replace_macros($tpl, array(
+                       $o = replace_macros($tpl, [
                                '$title' => t('Authorize application connection'),
                                '$info' => t('Return to your app and insert this Securty Code:'),
                                '$code' => $verifier,
-                       ));
+                       ]);
 
                        return $o;
                }
@@ -99,13 +99,13 @@ function api_content(App $a)
                }
 
                $tpl = get_markup_template('oauth_authorize.tpl');
-               $o = replace_macros($tpl, array(
+               $o = replace_macros($tpl, [
                        '$title' => t('Authorize application connection'),
                        '$app' => $app,
                        '$authorize' => t('Do you want to authorize this application to access your posts and contacts, and/or create new posts for you?'),
                        '$yes' => t('Yes'),
                        '$no' => t('No'),
-               ));
+               ]);
 
                return $o;
        }
index b8800c7d7082a726c9d19de444820229c971cbe5..a220afff1cadcad109d520239030bea47c33e7e2 100644 (file)
@@ -19,8 +19,8 @@ function apps_content(App $a) {
        }
 
        $tpl = get_markup_template('apps.tpl');
-       return replace_macros($tpl, array(
+       return replace_macros($tpl, [
                '$title' => $title,
                '$apps' => $a->apps,
-       ));
+       ]);
 }
index e809d3baacb64574b1f07f42e95949d55d6f2cad..593b4fa661365ec8d38ef64c87f79a5ce0e98966 100644 (file)
@@ -26,7 +26,7 @@ function bookmarklet_content(App $a)
        if (!strstr($referer, $page)) {
                $content = add_page_info($_REQUEST["url"]);
 
-               $x = array(
+               $x = [
                        'is_owner' => true,
                        'allow_location' => $a->user['allow_location'],
                        'default_location' => $a->user['default-location'],
@@ -39,7 +39,7 @@ function bookmarklet_content(App $a)
                        'profile_uid' => local_user(),
                        'title' => trim($_REQUEST["title"], "*"),
                        'content' => $content
-               );
+               ];
                $o = status_editor($a, $x, 0, false);
                $o .= "<script>window.resizeTo(800,550);</script>";
        } else {
index 31ab5976b56a45f5755dff0f0d15eba4c28131c8..de00feadd24bd0df34e38966f7b56eba142fb19a 100644 (file)
@@ -51,13 +51,13 @@ function cal_init(App $a)
 
                $tpl = get_markup_template("vcard-widget.tpl");
 
-               $vcard_widget = replace_macros($tpl, array(
+               $vcard_widget = replace_macros($tpl, [
                        '$name' => $profile['name'],
                        '$photo' => $profile['photo'],
                        '$addr' => (($profile['addr'] != "") ? $profile['addr'] : ""),
                        '$account_type' => $account_type,
                        '$pdesc' => (($profile['pdesc'] != "") ? $profile['pdesc'] : ""),
-               ));
+               ]);
 
                $cal_widget = widget_events();
 
@@ -80,17 +80,17 @@ function cal_content(App $a)
        $i18n = get_event_strings();
 
        $htpl = get_markup_template('event_head.tpl');
-       $a->page['htmlhead'] .= replace_macros($htpl, array(
+       $a->page['htmlhead'] .= replace_macros($htpl, [
                '$baseurl' => System::baseUrl(),
                '$module_url' => '/cal/' . $a->data['user']['nickname'],
                '$modparams' => 2,
                '$i18n' => $i18n,
-       ));
+       ]);
 
        $etpl = get_markup_template('event_end.tpl');
-       $a->page['end'] .= replace_macros($etpl, array(
+       $a->page['end'] .= replace_macros($etpl, [
                '$baseurl' => System::baseUrl(),
-       ));
+       ]);
 
        $mode = 'view';
        $y = 0;
@@ -206,14 +206,14 @@ function cal_content(App $a)
                $adjust_finish = datetime_convert('UTC', date_default_timezone_get(), $finish);
 
                // put the event parametes in an array so we can better transmit them
-               $event_params = array(
+               $event_params = [
                        'event_id' => (x($_GET, 'id') ? $_GET["id"] : 0),
                        'start' => $start,
                        'finish' => $finish,
                        'adjust_start' => $adjust_start,
                        'adjust_finish' => $adjust_finish,
                        'ignored' => $ignored,
-               );
+               ];
 
                // get events by id or by date
                if (x($_GET, 'id')) {
@@ -222,7 +222,7 @@ function cal_content(App $a)
                        $r = events_by_date($owner_uid, $event_params, $sql_extra);
                }
 
-               $links = array();
+               $links = [];
 
                if (DBM::is_result($r)) {
                        $r = sort_by_date($r);
@@ -255,7 +255,7 @@ function cal_content(App $a)
 
                // Get rid of dashes in key names, Smarty3 can't handle them
                foreach ($events as $key => $event) {
-                       $event_item = array();
+                       $event_item = [];
                        foreach ($event['item'] as $k => $v) {
                                $k = str_replace('-', '_', $k);
                                $event_item[$k] = $v;
@@ -263,13 +263,13 @@ function cal_content(App $a)
                        $events[$key]['item'] = $event_item;
                }
 
-               $o = replace_macros($tpl, array(
+               $o = replace_macros($tpl, [
                        '$baseurl' => System::baseUrl(),
                        '$tabs' => $tabs,
                        '$title' => t('Events'),
                        '$view' => t('View'),
-                       '$previous' => array(System::baseUrl() . "/events/$prevyear/$prevmonth", t('Previous'), '', ''),
-                       '$next' => array(System::baseUrl() . "/events/$nextyear/$nextmonth", t('Next'), '', ''),
+                       '$previous' => [System::baseUrl() . "/events/$prevyear/$prevmonth", t('Previous'), '', ''],
+                       '$next' => [System::baseUrl() . "/events/$nextyear/$nextmonth", t('Next'), '', ''],
                        '$calendar' => cal($y, $m, $links, ' eventcal'),
                        '$events' => $events,
                        "today" => t("today"),
@@ -277,7 +277,7 @@ function cal_content(App $a)
                        "week" => t("week"),
                        "day" => t("day"),
                        "list" => t("list"),
-               ));
+               ]);
 
                if (x($_GET, 'id')) {
                        echo $o;
index cfeb531f761017616c0dfe00e777b1c5925cd78f..c4f236fad673843373475d6014e5101dcce9621f 100644 (file)
@@ -46,12 +46,12 @@ function common_content(App $a)
                $contact = dba::selectFirst('contact', ['name', 'url', 'photo'], ['self' => true, 'uid' => $uid]);
 
                if (DBM::is_result($contact)) {
-                       $vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"), array(
+                       $vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"), [
                                '$name' => htmlentities($contact['name']),
                                '$photo' => $contact['photo'],
                                'url' => 'contacts/' . $cid
-                       ));
-       
+                       ]);
+
                        if (!x($a->page, 'aside')) {
                                $a->page['aside'] = '';
                        }
@@ -115,7 +115,7 @@ function common_content(App $a)
 
                $photo_menu = Contact::photoMenu($rr);
 
-               $entry = array(
+               $entry = [
                        'url'          => $rr['url'],
                        'itemurl'      => defaults($contact_details, 'addr', $rr['url']),
                        'name'         => $contact_details['name'],
@@ -128,7 +128,7 @@ function common_content(App $a)
                        'network'      => ContactSelector::networkToName($contact_details['network'], $contact_details['url']),
                        'photo_menu'   => $photo_menu,
                        'id'           => ++$id,
-               );
+               ];
                $entries[] = $entry;
        }
 
@@ -142,12 +142,12 @@ function common_content(App $a)
 
        $tpl = get_markup_template('viewcontact_template.tpl');
 
-       $o .= replace_macros($tpl, array(
+       $o .= replace_macros($tpl, [
                '$title'    => $title,
                '$tab_str'  => $tab_str,
                '$contacts' => $entries,
                '$paginate' => paginate($a),
-       ));
+       ]);
 
        return $o;
 }
index 4b755e18ce6ebc58eb5b09b210029175e53b9c64..cfd2087d9762a804bad85d90b3d63956e77c5755 100644 (file)
@@ -67,35 +67,35 @@ function community_content(App $a, $update = 0)
                $tabs = [];
 
                if ((local_user() || in_array($page_style, [CP_USERS_AND_GLOBAL, CP_USERS_ON_SERVER])) && empty(Config::get('system','singleuser'))) {
-                       $tabs[] = array(
+                       $tabs[] = [
                                'label' => t('Community'),
                                'url' => 'community/local',
                                'sel' => $content == 'local' ? 'active' : '',
                                'title' => t('Posts from local users on this server'),
                                'id' => 'community-local-tab',
                                'accesskey' => 'l'
-                       );
+                       ];
                }
 
                if (local_user() || in_array($page_style, [CP_USERS_AND_GLOBAL, CP_GLOBAL_COMMUNITY])) {
-                       $tabs[] = array(
+                       $tabs[] = [
                                'label' => t('Global Timeline'),
                                'url' => 'community/global',
                                'sel' => $content == 'global' ? 'active' : '',
                                'title' => t('Posts from users of the federated network'),
                                'id' => 'community-global-tab',
                                'accesskey' => 'g'
-                       );
+                       ];
                }
 
                $tab_tpl = get_markup_template('common_tabs.tpl');
-               $o .= replace_macros($tab_tpl, array('$tabs' => $tabs));
+               $o .= replace_macros($tab_tpl, ['$tabs' => $tabs]);
 
                nav_set_selected('community');
 
                // We need the editor here to be able to reshare an item.
                if (local_user()) {
-                       $x = array(
+                       $x = [
                                'is_owner' => true,
                                'allow_location' => $a->user['allow_location'],
                                'default_location' => $a->user['default-location'],
@@ -105,7 +105,7 @@ function community_content(App $a, $update = 0)
                                'bang' => '',
                                'visitor' => 'block',
                                'profile_uid' => local_user(),
-                       );
+                       ];
                        $o .= status_editor($a, $x, 0, true);
                }
        }
@@ -141,7 +141,7 @@ function community_content(App $a, $update = 0)
                $count = 1;
                $previousauthor = "";
                $numposts = 0;
-               $s = array();
+               $s = [];
 
                do {
                        foreach ($r as $item) {
@@ -171,12 +171,12 @@ function community_content(App $a, $update = 0)
        }
 
        $t = get_markup_template("community.tpl");
-       return replace_macros($t, array(
+       return replace_macros($t, [
                '$content' => $o,
                '$header' => '',
                '$show_global_community_hint' => ($content == 'global') && Config::get('system', 'show_global_community_hint'),
                '$global_community_hint' => t("This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users.")
-       ));
+       ]);
 }
 
 function community_getitems($start, $itemspage, $content)
@@ -204,5 +204,5 @@ function community_getitems($start, $itemspage, $content)
        }
 
        // Should never happen
-       return array();
+       return [];
 }
index 13f8b492b5e164dd046b948e5c9ba467dae05de0..388725c0064cfe87848c2f140210b300e4675a5d 100644 (file)
@@ -33,7 +33,7 @@ function contactgroup_content(App $a)
 
                $group = $r[0];
                $members = Contact::getByGroupId($group['id']);
-               $preselected = array();
+               $preselected = [];
                if (count($members)) {
                        foreach ($members as $member) {
                                $preselected[] = $member['id'];
index 7089cf05a5f6c2abec863de1754e2e2e3ac635d4..ae0edb3cceb7c53b1a035c6eab03ca93943155d2 100644 (file)
@@ -48,7 +48,7 @@ function contacts_init(App $a)
                }
 
                /// @TODO Add nice spaces
-               $vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"), array(
+               $vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"), [
                        '$name' => htmlentities($a->data['contact']['name']),
                        '$photo' => $a->data['contact']['photo'],
                        '$url' => ($a->data['contact']['network'] == NETWORK_DFRN) ? "redir/" . $a->data['contact']['id'] : $a->data['contact']['url'],
@@ -56,7 +56,7 @@ function contacts_init(App $a)
                        '$network_name' => $networkname,
                        '$network' => t('Network:'),
                        '$account_type' => Contact::getAccountType($a->data['contact'])
-               ));
+               ]);
 
                $findpeople_widget = '';
                $follow_widget = '';
@@ -75,26 +75,26 @@ function contacts_init(App $a)
 
        $groups_widget = Group::sidebarWidget('contacts', 'group', 'full', 0, $contact_id);
 
-       $a->page['aside'] .= replace_macros(get_markup_template("contacts-widget-sidebar.tpl"), array(
+       $a->page['aside'] .= replace_macros(get_markup_template("contacts-widget-sidebar.tpl"), [
                '$vcard_widget' => $vcard_widget,
                '$findpeople_widget' => $findpeople_widget,
                '$follow_widget' => $follow_widget,
                '$groups_widget' => $groups_widget,
                '$networks_widget' => $networks_widget
-       ));
+       ]);
 
        $base = System::baseUrl();
        $tpl = get_markup_template("contacts-head.tpl");
-       $a->page['htmlhead'] .= replace_macros($tpl, array(
+       $a->page['htmlhead'] .= replace_macros($tpl, [
                '$baseurl' => System::baseUrl(true),
                '$base' => $base
-       ));
+       ]);
 
        $tpl = get_markup_template("contacts-end.tpl");
-       $a->page['end'] .= replace_macros($tpl, array(
+       $a->page['end'] .= replace_macros($tpl, [
                '$baseurl' => System::baseUrl(true),
                '$base' => $base
-       ));
+       ]);
 }
 
 function contacts_batch_actions(App $a)
@@ -259,13 +259,13 @@ function _contact_update_profile($contact_id)
        $data = Probe::uri($contact["url"], "", 0, false);
 
        // "Feed" or "Unknown" is mostly a sign of communication problems
-       if ((in_array($data["network"], array(NETWORK_FEED, NETWORK_PHANTOM))) && ($data["network"] != $contact["network"])) {
+       if ((in_array($data["network"], [NETWORK_FEED, NETWORK_PHANTOM])) && ($data["network"] != $contact["network"])) {
                return;
        }
 
-       $updatefields = array("name", "nick", "url", "addr", "batch", "notify", "poll", "request", "confirm",
-               "poco", "network", "alias");
-       $update = array();
+       $updatefields = ["name", "nick", "url", "addr", "batch", "notify", "poll", "request", "confirm",
+               "poco", "network", "alias"];
+       $update = [];
 
        if ($data["network"] == NETWORK_OSTATUS) {
                $result = Contact::createFromProbe($uid, $data["url"], false);
@@ -442,17 +442,17 @@ function contacts_content(App $a)
                                // <form> can't take arguments in its "action" parameter
                                // so add any arguments as hidden inputs
                                $query = explode_querystring($a->query_string);
-                               $inputs = array();
+                               $inputs = [];
                                foreach ($query['args'] as $arg) {
                                        if (strpos($arg, 'confirm=') === false) {
                                                $arg_parts = explode('=', $arg);
-                                               $inputs[] = array('name' => $arg_parts[0], 'value' => $arg_parts[1]);
+                                               $inputs[] = ['name' => $arg_parts[0], 'value' => $arg_parts[1]];
                                        }
                                }
 
                                $a->page['aside'] = '';
 
-                               return replace_macros(get_markup_template('contact_drop_confirm.tpl'), array(
+                               return replace_macros(get_markup_template('contact_drop_confirm.tpl'), [
                                        '$header' => t('Drop contact'),
                                        '$contact' => _contact_detail_for_template($orig_record),
                                        '$method' => 'get',
@@ -462,7 +462,7 @@ function contacts_content(App $a)
                                        '$confirm_url' => $query['base'],
                                        '$confirm_name' => 'confirmed',
                                        '$cancel' => t('Cancel'),
-                               ));
+                               ]);
                        }
                        // Now check how the user responded to the confirmation query
                        if (x($_REQUEST, 'canceled')) {
@@ -493,12 +493,12 @@ function contacts_content(App $a)
                $contact_id = $a->data['contact']['id'];
                $contact = $a->data['contact'];
 
-               $a->page['htmlhead'] .= replace_macros(get_markup_template('contact_head.tpl'), array(
+               $a->page['htmlhead'] .= replace_macros(get_markup_template('contact_head.tpl'), [
                        '$baseurl' => System::baseUrl(true),
-               ));
-               $a->page['end'] .= replace_macros(get_markup_template('contact_end.tpl'), array(
+               ]);
+               $a->page['end'] .= replace_macros(get_markup_template('contact_end.tpl'), [
                        '$baseurl' => System::baseUrl(true),
-               ));
+               ]);
 
                $dir_icon = '';
                $relation_text = '';
@@ -519,7 +519,7 @@ function contacts_content(App $a)
                                break;
                }
 
-               if (!in_array($contact['network'], array(NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA))) {
+               if (!in_array($contact['network'], [NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA])) {
                        $relation_text = "";
                }
 
@@ -542,7 +542,7 @@ function contacts_content(App $a)
                }
                $lblsuggest = (($contact['network'] === NETWORK_DFRN) ? t('Suggest friends') : '');
 
-               $poll_enabled = in_array($contact['network'], array(NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_FEED, NETWORK_MAIL));
+               $poll_enabled = in_array($contact['network'], [NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_FEED, NETWORK_MAIL]);
 
                $nettype = t('Network type: %s', ContactSelector::networkToName($contact['network'], $contact["url"]));
 
@@ -553,21 +553,21 @@ function contacts_content(App $a)
 
                $fetch_further_information = null;
                if ($contact['network'] == NETWORK_FEED) {
-                       $fetch_further_information = array(
+                       $fetch_further_information = [
                                'fetch_further_information',
                                t('Fetch further information for feeds'),
                                $contact['fetch_further_information'],
                                t("Fetch information like preview pictures, title and teaser from the feed item. You can activate this if the feed doesn't contain much text. Keywords are taken from the meta header in the feed item and are posted as hash tags."),
-                               array('0' => t('Disabled'),
+                               ['0' => t('Disabled'),
                                        '1' => t('Fetch information'),
                                        '3' => t('Fetch keywords'),
                                        '2' => t('Fetch information and keywords')
-                               )
-                       );
+                               ]
+                       ];
                }
 
                $poll_interval = null;
-               if (in_array($contact['network'], array(NETWORK_FEED, NETWORK_MAIL))) {
+               if (in_array($contact['network'], [NETWORK_FEED, NETWORK_MAIL])) {
                        $poll_interval = ContactSelector::pollInterval($contact['priority'], (!$poll_enabled));
                }
 
@@ -578,7 +578,7 @@ function contacts_content(App $a)
 
                $follow = '';
                $follow_text = '';
-               if (in_array($contact['network'], array(NETWORK_DIASPORA, NETWORK_OSTATUS))) {
+               if (in_array($contact['network'], [NETWORK_DIASPORA, NETWORK_OSTATUS])) {
                        if ($contact['rel'] == CONTACT_IS_FOLLOWER) {
                                $follow = System::baseUrl(true) . "/follow?url=" . urlencode($contact["url"]);
                                $follow_text = t("Connect/Follow");
@@ -592,7 +592,7 @@ function contacts_content(App $a)
                $contact_actions = contact_actions($contact);
 
                $tpl = get_markup_template("contact_edit.tpl");
-               $o .= replace_macros($tpl, array(
+               $o .= replace_macros($tpl, [
                        '$header' => t("Contact"),
                        '$tab_str' => $tab_str,
                        '$submit' => t('Submit'),
@@ -626,16 +626,16 @@ function contacts_content(App $a)
                        '$ignore_text' => (($contact['readonly']) ? t('Unignore') : t('Ignore') ),
                        '$insecure' => (($contact['network'] !== NETWORK_DFRN && $contact['network'] !== NETWORK_MAIL && $contact['network'] !== NETWORK_FACEBOOK && $contact['network'] !== NETWORK_DIASPORA) ? $insecure : ''),
                        '$info' => $contact['info'],
-                       '$cinfo' => array('info', '', $contact['info'], ''),
+                       '$cinfo' => ['info', '', $contact['info'], ''],
                        '$blocked' => (($contact['blocked']) ? t('Currently blocked') : ''),
                        '$ignored' => (($contact['readonly']) ? t('Currently ignored') : ''),
                        '$archived' => (($contact['archive']) ? t('Currently archived') : ''),
                        '$pending' => (($contact['pending']) ? t('Awaiting connection acknowledge') : ''),
-                       '$hidden' => array('hidden', t('Hide this contact from others'), ($contact['hidden'] == 1), t('Replies/likes to your public posts <strong>may</strong> still be visible')),
-                       '$notify' => array('notify', t('Notification for new posts'), ($contact['notify_new_posts'] == 1), t('Send a notification of every new post of this contact')),
+                       '$hidden' => ['hidden', t('Hide this contact from others'), ($contact['hidden'] == 1), t('Replies/likes to your public posts <strong>may</strong> still be visible')],
+                       '$notify' => ['notify', t('Notification for new posts'), ($contact['notify_new_posts'] == 1), t('Send a notification of every new post of this contact')],
                        '$fetch_further_information' => $fetch_further_information,
                        '$ffi_keyword_blacklist' => $contact['ffi_keyword_blacklist'],
-                       '$ffi_keyword_blacklist' => array('ffi_keyword_blacklist', t('Blacklisted keywords'), $contact['ffi_keyword_blacklist'], t('Comma separated list of keywords that should not be converted to hashtags, when "Fetch information and keywords" is selected')),
+                       '$ffi_keyword_blacklist' => ['ffi_keyword_blacklist', t('Blacklisted keywords'), $contact['ffi_keyword_blacklist'], t('Comma separated list of keywords that should not be converted to hashtags, when "Fetch information and keywords" is selected')],
                        '$photo' => $contact['photo'],
                        '$name' => htmlentities($contact['name']),
                        '$dir_icon' => $dir_icon,
@@ -657,9 +657,9 @@ function contacts_content(App $a)
                        '$contact_status' => t("Status"),
                        '$contact_settings_label' => t('Contact Settings'),
                        '$contact_profile_label' => t("Profile"),
-               ));
+               ]);
 
-               $arr = array('contact' => $contact, 'output' => $o);
+               $arr = ['contact' => $contact, 'output' => $o];
 
                call_hooks('contact_edit', $arr);
 
@@ -694,67 +694,67 @@ function contacts_content(App $a)
        $search = x($_GET, 'search') ? notags(trim($_GET['search'])) : '';
        $nets   = x($_GET, 'nets'  ) ? notags(trim($_GET['nets']))   : '';
 
-       $tabs = array(
-               array(
+       $tabs = [
+               [
                        'label' => t('Suggestions'),
                        'url'   => 'suggest',
                        'sel'   => '',
                        'title' => t('Suggest potential friends'),
                        'id'    => 'suggestions-tab',
                        'accesskey' => 'g',
-               ),
-               array(
+               ],
+               [
                        'label' => t('All Contacts'),
                        'url'   => 'contacts/all',
                        'sel'   => ($all) ? 'active' : '',
                        'title' => t('Show all contacts'),
                        'id'    => 'showall-tab',
                        'accesskey' => 'l',
-               ),
-               array(
+               ],
+               [
                        'label' => t('Unblocked'),
                        'url'   => 'contacts',
                        'sel'   => ((!$all) && (!$blocked) && (!$hidden) && (!$search) && (!$nets) && (!$ignored) && (!$archived)) ? 'active' : '',
                        'title' => t('Only show unblocked contacts'),
                        'id'    => 'showunblocked-tab',
                        'accesskey' => 'o',
-               ),
-               array(
+               ],
+               [
                        'label' => t('Blocked'),
                        'url'   => 'contacts/blocked',
                        'sel'   => ($blocked) ? 'active' : '',
                        'title' => t('Only show blocked contacts'),
                        'id'    => 'showblocked-tab',
                        'accesskey' => 'b',
-               ),
-               array(
+               ],
+               [
                        'label' => t('Ignored'),
                        'url'   => 'contacts/ignored',
                        'sel'   => ($ignored) ? 'active' : '',
                        'title' => t('Only show ignored contacts'),
                        'id'    => 'showignored-tab',
                        'accesskey' => 'i',
-               ),
-               array(
+               ],
+               [
                        'label' => t('Archived'),
                        'url'   => 'contacts/archived',
                        'sel'   => ($archived) ? 'active' : '',
                        'title' => t('Only show archived contacts'),
                        'id'    => 'showarchived-tab',
                        'accesskey' => 'y',
-               ),
-               array(
+               ],
+               [
                        'label' => t('Hidden'),
                        'url'   => 'contacts/hidden',
                        'sel'   => ($hidden) ? 'active' : '',
                        'title' => t('Only show hidden contacts'),
                        'id'    => 'showhidden-tab',
                        'accesskey' => 'h',
-               ),
-       );
+               ],
+       ];
 
        $tab_tpl = get_markup_template('common_tabs.tpl');
-       $t = replace_macros($tab_tpl, array('$tabs' => $tabs));
+       $t = replace_macros($tab_tpl, ['$tabs' => $tabs]);
 
        $total = 0;
        $searching = false;
@@ -783,7 +783,7 @@ function contacts_content(App $a)
 
        $sql_extra3 = Widget::unavailableNetworks();
 
-       $contacts = array();
+       $contacts = [];
 
        $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `pending` = 0 $sql_extra $sql_extra2 $sql_extra3 ORDER BY `name` ASC LIMIT %d , %d ",
                intval($_SESSION['uid']),
@@ -797,7 +797,7 @@ function contacts_content(App $a)
        }
 
        $tpl = get_markup_template("contacts-template.tpl");
-       $o .= replace_macros($tpl, array(
+       $o .= replace_macros($tpl, [
                '$baseurl' => System::baseUrl(),
                '$header' => t('Contacts') . (($nets) ? ' - ' . ContactSelector::networkToName($nets) : ''),
                '$tabs' => $t,
@@ -810,16 +810,16 @@ function contacts_content(App $a)
                '$contacts' => $contacts,
                '$contact_drop_confirm' => t('Do you really want to delete this contact?'),
                'multiselect' => 1,
-               '$batch_actions' => array(
+               '$batch_actions' => [
                        'contacts_batch_update'  => t('Update'),
                        'contacts_batch_block'   => t('Block') . "/" . t("Unblock"),
                        "contacts_batch_ignore"  => t('Ignore') . "/" . t("Unignore"),
                        "contacts_batch_archive" => t('Archive') . "/" . t("Unarchive"),
                        "contacts_batch_drop"    => t('Delete'),
-               ),
+               ],
                '$h_batch_actions' => t('Batch Actions'),
                '$paginate' => paginate($a),
-       ));
+       ]);
 
        return $o;
 }
@@ -838,58 +838,58 @@ function contacts_content(App $a)
 function contacts_tab($a, $contact_id, $active_tab)
 {
        // tabs
-       $tabs = array(
-               array(
+       $tabs = [
+               [
                        'label' => t('Status'),
                        'url'   => "contacts/" . $contact_id . "/posts",
                        'sel'   => (($active_tab == 1) ? 'active' : ''),
                        'title' => t('Status Messages and Posts'),
                        'id'    => 'status-tab',
                        'accesskey' => 'm',
-               ),
-               array(
+               ],
+               [
                        'label' => t('Profile'),
                        'url'   => "contacts/" . $contact_id,
                        'sel'   => (($active_tab == 2) ? 'active' : ''),
                        'title' => t('Profile Details'),
                        'id'    => 'profile-tab',
                        'accesskey' => 'o',
-               )
-       );
+               ]
+       ];
 
        // Show this tab only if there is visible friend list
        $x = GContact::countAllFriends(local_user(), $contact_id);
        if ($x) {
-               $tabs[] = array('label' => t('Contacts'),
+               $tabs[] = ['label' => t('Contacts'),
                        'url'   => "allfriends/" . $contact_id,
                        'sel'   => (($active_tab == 3) ? 'active' : ''),
                        'title' => t('View all contacts'),
                        'id'    => 'allfriends-tab',
-                       'accesskey' => 't');
+                       'accesskey' => 't'];
        }
 
        // Show this tab only if there is visible common friend list
        $common = GContact::countCommonFriends(local_user(), $contact_id);
        if ($common) {
-               $tabs[] = array('label' => t('Common Friends'),
+               $tabs[] = ['label' => t('Common Friends'),
                        'url'   => "common/loc/" . local_user() . "/" . $contact_id,
                        'sel'   => (($active_tab == 4) ? 'active' : ''),
                        'title' => t('View all common friends'),
                        'id'    => 'common-loc-tab',
                        'accesskey' => 'd'
-               );
+               ];
        }
 
-       $tabs[] = array('label' => t('Advanced'),
+       $tabs[] = ['label' => t('Advanced'),
                'url'   => 'crepair/' . $contact_id,
                'sel'   => (($active_tab == 5) ? 'active' : ''),
                'title' => t('Advanced Contact Settings'),
                'id'    => 'advanced-tab',
                'accesskey' => 'r'
-       );
+       ];
 
        $tab_tpl = get_markup_template('common_tabs.tpl');
-       $tab_str = replace_macros($tab_tpl, array('$tabs' => $tabs));
+       $tab_str = replace_macros($tab_tpl, ['$tabs' => $tabs]);
 
        return $tab_str;
 }
@@ -936,7 +936,7 @@ function _contact_detail_for_template($rr)
                $sparkle = '';
        }
 
-       return array(
+       return [
                'img_hover' => t('Visit %s\'s profile [%s]', $rr['name'], $rr['url']),
                'edit_hover' => t('Edit contact'),
                'photo_menu' => Contact::photoMenu($rr),
@@ -951,7 +951,7 @@ function _contact_detail_for_template($rr)
                'itemurl' => (($rr['addr'] != "") ? $rr['addr'] : $rr['url']),
                'url' => $url,
                'network' => ContactSelector::networkToName($rr['network'], $rr['url']),
-       );
+       ];
 }
 
 /**
@@ -964,61 +964,61 @@ function _contact_detail_for_template($rr)
  */
 function contact_actions($contact)
 {
-       $poll_enabled = in_array($contact['network'], array(NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_FEED, NETWORK_MAIL));
-       $contact_actions = array();
+       $poll_enabled = in_array($contact['network'], [NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_FEED, NETWORK_MAIL]);
+       $contact_actions = [];
 
        // Provide friend suggestion only for Friendica contacts
        if ($contact['network'] === NETWORK_DFRN) {
-               $contact_actions['suggest'] = array(
+               $contact_actions['suggest'] = [
                        'label' => t('Suggest friends'),
                        'url'   => 'fsuggest/' . $contact['id'],
                        'title' => '',
                        'sel'   => '',
                        'id'    => 'suggest',
-               );
+               ];
        }
 
        if ($poll_enabled) {
-               $contact_actions['update'] = array(
+               $contact_actions['update'] = [
                        'label' => t('Update now'),
                        'url'   => 'contacts/' . $contact['id'] . '/update',
                        'title' => '',
                        'sel'   => '',
                        'id'    => 'update',
-               );
+               ];
        }
 
-       $contact_actions['block'] = array(
+       $contact_actions['block'] = [
                'label' => (intval($contact['blocked']) ? t('Unblock') : t('Block') ),
                'url'   => 'contacts/' . $contact['id'] . '/block',
                'title' => t('Toggle Blocked status'),
                'sel'   => (intval($contact['blocked']) ? 'active' : ''),
                'id'    => 'toggle-block',
-       );
+       ];
 
-       $contact_actions['ignore'] = array(
+       $contact_actions['ignore'] = [
                'label' => (intval($contact['readonly']) ? t('Unignore') : t('Ignore') ),
                'url'   => 'contacts/' . $contact['id'] . '/ignore',
                'title' => t('Toggle Ignored status'),
                'sel'   => (intval($contact['readonly']) ? 'active' : ''),
                'id'    => 'toggle-ignore',
-       );
+       ];
 
-       $contact_actions['archive'] = array(
+       $contact_actions['archive'] = [
                'label' => (intval($contact['archive']) ? t('Unarchive') : t('Archive') ),
                'url'   => 'contacts/' . $contact['id'] . '/archive',
                'title' => t('Toggle Archive status'),
                'sel'   => (intval($contact['archive']) ? 'active' : ''),
                'id'    => 'toggle-archive',
-       );
+       ];
 
-       $contact_actions['delete'] = array(
+       $contact_actions['delete'] = [
                'label' => t('Delete'),
                'url'   => 'contacts/' . $contact['id'] . '/drop',
                'title' => t('Delete contact'),
                'sel'   => '',
                'id'    => 'delete',
-       );
+       ];
 
        return $contact_actions;
 }
index cfe0e3e286efd93ed9e88f550e3163e4b243b739..57796c44d1c59867d89599729270b0ff203be195 100644 (file)
@@ -120,22 +120,22 @@ function crepair_content(App $a)
        // Disable remote self for everything except feeds.
        // There is an issue when you repeat an item from maybe twitter and you got comments from friendica and twitter
        // Problem is, you couldn't reply to both networks.
-       if (!in_array($contact['network'], array(NETWORK_FEED, NETWORK_DFRN, NETWORK_DIASPORA))) {
+       if (!in_array($contact['network'], [NETWORK_FEED, NETWORK_DFRN, NETWORK_DIASPORA])) {
                $allow_remote_self = false;
        }
 
        if ($contact['network'] == NETWORK_FEED) {
-               $remote_self_options = array('0' => t('No mirroring'), '1' => t('Mirror as forwarded posting'), '2' => t('Mirror as my own posting'));
+               $remote_self_options = ['0' => t('No mirroring'), '1' => t('Mirror as forwarded posting'), '2' => t('Mirror as my own posting')];
        } else {
-               $remote_self_options = array('0' => t('No mirroring'), '2' => t('Mirror as my own posting'));
+               $remote_self_options = ['0' => t('No mirroring'), '2' => t('Mirror as my own posting')];
        }
 
-       $update_profile = in_array($contact['network'], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS));
+       $update_profile = in_array($contact['network'], [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS]);
 
        $tab_str = contacts_tab($a, $contact['id'], 5);
 
        $tpl = get_markup_template('crepair.tpl');
-       $o = replace_macros($tpl, array(
+       $o = replace_macros($tpl, [
                '$tab_str'        => $tab_str,
                '$warning'        => $warning,
                '$info'           => $info,
@@ -147,23 +147,23 @@ function crepair_content(App $a)
                '$lbl_submit'     => t('Submit'),
                '$label_remote_self' => t('Remote Self'),
                '$allow_remote_self' => $allow_remote_self,
-               '$remote_self' => array('remote_self',
+               '$remote_self' => ['remote_self',
                        t('Mirror postings from this contact'),
                        $contact['remote_self'],
                        t('Mark this contact as remote_self, this will cause friendica to repost new entries from this contact.'),
                        $remote_self_options
-               ),
-
-               '$name'         => array('name', t('Name') , htmlentities($contact['name'])),
-               '$nick'         => array('nick', t('Account Nickname'), htmlentities($contact['nick'])),
-               '$attag'        => array('attag', t('@Tagname - overrides Name/Nickname'), $contact['attag']),
-               '$url'          => array('url', t('Account URL'), $contact['url']),
-               '$request'      => array('request', t('Friend Request URL'), $contact['request']),
-               'confirm'       => array('confirm', t('Friend Confirm URL'), $contact['confirm']),
-               'notify'        => array('notify', t('Notification Endpoint URL'), $contact['notify']),
-               'poll'          => array('poll', t('Poll/Feed URL'), $contact['poll']),
-               'photo'         => array('photo', t('New photo from this URL'), ''),
-       ));
+               ],
+
+               '$name'         => ['name', t('Name') , htmlentities($contact['name'])],
+               '$nick'         => ['nick', t('Account Nickname'), htmlentities($contact['nick'])],
+               '$attag'        => ['attag', t('@Tagname - overrides Name/Nickname'), $contact['attag']],
+               '$url'          => ['url', t('Account URL'), $contact['url']],
+               '$request'      => ['request', t('Friend Request URL'), $contact['request']],
+               'confirm'       => ['confirm', t('Friend Confirm URL'), $contact['confirm']],
+               'notify'        => ['notify', t('Notification Endpoint URL'), $contact['notify']],
+               'poll'          => ['poll', t('Poll/Feed URL'), $contact['poll']],
+               'photo'         => ['photo', t('New photo from this URL'), ''],
+       ]);
 
        return $o;
 }
index 6c494128b1cd52f718806e35b7e51bd3abc028a4..95e2bb0c777e02ba599437267ba9fee831dfa0f1 100644 (file)
@@ -107,10 +107,10 @@ function dfrn_poll_init(App $a)
                                if ((int) $xml->status === 1) {
                                        $_SESSION['authenticated'] = 1;
                                        if (!x($_SESSION, 'remote')) {
-                                               $_SESSION['remote'] = array();
+                                               $_SESSION['remote'] = [];
                                        }
 
-                                       $_SESSION['remote'][] = array('cid' => $r[0]['id'], 'uid' => $r[0]['uid'], 'url' => $r[0]['url']);
+                                       $_SESSION['remote'][] = ['cid' => $r[0]['id'], 'uid' => $r[0]['uid'], 'url' => $r[0]['url']];
 
                                        $_SESSION['visitor_id'] = $r[0]['id'];
                                        $_SESSION['visitor_home'] = $r[0]['url'];
@@ -488,13 +488,13 @@ function dfrn_poll_content(App $a)
                                        . '&sec=' . $sec
                                );
                        } else {
-                               $s = post_url($r[0]['poll'], array(
+                               $s = post_url($r[0]['poll'], [
                                        'dfrn_id' => $encrypted_id,
                                        'type' => 'profile-check',
                                        'dfrn_version' => DFRN_PROTOCOL_VERSION,
                                        'challenge' => $challenge,
                                        'sec' => $sec
-                               ));
+                               ]);
                        }
 
                        $profile = ((DBM::is_result($r) && $r[0]['nickname']) ? $r[0]['nickname'] : $nickname);
@@ -529,10 +529,10 @@ function dfrn_poll_content(App $a)
                                if (((int) $xml->status == 0) && ($xml->challenge == $hash) && ($xml->sec == $sec)) {
                                        $_SESSION['authenticated'] = 1;
                                        if (!x($_SESSION, 'remote')) {
-                                               $_SESSION['remote'] = array();
+                                               $_SESSION['remote'] = [];
                                        }
 
-                                       $_SESSION['remote'][] = array('cid' => $r[0]['id'], 'uid' => $r[0]['uid'], 'url' => $r[0]['url']);
+                                       $_SESSION['remote'][] = ['cid' => $r[0]['id'], 'uid' => $r[0]['uid'], 'url' => $r[0]['url']];
                                        $_SESSION['visitor_id'] = $r[0]['id'];
                                        $_SESSION['visitor_home'] = $r[0]['url'];
                                        $_SESSION['visitor_visiting'] = $r[0]['uid'];
index d42e649bf60cf030729e85950c3818e264ef6d64..a5f18e07a3c298c803d8450cebccc6bbfdea19dc 100644 (file)
@@ -316,7 +316,7 @@ function dfrn_request_post(App $a)
                                        return;
                                } else {
                                        $contact_record = $ret[0];
-                                       $parms = array('dfrn-request' => $ret[0]['request']);
+                                       $parms = ['dfrn-request' => $ret[0]['request']];
                                }
                        }
 
@@ -517,7 +517,7 @@ function dfrn_request_content(App $a)
                }
 
                $tpl = get_markup_template("dfrn_req_confirm.tpl");
-               $o = replace_macros($tpl, array(
+               $o = replace_macros($tpl, [
                        '$dfrn_url' => $dfrn_url,
                        '$aes_allow' => (($aes_allow) ? '<input type="hidden" name="aes_allow" value="1" />' : "" ),
                        '$hidethem' => t('Hide this contact'),
@@ -529,7 +529,7 @@ function dfrn_request_content(App $a)
                        '$uid' => $_SESSION['uid'],
                        '$nickname' => $a->user['nickname'],
                        'dfrn_rawurl' => $_GET['dfrn_url']
-               ));
+               ]);
                return $o;
        } elseif ((x($_GET, 'confirm_key')) && strlen($_GET['confirm_key'])) {
                // we are the requestee and it is now safe to send our user their introduction,
@@ -553,7 +553,7 @@ function dfrn_request_content(App $a)
                                }
 
                                if (!$auto_confirm) {
-                                       notification(array(
+                                       notification([
                                                'type'         => NOTIFY_INTRO,
                                                'notify_flags' => $r[0]['notify-flags'],
                                                'language'     => $r[0]['language'],
@@ -566,19 +566,19 @@ function dfrn_request_content(App $a)
                                                'source_photo' => $r[0]['photo'],
                                                'verb'         => ACTIVITY_REQ_FRIEND,
                                                'otype'        => 'intro'
-                                       ));
+                                       ]);
                                }
 
                                if ($auto_confirm) {
                                        require_once 'mod/dfrn_confirm.php';
-                                       $handsfree = array(
+                                       $handsfree = [
                                                'uid'      => $r[0]['uid'],
                                                'node'     => $r[0]['nickname'],
                                                'dfrn_id'  => $r[0]['issued-id'],
                                                'intro_id' => $intro[0]['id'],
                                                'duplex'   => (($r[0]['page-flags'] == PAGE_FREELOVE) ? 1 : 0),
                                                'activity' => intval(PConfig::get($r[0]['uid'], 'system', 'post_newfriend'))
-                                       );
+                                       ];
                                        dfrn_confirm_post($a, $handsfree);
                                }
                        }
@@ -642,11 +642,11 @@ function dfrn_request_content(App $a)
                        get_server()
                );
 
-               $o = replace_macros($tpl, array(
+               $o = replace_macros($tpl, [
                        '$header' => t('Friend/Connection Request'),
                        '$desc' => t('Examples: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, testuser@gnusocial.de'),
                        '$pls_answer' => t('Please answer the following:'),
-                       '$does_know_you' => array('knowyou', sprintf(t('Does %s know you?'), $a->profile['name']), false, '', array(t('No'), t('Yes'))),
+                       '$does_know_you' => ['knowyou', sprintf(t('Does %s know you?'), $a->profile['name']), false, '', [t('No'), t('Yes')]],
                        '$add_note' => t('Add a personal note:'),
                        '$page_desc' => $page_desc,
                        '$friendica' => t('Friendica'),
@@ -660,7 +660,7 @@ function dfrn_request_content(App $a)
                        '$nickname' => $a->argv[1],
                        '$name' => $a->profile['name'],
                        '$myaddr' => $myaddr
-               ));
+               ]);
                return $o;
        }
 
index a711f723149fb38286009e483c425bac4b2fddf1..59a3195b1b54d087fa7c35084b7e6b5fb3e03776 100644 (file)
@@ -146,11 +146,11 @@ function directory_content(App $a) {
 
                        $location_e = $location;
 
-                       $photo_menu = array(
-                               'profile' => array(t("View Profile"), Profile::zrl($profile_link))
-                       );
+                       $photo_menu = [
+                               'profile' => [t("View Profile"), Profile::zrl($profile_link)]
+                       ];
 
-                       $entry = array(
+                       $entry = [
                                'id' => $rr['id'],
                                'url' => $profile_link,
                                'itemurl' => $itemurl,
@@ -169,9 +169,9 @@ function directory_content(App $a) {
                                'about' => $about,
                                'photo_menu' => $photo_menu,
 
-                       );
+                       ];
 
-                       $arr = array('contact' => $rr, 'entry' => $entry);
+                       $arr = ['contact' => $rr, 'entry' => $entry];
 
                        call_hooks('directory_item', $arr);
 
@@ -187,7 +187,7 @@ function directory_content(App $a) {
 
                $tpl = get_markup_template('directory_header.tpl');
 
-               $o .= replace_macros($tpl, array(
+               $o .= replace_macros($tpl, [
                        '$search' => $search,
                        '$globaldir' => t('Global Directory'),
                        '$gdirpath' => $gdirpath,
@@ -198,7 +198,7 @@ function directory_content(App $a) {
                        '$title' => t('Site Directory'),
                        '$submit' => t('Find'),
                        '$paginate' => paginate($a),
-               ));
+               ]);
 
        }
        else
index 9a91d0652c0976975face5c6783f536bfb967fe9..1b538d813aefa48c5947ad2460990e22181b9770 100644 (file)
@@ -47,7 +47,7 @@ function dirfind_content(App $a, $prefix = "") {
                if ((valid_email($search) && validate_email($search)) ||
                        (substr(normalise_link($search), 0, 7) == "http://")) {
                        $user_data = Probe::uri($search);
-                       $discover_user = (in_array($user_data["network"], array(NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA)));
+                       $discover_user = (in_array($user_data["network"], [NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA]));
                }
        }
 
@@ -209,20 +209,20 @@ function dirfind_content(App $a, $prefix = "") {
                                                $details = _contact_detail_for_template($contact[0]);
                                                $alt_text = $details['alt_text'];
                                        } else {
-                                               $photo_menu = array();
+                                               $photo_menu = [];
                                        }
                                } else {
                                        $connlnk = System::baseUrl().'/follow/?url='.(($jj->connect) ? $jj->connect : $jj->url);
                                        $conntxt = t('Connect');
-                                       $photo_menu = array(
-                                               'profile' => array(t("View Profile"), Profile::zrl($jj->url)),
-                                               'follow' => array(t("Connect/Follow"), $connlnk)
-                                       );
+                                       $photo_menu = [
+                                               'profile' => [t("View Profile"), Profile::zrl($jj->url)],
+                                               'follow' => [t("Connect/Follow"), $connlnk]
+                                       ];
                                }
 
                                $jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo);
 
-                               $entry = array(
+                               $entry = [
                                        'alt_text' => $alt_text,
                                        'url' => Profile::zrl($jj->url),
                                        'itemurl' => $itemurl,
@@ -238,17 +238,17 @@ function dirfind_content(App $a, $prefix = "") {
                                        'account_type'  => Contact::getAccountType($contact_details),
                                        'network' => ContactSelector::networkToName($jj->network, $jj->url),
                                        'id' => ++$id,
-                               );
+                               ];
                                $entries[] = $entry;
                        }
 
                $tpl = get_markup_template('viewcontact_template.tpl');
 
-               $o .= replace_macros($tpl,array(
+               $o .= replace_macros($tpl,[
                        'title' => $header,
                        '$contacts' => $entries,
                        '$paginate' => paginate($a),
-               ));
+               ]);
 
                } else {
                        info( t('No matches') . EOL);
index 2bd2b9a5d18b4592948413b9397376a48a3a7a29..5ae8b6f4518f8d27a58539ba217908b987ac1f68 100644 (file)
@@ -18,7 +18,7 @@ function display_init(App $a)
        }
 
        $nick = (($a->argc > 1) ? $a->argv[1] : '');
-       $profiledata = array();
+       $profiledata = [];
 
        if ($a->argc == 3) {
                if (substr($a->argv[2], -5) == '.atom') {
@@ -102,7 +102,7 @@ function display_init(App $a)
                                }
                                $profiledata["network"] = NETWORK_DFRN;
                        } else {
-                               $profiledata = array();
+                               $profiledata = [];
                        }
                }
        }
@@ -111,7 +111,7 @@ function display_init(App $a)
 }
 
 function display_fetchauthor($a, $item) {
-       $profiledata = array();
+       $profiledata = [];
        $profiledata["uid"] = -1;
        $profiledata["nickname"] = $item["author-name"];
        $profiledata["name"] = $item["author-name"];
@@ -181,7 +181,7 @@ function display_fetchauthor($a, $item) {
        $profiledata["photo"] = System::removedBaseUrl($profiledata["photo"]);
 
        if (local_user()) {
-               if (in_array($profiledata["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) {
+               if (in_array($profiledata["network"], [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS])) {
                        $profiledata["remoteconnect"] = System::baseUrl()."/follow?url=".urlencode($profiledata["url"]);
                }
        } elseif ($profiledata["network"] == NETWORK_DFRN) {
@@ -207,7 +207,7 @@ function display_content(App $a, $update = false, $update_uid = 0) {
        if ($update) {
                $item_id = $_REQUEST['item_id'];
                $item = dba::selectFirst('item', ['uid', 'parent'], ['id' => $item_id]);
-               $a->profile = array('uid' => intval($item['uid']), 'profile_uid' => intval($item['uid']));
+               $a->profile = ['uid' => intval($item['uid']), 'profile_uid' => intval($item['uid'])];
                $item_parent = $item['parent'];
        } else {
                $item_id = (($a->argc > 2) ? $a->argv[2] : 0);
@@ -245,7 +245,7 @@ function display_content(App $a, $update = false, $update_uid = 0) {
        }
 
        // We are displaying an "alternate" link if that post was public. See issue 2864
-       $is_public = dba::exists('item', array('id' => $item_id, 'private' => false));
+       $is_public = dba::exists('item', ['id' => $item_id, 'private' => false]);
        if ($is_public) {
                // For the atom feed the nickname doesn't matter at all, we only need the item id.
                $alternate = System::baseUrl().'/display/feed-item/'.$item_id.'.atom';
@@ -256,10 +256,10 @@ function display_content(App $a, $update = false, $update_uid = 0) {
        }
 
        $a->page['htmlhead'] .= replace_macros(get_markup_template('display-head.tpl'),
-                               array('$alternate' => $alternate,
-                                       '$conversation' => $conversation));
+                               ['$alternate' => $alternate,
+                                       '$conversation' => $conversation]);
 
-       $groups = array();
+       $groups = [];
 
        $contact = null;
        $remote_contact = false;
@@ -307,7 +307,7 @@ function display_content(App $a, $update = false, $update_uid = 0) {
 
        // We need the editor here to be able to reshare an item.
        if ($is_owner) {
-               $x = array(
+               $x = [
                        'is_owner' => true,
                        'allow_location' => $a->user['allow_location'],
                        'default_location' => $a->user['default-location'],
@@ -317,7 +317,7 @@ function display_content(App $a, $update = false, $update_uid = 0) {
                        'bang' => '',
                        'visitor' => 'block',
                        'profile_uid' => local_user(),
-               );
+               ];
                $o .= status_editor($a, $x, 0, true);
        }
 
@@ -351,7 +351,7 @@ function display_content(App $a, $update = false, $update_uid = 0) {
        if (local_user() && (local_user() == $a->profile['uid'])) {
                $unseen = dba::selectFirst('item', ['id'], ['parent' => $s[0]['parent'], 'unseen' => true]);
                if (DBM::is_result($unseen)) {
-                       dba::update('item', array('unseen' => false), array('parent' => $s[0]['parent'], 'unseen' => true));
+                       dba::update('item', ['unseen' => false], ['parent' => $s[0]['parent'], 'unseen' => true]);
                }
        }
 
index a9cdfe9bbbd262018d4a35edba7c52c49e714dbc..117cb3fb19301180746acc0c91e92fabcc3964ae 100644 (file)
@@ -36,25 +36,25 @@ function editpost_content(App $a) {
                return;
        }
 
-       $o .= replace_macros(get_markup_template("section_title.tpl"),array(
+       $o .= replace_macros(get_markup_template("section_title.tpl"),[
                '$title' => t('Edit post')
-       ));
+       ]);
 
        $tpl = get_markup_template('jot-header.tpl');
-       $a->page['htmlhead'] .= replace_macros($tpl, array(
+       $a->page['htmlhead'] .= replace_macros($tpl, [
                '$baseurl' => System::baseUrl(),
                '$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'),
                '$geotag' => $geotag,
                '$nickname' => $a->user['nickname']
-       ));
+       ]);
 
        $tpl = get_markup_template('jot-end.tpl');
-       $a->page['end'] .= replace_macros($tpl, array(
+       $a->page['end'] .= replace_macros($tpl, [
                '$baseurl' => System::baseUrl(),
                '$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'),
                '$geotag' => $geotag,
                '$nickname' => $a->user['nickname']
-       ));
+       ]);
 
 
        $tpl = get_markup_template("jot.tpl");
@@ -100,7 +100,7 @@ function editpost_content(App $a) {
 
        //$tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins));
 
-       $o .= replace_macros($tpl,array(
+       $o .= replace_macros($tpl,[
                '$is_edit' => true,
                '$return_path' => $_SESSION['return_url'],
                '$action' => 'item',
@@ -150,7 +150,7 @@ function editpost_content(App $a) {
                '$message' => t('Message'),
                '$browser' => t('Browser'),
                '$shortpermset' => t('permissions'),
-       ));
+       ]);
 
        return $o;
 
index b64b6a13403d2ec8c19f03cc4141681eda6c6239..791499515d526c43ade902cd260544224d8544e2 100644 (file)
@@ -150,7 +150,7 @@ function events_post(App $a) {
        }
 
 
-       $datarray = array();
+       $datarray = [];
        $datarray['guid']      = get_guid(32);
        $datarray['start']     = $start;
        $datarray['finish']    = $finish;
@@ -221,17 +221,17 @@ function events_content(App $a) {
        $i18n = get_event_strings();
 
        $htpl = get_markup_template('event_head.tpl');
-       $a->page['htmlhead'] .= replace_macros($htpl, array(
+       $a->page['htmlhead'] .= replace_macros($htpl, [
                '$baseurl' => System::baseUrl(),
                '$module_url' => '/events',
                '$modparams' => 1,
                '$i18n' => $i18n,
-       ));
+       ]);
 
        $etpl = get_markup_template('event_end.tpl');
-       $a->page['end'] .= replace_macros($etpl, array(
+       $a->page['end'] .= replace_macros($etpl, [
                '$baseurl' => System::baseUrl(),
-       ));
+       ]);
 
        $o = '';
        $tabs = '';
@@ -326,14 +326,14 @@ function events_content(App $a) {
                $adjust_finish = datetime_convert('UTC', date_default_timezone_get(), $finish);
 
                // put the event parametes in an array so we can better transmit them
-               $event_params = array(
+               $event_params = [
                        'event_id'      => (x($_GET, 'id') ? $_GET['id'] : 0),
                        'start'         => $start,
                        'finish'        => $finish,
                        'adjust_start'  => $adjust_start,
                        'adjust_finish' => $adjust_finish,
                        'ignored'       => $ignored,
-               );
+               ];
 
                // get events by id or by date
                if (x($_GET, 'id')) {
@@ -342,7 +342,7 @@ function events_content(App $a) {
                        $r = events_by_date(local_user(), $event_params);
                }
 
-               $links = array();
+               $links = [];
 
                if (DBM::is_result($r)) {
                        $r = sort_by_date($r);
@@ -354,7 +354,7 @@ function events_content(App $a) {
                        }
                }
 
-               $events = array();
+               $events = [];
 
                // transform the event in a usable array
                if (DBM::is_result($r)) {
@@ -375,7 +375,7 @@ function events_content(App $a) {
 
                // Get rid of dashes in key names, Smarty3 can't handle them
                foreach ($events as $key => $event) {
-                       $event_item = array();
+                       $event_item = [];
                        foreach ($event['item'] as $k => $v) {
                                $k = str_replace('-' ,'_', $k);
                                $event_item[$k] = $v;
@@ -383,14 +383,14 @@ function events_content(App $a) {
                        $events[$key]['item'] = $event_item;
                }
 
-               $o = replace_macros($tpl, array(
+               $o = replace_macros($tpl, [
                        '$baseurl'   => System::baseUrl(),
                        '$tabs'      => $tabs,
                        '$title'     => t('Events'),
                        '$view'      => t('View'),
-                       '$new_event' => array(System::baseUrl() . '/events/new', t('Create New Event'), '', ''),
-                       '$previous'  => array(System::baseUrl() . '/events/$prevyear/$prevmonth', t('Previous'), '', ''),
-                       '$next'      => array(System::baseUrl() . '/events/$nextyear/$nextmonth', t('Next'), '', ''),
+                       '$new_event' => [System::baseUrl() . '/events/new', t('Create New Event'), '', ''],
+                       '$previous'  => [System::baseUrl() . '/events/$prevyear/$prevmonth', t('Previous'), '', ''],
+                       '$next'      => [System::baseUrl() . '/events/$nextyear/$nextmonth', t('Next'), '', ''],
                        '$calendar'  => cal($y, $m, $links, ' eventcal'),
 
                        '$events'    => $events,
@@ -400,7 +400,7 @@ function events_content(App $a) {
                        '$week'  => t('week'),
                        '$day'   => t('day'),
                        '$list'  => t('list'),
-               ));
+               ]);
 
                if (x($_GET, 'id')) {
                        echo $o;
@@ -421,8 +421,8 @@ function events_content(App $a) {
        }
 
        // Passed parameters overrides anything found in the DB
-       if (in_array($mode, array('edit', 'new', 'copy'))) {
-               if (!x($orig_event)) {$orig_event = array();}
+       if (in_array($mode, ['edit', 'new', 'copy'])) {
+               if (!x($orig_event)) {$orig_event = [];}
                // In case of an error the browser is redirected back here, with these parameters filled in with the previous values
                if (x($_REQUEST, 'nofinish'))    {$orig_event['nofinish']    = $_REQUEST['nofinish'];}
                if (x($_REQUEST, 'adjust'))      {$orig_event['adjust']      = $_REQUEST['adjust'];}
@@ -492,7 +492,7 @@ function events_content(App $a) {
 
                $tpl = get_markup_template('event_form.tpl');
 
-               $o .= replace_macros($tpl,array(
+               $o .= replace_macros($tpl,[
                        '$post' => System::baseUrl() . '/events',
                        '$eid'  => $eid,
                        '$cid'  => $cid,
@@ -519,12 +519,12 @@ function events_content(App $a) {
                        '$l_orig' => $l_orig,
                        '$t_text' => t('Title:') . ' <span class="required" title="' . t('Required') . '">*</span>',
                        '$t_orig' => $t_orig,
-                       '$summary' => array('summary', t('Title:'), $t_orig, '', '*'),
+                       '$summary' => ['summary', t('Title:'), $t_orig, '', '*'],
                        '$sh_text' => t('Share this event'),
-                       '$share' => array('share', t('Share this event'), $sh_checked, '', $sh_disabled),
+                       '$share' => ['share', t('Share this event'), $sh_checked, '', $sh_disabled],
                        '$sh_checked' => $sh_checked,
-                       '$nofinish' => array('nofinish', t('Finish date/time is not known or not relevant'), $n_checked),
-                       '$adjust' => array('adjust', t('Adjust for viewer timezone'), $a_checked),
+                       '$nofinish' => ['nofinish', t('Finish date/time is not known or not relevant'), $n_checked],
+                       '$adjust' => ['adjust', t('Adjust for viewer timezone'), $a_checked],
                        '$preview' => t('Preview'),
                        '$acl' => $acl,
                        '$submit' => t('Submit'),
@@ -532,7 +532,7 @@ function events_content(App $a) {
                        '$advanced' => t('Advanced'),
                        '$permissions' => t('Permissions'),
 
-               ));
+               ]);
 
                return $o;
        }
@@ -541,7 +541,7 @@ function events_content(App $a) {
        if ($mode === 'drop' && $event_id) {
                $del = 0;
 
-               $params = array('event_id' => ($event_id));
+               $params = ['event_id' => ($event_id)];
                $ev = event_by_id(local_user(), $params);
 
                // Delete only real events (no birthdays)
index 3297dd918b0a74567362670cd1afcdda2d02a93a..992f2633ff99fa73a5477bf85a3743fe8b8ff5b3 100644 (file)
@@ -30,7 +30,7 @@ function fbrowser_content(App $a) {
 
        switch ($a->argv[1]) {
                case "image":
-                       $path = array(array("", t("Photos")));
+                       $path = [["", t("Photos")]];
                        $albums = false;
                        $sql_extra = "";
                        $sql_extra2 = " ORDER BY created DESC LIMIT 0, 10";
@@ -42,7 +42,7 @@ function fbrowser_content(App $a) {
                                        dbesc( t('Contact Photos'))
                                );
 
-                               function _map_folder1($el){return array(bin2hex($el['album']),$el['album']);};
+                               function _map_folder1($el){return [bin2hex($el['album']),$el['album']];};
                                $albums = array_map( "_map_folder1" , $albums);
 
                        }
@@ -52,7 +52,7 @@ function fbrowser_content(App $a) {
                                $album = hex2bin($a->argv[2]);
                                $sql_extra = sprintf("AND `album` = '%s' ",dbesc($album));
                                $sql_extra2 = "";
-                               $path[]=array($a->argv[2], $album);
+                               $path[]=[$a->argv[2], $album];
                        }
 
                        $r = q("SELECT `resource-id`, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`filename`) AS `filename`, ANY_VALUE(`type`) AS `type`,
@@ -78,17 +78,17 @@ function fbrowser_content(App $a) {
                                else
                                        $scale = $rr['loq'];
 
-                               return array(
+                               return [
                                        System::baseUrl() . '/photos/' . $a->user['nickname'] . '/image/' . $rr['resource-id'],
                                        $filename_e,
                                        System::baseUrl() . '/photo/' . $rr['resource-id'] . '-' . $scale . '.'. $ext
-                               );
+                               ];
                        }
                        $files = array_map("_map_files1", $r);
 
                        $tpl = get_markup_template($template_file);
 
-                       $o =  replace_macros($tpl, array(
+                       $o =  replace_macros($tpl, [
                                '$type'     => 'image',
                                '$baseurl'  => System::baseUrl(),
                                '$path'     => $path,
@@ -96,7 +96,7 @@ function fbrowser_content(App $a) {
                                '$files'    => $files,
                                '$cancel'   => t('Cancel'),
                                '$nickname' => $a->user['nickname'],
-                       ));
+                       ]);
 
 
                        break;
@@ -112,21 +112,21 @@ function fbrowser_content(App $a) {
                                        $filetype = ( (file_exists("images/icons/$m1.png"))?$m1:"zip");
                                        $filename_e = $rr['filename'];
 
-                                       return array(System::baseUrl() . '/attach/' . $rr['id'], $filename_e, System::baseUrl() . '/images/icons/16/' . $filetype . '.png');
+                                       return [System::baseUrl() . '/attach/' . $rr['id'], $filename_e, System::baseUrl() . '/images/icons/16/' . $filetype . '.png'];
                                }
                                $files = array_map("_map_files2", $files);
 
 
                                $tpl = get_markup_template($template_file);
-                               $o = replace_macros($tpl, array(
+                               $o = replace_macros($tpl, [
                                        '$type'     => 'file',
                                        '$baseurl'  => System::baseUrl(),
-                                       '$path'     => array( array( "", t("Files")) ),
+                                       '$path'     => [ [ "", t("Files")] ],
                                        '$folders'  => false,
                                        '$files'    =>$files,
                                        '$cancel'   => t('Cancel'),
                                        '$nickname' => $a->user['nickname'],
-                               ));
+                               ]);
 
                        }
 
index c097ee4c46f02418e1a3be5409d7b6df911dc73e..040ef81c84b89c84a091d88ffdcbc4c27d26c32f 100644 (file)
@@ -11,7 +11,7 @@ use Friendica\Util\XML;
 function fetch_init(App $a)
 {
 
-       if (($a->argc != 3) || (!in_array($a->argv[1], array("post", "status_message", "reshare")))) {
+       if (($a->argc != 3) || (!in_array($a->argv[1], ["post", "status_message", "reshare"]))) {
                header($_SERVER["SERVER_PROTOCOL"].' 404 '.t('Not Found'));
                killme();
        }
index ea2c70d9bad6b4c98bf97ff355407c0fdd83861b..f729a78e63e4f3ca5bfb6779f53037008df8c85b 100644 (file)
@@ -28,10 +28,10 @@ function filer_content(App $a) {
                 $filetags = explode(",", $filetags);
 
                $tpl = get_markup_template("filer_dialog.tpl");
-               $o = replace_macros($tpl, array(
-                       '$field' => array('term', t("Save to Folder:"), '', '', $filetags, t('- select -')),
+               $o = replace_macros($tpl, [
+                       '$field' => ['term', t("Save to Folder:"), '', '', $filetags, t('- select -')],
                        '$submit' => t('Save'),
-               ));
+               ]);
 
                echo $o;
        }
index f1a53e953f0a523832a7108d9818c66f617baaa4..c60403e54d1e24d8fefdb2ee99dd1cc1cd2baa48 100644 (file)
@@ -131,7 +131,7 @@ function follow_content(App $a) {
                normalise_link($ret["url"]));
 
        if (!$r) {
-               $r = array(array("location" => "", "about" => "", "keywords" => ""));
+               $r = [["location" => "", "about" => "", "keywords" => ""]];
        } else {
                $gcontact_id = $r[0]["id"];
        }
@@ -143,12 +143,12 @@ function follow_content(App $a) {
 
        $header = t("Connect/Follow");
 
-       $o  = replace_macros($tpl,array(
+       $o  = replace_macros($tpl,[
                        '$header' => htmlentities($header),
                        //'$photo' => proxy_url($ret["photo"], false, PROXY_SIZE_SMALL),
                        '$desc' => "",
                        '$pls_answer' => t('Please answer the following:'),
-                       '$does_know_you' => array('knowyou', sprintf(t('Does %s know you?'),$ret["name"]), false, '', array(t('No'), t('Yes'))),
+                       '$does_know_you' => ['knowyou', sprintf(t('Does %s know you?'),$ret["name"]), false, '', [t('No'), t('Yes')]],
                        '$add_note' => t('Add a personal note:'),
                        '$page_desc' => "",
                        '$friendica' => "",
@@ -173,7 +173,7 @@ function follow_content(App $a) {
                        '$about_label' => t("About:"), */
                        '$keywords' => $r[0]["keywords"],
                        '$keywords_label' => t("Tags:")
-       ));
+       ]);
 
        $a->page['aside'] = "";
 
@@ -181,8 +181,8 @@ function follow_content(App $a) {
 
        if ($gcontact_id <> 0) {
                $o .= replace_macros(get_markup_template('section_title.tpl'),
-                                               array('$title' => t('Status Messages and Posts')
-               ));
+                                               ['$title' => t('Status Messages and Posts')
+               ]);
 
                // Show last public posts
                $o .= Contact::getPostsFromUrl($ret["url"]);
index 36fb18c0ac008ab70397b741d2fac72a570e17b1..7f48ae3d4a4eed258c57800dd664f7bfe863ac62 100644 (file)
@@ -7,7 +7,7 @@ use Friendica\Database\DBM;
 
 function friendica_init(App $a) {
        if ($a->argv[1] == "json"){
-               $register_policy = Array('REGISTER_CLOSED', 'REGISTER_APPROVE', 'REGISTER_OPEN');
+               $register_policy = ['REGISTER_CLOSED', 'REGISTER_APPROVE', 'REGISTER_OPEN'];
 
                $sql_extra = '';
                if (x($a->config,'admin_nickname')) {
@@ -17,15 +17,15 @@ function friendica_init(App $a) {
                        $adminlist = explode(",", str_replace(" ", "", $a->config['admin_email']));
 
                        $r = q("SELECT `username`, `nickname` FROM `user` WHERE `email` = '%s' $sql_extra", dbesc($adminlist[0]));
-                       $admin = array(
+                       $admin = [
                                'name' => $r[0]['username'],
                                'profile'=> System::baseUrl() . '/profile/' . $r[0]['nickname'],
-                       );
+                       ];
                } else {
                        $admin = false;
                }
 
-               $visible_plugins = array();
+               $visible_plugins = [];
                if (is_array($a->plugins) && count($a->plugins)) {
                        $r = q("SELECT * FROM `addon` WHERE `hidden` = 0");
                        if (DBM::is_result($r)) {
@@ -36,7 +36,7 @@ function friendica_init(App $a) {
                }
 
                Config::load('feature_lock');
-               $locked_features = array();
+               $locked_features = [];
                if (is_array($a->config['feature_lock']) && count($a->config['feature_lock'])) {
                        foreach ($a->config['feature_lock'] as $k => $v) {
                                if ($k === 'config_loaded') {
@@ -47,7 +47,7 @@ function friendica_init(App $a) {
                        }
                }
 
-               $data = Array(
+               $data = [
                        'version'         => FRIENDICA_VERSION,
                        'url'             => System::baseUrl(),
                        'plugins'         => $visible_plugins,
@@ -58,7 +58,7 @@ function friendica_init(App $a) {
                        'platform'        => FRIENDICA_PLATFORM,
                        'info'            => ((x($a->config,'info')) ? $a->config['info'] : ''),
                        'no_scrape_url'   => System::baseUrl().'/noscrape'
-               );
+               ];
 
                echo json_encode($data);
                killme();
@@ -83,7 +83,7 @@ function friendica_content(App $a) {
        $o .= t('Suggestions, praise, donations, etc. - please email "Info" at Friendica - dot com');
        $o .= '</p>' . PHP_EOL;
 
-       $visible_plugins = array();
+       $visible_plugins = [];
        if (is_array($a->plugins) && count($a->plugins)) {
                $r = q("SELECT * FROM `addon` WHERE `hidden` = 0");
                if (DBM::is_result($r)) {
index 0d088c02c8652abca44cd6788566b7dc9b6d9495..926bb25f0747caff035a69df2737b3bb581c28f0 100644 (file)
@@ -111,7 +111,7 @@ function fsuggest_content(App $a)
        $o .= contact_selector(
                'suggest',
                'suggest-select',
-               array('size' => 4, 'exclude' => $contact_id, 'networks' => 'DFRN_ONLY', 'single' => true),
+               ['size' => 4, 'exclude' => $contact_id, 'networks' => 'DFRN_ONLY', 'single' => true],
                false
        );
 
index 8a6e9309f1f87aea7e326e704e5264c39bc73ded..ce091db8cd0e339eb2387a5d1d3138a7bfe9fe11 100644 (file)
@@ -92,17 +92,17 @@ function group_content(App $a) {
 
        $tpl = get_markup_template('group_edit.tpl');
 
-       $context = array(
+       $context = [
                        '$submit' => t('Save Group'),
-       );
+       ];
 
        if (($a->argc == 2) && ($a->argv[1] === 'new')) {
-               return replace_macros($tpl, $context + array(
+               return replace_macros($tpl, $context + [
                        '$title' => t('Create a group of contacts/friends.'),
-                       '$gname' => array('groupname', t('Group Name: '), '', ''),
+                       '$gname' => ['groupname', t('Group Name: '), '', ''],
                        '$gid' => 'new',
                        '$form_security_token' => get_form_security_token("group_edit"),
-               ));
+               ]);
 
 
        }
@@ -160,8 +160,8 @@ function group_content(App $a) {
 
                $group = $r[0];
                $members = Contact::getByGroupId($group['id']);
-               $preselected = array();
-               $entry = array();
+               $preselected = [];
+               $entry = [];
                $id = 0;
 
                if (count($members)) {
@@ -178,7 +178,7 @@ function group_content(App $a) {
                        }
 
                        $members = Contact::getByGroupId($group['id']);
-                       $preselected = array();
+                       $preselected = [];
                        if (count($members)) {
                                foreach ($members as $member) {
                                        $preselected[] = $member['id'];
@@ -187,21 +187,21 @@ function group_content(App $a) {
                }
 
                $drop_tpl = get_markup_template('group_drop.tpl');
-               $drop_txt = replace_macros($drop_tpl, array(
+               $drop_txt = replace_macros($drop_tpl, [
                        '$id' => $group['id'],
                        '$delete' => t('Delete Group'),
                        '$form_security_token' => get_form_security_token("group_drop"),
-               ));
+               ]);
 
 
-               $context = $context + array(
+               $context = $context + [
                        '$title' => t('Group Editor'),
-                       '$gname' => array('groupname', t('Group Name: '), $group['name'], ''),
+                       '$gname' => ['groupname', t('Group Name: '), $group['name'], ''],
                        '$gid' => $group['id'],
                        '$drop' => $drop_txt,
                        '$form_security_token' => get_form_security_token('group_edit'),
                        '$edit_name' => t('Edit Group Name')
-               );
+               ];
 
        }
 
@@ -209,13 +209,13 @@ function group_content(App $a) {
                return;
        }
 
-       $groupeditor = array(
+       $groupeditor = [
                'label_members' => t('Members'),
-               'members' => array(),
+               'members' => [],
                'label_contacts' => t('All Contacts'),
                'group_is_empty' => t('Group is empty'),
-               'contacts' => array(),
-       );
+               'contacts' => [],
+       ];
 
        $sec_token = addslashes(get_form_security_token('group_member_change'));
 
@@ -225,12 +225,12 @@ function group_content(App $a) {
                        $entry = _contact_detail_for_template($member);
                        $entry['label'] = 'members';
                        $entry['photo_menu'] = '';
-                       $entry['change_member'] = array(
+                       $entry['change_member'] = [
                                'title'     => t("Remove Contact"),
                                'gid'       => $group['id'],
                                'cid'       => $member['id'],
                                'sec_token' => $sec_token
-                       );
+                       ];
 
                        $groupeditor['members'][] = $entry;
                } else {
@@ -249,12 +249,12 @@ function group_content(App $a) {
                                $entry = _contact_detail_for_template($member);
                                $entry['label'] = 'contacts';
                                $entry['photo_menu'] = '';
-                               $entry['change_member'] = array(
+                               $entry['change_member'] = [
                                        'title'     => t("Add Contact"),
                                        'gid'       => $group['id'],
                                        'cid'       => $member['id'],
                                        'sec_token' => $sec_token
-                               );
+                               ];
 
                                $groupeditor['contacts'][] = $entry;
                        }
index 87f5ef3207be5e53740046ea4af71a65d2146524..1c00743106fc079a4493c0b01267d013dec56543 100644 (file)
@@ -40,7 +40,7 @@ function hcard_init(App $a)
 
        if (!$blocked) {
                $keywords = ((x($a->profile, 'pub_keywords')) ? $a->profile['pub_keywords'] : '');
-               $keywords = str_replace(array(',',' ',',,'), array(' ',',',','), $keywords);
+               $keywords = str_replace([',',' ',',,'], [' ',',',','], $keywords);
                if (strlen($keywords)) {
                        $a->page['htmlhead'] .= '<meta name="keywords" content="' . $keywords . '" />' . "\r\n" ;
                }
@@ -52,7 +52,7 @@ function hcard_init(App $a)
        $a->page['htmlhead'] .= '<link rel="lrdd" type="application/xrd+xml" href="' . System::baseUrl() . '/xrd/?uri=' . $uri . '" />' . "\r\n";
        header('Link: <' . System::baseUrl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
 
-       $dfrn_pages = array('request', 'confirm', 'notify', 'poll');
+       $dfrn_pages = ['request', 'confirm', 'notify', 'poll'];
        foreach ($dfrn_pages as $dfrn) {
                $a->page['htmlhead'] .= "<link rel=\"dfrn-{$dfrn}\" href=\"".System::baseUrl()."/dfrn_{$dfrn}/{$which}\" />\r\n";
        }
index 65221165fdd5d23e6c14645fa3ad13f447e2e27a..ab5223a3970a133d6bfa0f4143f097ea28183928 100644 (file)
@@ -55,9 +55,9 @@ function help_content(App $a) {
        if (!strlen($text)) {
                header($_SERVER["SERVER_PROTOCOL"] . ' 404 ' . t('Not Found'));
                $tpl = get_markup_template("404.tpl");
-               return replace_macros($tpl, array(
+               return replace_macros($tpl, [
                                        '$message' => t('Page not found.')
-                               ));
+                               ]);
        }
 
        $html = Markdown::convert($text, false);
@@ -67,7 +67,7 @@ function help_content(App $a) {
                $lines = explode("\n", $html);
                $toc="<style>aside ul {padding-left: 1em;}aside h1{font-size:2em}</style><h2>TOC</h2><ul id='toc'>";
                $lastlevel=1;
-               $idnum = array(0,0,0,0,0,0,0);
+               $idnum = [0,0,0,0,0,0,0];
                foreach($lines as &$line){
                        if (substr($line,0,2)=="<h") {
                                $level = substr($line,2,1);
index 5f8d6a64ff9826751d098b2479e0b951cd92c029..beda739fdb19d06b2768c5ef5fb3d46057d675f0 100644 (file)
@@ -8,7 +8,7 @@ use Friendica\Module\Login;
 if(! function_exists('home_init')) {
 function home_init(App $a) {
 
-       $ret = array();
+       $ret = [];
        call_hooks('home_init',$ret);
 
        if (local_user() && ($a->user['nickname'])) {
index 1da8fda998095d9673f8f81d073561245faf778b..16f132fe092ff2a871fcc3a0e15fe67cffbe84c6 100644 (file)
@@ -22,11 +22,11 @@ function hostxrd_init(App $a)
        }
 
        $tpl = get_markup_template('xrd_host.tpl');
-       echo replace_macros($tpl, array(
+       echo replace_macros($tpl, [
                '$zhost' => $a->get_hostname(),
                '$zroot' => System::baseUrl(),
                '$domain' => System::baseUrl(),
-               '$bigkey' => Salmon::salmonKey(Config::get('system', 'site_pubkey')))
+               '$bigkey' => Salmon::salmonKey(Config::get('system', 'site_pubkey'))]
        );
 
        exit();
index 9bf4774056f3c227bb43e35d26e4e269e9395846..334bf228abe74ddb253c79ccb5d1b253ef69f593 100644 (file)
@@ -66,7 +66,7 @@ function hovercard_content()
        }
 
        // Move the contact data to the profile array so we can deliver it to
-       $profile = array(
+       $profile = [
                'name'     => $contact['name'],
                'nick'     => $contact['nick'],
                'addr'     => defaults($contact, 'addr', $contact['url']),
@@ -81,12 +81,12 @@ function hovercard_content()
                'bd'       => $contact['birthday'] <= '0001-01-01' ? '' : $contact['birthday'],
                'account_type' => Contact::getAccountType($contact),
                'actions'  => $actions,
-       );
+       ];
        if ($datatype == 'html') {
                $tpl = get_markup_template('hovercard.tpl');
-               $o = replace_macros($tpl, array(
+               $o = replace_macros($tpl, [
                        '$profile' => $profile,
-               ));
+               ]);
 
                return $o;
        } else {
index 81e4805b2e5c7c1ee00ef1945b5dbf87e6293d64..2989f7fbea1d72c343dc17b36da6bcc2d2017f0d 100644 (file)
@@ -69,7 +69,7 @@ function install_post(App $a) {
                        dba::connect($dbhost, $dbuser, $dbpass, $dbdata, true);
 
                        $tpl = get_markup_template('htconfig.tpl');
-                       $txt = replace_macros($tpl,array(
+                       $txt = replace_macros($tpl,[
                                '$dbhost' => $dbhost,
                                '$dbuser' => $dbuser,
                                '$dbpass' => $dbpass,
@@ -80,7 +80,7 @@ function install_post(App $a) {
                                '$phpath' => $phpath,
                                '$adminmail' => $adminmail,
                                '$rino' => $rino
-                       ));
+                       ]);
 
 
                        $result = file_put_contents('.htconfig.php', $txt);
@@ -138,12 +138,12 @@ function install_content(App $a) {
                $r = q("SELECT COUNT(*) as `total` FROM `user`");
                if (DBM::is_result($r) && $r[0]['total']) {
                        $tpl = get_markup_template('install.tpl');
-                       return replace_macros($tpl, array(
+                       return replace_macros($tpl, [
                                '$title' => $install_title,
                                '$pass' => '',
                                '$status' => t('Database already in use.'),
                                '$text' => '',
-                       ));
+                       ]);
                }
        }
 
@@ -153,18 +153,18 @@ function install_content(App $a) {
 
        if ($db_return_text != "") {
                $tpl = get_markup_template('install.tpl');
-               return replace_macros($tpl, array(
+               return replace_macros($tpl, [
                        '$title' => $install_title,
                        '$pass' => "",
                        '$text' => $db_return_text . what_next(),
-               ));
+               ]);
        }
 
        switch ($install_wizard_pass) {
                case 1: { // System check
 
 
-                       $checks = array();
+                       $checks = [];
 
                        check_funcs($checks);
 
@@ -196,7 +196,7 @@ function install_content(App $a) {
 
 
                        $tpl = get_markup_template('install_checks.tpl');
-                       $o .= replace_macros($tpl, array(
+                       $o .= replace_macros($tpl, [
                                '$title' => $install_title,
                                '$pass' => t('System check'),
                                '$checks' => $checks,
@@ -206,7 +206,7 @@ function install_content(App $a) {
                                '$reload' => t('Check again'),
                                '$phpath' => $phpath,
                                '$baseurl' => System::baseUrl(),
-                       ));
+                       ]);
                        return $o;
                }; break;
 
@@ -220,7 +220,7 @@ function install_content(App $a) {
 
 
                        $tpl = get_markup_template('install_db.tpl');
-                       $o .= replace_macros($tpl, array(
+                       $o .= replace_macros($tpl, [
                                '$title' => $install_title,
                                '$pass' => t('Database connection'),
                                '$info_01' => t('In order to install Friendica we need to know how to connect to your database.'),
@@ -229,11 +229,11 @@ function install_content(App $a) {
 
                                '$status' => $wizard_status,
 
-                               '$dbhost' => array('dbhost', t('Database Server Name'), $dbhost, '', 'required'),
-                               '$dbuser' => array('dbuser', t('Database Login Name'), $dbuser, '', 'required', 'autofocus'),
-                               '$dbpass' => array('dbpass', t('Database Login Password'), $dbpass, t("For security reasons the password must not be empty"), 'required'),
-                               '$dbdata' => array('dbdata', t('Database Name'), $dbdata, '', 'required'),
-                               '$adminmail' => array('adminmail', t('Site administrator email address'), $adminmail, t('Your account email address must match this in order to use the web admin panel.'), 'required', 'autofocus', 'email'),
+                               '$dbhost' => ['dbhost', t('Database Server Name'), $dbhost, '', 'required'],
+                               '$dbuser' => ['dbuser', t('Database Login Name'), $dbuser, '', 'required', 'autofocus'],
+                               '$dbpass' => ['dbpass', t('Database Login Password'), $dbpass, t("For security reasons the password must not be empty"), 'required'],
+                               '$dbdata' => ['dbdata', t('Database Name'), $dbdata, '', 'required'],
+                               '$adminmail' => ['adminmail', t('Site administrator email address'), $adminmail, t('Your account email address must match this in order to use the web admin panel.'), 'required', 'autofocus', 'email'],
 
 
 
@@ -245,7 +245,7 @@ function install_content(App $a) {
 
                                '$submit' => t('Submit'),
 
-                       ));
+                       ]);
                        return $o;
                }; break;
                case 3: { // Site settings
@@ -262,7 +262,7 @@ function install_content(App $a) {
                        $lang_choices = get_available_languages();
 
                        $tpl = get_markup_template('install_settings.tpl');
-                       $o .= replace_macros($tpl, array(
+                       $o .= replace_macros($tpl, [
                                '$title' => $install_title,
                                '$pass' => t('Site settings'),
 
@@ -274,18 +274,18 @@ function install_content(App $a) {
                                '$dbdata' => $dbdata,
                                '$phpath' => $phpath,
 
-                               '$adminmail' => array('adminmail', t('Site administrator email address'), $adminmail, t('Your account email address must match this in order to use the web admin panel.'), 'required', 'autofocus', 'email'),
+                               '$adminmail' => ['adminmail', t('Site administrator email address'), $adminmail, t('Your account email address must match this in order to use the web admin panel.'), 'required', 'autofocus', 'email'],
 
 
                                '$timezone' => field_timezone('timezone', t('Please select a default timezone for your website'), $timezone, ''),
-                               '$language' => array('language', t('System Language:'), 'en', t('Set the default language for your Friendica installation interface and to send emails.'), $lang_choices),
+                               '$language' => ['language', t('System Language:'), 'en', t('Set the default language for your Friendica installation interface and to send emails.'), $lang_choices],
                                '$baseurl' => System::baseUrl(),
 
 
 
                                '$submit' => t('Submit'),
 
-                       ));
+                       ]);
                        return $o;
                }; break;
 
@@ -300,12 +300,12 @@ function install_content(App $a) {
  * help                : string optional
  */
 function check_add(&$checks, $title, $status, $required, $help) {
-       $checks[] = array(
+       $checks[] = [
                'title' => $title,
                'status' => $status,
                'required' => $required,
                'help'  => $help,
-       );
+       ];
 }
 
 function check_php(&$phpath, &$checks) {
@@ -322,9 +322,9 @@ function check_php(&$phpath, &$checks) {
                $help .= t("If you don't have a command line version of PHP installed on your server, you will not be able to run the background processing. See <a href='https://github.com/friendica/friendica/blob/master/doc/Install.md#set-up-the-worker'>'Setup the worker'</a>") . EOL;
                $help .= EOL . EOL;
                $tpl = get_markup_template('field_input.tpl');
-               $help .= replace_macros($tpl, array(
-                       '$field' => array('phpath', t('PHP executable path'), $phpath, t('Enter full path to php executable. You can leave this blank to continue the installation.')),
-               ));
+               $help .= replace_macros($tpl, [
+                       '$field' => ['phpath', t('PHP executable path'), $phpath, t('Enter full path to php executable. You can leave this blank to continue the installation.')],
+               ]);
                $phpath = "";
        }
 
@@ -367,11 +367,11 @@ function check_keys(&$checks) {
        $res = false;
 
        if (function_exists('openssl_pkey_new')) {
-               $res = openssl_pkey_new(array(
+               $res = openssl_pkey_new([
                        'digest_alg'       => 'sha1',
                        'private_key_bits' => 4096,
                        'encrypt_key'      => false
-               ));
+               ]);
        }
 
        // Get private key
@@ -386,7 +386,7 @@ function check_keys(&$checks) {
 
 
 function check_funcs(&$checks) {
-       $ck_funcs = array();
+       $ck_funcs = [];
        check_add($ck_funcs, t('libCurl PHP module'), true, true, "");
        check_add($ck_funcs, t('GD graphics PHP module'), true, true, "");
        check_add($ck_funcs, t('OpenSSL PHP module'), true, true, "");
index 06c0df3b84d5902ede461f243122182da7776d6f..84426c57848329eb973ffa4cf41f290c7d64cde2 100644 (file)
@@ -32,7 +32,7 @@ function invite_post(App $a) {
        }
 
 
-       $recips  = ((x($_POST,'recipients')) ? explode("\n",$_POST['recipients']) : array());
+       $recips  = ((x($_POST,'recipients')) ? explode("\n",$_POST['recipients']) : []);
        $message = ((x($_POST,'message'))    ? notags(trim($_POST['message']))    : '');
 
        $total = 0;
@@ -136,7 +136,7 @@ function invite_content(App $a) {
                }
        }
 
-       $o = replace_macros($tpl, array(
+       $o = replace_macros($tpl, [
                '$form_security_token' => get_form_security_token("send_invite"),
                '$invite'              => t('Send invitations'),
                '$addr_text'           => t('Enter email addresses, one per line:'),
@@ -147,7 +147,7 @@ function invite_content(App $a) {
                        . "\r\n" . "\r\n" . System::baseUrl() . '/profile/' . $a->user['nickname']
                        . "\r\n" . "\r\n" . t('For more information about the Friendica project and why we feel it is important, please visit http://friendi.ca') . "\r\n" . "\r\n"  ,
                '$submit'              => t('Submit')
-       ));
+       ]);
 
        return $o;
 }
index f5f698a67c3f046254b4f64de49432b7784b1bdb..0ff5eb4fef1afed07707ed6ba972517451dff8b7 100644 (file)
@@ -45,7 +45,7 @@ function item_post(App $a) {
        if (x($_REQUEST, 'dropitems')) {
                $arr_drop = explode(',', $_REQUEST['dropitems']);
                drop_items($arr_drop);
-               $json = array('success' => 1);
+               $json = ['success' => 1];
                echo json_encode($json);
                killme();
        }
@@ -455,11 +455,11 @@ function item_post(App $a) {
                }
        }
 
-       $tagged = array();
+       $tagged = [];
 
        $private_forum = false;
        $only_to_forum = false;
-       $forum_contact = array();
+       $forum_contact = [];
 
        if (count($tags)) {
                foreach ($tags as $tag) {
@@ -690,7 +690,7 @@ function item_post(App $a) {
                $parent_uri = $uri;
        }
 
-       $datarray = array();
+       $datarray = [];
        $datarray['uid']           = $profile_uid;
        $datarray['type']          = $post_type;
        $datarray['wall']          = $wall;
@@ -735,8 +735,8 @@ function item_post(App $a) {
        $datarray['postopts']      = $postopts;
        $datarray['origin']        = $origin;
        $datarray['moderated']     = $allow_moderated;
-       $datarray['gcontact-id']   = GContact::getId(array("url" => $datarray['author-link'], "network" => $datarray['network'],
-                                                       "photo" => $datarray['author-avatar'], "name" => $datarray['author-name']));
+       $datarray['gcontact-id']   = GContact::getId(["url" => $datarray['author-link'], "network" => $datarray['network'],
+                                                       "photo" => $datarray['author-avatar'], "name" => $datarray['author-name']]);
        $datarray['object']        = $object;
        $datarray['last-child'] = 1;
 
@@ -777,9 +777,9 @@ function item_post(App $a) {
                // We set the datarray ID to -1 because in preview mode the dataray
                // doesn't have an ID.
                $datarray["id"] = -1;
-               $o = conversation($a,array(array_merge($contact_record,$datarray)),'search', false, true);
+               $o = conversation($a,[array_merge($contact_record,$datarray)],'search', false, true);
                logger('preview: ' . $o);
-               echo json_encode(array('preview' => $o));
+               echo json_encode(['preview' => $o]);
                killme();
        }
 
@@ -791,7 +791,7 @@ function item_post(App $a) {
                        goaway($return_path);
                }
 
-               $json = array('cancel' => 1);
+               $json = ['cancel' => 1];
                if (x($_REQUEST, 'jsreload') && strlen($_REQUEST['jsreload'])) {
                        $json['reload'] = System::baseUrl() . '/' . $_REQUEST['jsreload'];
                }
@@ -806,7 +806,7 @@ function item_post(App $a) {
                // This could be done in Item::update as well - but we have to check for the existance of some fields.
                put_item_in_cache($datarray);
 
-               $fields = array(
+               $fields = [
                        'title' => $datarray['title'],
                        'body' => $datarray['body'],
                        'tag' => $datarray['tag'],
@@ -815,7 +815,7 @@ function item_post(App $a) {
                        'rendered-html' => $datarray['rendered-html'],
                        'rendered-hash' => $datarray['rendered-hash'],
                        'edited' => datetime_convert(),
-                       'changed' => datetime_convert());
+                       'changed' => datetime_convert()];
 
                Item::update($fields, ['id' => $post_id]);
 
@@ -845,7 +845,7 @@ function item_post(App $a) {
        // These notifications are sent if someone else is commenting other your wall
        if ($parent) {
                if ($contact_record != $author) {
-                       notification(array(
+                       notification([
                                'type'         => NOTIFY_COMMENT,
                                'notify_flags' => $user['notify-flags'],
                                'language'     => $user['language'],
@@ -861,14 +861,14 @@ function item_post(App $a) {
                                'otype'        => 'item',
                                'parent'       => $parent,
                                'parent_uri'   => $parent_item['uri']
-                       ));
+                       ]);
                }
 
                // Store the comment signature information in case we need to relay to Diaspora
                Diaspora::storeCommentSignature($datarray, $author, ($self ? $user['prvkey'] : false), $post_id);
        } else {
                if (($contact_record != $author) && !count($forum_contact)) {
-                       notification(array(
+                       notification([
                                'type'         => NOTIFY_WALL,
                                'notify_flags' => $user['notify-flags'],
                                'language'     => $user['language'],
@@ -882,7 +882,7 @@ function item_post(App $a) {
                                'source_photo' => $datarray['author-avatar'],
                                'verb'         => ACTIVITY_POST,
                                'otype'        => 'item'
-                       ));
+                       ]);
                }
        }
 
@@ -909,7 +909,7 @@ function item_post(App $a) {
                                $html    = prepare_body($datarray);
                                $message = '<html><body>' . $link . $html . $disclaimer . '</body></html>';
                                include_once 'include/html2plain.php';
-                               $params = array (
+                               $params =  [
                                        'fromName' => $a->user['username'],
                                        'fromEmail' => $a->user['email'],
                                        'toEmail' => $addr,
@@ -917,7 +917,7 @@ function item_post(App $a) {
                                        'messageSubject' => $subject,
                                        'htmlVersion' => $message,
                                        'textVersion' => html2plain($html.$disclaimer)
-                               );
+                               ];
                                Emailer::send($params);
                        }
                }
@@ -927,7 +927,7 @@ function item_post(App $a) {
        // We now do it in the background to save some time.
        // This is important in interactive environments like the frontend or the API.
        // We don't fork a new process since this is done anyway with the following command
-       Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), "CreateShadowEntry", $post_id);
+       Worker::add(['priority' => PRIORITY_HIGH, 'dont_fork' => true], "CreateShadowEntry", $post_id);
 
        // Call the background process that is delivering the item to the receivers
        Worker::add(PRIORITY_HIGH, "Notifier", $notify_type, $post_id);
@@ -949,7 +949,7 @@ function item_post_return($baseurl, $api_source, $return_path) {
                goaway($return_path);
        }
 
-       $json = array('success' => 1);
+       $json = ['success' => 1];
        if (x($_REQUEST, 'jsreload') && strlen($_REQUEST['jsreload'])) {
                $json['reload'] = $baseurl . '/' . $_REQUEST['jsreload'];
        }
@@ -975,7 +975,7 @@ function item_content(App $a) {
                $o = drop_item($a->argv[2], !is_ajax());
                if (is_ajax()) {
                        // ajax return: [<item id>, 0 (no perm) | <owner id>]
-                       echo json_encode(array(intval($a->argv[2]), intval($o)));
+                       echo json_encode([intval($a->argv[2]), intval($o)]);
                        killme();
                }
        }
@@ -1206,5 +1206,5 @@ function handle_tag(App $a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $n
                }
        }
 
-       return array('replaced' => $replaced, 'contact' => $r[0]);
+       return ['replaced' => $replaced, 'contact' => $r[0]];
 }
index a8cccd955c052bcd0e397823c773937131cb56c4..ced03d1b569edb707141b176bbb1ea5004cebbe0 100644 (file)
@@ -16,7 +16,7 @@ function lockview_content(App $a) {
        if(! $item_id)
                killme();
 
-       if (!in_array($type, array('item','photo','event')))
+       if (!in_array($type, ['item','photo','event']))
                killme();
 
        $r = q("SELECT * FROM `%s` WHERE `id` = %d LIMIT 1",
@@ -49,7 +49,7 @@ function lockview_content(App $a) {
        $deny_groups = expand_acl($item['deny_gid']);
 
        $o = t('Visible to:') . '<br />';
-       $l = array();
+       $l = [];
 
        if(count($allowed_groups)) {
                $r = q("SELECT `name` FROM `group` WHERE `id` IN ( %s )",
index b3304fda12bba312b3149025bb21f3f8c76b2107..3f480ea0f3024f7e179b236a77ac227e1eaa1536 100644 (file)
@@ -70,12 +70,12 @@ function lostpass_post(App $a) {
        $preamble = sprintf($preamble, $username, $sitename);
        $body = sprintf($body, $resetlink, System::baseUrl(), $email);
 
-       notification(array(
+       notification([
                'type' => SYSTEM_EMAIL,
                'to_email' => $email,
                'subject'=> sprintf( t('Password reset requested at %s'),$sitename),
                'preamble'=> $preamble,
-               'body' => $body));
+               'body' => $body]);
 
        goaway(System::baseUrl());
 
@@ -111,7 +111,7 @@ function lostpass_content(App $a) {
                /// @TODO Is DBM::is_result() okay here?
                if ($r) {
                        $tpl = get_markup_template('pwdreset.tpl');
-                       $o .= replace_macros($tpl,array(
+                       $o .= replace_macros($tpl,[
                                '$lbl1' => t('Password Reset'),
                                '$lbl2' => t('Your password has been reset as requested.'),
                                '$lbl3' => t('Your new password is'),
@@ -121,7 +121,7 @@ function lostpass_content(App $a) {
                                '$newpass' => $new_password,
                                '$baseurl' => System::baseUrl()
 
-                       ));
+                       ]);
                                info("Your password has been reset." . EOL);
 
 
@@ -146,12 +146,12 @@ function lostpass_content(App $a) {
                        $preamble = sprintf($preamble, $username);
                        $body = sprintf($body, System::baseUrl(), $email, $new_password);
 
-                       notification(array(
+                       notification([
                                'type' => SYSTEM_EMAIL,
                                'to_email' => $email,
                                'subject'=> sprintf( t('Your password has been changed at %s'),$sitename),
                                'preamble'=> $preamble,
-                               'body' => $body));
+                               'body' => $body]);
 
                        return $o;
                }
@@ -160,12 +160,12 @@ function lostpass_content(App $a) {
        else {
                $tpl = get_markup_template('lostpass.tpl');
 
-               $o .= replace_macros($tpl,array(
+               $o .= replace_macros($tpl,[
                        '$title' => t('Forgot your Password?'),
                        '$desc' => t('Enter your email address and submit to have your password reset. Then check your email for further instructions.'),
                        '$name' => t('Nickname or Email: '),
                        '$submit' => t('Reset')
-               ));
+               ]);
 
                return $o;
        }
index 2258fc5ce29337029df97a8fe60389d0659cc5f0..adc9fab166f12a40a2a4a00c802b42c0dfaf69f2 100644 (file)
@@ -17,8 +17,8 @@ function maintenance_content(App $a) {
        header('Status: 503 Service Temporarily Unavailable');
        header('Retry-After: 600');
 
-       return replace_macros(get_markup_template('maintenance.tpl'), array(
+       return replace_macros(get_markup_template('maintenance.tpl'), [
                '$sysdown' => t('System down for maintenance'),
                '$reason' => $reason
-       ));
+       ]);
 }
index 72de332fc70634abbfc5a07495d2c6af1040ab29..f2781f10815876dd412a320109c1ee9183eba9fc 100644 (file)
@@ -90,7 +90,7 @@ function manage_post(App $a) {
                $_SESSION['submanage'] = $original_id;
        }
 
-       $ret = array();
+       $ret = [];
        call_hooks('home_init',$ret);
 
        goaway( System::baseUrl() . "/profile/" . $a->user['nickname'] );
@@ -150,13 +150,13 @@ function manage_content(App $a) {
                $identities[$key]['notifications'] = $notifications;
        }
 
-       $o = replace_macros(get_markup_template('manage.tpl'), array(
+       $o = replace_macros(get_markup_template('manage.tpl'), [
                '$title' => t('Manage Identities and/or Pages'),
                '$desc' => t('Toggle between different identities or community/group pages which share your account details or which you have been granted "manage" permissions'),
                '$choose' => t('Select an identity to manage: '),
                '$identities' => $identities,
                '$submit' => t('Submit'),
-       ));
+       ]);
 
        return $o;
 
index 203f5ab829fc596a1a998243138aeb870e285d97..a651f51662a923d5a55d90cdd1c51002ef01ac5c 100644 (file)
@@ -15,11 +15,11 @@ function manifest_content(App $a) {
                $touch_icon = 'images/friendica-128.png';
        }
 
-       $o = replace_macros($tpl, array(
+       $o = replace_macros($tpl, [
                '$baseurl' => System::baseUrl(),
                '$touch_icon' => $touch_icon,
                '$title' => Config::get('config', 'sitename', 'Friendica'),
-       ));
+       ]);
 
        echo $o;
 
index 9ccf5a955b9efe9d78297c1229d1aba77310faff..8a0c66faf07e464d4e52b60c70142e238f84f898 100644 (file)
@@ -47,7 +47,7 @@ function match_content(App $a)
                return;
        }
 
-       $params = array();
+       $params = [];
        $tags = trim($r[0]['pub_keywords'] . ' ' . $r[0]['prv_keywords']);
 
        if ($tags) {
@@ -83,14 +83,14 @@ function match_content(App $a)
                                if (!count($match)) {
                                        $jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo);
                                        $connlnk = System::baseUrl() . '/follow/?url=' . $jj->url;
-                                       $photo_menu = array(
-                                               'profile' => array(t("View Profile"), Profile::zrl($jj->url)),
-                                               'follow' => array(t("Connect/Follow"), $connlnk)
-                                       );
+                                       $photo_menu = [
+                                               'profile' => [t("View Profile"), Profile::zrl($jj->url)],
+                                               'follow' => [t("Connect/Follow"), $connlnk]
+                                       ];
 
                                        $contact_details = Contact::getDetailsByURL($jj->url, local_user());
 
-                                       $entry = array(
+                                       $entry = [
                                                'url' => Profile::zrl($jj->url),
                                                'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $jj->url),
                                                'name' => $jj->name,
@@ -105,7 +105,7 @@ function match_content(App $a)
                                                'img_hover' => $jj->tags,
                                                'photo_menu' => $photo_menu,
                                                'id' => ++$id,
-                                       );
+                                       ];
                                        $entries[] = $entry;
                                }
                        }
@@ -114,10 +114,10 @@ function match_content(App $a)
 
                        $o .= replace_macros(
                                $tpl,
-                               array(
+                               [
                                '$title' => t('Profile Match'),
                                '$contacts' => $entries,
-                               '$paginate' => paginate($a))
+                               '$paginate' => paginate($a)]
                        );
                } else {
                        info(t('No matches') . EOL);
index 04073139f3cabe88f40232d8776ed8d48e8b032e..c02e27bef4460e1f30f417eb336403a9d76822df 100644 (file)
@@ -20,31 +20,31 @@ function message_init(App $a)
                $tabs = render_messages(get_messages(local_user(), 0, 5), 'mail_list.tpl');
        }
 
-       $new = array(
+       $new = [
                'label' => t('New Message'),
                'url' => 'message/new',
                'sel' => $a->argc > 1 && $a->argv[1] == 'new',
                'accesskey' => 'm',
-       );
+       ];
 
        $tpl = get_markup_template('message_side.tpl');
-       $a->page['aside'] = replace_macros($tpl, array(
+       $a->page['aside'] = replace_macros($tpl, [
                '$tabs' => $tabs,
                '$new' => $new,
-       ));
+       ]);
        $base = System::baseUrl();
 
        $head_tpl = get_markup_template('message-head.tpl');
-       $a->page['htmlhead'] .= replace_macros($head_tpl, array(
+       $a->page['htmlhead'] .= replace_macros($head_tpl, [
                '$baseurl' => System::baseUrl(true),
                '$base' => $base
-       ));
+       ]);
 
        $end_tpl = get_markup_template('message-end.tpl');
-       $a->page['end'] .= replace_macros($end_tpl, array(
+       $a->page['end'] .= replace_macros($end_tpl, [
                '$baseurl' => System::baseUrl(true),
                '$base' => $base
-       ));
+       ]);
 }
 
 function message_post(App $a)
@@ -102,9 +102,9 @@ function message_content(App $a)
        $myprofile = System::baseUrl() . '/profile/' . $a->user['nickname'];
 
        $tpl = get_markup_template('mail_head.tpl');
-       $header = replace_macros($tpl, array(
+       $header = replace_macros($tpl, [
                '$messages' => t('Messages'),
-       ));
+       ]);
 
        if (($a->argc == 3) && ($a->argv[1] === 'drop' || $a->argv[1] === 'dropconv')) {
                if (!intval($a->argv[2])) {
@@ -116,16 +116,16 @@ function message_content(App $a)
                        // <form> can't take arguments in its "action" parameter
                        // so add any arguments as hidden inputs
                        $query = explode_querystring($a->query_string);
-                       $inputs = array();
+                       $inputs = [];
                        foreach ($query['args'] as $arg) {
                                if (strpos($arg, 'confirm=') === false) {
                                        $arg_parts = explode('=', $arg);
-                                       $inputs[] = array('name' => $arg_parts[0], 'value' => $arg_parts[1]);
+                                       $inputs[] = ['name' => $arg_parts[0], 'value' => $arg_parts[1]];
                                }
                        }
 
                        //$a->page['aside'] = '';
-                       return replace_macros(get_markup_template('confirm.tpl'), array(
+                       return replace_macros(get_markup_template('confirm.tpl'), [
                                '$method' => 'get',
                                '$message' => t('Do you really want to delete this message?'),
                                '$extra_inputs' => $inputs,
@@ -133,7 +133,7 @@ function message_content(App $a)
                                '$confirm_url' => $query['base'],
                                '$confirm_name' => 'confirmed',
                                '$cancel' => t('Cancel'),
-                       ));
+                       ]);
                }
                // Now check how the user responded to the confirmation query
                if ($_REQUEST['canceled']) {
@@ -188,20 +188,20 @@ function message_content(App $a)
                $o .= $header;
 
                $tpl = get_markup_template('msg-header.tpl');
-               $a->page['htmlhead'] .= replace_macros($tpl, array(
+               $a->page['htmlhead'] .= replace_macros($tpl, [
                        '$baseurl' => System::baseUrl(true),
                        '$nickname' => $a->user['nickname'],
                        '$linkurl' => t('Please enter a link URL:')
-               ));
+               ]);
 
                $tpl = get_markup_template('msg-end.tpl');
-               $a->page['end'] .= replace_macros($tpl, array(
+               $a->page['end'] .= replace_macros($tpl, [
                        '$baseurl' => System::baseUrl(true),
                        '$nickname' => $a->user['nickname'],
                        '$linkurl' => t('Please enter a link URL:')
-               ));
+               ]);
 
-               $preselect = isset($a->argv[2]) ? array($a->argv[2]) : false;
+               $preselect = isset($a->argv[2]) ? [$a->argv[2]] : false;
 
                $prename = $preurl = $preid = '';
 
@@ -228,7 +228,7 @@ function message_content(App $a)
                                $prename = $r[0]['name'];
                                $preurl = $r[0]['url'];
                                $preid = $r[0]['id'];
-                               $preselect = array($preid);
+                               $preselect = [$preid];
                        } else {
                                $preselect = false;
                        }
@@ -240,7 +240,7 @@ function message_content(App $a)
                $select = contact_select('messageto', 'message-to-select', $preselect, 4, true, false, false, 10);
 
                $tpl = get_markup_template('prv_message.tpl');
-               $o .= replace_macros($tpl, array(
+               $o .= replace_macros($tpl, [
                        '$header' => t('Send Private Message'),
                        '$to' => t('To:'),
                        '$showinputs' => 'true',
@@ -258,7 +258,7 @@ function message_content(App $a)
                        '$insert' => t('Insert web link'),
                        '$wait' => t('Please wait'),
                        '$submit' => t('Submit')
-               ));
+               ]);
                return $o;
        }
 
@@ -334,20 +334,20 @@ function message_content(App $a)
                require_once("include/bbcode.php");
 
                $tpl = get_markup_template('msg-header.tpl');
-               $a->page['htmlhead'] .= replace_macros($tpl, array(
+               $a->page['htmlhead'] .= replace_macros($tpl, [
                        '$baseurl' => System::baseUrl(true),
                        '$nickname' => $a->user['nickname'],
                        '$linkurl' => t('Please enter a link URL:')
-               ));
+               ]);
 
                $tpl = get_markup_template('msg-end.tpl');
-               $a->page['end'] .= replace_macros($tpl, array(
+               $a->page['end'] .= replace_macros($tpl, [
                        '$baseurl' => System::baseUrl(true),
                        '$nickname' => $a->user['nickname'],
                        '$linkurl' => t('Please enter a link URL:')
-               ));
+               ]);
 
-               $mails = array();
+               $mails = [];
                $seen = 0;
                $unknown = false;
 
@@ -382,7 +382,7 @@ function message_content(App $a)
                                $from_photo = $message['from-photo'];
                        }
 
-                       $mails[] = array(
+                       $mails[] = [
                                'id' => $message['id'],
                                'from_name' => $from_name_e,
                                'from_url' => $from_url,
@@ -395,7 +395,7 @@ function message_content(App $a)
                                'to_name' => $to_name_e,
                                'date' => datetime_convert('UTC', date_default_timezone_get(), $message['created'], 'D, d M Y - g:i A'),
                                'ago' => relative_date($message['created']),
-                       );
+                       ];
 
                        $seen = $message['seen'];
                }
@@ -404,7 +404,7 @@ function message_content(App $a)
                $parent = '<input type="hidden" name="replyto" value="' . $message['parent-uri'] . '" />';
 
                $tpl = get_markup_template('mail_display.tpl');
-               $o = replace_macros($tpl, array(
+               $o = replace_macros($tpl, [
                        '$thread_id' => $a->argv[1],
                        '$thread_subject' => $message['title'],
                        '$thread_seen' => $seen,
@@ -428,7 +428,7 @@ function message_content(App $a)
                        '$insert' => t('Insert web link'),
                        '$submit' => t('Submit'),
                        '$wait' => t('Please wait')
-               ));
+               ]);
 
                return $o;
        }
@@ -483,7 +483,7 @@ function render_messages(array $msg, $t)
                        $from_photo = (($rr['thumb']) ? $rr['thumb'] : $rr['from-photo']);
                }
 
-               $rslt .= replace_macros($tpl, array(
+               $rslt .= replace_macros($tpl, [
                        '$id' => $rr['id'],
                        '$from_name' => $participants,
                        '$from_url' => (($rr['network'] === NETWORK_DFRN) ? 'redir/' . $rr['contact-id'] : $rr['url']),
@@ -498,7 +498,7 @@ function render_messages(array $msg, $t)
                        '$ago' => relative_date($rr['mailcreated']),
                        '$seen' => $rr['mailseen'],
                        '$count' => tt('%d message', '%d messages', $rr['count']),
-               ));
+               ]);
        }
 
        return $rslt;
index a652bc8ed87b92d86a646a3043b932b1f79ea65a..0d7cca4ff1b9786f779cecef226b108929924ff6 100644 (file)
@@ -21,7 +21,7 @@ function msearch_post(App $a) {
        if (DBM::is_result($r))
                $total = $r[0]['total'];
 
-       $results = array();
+       $results = [];
 
        $r = q("SELECT `pub_keywords`, `username`, `nickname`, `user`.`uid` FROM `user` LEFT JOIN `profile` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 AND `user`.`hidewall` = 0 AND MATCH `pub_keywords` AGAINST ('%s') LIMIT %d , %d ",
                dbesc($search),
@@ -31,15 +31,15 @@ function msearch_post(App $a) {
 
        if (DBM::is_result($r)) {
                foreach($r as $rr)
-                       $results[] = array(
+                       $results[] = [
                                'name' => $rr['name'],
                                'url' => System::baseUrl() . '/profile/' . $rr['nickname'],
                                'photo' => System::baseUrl() . '/photo/avatar/' . $rr['uid'] . '.jpg',
-                               'tags' => str_replace(array(',','  '),array(' ',' '),$rr['pub_keywords'])
-                       );
+                               'tags' => str_replace([',','  '],[' ',' '],$rr['pub_keywords'])
+                       ];
        }
 
-       $output = array('total' => $total, 'items_page' => $perpage, 'page' => $page + 1, 'results' => $results);
+       $output = ['total' => $total, 'items_page' => $perpage, 'page' => $page + 1, 'results' => $results];
 
        echo json_encode($output);
 
index ef5437213e20b559e72d918414321115f7c4f1e9..e9d60fd5ca97df1430b57b8068b3a4e736dd8a16 100644 (file)
@@ -32,13 +32,13 @@ function network_init(App $a) {
        }
 
        if (x($_GET, 'save')) {
-               $exists = dba::exists('search', array('uid' => local_user(), 'term' => $search));
+               $exists = dba::exists('search', ['uid' => local_user(), 'term' => $search]);
                if (!$exists) {
-                       dba::insert('search', array('uid' => local_user(), 'term' => $search));
+                       dba::insert('search', ['uid' => local_user(), 'term' => $search]);
                }
        }
        if (x($_GET, 'remove')) {
-               dba::delete('search', array('uid' => local_user(), 'term' => $search));
+               dba::delete('search', ['uid' => local_user(), 'term' => $search]);
        }
 
        $is_a_date_query = false;
@@ -64,7 +64,7 @@ function network_init(App $a) {
        }
 
        // convert query string to array. remove friendica args
-       $query_array = array();
+       $query_array = [];
        $query_string = str_replace($a->cmd."?", "", $a->query_string);
        parse_str($query_string, $query_array);
        array_shift($query_array);
@@ -83,7 +83,7 @@ function network_init(App $a) {
                $remember_group = ($sel_groups === false && $last_sel_groups && $last_sel_groups != 0);
 
                $net_baseurl = '/network';
-               $net_args = array();
+               $net_args = [];
 
                if ($remember_group) {
                        $net_baseurl .= '/' . $last_sel_groups; // Note that the group number must come before the "/new" tab selection
@@ -96,7 +96,7 @@ function network_init(App $a) {
                        // last selected tab is _not_ '/network?f=&order=comment'.
                        // and this isn't a date query
 
-                       $tab_baseurls = array(
+                       $tab_baseurls = [
                                '',             //all
                                '',             //postord
                                '',             //conv
@@ -104,8 +104,8 @@ function network_init(App $a) {
                                '',             //starred
                                '',             //bookmarked
                                '',             //spam
-                       );
-                       $tab_args = array(
+                       ];
+                       $tab_args = [
                                'f=&order=comment',     //all
                                'f=&order=post',        //postord
                                'f=&conv=1',            //conv
@@ -113,7 +113,7 @@ function network_init(App $a) {
                                'f=&star=1',            //starred
                                'f=&bmark=1',           //bookmarked
                                'f=&spam=1',            //spam
-                       );
+                       ];
 
                        $k = array_search('active', $last_sel_tabs);
 
@@ -121,7 +121,7 @@ function network_init(App $a) {
                                $net_baseurl .= $tab_baseurls[$k];
 
                                // parse out tab queries
-                               $dest_qa = array();
+                               $dest_qa = [];
                                $dest_qs = $tab_args[$k];
                                parse_str($dest_qs, $dest_qa);
                                $net_args = array_merge($net_args, $dest_qa);
@@ -188,26 +188,26 @@ function saved_searches($search) {
 
        $o = '';
 
-       $terms = dba::select('search', array('id', 'term'), array('uid' => local_user()));
-       $saved = array();
+       $terms = dba::select('search', ['id', 'term'], ['uid' => local_user()]);
+       $saved = [];
 
        while ($rr = dba::fetch($terms)) {
-               $saved[] = array(
+               $saved[] = [
                        'id'          => $rr['id'],
                        'term'        => $rr['term'],
                        'encodedterm' => urlencode($rr['term']),
                        'delete'      => t('Remove term'),
                        'selected'    => ($search==$rr['term']),
-               );
+               ];
        }
 
        $tpl = get_markup_template("saved_searches_aside.tpl");
-       $o = replace_macros($tpl, array(
+       $o = replace_macros($tpl, [
                '$title'     => t('Saved Searches'),
                '$add'       => t('add'),
                '$searchbox' => search($search,'netsearch-box',$srchurl,true),
                '$saved'     => $saved,
-       ));
+       ]);
 
        return $o;
 }
@@ -275,7 +275,7 @@ function network_query_get_sel_tab(App $a) {
                }
        }
 
-       return array($no_active, $all_active, $postord_active, $conv_active, $new_active, $starred_active, $bookmarked_active, $spam_active);
+       return [$no_active, $all_active, $postord_active, $conv_active, $new_active, $starred_active, $bookmarked_active, $spam_active];
 }
 
 /**
@@ -350,7 +350,7 @@ function networkSetSeen($condition) {
        $unseen = dba::exists('item', $condition);
 
        if ($unseen) {
-               $r = dba::update('item', array('unseen' => false), $condition);
+               $r = dba::update('item', ['unseen' => false], $condition);
        }
 }
 
@@ -386,7 +386,7 @@ function network_content(App $a, $update = 0) {
        }
 
        /// @TODO Is this really necessary? $a is already available to hooks
-       $arr = array('query' => $a->query_string);
+       $arr = ['query' => $a->query_string];
        call_hooks('network_content_init', $arr);
 
        $nouveau = false;
@@ -442,7 +442,7 @@ function networkFlatView(App $a, $update = 0) {
 
                nav_set_selected('network');
 
-               $x = array(
+               $x = [
                        'is_owner' => true,
                        'allow_location' => $a->user['allow_location'],
                        'default_location' => $a->user['default-location'],
@@ -456,7 +456,7 @@ function networkFlatView(App $a, $update = 0) {
                        'visitor' => 'block',
                        'profile_uid' => local_user(),
                        'content' => '',
-               );
+               ];
 
                $o .= status_editor($a, $x);
 
@@ -483,7 +483,7 @@ function networkFlatView(App $a, $update = 0) {
                intval($_SESSION['uid'])
        );
 
-       $condition = array('unseen' => true, 'uid' => local_user());
+       $condition = ['unseen' => true, 'uid' => local_user()];
        networkSetSeen($condition);
 
        $mode = 'network-new';
@@ -531,7 +531,7 @@ function networkThreadedView(App $a, $update = 0) {
                                }
                        } elseif (intval($a->argv[$x])) {
                                $gid = intval($a->argv[$x]);
-                               $def_acl = array('allow_gid' => '<' . $gid . '>');
+                               $def_acl = ['allow_gid' => '<' . $gid . '>'];
                        }
                }
        }
@@ -546,18 +546,18 @@ function networkThreadedView(App $a, $update = 0) {
        $nets = ((x($_GET,'nets')) ? $_GET['nets'] : '');
 
        if ($cid) {
-               $def_acl = array('allow_cid' => '<' . intval($cid) . '>');
+               $def_acl = ['allow_cid' => '<' . intval($cid) . '>'];
        }
 
        if ($nets) {
-               $r = dba::select('contact', array('id'), array('uid' => local_user(), 'network' => $nets), array('self' => false));
+               $r = dba::select('contact', ['id'], ['uid' => local_user(), 'network' => $nets], ['self' => false]);
 
                $str = '';
                while ($rr = dba::fetch($r)) {
                        $str .= '<' . $rr['id'] . '>';
                }
                if (strlen($str)) {
-                       $def_acl = array('allow_cid' => $str);
+                       $def_acl = ['allow_cid' => $str];
                }
        }
        PConfig::set(local_user(), 'network.view', 'net.selected', ($nets ? $nets : 'all'));
@@ -592,7 +592,7 @@ function networkThreadedView(App $a, $update = 0) {
                        }
                }
 
-               $x = array(
+               $x = [
                        'is_owner' => true,
                        'allow_location' => $a->user['allow_location'],
                        'default_location' => $a->user['default-location'],
@@ -606,7 +606,7 @@ function networkThreadedView(App $a, $update = 0) {
                        'visitor' => 'block',
                        'profile_uid' => local_user(),
                        'content' => $content,
-               );
+               ];
 
                $o .= status_editor($a, $x);
        }
@@ -644,7 +644,7 @@ function networkThreadedView(App $a, $update = 0) {
                        // NOTREACHED
                }
 
-               $contacts = Group::expand(array($gid));
+               $contacts = Group::expand([$gid]);
 
                if ((is_array($contacts)) && count($contacts)) {
                        $contact_str_self = "";
@@ -663,9 +663,9 @@ function networkThreadedView(App $a, $update = 0) {
                        info(t('Group is empty'));
                }
 
-               $o = replace_macros(get_markup_template("section_title.tpl"),array(
+               $o = replace_macros(get_markup_template("section_title.tpl"),[
                        '$title' => t('Group: %s', $group['name'])
-               )) . $o;
+               ]) . $o;
 
        } elseif ($cid) {
                $fields = ['id', 'name', 'network', 'writable', 'nurl',
@@ -675,20 +675,20 @@ function networkThreadedView(App $a, $update = 0) {
                if (DBM::is_result($contact)) {
                        $sql_extra = " AND ".$sql_table.".`contact-id` = ".intval($cid);
 
-                       $entries[0] = array(
+                       $entries[0] = [
                                'id' => 'network',
                                'name' => htmlentities($contact['name']),
                                'itemurl' => defaults($contact, 'addr', $contact['nurl']),
                                'thumb' => proxy_url($contact['thumb'], false, PROXY_SIZE_THUMB),
                                'details' => $contact['location'],
-                       );
+                       ];
 
                        $entries[0]["account_type"] = Contact::getAccountType($contact);
 
-                       $o = replace_macros(get_markup_template("viewcontact_template.tpl"),array(
+                       $o = replace_macros(get_markup_template("viewcontact_template.tpl"),[
                                'contacts' => $entries,
                                'id' => 'network',
-                       )) . $o;
+                       ]) . $o;
 
                        if ($contact['network'] === NETWORK_OSTATUS && $contact['writable'] && !PConfig::get(local_user(),'system','nowarn_insecure')) {
                                notice(t('Private messages to this person are at risk of public disclosure.') . EOL);
@@ -851,11 +851,11 @@ function networkThreadedView(App $a, $update = 0) {
 
        // Then fetch all the children of the parents that are on this page
 
-       $parents_arr = array();
+       $parents_arr = [];
        $parents_str = '';
        $date_offset = "";
 
-       $items = array();
+       $items = [];
        if (DBM::is_result($r)) {
                foreach ($r as $rr) {
                        if (!in_array($rr['item_id'], $parents_arr)) {
@@ -901,10 +901,10 @@ function networkThreadedView(App $a, $update = 0) {
        // at the top level network page just mark everything seen.
 
        if (!$gid && !$cid && !$star) {
-               $condition = array('unseen' => true, 'uid' => local_user());
+               $condition = ['unseen' => true, 'uid' => local_user()];
                networkSetSeen($condition);
        } elseif ($parents_str) {
-               $condition = array("`uid` = ? AND `unseen` AND `parent` IN (" . dbesc($parents_str) . ")", local_user());
+               $condition = ["`uid` = ? AND `unseen` AND `parent` IN (" . dbesc($parents_str) . ")", local_user()];
                networkSetSeen($condition);
        }
 
@@ -936,80 +936,80 @@ function network_tabs(App $a)
        $cmd = $a->cmd;
 
        // tabs
-       $tabs = array(
-               array(
+       $tabs = [
+               [
                        'label' => t('Commented Order'),
                        'url'   => str_replace('/new', '', $cmd) . '?f=&order=comment' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : ''),
                        'sel'   => $all_active,
                        'title' => t('Sort by Comment Date'),
                        'id'    => 'commented-order-tab',
                        'accesskey' => "e",
-               ),
-               array(
+               ],
+               [
                        'label' => t('Posted Order'),
                        'url'   => str_replace('/new', '', $cmd) . '?f=&order=post' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : ''),
                        'sel'   => $postord_active,
                        'title' => t('Sort by Post Date'),
                        'id'    => 'posted-order-tab',
                        'accesskey' => "t",
-               ),
-       );
+               ],
+       ];
 
        if (Feature::isEnabled(local_user(),'personal_tab')) {
-               $tabs[] = array(
+               $tabs[] = [
                        'label' => t('Personal'),
                        'url'   => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&conv=1',
                        'sel'   => $conv_active,
                        'title' => t('Posts that mention or involve you'),
                        'id'    => 'personal-tab',
                        'accesskey' => "r",
-               );
+               ];
        }
 
        if (Feature::isEnabled(local_user(),'new_tab')) {
-               $tabs[] = array(
+               $tabs[] = [
                        'label' => t('New'),
                        'url'   => 'network/new' . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : ''),
                        'sel'   => $new_active,
                        'title' => t('Activity Stream - by date'),
                        'id'    => 'activitiy-by-date-tab',
                        'accesskey' => "w",
-               );
+               ];
        }
 
        if (Feature::isEnabled(local_user(),'link_tab')) {
-               $tabs[] = array(
+               $tabs[] = [
                        'label' => t('Shared Links'),
                        'url'   => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&bmark=1',
                        'sel'   => $bookmarked_active,
                        'title' => t('Interesting Links'),
                        'id'    => 'shared-links-tab',
                        'accesskey' => "b",
-               );
+               ];
        }
 
        if (Feature::isEnabled(local_user(),'star_posts')) {
-               $tabs[] = array(
+               $tabs[] = [
                        'label' => t('Starred'),
                        'url'   => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&star=1',
                        'sel'   => $starred_active,
                        'title' => t('Favourite Posts'),
                        'id'    => 'starred-posts-tab',
                        'accesskey' => "m",
-               );
+               ];
        }
 
        // save selected tab, but only if not in file mode
        if (!x($_GET,'file')) {
-               PConfig::set(local_user(), 'network.view','tab.selected',array($all_active, $postord_active, $conv_active, $new_active, $starred_active, $bookmarked_active, $spam_active));
+               PConfig::set(local_user(), 'network.view','tab.selected',[$all_active, $postord_active, $conv_active, $new_active, $starred_active, $bookmarked_active, $spam_active]);
        }
 
-       $arr = array('tabs' => $tabs);
+       $arr = ['tabs' => $tabs];
        call_hooks('network_tabs', $arr);
 
        $tpl = get_markup_template('common_tabs.tpl');
 
-       return replace_macros($tpl, array('$tabs' => $arr['tabs']));
+       return replace_macros($tpl, ['$tabs' => $arr['tabs']]);
 
        // --- end item filter tabs
 }
index 7a690c15e92bd5589d93ada3d8f57fa7fa62cf6b..d92335ad13463d79b1a0d1bdf1b0eb7feb34af6c 100644 (file)
@@ -12,8 +12,8 @@ use Friendica\Core\Config;
 require_once 'include/plugin.php';
 
 function nodeinfo_wellknown(App $a) {
-       $nodeinfo = array('links' => array(array('rel' => 'http://nodeinfo.diaspora.software/ns/schema/1.0',
-                                       'href' => System::baseUrl().'/nodeinfo/1.0')));
+       $nodeinfo = ['links' => [['rel' => 'http://nodeinfo.diaspora.software/ns/schema/1.0',
+                                       'href' => System::baseUrl().'/nodeinfo/1.0']]];
 
        header('Content-type: application/json; charset=utf-8');
        echo json_encode($nodeinfo, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);
@@ -33,13 +33,13 @@ function nodeinfo_init(App $a) {
 
        $smtp = (function_exists('imap_open') && !Config::get('system', 'imap_disabled') && !Config::get('system', 'dfrn_only'));
 
-       $nodeinfo = array();
+       $nodeinfo = [];
        $nodeinfo['version'] = '1.0';
-       $nodeinfo['software'] = array('name' => 'friendica', 'version' => FRIENDICA_VERSION.'-'.DB_UPDATE_VERSION);
+       $nodeinfo['software'] = ['name' => 'friendica', 'version' => FRIENDICA_VERSION.'-'.DB_UPDATE_VERSION];
 
-       $nodeinfo['protocols'] = array();
-       $nodeinfo['protocols']['inbound'] = array();
-       $nodeinfo['protocols']['outbound'] = array();
+       $nodeinfo['protocols'] = [];
+       $nodeinfo['protocols']['inbound'] = [];
+       $nodeinfo['protocols']['outbound'] = [];
 
        if (Config::get('system', 'diaspora_enabled')) {
                $nodeinfo['protocols']['inbound'][] = 'diaspora';
@@ -54,21 +54,21 @@ function nodeinfo_init(App $a) {
                $nodeinfo['protocols']['outbound'][] = 'gnusocial';
        }
 
-       $nodeinfo['services'] = array();
-       $nodeinfo['services']['inbound'] = array();
-       $nodeinfo['services']['outbound'] = array();
+       $nodeinfo['services'] = [];
+       $nodeinfo['services']['inbound'] = [];
+       $nodeinfo['services']['outbound'] = [];
 
-       $nodeinfo['usage'] = array();
+       $nodeinfo['usage'] = [];
 
        $nodeinfo['openRegistrations'] = ($a->config['register_policy'] != 0);
 
-       $nodeinfo['metadata'] = array('nodeName' => $a->config['sitename']);
+       $nodeinfo['metadata'] = ['nodeName' => $a->config['sitename']];
 
        if (Config::get('system', 'nodeinfo')) {
 
-               $nodeinfo['usage']['users'] = array('total' => (int)Config::get('nodeinfo', 'total_users'),
+               $nodeinfo['usage']['users'] = ['total' => (int)Config::get('nodeinfo', 'total_users'),
                                        'activeHalfyear' => (int)Config::get('nodeinfo', 'active_users_halfyear'),
-                                       'activeMonth' => (int)Config::get('nodeinfo', 'active_users_monthly'));
+                                       'activeMonth' => (int)Config::get('nodeinfo', 'active_users_monthly')];
                $nodeinfo['usage']['localPosts'] = (int)Config::get('nodeinfo', 'local_posts');
                $nodeinfo['usage']['localComments'] = (int)Config::get('nodeinfo', 'local_comments');
 
@@ -159,7 +159,7 @@ function nodeinfo_cron() {
 
                $plugin = 'statistics_json';
                $plugins = Config::get('system', 'addon');
-               $plugins_arr = array();
+               $plugins_arr = [];
 
                if ($plugins) {
                        $plugins_arr = explode(',',str_replace(' ', '',$plugins));
index 7ebb5bd1f2179852e57ace38dbfa0cbd764c92ed..d5da626045e4b6837524da2788084b006ca012ca 100644 (file)
@@ -39,7 +39,7 @@ function nogroup_content(App $a)
                foreach ($r as $rr) {
                        $contact_details = Contact::getDetailsByURL($rr['url'], local_user(), $rr);
 
-                       $contacts[] = array(
+                       $contacts[] = [
                                'img_hover' => t('Visit %s\'s profile [%s]', $contact_details['name'], $rr['url']),
                                'edit_hover' => t('Edit contact'),
                                'photo_menu' => Contact::photoMenu($rr),
@@ -53,17 +53,17 @@ function nogroup_content(App $a)
                                'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']),
                                'url' => $rr['url'],
                                'network' => ContactSelector::networkToName($rr['network'], $rr['url']),
-                       );
+                       ];
                }
        }
 
        $tpl = get_markup_template("nogroup-template.tpl");
        $o = replace_macros(
                $tpl,
-               array(
+               [
                '$header' => t('Contacts who are not members of a group'),
                '$contacts' => $contacts,
-               '$paginate' => paginate($a))
+               '$paginate' => paginate($a)]
        );
 
        return $o;
index bbf9020e84b1294fa92d8c4ad9ad32a1d0e154ef..9efaeb2bf1f494b92be99a38d0e92b9d54c97514 100644 (file)
@@ -25,18 +25,18 @@ function noscrape_init(App $a)
 
        if (!$a->profile['net-publish'] || $a->profile['hidewall']) {
                header('Content-type: application/json; charset=utf-8');
-               $json_info = array("hide" => true);
+               $json_info = ["hide" => true];
                echo json_encode($json_info);
                exit;
        }
 
        $keywords = ((x($a->profile, 'pub_keywords')) ? $a->profile['pub_keywords'] : '');
-       $keywords = str_replace(array('#',',',' ',',,'), array('',' ',',',','), $keywords);
+       $keywords = str_replace(['#',',',' ',',,'], ['',' ',',',','], $keywords);
        $keywords = explode(',', $keywords);
 
        $contactPhoto = dba::selectFirst('contact', ['photo'], ['self' => true, 'uid' => $a->profile['uid']]);
 
-       $json_info = array(
+       $json_info = [
                'fn'       => $a->profile['name'],
                'addr'     => $a->profile['addr'],
                'nick'     => $which,
@@ -46,7 +46,7 @@ function noscrape_init(App $a)
                'comm'     => (x($a->profile, 'page-flags')) && ($a->profile['page-flags'] == PAGE_COMMUNITY),
                'photo'    => $contactPhoto["photo"],
                'tags'     => $keywords
-       );
+       ];
 
        if (is_array($a->profile) && !$a->profile['hide-friends']) {
                /// @todo What should this value tell us?
@@ -86,14 +86,14 @@ function noscrape_init(App $a)
        $json_info["last-activity"] = date("o-W", $last_active);
 
        //These are optional fields.
-       $profile_fields = array('pdesc', 'locality', 'region', 'postal-code', 'country-name', 'gender', 'marital', 'about');
+       $profile_fields = ['pdesc', 'locality', 'region', 'postal-code', 'country-name', 'gender', 'marital', 'about'];
        foreach ($profile_fields as $field) {
                if (!empty($a->profile[$field])) {
                        $json_info["$field"] = $a->profile[$field];
                }
        }
 
-       $dfrn_pages = array('request', 'confirm', 'notify', 'poll');
+       $dfrn_pages = ['request', 'confirm', 'notify', 'poll'];
        foreach ($dfrn_pages as $dfrn) {
                $json_info["dfrn-{$dfrn}"] = System::baseUrl()."/dfrn_{$dfrn}/{$which}";
        }
index dbf84337eff440b6ff2d29c69e2987290afe8e13..a98577e546d73a4eb1289071b304796402add152 100644 (file)
@@ -34,7 +34,7 @@ function notes_content(App $a, $update = false) {
        require_once('include/security.php');
        require_once('include/conversation.php');
        require_once('include/acl_selectors.php');
-       $groups = array();
+       $groups = [];
 
 
        $o = '';
@@ -55,7 +55,7 @@ function notes_content(App $a, $update = false) {
                $commpage = false;
                $commvisitor = false;
 
-               $x = array(
+               $x = [
                        'is_owner' => $is_owner,
                        'allow_location' => (($a->user['allow_location']) ? true : false),
                        'default_location' => $a->user['default-location'],
@@ -67,7 +67,7 @@ function notes_content(App $a, $update = false) {
                        'profile_uid' => local_user(),
                        'button' => t('Save'),
                        'acl_data' => '',
-               );
+               ];
 
                $o .= status_editor($a,$x,$a->contact['id']);
 
@@ -106,7 +106,7 @@ function notes_content(App $a, $update = false) {
 
        );
 
-       $parents_arr = array();
+       $parents_arr = [];
        $parents_str = '';
 
        if (DBM::is_result($r)) {
index e2de81e6c7f24a7f49dfe41602298fbe7c1d0b10..4d549b46db62b0496913a8f472de6e49f1c42b88 100644 (file)
@@ -86,7 +86,7 @@ function notifications_content(App $a) {
        $o = '';
        // Get the nav tabs for the notification pages
        $tabs = $nm->getTabs();
-       $notif_content = array();
+       $notif_content = [];
 
        // Notification results per page
        $perpage = 20;
@@ -149,10 +149,10 @@ function notifications_content(App $a) {
                $tpl = get_markup_template("intros.tpl");
 
                // The link to switch between ignored and normal connection requests
-               $notif_show_lnk = array(
+               $notif_show_lnk = [
                        'href' => (!$all ? 'notifications/intros/all' : 'notifications/intros' ),
                        'text' => (!$all ? t('Show Ignored Requests') : t('Hide Ignored Requests'))
-               );
+               ];
 
                // Loop through all introduction notifications.This creates an array with the output html for each
                // introduction
@@ -162,7 +162,7 @@ function notifications_content(App $a) {
                        // We have to distinguish between these two because they use different data.
                        switch ($it['label']) {
                                case 'friend_suggestion':
-                                       $notif_content[] = replace_macros($sugg, array(
+                                       $notif_content[] = replace_macros($sugg, [
                                                '$str_notifytype' => t('Notification type: '),
                                                '$notify_type' => $it['notify_type'],
                                                '$intro_id' => $it['intro_id'],
@@ -171,8 +171,8 @@ function notifications_content(App $a) {
                                                '$photo' => $it['photo'],
                                                '$fullname' => $it['name'],
                                                '$url' => $it['url'],
-                                               '$hidden' => array('hidden', t('Hide this contact from others'), ($it['hidden'] == 1), ''),
-                                               '$activity' => array('activity', t('Post a new friend activity'), $it['post_newfriend'], t('if applicable')),
+                                               '$hidden' => ['hidden', t('Hide this contact from others'), ($it['hidden'] == 1), ''],
+                                               '$activity' => ['activity', t('Post a new friend activity'), $it['post_newfriend'], t('if applicable')],
 
                                                '$knowyou' => $it['knowyou'],
                                                '$approve' => t('Approve'),
@@ -180,7 +180,7 @@ function notifications_content(App $a) {
                                                '$request' => $it['request'],
                                                '$ignore' => t('Ignore'),
                                                '$discard' => t('Discard'),
-                                       ));
+                                       ]);
                                        break;
 
                                // Normal connection requests
@@ -207,7 +207,7 @@ function notifications_content(App $a) {
                                                }
                                        }
 
-                                       $dfrn_text = replace_macros($dfrn_tpl,array(
+                                       $dfrn_text = replace_macros($dfrn_tpl,[
                                                '$intro_id' => $it['intro_id'],
                                                '$friend_selected' => $friend_selected,
                                                '$fan_selected' => $fan_selected,
@@ -216,7 +216,7 @@ function notifications_content(App $a) {
                                                '$approve_as3' => $helptext3,
                                                '$as_friend' => t('Friend'),
                                                '$as_fan' => (($it['network'] == NETWORK_DIASPORA) ? t('Sharer') : t('Subscriber'))
-                                       ));
+                                       ]);
 
                                        $header = $it["name"];
 
@@ -231,7 +231,7 @@ function notifications_content(App $a) {
                                                $discard = '';
                                        }
 
-                                       $notif_content[] = replace_macros($tpl, array(
+                                       $notif_content[] = replace_macros($tpl, [
                                                '$header' => htmlentities($header),
                                                '$str_notifytype' => t('Notification type: '),
                                                '$notify_type' => $it['notify_type'],
@@ -250,8 +250,8 @@ function notifications_content(App $a) {
                                                '$lbl_keywords' => t('Tags:'),
                                                '$gender' => $it['gender'],
                                                '$lbl_gender' => t('Gender:'),
-                                               '$hidden' => array('hidden', t('Hide this contact from others'), ($it['hidden'] == 1), ''),
-                                               '$activity' => array('activity', t('Post a new friend activity'), $it['post_newfriend'], t('if applicable')),
+                                               '$hidden' => ['hidden', t('Hide this contact from others'), ($it['hidden'] == 1), ''],
+                                               '$activity' => ['activity', t('Post a new friend activity'), $it['post_newfriend'], t('if applicable')],
                                                '$url' => $it['url'],
                                                '$zrl' => $it['zrl'],
                                                '$lbl_url' => t('Profile URL'),
@@ -265,7 +265,7 @@ function notifications_content(App $a) {
                                                '$ignore' => t('Ignore'),
                                                '$discard' => $discard,
 
-                                       ));
+                                       ]);
                                        break;
                        }
                }
@@ -295,7 +295,7 @@ function notifications_content(App $a) {
                        $tpl_var_name = 'tpl_item_'.$it['label'];
                        $tpl_notif = get_markup_template($$tpl_var_name);
 
-                       $notif_content[] = replace_macros($tpl_notif,array(
+                       $notif_content[] = replace_macros($tpl_notif,[
                                '$item_label' => $it['label'],
                                '$item_link' => $it['link'],
                                '$item_image' => $it['image'],
@@ -304,16 +304,16 @@ function notifications_content(App $a) {
                                '$item_when' => $it['when'],
                                '$item_ago' => $it['ago'],
                                '$item_seen' => $it['seen'],
-                       ));
+                       ]);
                }
 
                // It doesn't make sense to show the Show unread / Show all link visible if the user is on the
                // "Show all" page and there are no notifications. So we will hide it.
                if($show == 0 || intval($show) && $notifs['total'] > 0) {
-                       $notif_show_lnk = array(
+                       $notif_show_lnk = [
                                'href' => ($show ? 'notifications/'.$notifs['ident'] : 'notifications/'.$notifs['ident'].'?show=all' ),
                                'text' => ($show ? t('Show unread') : t('Show all')),
-                       );
+                       ];
                }
 
                // Output if there aren't any notifications available
@@ -321,14 +321,14 @@ function notifications_content(App $a) {
                        $notif_nocontent = sprintf( t('No more %s notifications.'), $notifs['ident']);
        }
 
-       $o .= replace_macros($notif_tpl, array(
+       $o .= replace_macros($notif_tpl, [
                '$notif_header' => $notif_header,
                '$tabs' => $tabs,
                '$notif_content' => $notif_content,
                '$notif_nocontent' => $notif_nocontent,
                '$notif_show_lnk' => $notif_show_lnk,
                '$notif_paginate' => paginate($a)
-       ));
+       ]);
 
        return $o;
 }
index 913f83f9beef777ef70277b7834ceec5ba78feea..2cb434ae98c6d41530caa5b05a5dbb62667666ad 100644 (file)
@@ -37,7 +37,7 @@ function notify_init(App $a) {
 
        if ($a->argc > 2 && $a->argv[1] === 'mark' && $a->argv[2] === 'all' ) {
                $r = $nm->setAllSeen();
-               $j = json_encode(array('result' => ($r) ? 'success' : 'fail'));
+               $j = json_encode(['result' => ($r) ? 'success' : 'fail']);
                echo $j;
                killme();
        }
@@ -56,25 +56,25 @@ function notify_content(App $a) {
        $not_tpl = get_markup_template('notify.tpl');
        require_once('include/bbcode.php');
 
-       $r = $nm->getAll(array('seen'=>0));
+       $r = $nm->getAll(['seen'=>0]);
        if (DBM::is_result($r) > 0) {
                foreach ($r as $it) {
-                       $notif_content .= replace_macros($not_tpl,array(
+                       $notif_content .= replace_macros($not_tpl,[
                                '$item_link' => System::baseUrl(true).'/notify/view/'. $it['id'],
                                '$item_image' => $it['photo'],
                                '$item_text' => strip_tags(bbcode($it['msg'])),
                                '$item_when' => relative_date($it['date'])
-                       ));
+                       ]);
                }
        } else {
                $notif_content .= t('No more system notifications.');
        }
 
-       $o .= replace_macros($notif_tpl, array(
+       $o .= replace_macros($notif_tpl, [
                '$notif_header' => t('System Notifications'),
                '$tabs' => false, // $tabs,
                '$notif_content' => $notif_content,
-       ));
+       ]);
 
        return $o;
 
index 37dc76545f73522213c3483540840c1b748fe1f2..19617391dd6837fe072d68f9992e1667c8af964c 100644 (file)
@@ -9,7 +9,7 @@ function oexchange_init(App $a) {
        if (($a->argc > 1) && ($a->argv[1] === 'xrd')) {
                $tpl = get_markup_template('oexchange_xrd.tpl');
 
-               $o = replace_macros($tpl, array('$base' => System::baseUrl()));
+               $o = replace_macros($tpl, ['$base' => System::baseUrl()]);
                echo $o;
                killme();
        }
@@ -44,7 +44,7 @@ function oexchange_content(App $a) {
 
        require_once('include/html2bbcode.php');
 
-       $post = array();
+       $post = [];
 
        $post['profile_uid'] = local_user();
        $post['return'] = '/oexchange/done' ;
index c61f4674b18757959d0de0854c953ea85ccbfad8..8a427908bc244277bfca2e10c7602102b5151bf4 100644 (file)
@@ -9,10 +9,10 @@ function opensearch_content(App $a) {
 
        header("Content-type: application/opensearchdescription+xml");
 
-       $o = replace_macros($tpl, array(
+       $o = replace_macros($tpl, [
                '$baseurl' => System::baseUrl(),
                '$nodename' => $a->get_hostname(),
-       ));
+       ]);
 
        echo $o;
 
index 4fabba6c7e7c001e65b06cf783e9c05c0cd30641..dbe45aba15736245f606d9ea110c2b8b7d5af5db 100644 (file)
@@ -59,10 +59,10 @@ function parse_url_content(App $a) {
        // the URL with the corresponding BBCode media tag
        $redirects = 0;
        // Fetch the header of the URL
-       $result = z_fetch_url($url, false, $redirects, array("novalidate" => true, "nobody" => true));
+       $result = z_fetch_url($url, false, $redirects, ["novalidate" => true, "nobody" => true]);
        if($result["success"]) {
                // Convert the header fields into an array
-               $hdrs = array();
+               $hdrs = [];
                $h = explode("\n", $result["header"]);
                foreach ($h as $l) {
                        list($k,$v) = array_map("trim", explode(":", trim($l), 2));
@@ -89,7 +89,7 @@ function parse_url_content(App $a) {
 
        $template = "[bookmark=%s]%s[/bookmark]%s";
 
-       $arr = array("url" => $url, "text" => "");
+       $arr = ["url" => $url, "text" => ""];
 
        call_hooks("parse_link", $arr);
 
@@ -102,7 +102,7 @@ function parse_url_content(App $a) {
        // need to parse the url for content.
        if ($url && $title && $text) {
 
-               $title = str_replace(array("\r","\n"),array("",""),$title);
+               $title = str_replace(["\r","\n"],["",""],$title);
 
                $text = "[quote]" . trim($text) . "[/quote]" . $br;
 
index dc7d8567833086377dfa4dce5bcc390e58850ec7..e899d671d64e3691e3ac2f806cb0a6d5e8ae7b36 100644 (file)
@@ -71,7 +71,7 @@ function photo_init(App $a)
                                break;
                }
 
-               $uid = str_replace(array('.jpg', '.png', '.gif'), array('', '', ''), $person);
+               $uid = str_replace(['.jpg', '.png', '.gif'], ['', '', ''], $person);
 
                foreach (Image::supportedTypes() AS $m => $e) {
                        $uid = str_replace('.' . $e, '', $uid);
@@ -92,7 +92,7 @@ function photo_init(App $a)
        } else {
                // Other photos
                $resolution = 0;
-               $photo = str_replace(array('.jpg', '.png', '.gif'), array('', '', ''), $photo);
+               $photo = str_replace(['.jpg', '.png', '.gif'], ['', '', ''], $photo);
 
                foreach (Image::supportedTypes() AS $m => $e) {
                        $photo = str_replace('.' . $e, '', $photo);
index ac1f06f8e81bf9cd0e855f0a7a399d3ebbbdd0d5..5714b0e866032d56a3a7f5a8082900d5fd70632f 100644 (file)
@@ -55,20 +55,20 @@ function photos_init(App $a) {
 
                $tpl = get_markup_template("vcard-widget.tpl");
 
-               $vcard_widget = replace_macros($tpl, array(
+               $vcard_widget = replace_macros($tpl, [
                        '$name' => $profile['name'],
                        '$photo' => $profile['photo'],
                        '$addr' => defaults($profile, 'addr', ''),
                        '$account_type' => $account_type,
                        '$pdesc' => defaults($profile, 'pdesc', ''),
-               ));
+               ]);
 
                $albums = Photo::getAlbums($a->data['user']['uid']);
 
                $albums_visible = ((intval($a->data['user']['hidewall']) && !local_user() && !remote_user()) ? false : true);
 
                // add various encodings to the array so we can just loop through and pick them out in a template
-               $ret = array('success' => false);
+               $ret = ['success' => false];
 
                if ($albums) {
                        $a->data['albums'] = $albums;
@@ -76,18 +76,18 @@ function photos_init(App $a) {
                                $ret['success'] = true;
                        }
 
-                       $ret['albums'] = array();
+                       $ret['albums'] = [];
                        foreach ($albums as $k => $album) {
                                //hide profile photos to others
                                if (!$is_owner && !remote_user() && ($album['album'] == t('Profile Photos')))
                                        continue;
-                               $entry = array(
+                               $entry = [
                                        'text'      => $album['album'],
                                        'total'     => $album['total'],
                                        'url'       => 'photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($album['album']),
                                        'urlencode' => urlencode($album['album']),
                                        'bin2hex'   => bin2hex($album['album'])
-                               );
+                               ];
                                $ret['albums'][] = $entry;
                        }
                }
@@ -97,15 +97,15 @@ function photos_init(App $a) {
                }
 
                if ($ret['success']) {
-                       $photo_albums_widget = replace_macros(get_markup_template('photo_albums.tpl'), array(
+                       $photo_albums_widget = replace_macros(get_markup_template('photo_albums.tpl'), [
                                '$nick'     => $a->data['user']['nickname'],
                                '$title'    => t('Photo Albums'),
                                '$recent'   => t('Recent Photos'),
                                '$albums'   => $ret['albums'],
                                '$baseurl'  => System::baseUrl(),
-                               '$upload'   => array(t('Upload New Photos'), 'photos/' . $a->data['user']['nickname'] . '/upload'),
+                               '$upload'   => [t('Upload New Photos'), 'photos/' . $a->data['user']['nickname'] . '/upload'],
                                '$can_post' => $can_post
-                       ));
+                       ]);
                }
 
 
@@ -116,9 +116,9 @@ function photos_init(App $a) {
                $a->page['aside'] .= $photo_albums_widget;
 
                $tpl = get_markup_template("photos_head.tpl");
-               $a->page['htmlhead'] .= replace_macros($tpl,array(
+               $a->page['htmlhead'] .= replace_macros($tpl,[
                        '$ispublic' => t('everybody')
-               ));
+               ]);
        }
 
        return;
@@ -229,10 +229,10 @@ function photos_post(App $a)
                        // Check if we should do HTML-based delete confirmation
                        if (x($_REQUEST, 'confirm')) {
                                $drop_url = $a->query_string;
-                               $extra_inputs = array(
-                                       array('name' => 'albumname', 'value' => $_POST['albumname']),
-                               );
-                               $a->page['content'] = replace_macros(get_markup_template('confirm.tpl'), array(
+                               $extra_inputs = [
+                                       ['name' => 'albumname', 'value' => $_POST['albumname']],
+                               ];
+                               $a->page['content'] = replace_macros(get_markup_template('confirm.tpl'), [
                                        '$method' => 'post',
                                        '$message' => t('Do you really want to delete this photo album and all its photos?'),
                                        '$extra_inputs' => $extra_inputs,
@@ -240,12 +240,12 @@ function photos_post(App $a)
                                        '$confirm_url' => $drop_url,
                                        '$confirm_name' => 'dropalbum', // Needed so that confirmation will bring us back into this if statement
                                        '$cancel' => t('Cancel'),
-                               ));
+                               ]);
                                $a->error = 1; // Set $a->error so the other module functions don't execute
                                return;
                        }
 
-                       $res = array();
+                       $res = [];
 
                        // get the list of photos we are about to delete
 
@@ -321,15 +321,15 @@ function photos_post(App $a)
                // Check if we should do HTML-based delete confirmation
                if (x($_REQUEST, 'confirm')) {
                        $drop_url = $a->query_string;
-                       $a->page['content'] = replace_macros(get_markup_template('confirm.tpl'), array(
+                       $a->page['content'] = replace_macros(get_markup_template('confirm.tpl'), [
                                '$method' => 'post',
                                '$message' => t('Do you really want to delete this photo?'),
-                               '$extra_inputs' => array(),
+                               '$extra_inputs' => [],
                                '$confirm' => t('Delete Photo'),
                                '$confirm_url' => $drop_url,
                                '$confirm_name' => 'delete', // Needed so that confirmation will bring us back into this if statement
                                '$cancel' => t('Cancel'),
-                       ));
+                       ]);
                        $a->error = 1; // Set $a->error so the other module functions don't execute
                        return;
                }
@@ -489,7 +489,7 @@ function photos_post(App $a)
                        $title = '';
                        $uri = item_new_uri($a->get_hostname(),$page_owner_uid);
 
-                       $arr = array();
+                       $arr = [];
                        $arr['guid']          = get_guid(32);
                        $arr['uid']           = $page_owner_uid;
                        $arr['uri']           = $uri;
@@ -541,7 +541,7 @@ function photos_post(App $a)
                                $rawtags = '#' . $rawtags;
                        }
 
-                       $taginfo = array();
+                       $taginfo = [];
                        $tags = get_tags($rawtags);
 
                        if (count($tags)) {
@@ -566,7 +566,7 @@ function photos_post(App $a)
                                                                        }
                                                                }
                                                        }
-                                                       $taginfo[] = array($newname, $profile, $salmon);
+                                                       $taginfo[] = [$newname, $profile, $salmon];
                                                } else {
                                                        $newname = $name;
                                                        $alias = '';
@@ -611,9 +611,9 @@ function photos_post(App $a)
                                                }
                                                if ($profile) {
                                                        if (substr($notify, 0, 4) === 'cid:') {
-                                                               $taginfo[] = array($newname, $profile, $notify, $r[0], '@[url=' . str_replace(',','%2c',$profile) . ']' . $newname . '[/url]');
+                                                               $taginfo[] = [$newname, $profile, $notify, $r[0], '@[url=' . str_replace(',','%2c',$profile) . ']' . $newname . '[/url]'];
                                                        } else {
-                                                               $taginfo[] = array($newname, $profile, $notify, null, $str_tags .= '@[url=' . $profile . ']' . $newname . '[/url]');
+                                                               $taginfo[] = [$newname, $profile, $notify, null, $str_tags .= '@[url=' . $profile . ']' . $newname . '[/url]'];
                                                        }
                                                        if (strlen($str_tags)) {
                                                                $str_tags .= ',';
@@ -667,7 +667,7 @@ function photos_post(App $a)
                                foreach ($taginfo as $tagged) {
                                        $uri = item_new_uri($a->get_hostname(), $page_owner_uid);
 
-                                       $arr = array();
+                                       $arr = [];
                                        $arr['guid']          = get_guid(32);
                                        $arr['uid']           = $page_owner_uid;
                                        $arr['uri']           = $uri;
@@ -769,7 +769,7 @@ function photos_post(App $a)
        $str_group_deny    = perms2str(is_array($group_deny)    ? $group_deny    : explode(',', $group_deny));
        $str_contact_deny  = perms2str(is_array($contact_deny)  ? $contact_deny  : explode(',', $contact_deny));
 
-       $ret = array('src' => '', 'filename' => '', 'filesize' => 0, 'type' => '');
+       $ret = ['src' => '', 'filename' => '', 'filesize' => 0, 'type' => ''];
 
        call_hooks('photo_post_file', $ret);
 
@@ -899,7 +899,7 @@ function photos_post(App $a)
                $lon = Photo::getGps($exif['GPS']['GPSLongitude'], $exif['GPS']['GPSLongitudeRef']);
        }
 
-       $arr = array();
+       $arr = [];
        if ($lat && $lon) {
                $arr['coord'] = $lat . ' ' . $lon;
        }
@@ -1101,16 +1101,16 @@ function photos_content(App $a)
 
                $uploader = '';
 
-               $ret = array('post_url' => 'photos/' . $a->data['user']['nickname'],
+               $ret = ['post_url' => 'photos/' . $a->data['user']['nickname'],
                                'addon_text' => $uploader,
-                               'default_upload' => true);
+                               'default_upload' => true];
 
                call_hooks('photo_upload_form',$ret);
 
-               $default_upload_box = replace_macros(get_markup_template('photos_default_uploader_box.tpl'), array());
-               $default_upload_submit = replace_macros(get_markup_template('photos_default_uploader_submit.tpl'), array(
+               $default_upload_box = replace_macros(get_markup_template('photos_default_uploader_box.tpl'), []);
+               $default_upload_submit = replace_macros(get_markup_template('photos_default_uploader_submit.tpl'), [
                        '$submit' => t('Submit'),
-               ));
+               ]);
 
                $usage_message = '';
 
@@ -1118,7 +1118,7 @@ function photos_content(App $a)
 
                $aclselect_e = ($visitor ? '' : populate_acl($a->user));
 
-               $o .= replace_macros($tpl,array(
+               $o .= replace_macros($tpl,[
                        '$pagename' => t('Upload Photos'),
                        '$sessid' => session_id(),
                        '$usage' => $usage_message,
@@ -1138,7 +1138,7 @@ function photos_content(App $a)
                        '$group_perms' => t('Show to Groups'),
                        '$contact_perms' => t('Show to Contacts'),
                        '$return_path' => $a->query_string,
-               ));
+               ]);
 
                return $o;
        }
@@ -1184,29 +1184,29 @@ function photos_content(App $a)
 
                                        $album_e = $album;
 
-                                       $o .= replace_macros($edit_tpl,array(
+                                       $o .= replace_macros($edit_tpl,[
                                                '$nametext' => t('New album name: '),
                                                '$nickname' => $a->data['user']['nickname'],
                                                '$album' => $album_e,
                                                '$hexalbum' => bin2hex($album),
                                                '$submit' => t('Submit'),
                                                '$dropsubmit' => t('Delete Album')
-                                       ));
+                                       ]);
                                }
                        }
                } else {
                        if (($album !== t('Profile Photos')) && ($album !== 'Contact Photos') && ($album !== t('Contact Photos')) && $can_post) {
-                               $edit = array(t('Edit Album'), 'photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($album) . '/edit');
+                               $edit = [t('Edit Album'), 'photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($album) . '/edit'];
                        }
                }
 
                if ($order_field === 'posted') {
-                       $order =  array(t('Show Newest First'), 'photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($album));
+                       $order =  [t('Show Newest First'), 'photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($album)];
                } else {
-                       $order = array(t('Show Oldest First'), 'photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($album) . '?f=&order=posted');
+                       $order = [t('Show Oldest First'), 'photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($album) . '?f=&order=posted'];
                }
 
-               $photos = array();
+               $photos = [];
 
                if (DBM::is_result($r)) {
                        // "Twist" is only used for the duepunto theme with style "slackr"
@@ -1219,7 +1219,7 @@ function photos_content(App $a)
                                $imgalt_e = $rr['filename'];
                                $desc_e = $rr['desc'];
 
-                               $photos[] = array(
+                               $photos[] = [
                                        'id' => $rr['id'],
                                        'twist' => ' ' . ($twist ? 'rotleft' : 'rotright') . rand(2,4),
                                        'link' => 'photos/' . $a->data['user']['nickname'] . '/image/' . $rr['resource-id']
@@ -1230,20 +1230,20 @@ function photos_content(App $a)
                                        'desc'=> $desc_e,
                                        'ext' => $ext,
                                        'hash'=> $rr['resource-id'],
-                               );
+                               ];
                        }
                }
 
                $tpl = get_markup_template('photo_album.tpl');
-               $o .= replace_macros($tpl, array(
+               $o .= replace_macros($tpl, [
                                '$photos' => $photos,
                                '$album' => $album,
                                '$can_post' => $can_post,
-                               '$upload' => array(t('Upload New Photos'), 'photos/' . $a->data['user']['nickname'] . '/upload/' . bin2hex($album)),
+                               '$upload' => [t('Upload New Photos'), 'photos/' . $a->data['user']['nickname'] . '/upload/' . bin2hex($album)],
                                '$order' => $order,
                                '$edit' => $edit,
                                '$paginate' => paginate($a),
-                       ));
+                       ]);
 
                return $o;
 
@@ -1329,10 +1329,10 @@ function photos_content(App $a)
                $lock = null;
 
                if ($can_post && ($ph[0]['uid'] == $owner_uid)) {
-                       $tools = array(
-                               'edit'  => array('photos/' . $a->data['user']['nickname'] . '/image/' . $datum . (($cmd === 'edit') ? '' : '/edit'), (($cmd === 'edit') ? t('View photo') : t('Edit photo'))),
-                               'profile'=>array('profile_photo/use/'.$ph[0]['resource-id'], t('Use as profile photo')),
-                       );
+                       $tools = [
+                               'edit'  => ['photos/' . $a->data['user']['nickname'] . '/image/' . $datum . (($cmd === 'edit') ? '' : '/edit'), (($cmd === 'edit') ? t('View photo') : t('Edit photo'))],
+                               'profile'=>['profile_photo/use/'.$ph[0]['resource-id'], t('Use as profile photo')],
+                       ];
 
                        // lock
                        $lock = ( ( ($ph[0]['uid'] == local_user()) && (strlen($ph[0]['allow_cid']) || strlen($ph[0]['allow_gid'])
@@ -1345,16 +1345,16 @@ function photos_content(App $a)
 
                if ( $cmd === 'edit') {
                        $tpl = get_markup_template('photo_edit_head.tpl');
-                       $a->page['htmlhead'] .= replace_macros($tpl,array(
+                       $a->page['htmlhead'] .= replace_macros($tpl,[
                                '$prevlink' => $prevlink,
                                '$nextlink' => $nextlink
-                       ));
+                       ]);
                }
 
                if ($prevlink)
-                       $prevlink = array($prevlink, '<div class="icon prev"></div>') ;
+                       $prevlink = [$prevlink, '<div class="icon prev"></div>'] ;
 
-               $photo = array(
+               $photo = [
                        'href' => 'photo/' . $hires['resource-id'] . '-' . $hires['scale'] . '.' . $phototypes[$hires['type']],
                        'title'=> t('View Full Size'),
                        'src'  => 'photo/' . $lores['resource-id'] . '-' . $lores['scale'] . '.' . $phototypes[$lores['type']] . '?f=&_u=' . datetime_convert('','','','ymdhis'),
@@ -1362,10 +1362,10 @@ function photos_content(App $a)
                        'width' => $hires['width'],
                        'album' => $hires['album'],
                        'filename' => $hires['filename'],
-               );
+               ];
 
                if ($nextlink) {
-                       $nextlink = array($nextlink, '<div class="icon next"></div>');
+                       $nextlink = [$nextlink, '<div class="icon next"></div>'];
                }
 
 
@@ -1447,7 +1447,7 @@ function photos_content(App $a)
                                }
                                $tag_str .= bbcode($t);
                        }
-                       $tags = array(t('Tags: '), $tag_str);
+                       $tags = [t('Tags: '), $tag_str];
                        if ($cmd === 'edit') {
                                $tags[] = 'tagrm/' . $link_item['id'];
                                $tags[] = t('[Remove any tag]');
@@ -1463,14 +1463,14 @@ function photos_content(App $a)
                        $caption_e = $ph[0]['desc'];
                        $aclselect_e = populate_acl($ph[0]);
 
-                       $edit = replace_macros($edit_tpl, array(
+                       $edit = replace_macros($edit_tpl, [
                                '$id' => $ph[0]['id'],
-                               '$album' => array('albname', t('New album name'), $album_e,''),
-                               '$caption' => array('desc', t('Caption'), $caption_e, ''),
-                               '$tags' => array('newtag', t('Add a Tag'), "", t('Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping')),
-                               '$rotate_none' => array('rotate', t('Do not rotate'),0,'', true),
-                               '$rotate_cw' => array('rotate', t('Rotate CW (right)'),1,''),
-                               '$rotate_ccw' => array('rotate', t('Rotate CCW (left)'),2,''),
+                               '$album' => ['albname', t('New album name'), $album_e,''],
+                               '$caption' => ['desc', t('Caption'), $caption_e, ''],
+                               '$tags' => ['newtag', t('Add a Tag'), "", t('Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping')],
+                               '$rotate_none' => ['rotate', t('Do not rotate'),0,'', true],
+                               '$rotate_cw' => ['rotate', t('Rotate CW (right)'),1,''],
+                               '$rotate_ccw' => ['rotate', t('Rotate CCW (left)'),2,''],
 
                                '$nickname' => $a->data['user']['nickname'],
                                '$resource_id' => $ph[0]['resource-id'],
@@ -1485,7 +1485,7 @@ function photos_content(App $a)
                                '$group_perms' => t('Show to Groups'),
                                '$contact_perms' => t('Show to Contacts'),
                                '$return_path' => $a->query_string,
-                       ));
+                       ]);
                }
 
                $like = '';
@@ -1502,18 +1502,18 @@ function photos_content(App $a)
 
                        if ($can_post || can_write_wall($owner_uid)) {
                                $like_tpl = get_markup_template('like_noshare.tpl');
-                               $likebuttons = replace_macros($like_tpl, array(
+                               $likebuttons = replace_macros($like_tpl, [
                                        '$id' => $link_item['id'],
                                        '$likethis' => t("I like this \x28toggle\x29"),
                                        '$nolike' => (Feature::isEnabled(local_user(), 'dislike') ? t("I don't like this \x28toggle\x29") : ''),
                                        '$wait' => t('Please wait'),
                                        '$return_path' => $a->query_string,
-                               ));
+                               ]);
                        }
 
                        if (!DBM::is_result($r)) {
                                if (($can_post || can_write_wall($owner_uid)) && $link_item['last-child']) {
-                                       $comments .= replace_macros($cmnt_tpl, array(
+                                       $comments .= replace_macros($cmnt_tpl, [
                                                '$return_path' => '',
                                                '$jsreload' => $return_url,
                                                '$type' => 'wall-comment',
@@ -1529,14 +1529,14 @@ function photos_content(App $a)
                                                '$sourceapp' => t($a->sourcename),
                                                '$ww' => '',
                                                '$rand_num' => random_digits(12)
-                                       ));
+                                       ]);
                                }
                        }
 
-                       $conv_responses = array(
-                               'like' => array('title' => t('Likes','title')),'dislike' => array('title' => t('Dislikes','title')),
-                               'attendyes' => array('title' => t('Attending','title')), 'attendno' => array('title' => t('Not attending','title')), 'attendmaybe' => array('title' => t('Might attend','title'))
-                       );
+                       $conv_responses = [
+                               'like' => ['title' => t('Likes','title')],'dislike' => ['title' => t('Dislikes','title')],
+                               'attendyes' => ['title' => t('Attending','title')], 'attendno' => ['title' => t('Not attending','title')], 'attendmaybe' => ['title' => t('Might attend','title')]
+                       ];
 
                        // display comments
                        if (DBM::is_result($r)) {
@@ -1552,7 +1552,7 @@ function photos_content(App $a)
                                }
 
                                if (($can_post || can_write_wall($owner_uid)) && $link_item['last-child']) {
-                                       $comments .= replace_macros($cmnt_tpl,array(
+                                       $comments .= replace_macros($cmnt_tpl,[
                                                '$return_path' => '',
                                                '$jsreload' => $return_url,
                                                '$type' => 'wall-comment',
@@ -1568,7 +1568,7 @@ function photos_content(App $a)
                                                '$sourceapp' => t($a->sourcename),
                                                '$ww' => '',
                                                '$rand_num' => random_digits(12)
-                                       ));
+                                       ]);
                                }
 
                                foreach ($r as $item) {
@@ -1599,18 +1599,18 @@ function photos_content(App $a)
                                        $profile_link = $profile_url;
 
                                        $dropping = (($item['contact-id'] == $contact_id) || ($item['uid'] == local_user()));
-                                       $drop = array(
+                                       $drop = [
                                                'dropping' => $dropping,
                                                'pagedrop' => false,
                                                'select' => t('Select'),
                                                'delete' => t('Delete'),
-                                       );
+                                       ];
 
                                        $name_e = $profile_name;
                                        $title_e = $item['title'];
                                        $body_e = bbcode($item['body']);
 
-                                       $comments .= replace_macros($template,array(
+                                       $comments .= replace_macros($template,[
                                                '$id' => $item['item_id'],
                                                '$profile_url' => $profile_link,
                                                '$name' => $name_e,
@@ -1622,10 +1622,10 @@ function photos_content(App $a)
                                                '$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''),
                                                '$drop' => $drop,
                                                '$comment' => $comment
-                                       ));
+                                       ]);
 
                                        if (($can_post || can_write_wall($owner_uid)) && $item['last-child']) {
-                                               $comments .= replace_macros($cmnt_tpl, array(
+                                               $comments .= replace_macros($cmnt_tpl, [
                                                        '$return_path' => '',
                                                        '$jsreload' => $return_url,
                                                        '$type' => 'wall-comment',
@@ -1641,11 +1641,11 @@ function photos_content(App $a)
                                                        '$sourceapp' => t($a->sourcename),
                                                        '$ww' => '',
                                                        '$rand_num' => random_digits(12)
-                                               ));
+                                               ]);
                                        }
                                }
                        }
-                       $response_verbs = array('like');
+                       $response_verbs = ['like'];
                        if (Feature::isEnabled($owner_uid, 'dislike')) {
                                $response_verbs[] = 'dislike';
                        }
@@ -1655,7 +1655,7 @@ function photos_content(App $a)
                }
 
                $photo_tpl = get_markup_template('photo_view.tpl');
-               $o .= replace_macros($photo_tpl, array(
+               $o .= replace_macros($photo_tpl, [
                        '$id' => $ph[0]['id'],
                        '$album' => [$album_link, $ph[0]['album']],
                        '$tools' => $tools,
@@ -1674,7 +1674,7 @@ function photos_content(App $a)
                        'responses' => $responses,
                        '$comments' => $comments,
                        '$paginate' => $paginate,
-               ));
+               ]);
 
                $a->page['htmlhead'] .= "\n" . '<meta name="twitter:card" content="photo" />' . "\n";
                $a->page['htmlhead'] .= '<meta name="twitter:title" content="' . $photo["album"] . '" />' . "\n";
@@ -1711,7 +1711,7 @@ function photos_content(App $a)
                intval($a->pager['itemspage'])
        );
 
-       $photos = array();
+       $photos = [];
        if (DBM::is_result($r)) {
                // "Twist" is only used for the duepunto theme with style "slackr"
                $twist = false;
@@ -1727,31 +1727,31 @@ function photos_content(App $a)
                        $alt_e = $rr['filename'];
                        $name_e = $rr['album'];
 
-                       $photos[] = array(
+                       $photos[] = [
                                'id'            => $rr['id'],
                                'twist'         => ' ' . ($twist ? 'rotleft' : 'rotright') . rand(2,4),
                                'link'          => 'photos/' . $a->data['user']['nickname'] . '/image/' . $rr['resource-id'],
                                'title'         => t('View Photo'),
                                'src'           => 'photo/' . $rr['resource-id'] . '-' . ((($rr['scale']) == 6) ? 4 : $rr['scale']) . '.' . $ext,
                                'alt'           => $alt_e,
-                               'album' => array(
+                               'album' => [
                                        'link'  => 'photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($rr['album']),
                                        'name'  => $name_e,
                                        'alt'   => t('View Album'),
-                               ),
+                               ],
 
-                       );
+                       ];
                }
        }
 
        $tpl = get_markup_template('photos_recent.tpl');
-       $o .= replace_macros($tpl, array(
+       $o .= replace_macros($tpl, [
                '$title' => t('Recent Photos'),
                '$can_post' => $can_post,
-               '$upload' => array(t('Upload New Photos'), 'photos/'.$a->data['user']['nickname'].'/upload'),
+               '$upload' => [t('Upload New Photos'), 'photos/'.$a->data['user']['nickname'].'/upload'],
                '$photos' => $photos,
                '$paginate' => paginate($a),
-       ));
+       ]);
 
        return $o;
 }
index d8eaa8126fd03f0aad9b5a079db905dab216b2c5..9dd6780d01bcd7b0cd375a97cb278785dfcef064 100644 (file)
@@ -60,15 +60,15 @@ function ping_init(App $a)
                $format = 'json';
        }
 
-       $tags          = array();
-       $comments      = array();
-       $likes         = array();
-       $dislikes      = array();
-       $friends       = array();
-       $posts         = array();
-       $regs          = array();
-       $mails         = array();
-       $notifications = array();
+       $tags          = [];
+       $comments      = [];
+       $likes         = [];
+       $dislikes      = [];
+       $friends       = [];
+       $posts         = [];
+       $regs          = [];
+       $mails         = [];
+       $notifications = [];
 
        $intro_count    = 0;
        $mail_count     = 0;
@@ -76,8 +76,8 @@ function ping_init(App $a)
        $network_count  = 0;
        $register_count = 0;
        $sysnotify_count = 0;
-       $groups_unseen  = array();
-       $forums_unseen  = array();
+       $groups_unseen  = [];
+       $forums_unseen  = [];
 
        $all_events       = 0;
        $all_events_today = 0;
@@ -86,7 +86,7 @@ function ping_init(App $a)
        $birthdays        = 0;
        $birthdays_today  = 0;
 
-       $data = array();
+       $data = [];
        $data['intro']    = $intro_count;
        $data['mail']     = $mail_count;
        $data['net']      = $network_count;
@@ -103,7 +103,7 @@ function ping_init(App $a)
        if (local_user()) {
                // Different login session than the page that is calling us.
                if (intval($_GET['uid']) && intval($_GET['uid']) != local_user()) {
-                       $data = array('result' => array('invalid' => 1));
+                       $data = ['result' => ['invalid' => 1]];
 
                        if ($format == 'json') {
                                if (isset($_GET['callback'])) {
@@ -137,7 +137,7 @@ function ping_init(App $a)
                );
 
                if (DBM::is_result($items_unseen)) {
-                       $arr = array('items' => $items_unseen);
+                       $arr = ['items' => $items_unseen];
                        call_hooks('network_ping', $arr);
 
                        foreach ($items_unseen as $item) {
@@ -278,7 +278,7 @@ function ping_init(App $a)
                // merge all notification types in one array
                if (DBM::is_result($intros)) {
                        foreach ($intros as $intro) {
-                               $notif = array(
+                               $notif = [
                                        'href'    => System::baseUrl() . '/notifications/intros/' . $intro['id'],
                                        'name'    => $intro['name'],
                                        'url'     => $intro['url'],
@@ -286,14 +286,14 @@ function ping_init(App $a)
                                        'date'    => $intro['datetime'],
                                        'seen'    => false,
                                        'message' => t('{0} wants to be your friend'),
-                               );
+                               ];
                                $notifs[] = $notif;
                        }
                }
 
                if (DBM::is_result($mails)) {
                        foreach ($mails as $mail) {
-                               $notif = array(
+                               $notif = [
                                        'href'    => System::baseUrl() . '/message/' . $mail['id'],
                                        'name'    => $mail['from-name'],
                                        'url'     => $mail['from-url'],
@@ -301,14 +301,14 @@ function ping_init(App $a)
                                        'date'    => $mail['created'],
                                        'seen'    => false,
                                        'message' => t('{0} sent you a message'),
-                               );
+                               ];
                                $notifs[] = $notif;
                        }
                }
 
                if (DBM::is_result($regs)) {
                        foreach ($regs as $reg) {
-                               $notif = array(
+                               $notif = [
                                        'href'    => System::baseUrl() . '/admin/users/',
                                        'name'    => $reg['name'],
                                        'url'     => $reg['url'],
@@ -316,7 +316,7 @@ function ping_init(App $a)
                                        'date'    => $reg['created'],
                                        'seen'    => false,
                                        'message' => t('{0} requested registration'),
-                               );
+                               ];
                                $notifs[] = $notif;
                        }
                }
@@ -360,7 +360,7 @@ function ping_init(App $a)
 
                                $local_time = datetime_convert('UTC', date_default_timezone_get(), $notif['date']);
 
-                               $notifications[] = array(
+                               $notifications[] = [
                                        'id'        => $notif['id'],
                                        'href'      => $notif['href'],
                                        'name'      => $notif['name'],
@@ -370,13 +370,13 @@ function ping_init(App $a)
                                        'message'   => $notif['message'],
                                        'seen'      => $notif['seen'],
                                        'timestamp' => strtotime($local_time)
-                               );
+                               ];
                        }
                }
        }
 
-       $sysmsgs = array();
-       $sysmsgs_info = array();
+       $sysmsgs = [];
+       $sysmsgs_info = [];
 
        if (x($_SESSION, 'sysmsg')) {
                $sysmsgs = $_SESSION['sysmsg'];
@@ -393,12 +393,12 @@ function ping_init(App $a)
                $data['forums'] = $forums_unseen;
                $data['notify'] = $sysnotify_count + $intro_count + $mail_count + $register_count;
                $data['notifications'] = $notifications;
-               $data['sysmsgs'] = array(
+               $data['sysmsgs'] = [
                        'notice' => $sysmsgs,
                        'info' => $sysmsgs_info
-               );
+               ];
 
-               $json_payload = json_encode(array("result" => $data));
+               $json_payload = json_encode(["result" => $data]);
 
                if (isset($_GET['callback'])) {
                        // JSONP support
@@ -413,7 +413,7 @@ function ping_init(App $a)
                $data = ping_format_xml_data($data, $sysnotify_count, $notifications, $sysmsgs, $sysmsgs_info, $groups_unseen, $forums_unseen);
 
                header("Content-type: text/xml");
-               echo XML::fromArray(array("result" => $data), $xml);
+               echo XML::fromArray(["result" => $data], $xml);
        }
 
        killme();
@@ -427,7 +427,7 @@ function ping_init(App $a)
  */
 function ping_get_notifications($uid)
 {
-       $result  = array();
+       $result  = [];
        $offset  = 0;
        $seen    = false;
        $seensql = "NOT";
@@ -523,11 +523,11 @@ function ping_get_notifications($uid)
  */
 function ping_format_xml_data($data, $sysnotify, $notifs, $sysmsgs, $sysmsgs_info, $groups_unseen, $forums_unseen)
 {
-       $notifications = array();
+       $notifications = [];
        foreach ($notifs as $key => $notif) {
                $notifications[$key . ':note'] = $notif['message'];
 
-               $notifications[$key . ':@attributes'] = array(
+               $notifications[$key . ':@attributes'] = [
                        'id'        => $notif['id'],
                        'href'      => $notif['href'],
                        'name'      => $notif['name'],
@@ -536,10 +536,10 @@ function ping_format_xml_data($data, $sysnotify, $notifs, $sysmsgs, $sysmsgs_inf
                        'date'      => $notif['date'],
                        'seen'      => $notif['seen'],
                        'timestamp' => $notif['timestamp']
-               );
+               ];
        }
 
-       $sysmsg = array();
+       $sysmsg = [];
        foreach ($sysmsgs as $key => $m) {
                $sysmsg[$key . ':notice'] = $m;
        }
@@ -548,27 +548,27 @@ function ping_format_xml_data($data, $sysnotify, $notifs, $sysmsgs, $sysmsgs_inf
        }
 
        $data['notif'] = $notifications;
-       $data['@attributes'] = array('count' => $sysnotify_count + $data['intro'] + $data['mail'] + $data['register']);
+       $data['@attributes'] = ['count' => $sysnotify_count + $data['intro'] + $data['mail'] + $data['register']];
        $data['sysmsgs'] = $sysmsg;
 
        if ($data['register'] == 0) {
                unset($data['register']);
        }
 
-       $groups = array();
+       $groups = [];
        if (count($groups_unseen)) {
                foreach ($groups_unseen as $key => $item) {
                        $groups[$key . ':group'] = $item['count'];
-                       $groups[$key . ':@attributes'] = array('id' => $item['id']);
+                       $groups[$key . ':@attributes'] = ['id' => $item['id']];
                }
                $data['groups'] = $groups;
        }
 
-       $forums = array();
+       $forums = [];
        if (count($forums_unseen)) {
                foreach ($forums_unseen as $key => $item) {
                        $forums[$count . ':forum'] = $item['count'];
-                       $forums[$count . ':@attributes'] = array('id' => $item['id']);
+                       $forums[$count . ':@attributes'] = ['id' => $item['id']];
                }
                $data['forums'] = $forums;
        }
index 2e2791fc1ee6b763c008d79364dfb4192a59d36d..761a9c2b80858bf0d4ea79250798e35748899e9a 100644 (file)
@@ -152,7 +152,7 @@ function poco_init(App $a) {
        }
        logger("Query done", LOGGER_DEBUG);
 
-       $ret = array();
+       $ret = [];
        if (x($_GET, 'sorted')) {
                $ret['sorted'] = false;
        }
@@ -165,10 +165,10 @@ function poco_init(App $a) {
        $ret['startIndex']   = (int) $startIndex;
        $ret['itemsPerPage'] = (int) $itemsPerPage;
        $ret['totalResults'] = (int) $totalResults;
-       $ret['entry']        = array();
+       $ret['entry']        = [];
 
 
-       $fields_ret = array(
+       $fields_ret = [
                'id' => false,
                'displayName' => false,
                'urls' => false,
@@ -183,7 +183,7 @@ function poco_init(App $a) {
                'address' => false,
                'contactType' => false,
                'generation' => false
-       );
+       ];
 
        if ((! x($_GET, 'fields')) || ($_GET['fields'] === '@all')) {
                foreach ($fields_ret as $k => $v) {
@@ -254,7 +254,7 @@ function poco_init(App $a) {
                                        $contact['gender'] = "";
                                }
 
-                               $entry = array();
+                               $entry = [];
                                if ($fields_ret['id']) {
                                        $entry['id'] = (int)$contact['id'];
                                }
@@ -274,9 +274,9 @@ function poco_init(App $a) {
                                        $entry['generation'] = (int)$contact['generation'];
                                }
                                if ($fields_ret['urls']) {
-                                       $entry['urls'] = array(array('value' => $contact['url'], 'type' => 'profile'));
+                                       $entry['urls'] = [['value' => $contact['url'], 'type' => 'profile']];
                                        if ($contact['addr'] && ($contact['network'] !== NETWORK_MAIL)) {
-                                               $entry['urls'][] = array('value' => 'acct:' . $contact['addr'], 'type' => 'webfinger');
+                                               $entry['urls'][] = ['value' => 'acct:' . $contact['addr'], 'type' => 'webfinger'];
                                        }
                                }
                                if ($fields_ret['preferredUsername']) {
@@ -301,7 +301,7 @@ function poco_init(App $a) {
                                        $entry['updated'] = date("c", strtotime($entry['updated']));
                                }
                                if ($fields_ret['photos']) {
-                                       $entry['photos'] = array(array('value' => $contact['photo'], 'type' => 'profile'));
+                                       $entry['photos'] = [['value' => $contact['photo'], 'type' => 'profile']];
                                }
                                if ($fields_ret['network']) {
                                        $entry['network'] = $contact['network'];
@@ -316,7 +316,7 @@ function poco_init(App $a) {
                                        $tags = str_replace(",", " ", $contact['keywords']);
                                        $tags = explode(" ", $tags);
 
-                                       $cleaned = array();
+                                       $cleaned = [];
                                        foreach ($tags as $tag) {
                                                $tag = trim(strtolower($tag));
                                                if ($tag != "") {
@@ -324,10 +324,10 @@ function poco_init(App $a) {
                                                }
                                        }
 
-                                       $entry['tags'] = array($cleaned);
+                                       $entry['tags'] = [$cleaned];
                                }
                                if ($fields_ret['address']) {
-                                       $entry['address'] = array();
+                                       $entry['address'] = [];
 
                                        // Deactivated. It just reveals too much data. (Although its from the default profile)
                                        //if (isset($rr['paddress']))
@@ -354,7 +354,7 @@ function poco_init(App $a) {
                                $ret['entry'][] = $entry;
                        }
                } else {
-                       $ret['entry'][] = array();
+                       $ret['entry'][] = [];
                }
        } else {
                http_status_exit(500);
@@ -363,7 +363,7 @@ function poco_init(App $a) {
 
        if ($format === 'xml') {
                header('Content-type: text/xml');
-               echo replace_macros(get_markup_template('poco_xml.tpl'), array_xmlify(array('$response' => $ret)));
+               echo replace_macros(get_markup_template('poco_xml.tpl'), array_xmlify(['$response' => $ret]));
                killme();
        }
        if ($format === 'json') {
index 2f989dd7d3b07bd415847fe376034911b3be3ea9..8b36b17dceb0f6c0952a3efbcf00a5b053655277 100644 (file)
@@ -97,7 +97,7 @@ function poke_init(App $a) {
 
        $uri = item_new_uri($a->get_hostname(),$uid);
 
-       $arr = array();
+       $arr = [];
 
        $arr['guid']          = get_guid(32);
        $arr['uid']           = $uid;
@@ -177,10 +177,10 @@ function poke_content(App $a) {
        $base = System::baseUrl();
 
        $head_tpl = get_markup_template('poke_head.tpl');
-       $a->page['htmlhead'] .= replace_macros($head_tpl,array(
+       $a->page['htmlhead'] .= replace_macros($head_tpl,[
                '$baseurl' => System::baseUrl(true),
                '$base' => $base
-       ));
+       ]);
 
 
        $parent = ((x($_GET,'parent')) ? intval($_GET['parent']) : '0');
@@ -188,15 +188,15 @@ function poke_content(App $a) {
 
        $verbs = get_poke_verbs();
 
-       $shortlist = array();
+       $shortlist = [];
        foreach($verbs as $k => $v)
                if($v[1] !== 'NOTRANSLATION')
-                       $shortlist[] = array($k,$v[1]);
+                       $shortlist[] = [$k,$v[1]];
 
 
        $tpl = get_markup_template('poke_content.tpl');
 
-       $o = replace_macros($tpl,array(
+       $o = replace_macros($tpl,[
                '$title' => t('Poke/Prod'),
                '$desc' => t('poke, prod or do other things to somebody'),
                '$clabel' => t('Recipient'),
@@ -207,7 +207,7 @@ function poke_content(App $a) {
                '$submit' => t('Submit'),
                '$name' => $name,
                '$id' => $id
-       ));
+       ]);
 
        return $o;
 
index b4eaa0553691a0492142e33fde68dbf65987ca94..be92885b72938a864d61b6fdd35267ce4d05111b 100644 (file)
@@ -17,7 +17,7 @@ function pretheme_init(App $a) {
                        $version = '';
                        $credits = '';
                }
-               echo json_encode(array('img' => get_theme_screenshot($theme), 'desc' => $desc, 'version' => $version, 'credits' => $credits));
+               echo json_encode(['img' => get_theme_screenshot($theme), 'desc' => $desc, 'version' => $version, 'credits' => $credits]);
        }
 
        killme();
index dfd4792c9b97131123ea81f846240fe46e11f0b6..639788aa8b3bab68798d56fa679248fb9772f8db 100644 (file)
@@ -6,8 +6,8 @@ use Friendica\Network\Probe;
 function probe_content(App $a) {
 
        if (!local_user()) {
-               http_status_exit(403, array("title" => t("Public access denied."),
-                       "description" => t("Only logged in users are permitted to perform a probing.")));
+               http_status_exit(403, ["title" => t("Public access denied."),
+                       "description" => t("Only logged in users are permitted to perform a probing.")]);
                killme();
        }
 
index 77f8e069d39c207f996d182236ef3b619dcd6537..1982605127443924970a20ef246181049afac4b8 100644 (file)
@@ -61,7 +61,7 @@ function profile_init(App $a)
 
        // site block
        if (!$blocked && !$userblock) {
-               $keywords = str_replace(array('#', ',', ' ', ',,'), array('', ' ', ',', ','), defaults($a->profile, 'pub_keywords', ''));
+               $keywords = str_replace(['#', ',', ' ', ',,'], ['', ' ', ',', ','], defaults($a->profile, 'pub_keywords', ''));
                if (strlen($keywords)) {
                        $a->page['htmlhead'] .= '<meta name="keywords" content="' . $keywords . '" />' . "\r\n";
                }
@@ -75,7 +75,7 @@ function profile_init(App $a)
        $a->page['htmlhead'] .= '<link rel="lrdd" type="application/xrd+xml" href="' . System::baseUrl() . '/xrd/?uri=' . $uri . '" />' . "\r\n";
        header('Link: <' . System::baseUrl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
 
-       $dfrn_pages = array('request', 'confirm', 'notify', 'poll');
+       $dfrn_pages = ['request', 'confirm', 'notify', 'poll'];
        foreach ($dfrn_pages as $dfrn) {
                $a->page['htmlhead'] .= "<link rel=\"dfrn-{$dfrn}\" href=\"" . System::baseUrl() . "/dfrn_{$dfrn}/{$which}\" />\r\n";
        }
@@ -116,7 +116,7 @@ function profile_content(App $a, $update = 0)
        require_once 'include/acl_selectors.php';
        require_once 'include/items.php';
 
-       $groups = array();
+       $groups = [];
 
        $tab = 'posts';
        $o = '';
@@ -197,7 +197,7 @@ function profile_content(App $a, $update = 0)
                $a->page['aside'] .= tagcloud_wall_widget();
 
                if (can_write_wall($a->profile['profile_uid'])) {
-                       $x = array(
+                       $x = [
                                'is_owner' => $is_owner,
                                'allow_location' => ($is_owner || $commvisitor) && $a->profile['allow_location'],
                                'default_location' => $is_owner ? $a->user['default-location'] : '',
@@ -212,7 +212,7 @@ function profile_content(App $a, $update = 0)
                                'bang' => '',
                                'visitor' => $is_owner || $commvisitor ? 'block' : 'none',
                                'profile_uid' => $a->profile['profile_uid'],
-                       );
+                       ];
 
                        $o .= status_editor($a, $x);
                }
@@ -319,7 +319,7 @@ function profile_content(App $a, $update = 0)
                );
        }
 
-       $parents_arr = array();
+       $parents_arr = [];
        $parents_str = '';
 
        // Set a time stamp for this page. We will make use of it when we
@@ -342,7 +342,7 @@ function profile_content(App $a, $update = 0)
 
                $items = conv_sort($items, 'created');
        } else {
-               $items = array();
+               $items = [];
        }
 
        if ($is_owner && !$update && !Config::get('theme', 'hide_eventlist')) {
@@ -352,10 +352,10 @@ function profile_content(App $a, $update = 0)
 
 
        if ($is_owner) {
-               $unseen = dba::exists('item', array('wall' => true, 'unseen' => true, 'uid' => local_user()));
+               $unseen = dba::exists('item', ['wall' => true, 'unseen' => true, 'uid' => local_user()]);
                if ($unseen) {
-                       $r = dba::update('item', array('unseen' => false),
-                                       array('wall' => true, 'unseen' => true, 'uid' => local_user()));
+                       $r = dba::update('item', ['unseen' => false],
+                                       ['wall' => true, 'unseen' => true, 'uid' => local_user()]);
                }
        }
 
index 8cd1fcb6a34ce063535059141f7e7acc009140bf..f52015155d689646a9acafcca66da18a93ac36f4 100644 (file)
@@ -254,7 +254,7 @@ function profile_photo_content(App $a) {
 
                $tpl = get_markup_template('profile_photo.tpl');
 
-               $o .= replace_macros($tpl,array(
+               $o .= replace_macros($tpl,[
                        '$user' => $a->user['nickname'],
                        '$lbl_upfile' => t('Upload File:'),
                        '$lbl_profiles' => t('Select a profile:'),
@@ -263,7 +263,7 @@ function profile_photo_content(App $a) {
                        '$profiles' => $profiles,
                        '$form_security_token' => get_form_security_token("profile_photo"),
                        '$select' => sprintf('%s %s', t('or'), ($newuser) ? '<a href="' . System::baseUrl() . '">' . t('skip this step') . '</a>' : '<a href="'. System::baseUrl() . '/photos/' . $a->user['nickname'] . '">' . t('select a photo from your photo albums') . '</a>')
-               ));
+               ]);
 
                return $o;
        }
@@ -271,7 +271,7 @@ function profile_photo_content(App $a) {
                $filename = $a->config['imagecrop'] . '-' . $a->config['imagecrop_resolution'] . '.'.$a->config['imagecrop_ext'];
                $resolution = $a->config['imagecrop_resolution'];
                $tpl = get_markup_template("cropbody.tpl");
-               $o .= replace_macros($tpl,array(
+               $o .= replace_macros($tpl,[
                        '$filename' => $filename,
                        '$profile' => intval($_REQUEST['profile']),
                        '$resource' => $a->config['imagecrop'] . '-' . $a->config['imagecrop_resolution'],
@@ -280,7 +280,7 @@ function profile_photo_content(App $a) {
                        '$desc' => t('Please adjust the image cropping for optimum viewing.'),
                        '$form_security_token' => get_form_security_token("profile_photo"),
                        '$done' => t('Done Editing')
-               ));
+               ]);
                return $o;
        }
 
@@ -333,7 +333,7 @@ function profile_photo_crop_ui_head(App $a, Image $Image) {
        $a->config['imagecrop'] = $hash;
        $a->config['imagecrop_resolution'] = $smallest;
        $a->config['imagecrop_ext'] = $Image->getExt();
-       $a->page['htmlhead'] .= replace_macros(get_markup_template("crophead.tpl"), array());
-       $a->page['end'] .= replace_macros(get_markup_template("cropend.tpl"), array());
+       $a->page['htmlhead'] .= replace_macros(get_markup_template("crophead.tpl"), []);
+       $a->page['end'] .= replace_macros(get_markup_template("cropend.tpl"), []);
        return;
 }
index 5fcd2d8f171fc8a6e161a0eb07c96be3deb6b4b1..93571db9cd0718255d4652cee3aa98f9b1579fcc 100644 (file)
@@ -154,7 +154,7 @@ function profile_clean_keywords($keywords) {
        $keywords = str_replace(",", " ", $keywords);
        $keywords = explode(" ", $keywords);
 
-       $cleaned = array();
+       $cleaned = [];
        foreach ($keywords as $keyword) {
                $keyword = trim(strtolower($keyword));
                $keyword = trim($keyword, "#");
@@ -207,7 +207,7 @@ function profiles_post(App $a) {
                } else {
                        $ignore_year = false;
                }
-               if (!in_array($dob, array('0000-00-00', '0001-01-01'))) {
+               if (!in_array($dob, ['0000-00-00', '0001-01-01'])) {
                        if (strpos($dob, '0000-') === 0 || strpos($dob, '0001-') === 0) {
                                $ignore_year = true;
                                $dob = substr($dob, 5);
@@ -331,7 +331,7 @@ function profiles_post(App $a) {
 
                PConfig::set(local_user(), 'system', 'detailled_profile', (($_POST['detailled_profile'] == 1) ? 1: 0));
 
-               $changes = array();
+               $changes = [];
                $value = '';
                if ($is_default) {
                        if ($marital != $orig[0]['marital']) {
@@ -491,7 +491,7 @@ function profiles_post(App $a) {
                }
 
                if ($is_default) {
-                       $location = Profile::formatLocation(array("locality" => $locality, "region" => $region, "country-name" => $country_name));
+                       $location = Profile::formatLocation(["locality" => $locality, "region" => $region, "country-name" => $country_name]);
 
                        q("UPDATE `contact` SET `about` = '%s', `location` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `self` AND `uid` = %d",
                                dbesc($about),
@@ -541,7 +541,7 @@ function profile_activity($changed, $value) {
                return;
        }
 
-       $arr = array();
+       $arr = [];
 
        $arr['guid'] = get_guid(32);
        $arr['uri'] = $arr['parent-uri'] = item_new_uri($a->get_hostname(), local_user());
@@ -624,48 +624,48 @@ function profiles_content(App $a) {
                        notice( t('Profile not found.') . EOL);
                        return;
                }
-               
-               $a->page['htmlhead'] .= replace_macros(get_markup_template('profed_head.tpl'), array(
+
+               $a->page['htmlhead'] .= replace_macros(get_markup_template('profed_head.tpl'), [
                        '$baseurl' => System::baseUrl(true),
-               ));
-               $a->page['end'] .= replace_macros(get_markup_template('profed_end.tpl'), array(
+               ]);
+               $a->page['end'] .= replace_macros(get_markup_template('profed_end.tpl'), [
                        '$baseurl' => System::baseUrl(true),
-               ));
+               ]);
 
                $opt_tpl = get_markup_template("profile-hide-friends.tpl");
-               $hide_friends = replace_macros($opt_tpl,array(
-                       '$yesno' => array(
+               $hide_friends = replace_macros($opt_tpl,[
+                       '$yesno' => [
                                'hide-friends', //Name
                                t('Hide contacts and friends:'), //Label
                                !!$r[0]['hide-friends'], //Value
                                '', //Help string
-                               array(t('No'), t('Yes')) //Off - On strings
-                       ),
+                               [t('No'), t('Yes')] //Off - On strings
+                       ],
                        '$desc' => t('Hide your contact/friend list from viewers of this profile?'),
                        '$yes_str' => t('Yes'),
                        '$no_str' => t('No'),
                        '$yes_selected' => (($r[0]['hide-friends']) ? " checked=\"checked\" " : ""),
                        '$no_selected' => (($r[0]['hide-friends'] == 0) ? " checked=\"checked\" " : "")
-               ));
+               ]);
 
                $personal_account = !(in_array($a->user["page-flags"],
-                                       array(PAGE_COMMUNITY, PAGE_PRVGROUP)));
+                                       [PAGE_COMMUNITY, PAGE_PRVGROUP]));
 
                $detailled_profile = (PConfig::get(local_user(), 'system', 'detailled_profile') AND $personal_account);
 
                $is_default = (($r[0]['is-default']) ? 1 : 0);
                $tpl = get_markup_template("profile_edit.tpl");
-               $o .= replace_macros($tpl, array(
+               $o .= replace_macros($tpl, [
                        '$personal_account' => $personal_account,
                        '$detailled_profile' => $detailled_profile,
 
-                       '$details' => array(
+                       '$details' => [
                                'detailled_profile', //Name
                                t('Show more profile fields:'), //Label
                                $detailled_profile, //Value
                                '', //Help string
-                               array(t('No'), t('Yes')) //Off - On strings
-                       ),
+                               [t('No'), t('Yes')] //Off - On strings
+                       ],
 
                        '$multi_profiles'               => Feature::isEnabled(local_user(), 'multi_profiles'),
                        '$form_security_token'          => get_form_security_token("profile_edit"),
@@ -703,46 +703,46 @@ function profiles_content(App $a) {
                        '$disabled' => (($is_default) ? 'onclick="return false;" style="color: #BBBBFF;"' : ''),
                        '$baseurl' => System::baseUrl(true),
                        '$profile_id' => $r[0]['id'],
-                       '$profile_name' => array('profile_name', t('Profile Name:'), $r[0]['profile-name'], t('Required'), '*'),
+                       '$profile_name' => ['profile_name', t('Profile Name:'), $r[0]['profile-name'], t('Required'), '*'],
                        '$is_default'   => $is_default,
                        '$default' => (($is_default) ? '<p id="profile-edit-default-desc">' . t('This is your <strong>public</strong> profile.<br />It <strong>may</strong> be visible to anybody using the internet.') . '</p>' : ""),
-                       '$name' => array('name', t('Your Full Name:'), $r[0]['name']),
-                       '$pdesc' => array('pdesc', t('Title/Description:'), $r[0]['pdesc']),
+                       '$name' => ['name', t('Your Full Name:'), $r[0]['name']],
+                       '$pdesc' => ['pdesc', t('Title/Description:'), $r[0]['pdesc']],
                        '$dob' => dob($r[0]['dob']),
                        '$hide_friends' => $hide_friends,
-                       '$address' => array('address', t('Street Address:'), $r[0]['address']),
-                       '$locality' => array('locality', t('Locality/City:'), $r[0]['locality']),
-                       '$region' => array('region', t('Region/State:'), $r[0]['region']),
-                       '$postal_code' => array('postal_code', t('Postal/Zip Code:'), $r[0]['postal-code']),
-                       '$country_name' => array('country_name', t('Country:'), $r[0]['country-name']),
+                       '$address' => ['address', t('Street Address:'), $r[0]['address']],
+                       '$locality' => ['locality', t('Locality/City:'), $r[0]['locality']],
+                       '$region' => ['region', t('Region/State:'), $r[0]['region']],
+                       '$postal_code' => ['postal_code', t('Postal/Zip Code:'), $r[0]['postal-code']],
+                       '$country_name' => ['country_name', t('Country:'), $r[0]['country-name']],
                        '$age' => ((intval($r[0]['dob'])) ? '(' . t('Age: ') . age($r[0]['dob'],$a->user['timezone'],$a->user['timezone']) . ')' : ''),
                        '$gender' => ContactSelector::gender($r[0]['gender']),
                        '$marital' => ContactSelector::maritalStatus($r[0]['marital']),
-                       '$with' => array('with', t("Who: \x28if applicable\x29"), strip_tags($r[0]['with']), t('Examples: cathy123, Cathy Williams, cathy@example.com')),
-                       '$howlong' => array('howlong', t('Since [date]:'), ($r[0]['howlong'] <= NULL_DATE ? '' : datetime_convert('UTC',date_default_timezone_get(),$r[0]['howlong']))),
+                       '$with' => ['with', t("Who: \x28if applicable\x29"), strip_tags($r[0]['with']), t('Examples: cathy123, Cathy Williams, cathy@example.com')],
+                       '$howlong' => ['howlong', t('Since [date]:'), ($r[0]['howlong'] <= NULL_DATE ? '' : datetime_convert('UTC',date_default_timezone_get(),$r[0]['howlong']))],
                        '$sexual' => ContactSelector::sexualPreference($r[0]['sexual']),
-                       '$about' => array('about', t('Tell us about yourself...'), $r[0]['about']),
-                       '$xmpp' => array('xmpp', t('XMPP (Jabber) address:'), $r[0]['xmpp'], t("The XMPP address will be propagated to your contacts so that they can follow you.")),
-                       '$homepage' => array('homepage', t('Homepage URL:'), $r[0]['homepage']),
-                       '$hometown' => array('hometown', t('Hometown:'), $r[0]['hometown']),
-                       '$politic' => array('politic', t('Political Views:'), $r[0]['politic']),
-                       '$religion' => array('religion', t('Religious Views:'), $r[0]['religion']),
-                       '$pub_keywords' => array('pub_keywords', t('Public Keywords:'), $r[0]['pub_keywords'], t("\x28Used for suggesting potential friends, can be seen by others\x29")),
-                       '$prv_keywords' => array('prv_keywords', t('Private Keywords:'), $r[0]['prv_keywords'], t("\x28Used for searching profiles, never shown to others\x29")),
-                       '$likes' => array('likes', t('Likes:'), $r[0]['likes']),
-                       '$dislikes' => array('dislikes', t('Dislikes:'), $r[0]['dislikes']),
-                       '$music' => array('music', t('Musical interests'), $r[0]['music']),
-                       '$book' => array('book', t('Books, literature'), $r[0]['book']),
-                       '$tv' => array('tv', t('Television'), $r[0]['tv']),
-                       '$film' => array('film', t('Film/dance/culture/entertainment'), $r[0]['film']),
-                       '$interest' => array('interest', t('Hobbies/Interests'), $r[0]['interest']),
-                       '$romance' => array('romance', t('Love/romance'), $r[0]['romance']),
-                       '$work' => array('work', t('Work/employment'), $r[0]['work']),
-                       '$education' => array('education', t('School/education'), $r[0]['education']),
-                       '$contact' => array('contact', t('Contact information and Social Networks'), $r[0]['contact']),
-               ));
-
-               $arr = array('profile' => $r[0], 'entry' => $o);
+                       '$about' => ['about', t('Tell us about yourself...'), $r[0]['about']],
+                       '$xmpp' => ['xmpp', t('XMPP (Jabber) address:'), $r[0]['xmpp'], t("The XMPP address will be propagated to your contacts so that they can follow you.")],
+                       '$homepage' => ['homepage', t('Homepage URL:'), $r[0]['homepage']],
+                       '$hometown' => ['hometown', t('Hometown:'), $r[0]['hometown']],
+                       '$politic' => ['politic', t('Political Views:'), $r[0]['politic']],
+                       '$religion' => ['religion', t('Religious Views:'), $r[0]['religion']],
+                       '$pub_keywords' => ['pub_keywords', t('Public Keywords:'), $r[0]['pub_keywords'], t("\x28Used for suggesting potential friends, can be seen by others\x29")],
+                       '$prv_keywords' => ['prv_keywords', t('Private Keywords:'), $r[0]['prv_keywords'], t("\x28Used for searching profiles, never shown to others\x29")],
+                       '$likes' => ['likes', t('Likes:'), $r[0]['likes']],
+                       '$dislikes' => ['dislikes', t('Dislikes:'), $r[0]['dislikes']],
+                       '$music' => ['music', t('Musical interests'), $r[0]['music']],
+                       '$book' => ['book', t('Books, literature'), $r[0]['book']],
+                       '$tv' => ['tv', t('Television'), $r[0]['tv']],
+                       '$film' => ['film', t('Film/dance/culture/entertainment'), $r[0]['film']],
+                       '$interest' => ['interest', t('Hobbies/Interests'), $r[0]['interest']],
+                       '$romance' => ['romance', t('Love/romance'), $r[0]['romance']],
+                       '$work' => ['work', t('Work/employment'), $r[0]['work']],
+                       '$education' => ['education', t('School/education'), $r[0]['education']],
+                       '$contact' => ['contact', t('Contact information and Social Networks'), $r[0]['contact']],
+               ]);
+
+               $arr = ['profile' => $r[0], 'entry' => $o];
                call_hooks('profile_edit', $arr);
 
                return $o;
@@ -767,24 +767,24 @@ function profiles_content(App $a) {
 
                        $profiles = '';
                        foreach ($r as $rr) {
-                               $profiles .= replace_macros($tpl, array(
+                               $profiles .= replace_macros($tpl, [
                                        '$photo'        => $a->remove_baseurl($rr['thumb']),
                                        '$id'           => $rr['id'],
                                        '$alt'          => t('Profile Image'),
                                        '$profile_name' => $rr['profile-name'],
                                        '$visible'      => (($rr['is-default']) ? '<strong>' . t('visible to everybody') . '</strong>'
                                                : '<a href="'.'profperm/'.$rr['id'].'" />' . t('Edit visibility') . '</a>')
-                               ));
+                               ]);
                        }
 
                        $tpl_header = get_markup_template('profile_listing_header.tpl');
-                       $o .= replace_macros($tpl_header,array(
+                       $o .= replace_macros($tpl_header,[
                                '$header'      => t('Edit/Manage Profiles'),
                                '$chg_photo'   => t('Change profile photo'),
                                '$cr_new'      => t('Create New Profile'),
                                '$cr_new_link' => 'profiles/new?t=' . get_form_security_token("profile_new"),
                                '$profiles'    => $profiles
-                       ));
+                       ]);
                }
                return $o;
        }
index ee51906601b2c0fe5578bfeffc388694e23572ea..015260d54d356b6ebd47ff69c3beacc83b862ca6 100644 (file)
@@ -69,7 +69,7 @@ function profperm_content(App $a) {
                        intval($a->argv[1])
                );
 
-               $ingroup = array();
+               $ingroup = [];
                if (DBM::is_result($r))
                        foreach($r as $member)
                                $ingroup[] = $member['id'];
@@ -99,7 +99,7 @@ function profperm_content(App $a) {
 
                        $members = $r;
 
-                       $ingroup = array();
+                       $ingroup = [];
                        if (DBM::is_result($r))
                                foreach($r as $member)
                                        $ingroup[] = $member['id'];
index db0a615244a9fde2896add0d59e84835cdb0d34e..538275ef00f9e1a84c293e97156418b71b31a02d 100644 (file)
@@ -104,7 +104,7 @@ function proxy_init(App $a) {
                        $url = substr($url, 0, $pos + 1);
                }
 
-               $url = str_replace(array('.jpg', '.jpeg', '.gif', '.png'), array('','','',''), $url);
+               $url = str_replace(['.jpg', '.jpeg', '.gif', '.png'], ['','','',''], $url);
 
                $url = base64_decode(strtr($url, '-_', '+/'), true);
 
@@ -186,10 +186,10 @@ function proxy_init(App $a) {
                                die();
                        }
 
-                       $fields = array('uid' => 0, 'contact-id' => 0, 'guid' => get_guid(), 'resource-id' => $urlhash, 'created' => datetime_convert(), 'edited' => datetime_convert(),
+                       $fields = ['uid' => 0, 'contact-id' => 0, 'guid' => get_guid(), 'resource-id' => $urlhash, 'created' => datetime_convert(), 'edited' => datetime_convert(),
                                'filename' => basename($_REQUEST['url']), 'type' => '', 'album' => '', 'height' => imagesy($image), 'width' => imagesx($image),
                                'datasize' => 0, 'data' => $img_str, 'scale' => 100, 'profile' => 0,
-                               'allow_cid' => '', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '', 'desc' => $mime);
+                               'allow_cid' => '', 'allow_gid' => '', 'deny_cid' => '', 'deny_gid' => '', 'desc' => $mime];
                        dba::insert('photo', $fields);
                } else {
                        $Image = new Image($img_str, $mime);
@@ -286,7 +286,7 @@ function proxy_url($url, $writemode = false, $size = '') {
        // Extract the URL extension
        $extension = pathinfo(parse_url($url, PHP_URL_PATH), PATHINFO_EXTENSION);
 
-       $extensions = array('jpg', 'jpeg', 'gif', 'png');
+       $extensions = ['jpg', 'jpeg', 'gif', 'png'];
        if (in_array($extension, $extensions)) {
                $shortpath .= '.' . $extension;
                $longpath .= '.' . $extension;
@@ -340,7 +340,7 @@ function proxy_parse_query($url) {
        $query = parse_url($url, PHP_URL_QUERY);
        $query = html_entity_decode($query);
        $query_list = explode('&', $query);
-       $arr = array();
+       $arr = [];
 
        foreach ($query_list as $key_value) {
                $key_value_list = explode('=', $key_value);
index 4edf3ee6a651415eff0378b59421adb5d3c26ba7..56d4e59360346a7b9a7aefdfc7932f0e4f9b113b 100644 (file)
@@ -19,7 +19,7 @@ function register_post(App $a)
        $verified = 0;
        $blocked  = 1;
 
-       $arr = array('post' => $_POST);
+       $arr = ['post' => $_POST];
        call_hooks('register_post', $arr);
 
        $max_dailies = intval(Config::get('system', 'max_daily_registrations'));
@@ -133,7 +133,7 @@ function register_post(App $a)
 
                // send notification to admins
                foreach ($adminlist as $admin) {
-                       notification(array(
+                       notification([
                                'type'         => NOTIFY_SYSTEM,
                                'event'        => 'SYSTEM_REGISTER_REQUEST',
                                'source_name'  => $user['username'],
@@ -146,7 +146,7 @@ function register_post(App $a)
                                'uid'          => $admin['uid'],
                                'language'     => $admin['language'] ? $admin['language'] : 'en',
                                'show_in_notification_page' => false
-                       ));
+                       ]);
                }
                // send notification to the user, that the registration is pending
                User::sendRegisterPendingEmail(
@@ -222,14 +222,14 @@ function register_content(App $a)
                $profile_publish = '<input type="hidden" name="profile_publish_reg" value="1" />';
        } else {
                $publish_tpl = get_markup_template("profile_publish.tpl");
-               $profile_publish = replace_macros($publish_tpl, array(
+               $profile_publish = replace_macros($publish_tpl, [
                        '$instance' => 'reg',
                        '$pubdesc' => t('Include your profile in member directory?'),
                        '$yes_selected' => ' checked="checked" ',
                        '$no_selected' => '',
                        '$str_yes' => t('Yes'),
                        '$str_no' => t('No'),
-               ));
+               ]);
        }
 
        $r = q("SELECT COUNT(*) AS `contacts` FROM `contact`");
@@ -239,7 +239,7 @@ function register_content(App $a)
 
        $tpl = get_markup_template("register.tpl");
 
-       $arr = array('template' => $tpl);
+       $arr = ['template' => $tpl];
 
        call_hooks('register_form', $arr);
 
@@ -249,7 +249,7 @@ function register_content(App $a)
                '$oidhtml' => $oidhtml,
                '$invitations' => Config::get('system', 'invitation_only'),
                '$permonly'    => $a->config['register_policy'] == REGISTER_APPROVE,
-               '$permonlybox' => array('permonlybox', t('Note for the admin'), '', t('Leave a message for the admin, why you want to join this node')),
+               '$permonlybox' => ['permonlybox', t('Note for the admin'), '', t('Leave a message for the admin, why you want to join this node')],
                '$invite_desc' => t('Membership on this site is by invitation only.'),
                '$invite_label' => t('Your invitation ID: '),
                '$invite_id'  => $invite_id,
@@ -263,8 +263,8 @@ function register_content(App $a)
                '$namelabel' => t('Your Full Name ' . "\x28" . 'e.g. Joe Smith, real or real-looking' . "\x29" . ': '),
                '$addrlabel' => t('Your Email Address: (Initial information will be send there, so this has to be an existing address.)'),
                '$passwords' => $passwords,
-               '$password1' => array('password1', t('New Password:'), '', t('Leave empty for an auto generated password.')),
-               '$password2' => array('confirm', t('Confirm:'), '', ''),
+               '$password1' => ['password1', t('New Password:'), '', t('Leave empty for an auto generated password.')],
+               '$password2' => ['confirm', t('Confirm:'), '', ''],
                '$nickdesc'  => t('Choose a profile nickname. This must begin with a text character. Your profile address on this site will then be \'<strong>nickname@%s</strong>\'.', $a->get_hostname()),
                '$nicklabel' => t('Choose a nickname: '),
                '$photo'     => $photo,
index 8f08067e21115b70831a36982034ae4f0c2b9d88..f5bba6dea0f6131a48b92705b2567822972d770f 100644 (file)
@@ -84,8 +84,8 @@ function user_deny($hash)
                intval($register[0]['uid'])
        );
 
-       dba::delete('user', array('uid' => $register[0]['uid']));
-       dba::delete('register', array('hash' => $register[0]['hash']));
+       dba::delete('user', ['uid' => $register[0]['uid']]);
+       dba::delete('register', ['hash' => $register[0]['hash']]);
 
        notice(sprintf(t('Registration revoked for %s'), $user[0]['username']) . EOL);
        return true;
index bf5969982a2c3cf462029ad5876789c3217ebbb4..5912a6e3139fda4d45bd695b9ca5d5a75e6d97a8 100644 (file)
@@ -46,14 +46,14 @@ function removeme_content(App $a)
        $_SESSION['remove_account_verify'] = $hash;
 
        $tpl = get_markup_template('removeme.tpl');
-       $o .= replace_macros($tpl, array(
+       $o .= replace_macros($tpl, [
                '$basedir' => System::baseUrl(),
                '$hash' => $hash,
                '$title' => t('Remove My Account'),
                '$desc' => t('This will completely remove your account. Once this has been done it is not recoverable.'),
                '$passwd' => t('Please enter your password for verification:'),
                '$submit' => t('Remove My Account')
-       ));
+       ]);
 
        return $o;
 }
index 8327329bf56f2cce9f46a22c52303817db77d602..29f520b18cdce9252d235461b66b168afce506d0 100644 (file)
@@ -15,11 +15,11 @@ use Friendica\App;
  */
 function robots_txt_init(App $a)
 {
-       $allDisalloweds = array(
+       $allDisalloweds = [
                '/settings/',
                '/admin/',
                '/message/',
-       );
+       ];
 
        header('Content-Type: text/plain');
        echo 'User-agent: *' . PHP_EOL;
index 3a4dececdeeb87083cd696b5a570295ca52aef0d..d5b0fe243036b3d0dc41484af647371a61ff17da 100644 (file)
@@ -69,7 +69,7 @@ function salmon_post(App $a) {
        // unpack the  data
 
        // strip whitespace so our data element will return to one big base64 blob
-       $data = str_replace(array(" ","\t","\r","\n"),array("","","",""),$base->data);
+       $data = str_replace([" ","\t","\r","\n"],["","","",""],$base->data);
 
        // stash away some other stuff for later
 
index c17b11c5d9a46c3025d143232da52a6c68e2a30c..08b21d1e444316cf55cdedee1e1aef166d474353 100644 (file)
@@ -25,26 +25,26 @@ function search_saved_searches() {
        );
 
        if (DBM::is_result($r)) {
-               $saved = array();
+               $saved = [];
                foreach ($r as $rr) {
-                       $saved[] = array(
+                       $saved[] = [
                                'id'            => $rr['id'],
                                'term'          => $rr['term'],
                                'encodedterm'   => urlencode($rr['term']),
                                'delete'        => t('Remove term'),
                                'selected'      => ($search==$rr['term']),
-                       );
+                       ];
                }
 
 
                $tpl = get_markup_template("saved_searches_aside.tpl");
 
-               $o .= replace_macros($tpl, array(
+               $o .= replace_macros($tpl, [
                        '$title'        => t('Saved Searches'),
                        '$add'          => '',
                        '$searchbox'    => '',
                        '$saved'        => $saved,
-               ));
+               ]);
        }
 
        return $o;
@@ -63,11 +63,11 @@ function search_init(App $a) {
                                dbesc($search)
                        );
                        if (!DBM::is_result($r)) {
-                               dba::insert('search', array('uid' => local_user(), 'term' => $search));
+                               dba::insert('search', ['uid' => local_user(), 'term' => $search]);
                        }
                }
                if (x($_GET,'remove') && $search) {
-                       dba::delete('search', array('uid' => local_user(), 'term' => $search));
+                       dba::delete('search', ['uid' => local_user(), 'term' => $search]);
                }
 
                $a->page['aside'] .= search_saved_searches();
@@ -98,8 +98,8 @@ function search_content(App $a) {
 
        if (Config::get('system','local_search') && !local_user() && !remote_user()) {
                http_status_exit(403,
-                               array("title" => t("Public access denied."),
-                                       "description" => t("Only logged in users are permitted to perform a search.")));
+                               ["title" => t("Public access denied."),
+                                       "description" => t("Only logged in users are permitted to perform a search.")]);
                killme();
                //notice(t('Public access denied.').EOL);
                //return;
@@ -123,13 +123,13 @@ function search_content(App $a) {
                        $resultdata = json_decode($result);
                        if (($resultdata->time > (time() - $crawl_permit_period)) && ($resultdata->accesses > $free_crawls)) {
                                http_status_exit(429,
-                                               array("title" => t("Too Many Requests"),
-                                                       "description" => t("Only one search per minute is permitted for not logged in users.")));
+                                               ["title" => t("Too Many Requests"),
+                                                       "description" => t("Only one search per minute is permitted for not logged in users.")]);
                                killme();
                        }
-                       Cache::set("remote_search:".$remote, json_encode(array("time" => time(), "accesses" => $resultdata->accesses + 1)), CACHE_HOUR);
+                       Cache::set("remote_search:".$remote, json_encode(["time" => time(), "accesses" => $resultdata->accesses + 1]), CACHE_HOUR);
                } else
-                       Cache::set("remote_search:".$remote, json_encode(array("time" => time(), "accesses" => 1)), CACHE_HOUR);
+                       Cache::set("remote_search:".$remote, json_encode(["time" => time(), "accesses" => 1]), CACHE_HOUR);
        }
 
        nav_set_selected('search');
@@ -146,12 +146,12 @@ function search_content(App $a) {
        }
 
        // contruct a wrapper for the search header
-       $o .= replace_macros(get_markup_template("content_wrapper.tpl"),array(
+       $o .= replace_macros(get_markup_template("content_wrapper.tpl"),[
                'name' => "search-header",
                '$title' => t("Search"),
                '$title_size' => 3,
                '$content' => search($search,'search-box','search',((local_user()) ? true : false), false)
-       ));
+       ]);
 
        if (strpos($search,'#') === 0) {
                $tag = true;
@@ -228,9 +228,9 @@ function search_content(App $a) {
        else
                $title = sprintf( t('Results for: %s'), $search);
 
-       $o .= replace_macros(get_markup_template("section_title.tpl"),array(
+       $o .= replace_macros(get_markup_template("section_title.tpl"),[
                '$title' => $title
-       ));
+       ]);
 
        logger("Start Conversation for '".$search."'", LOGGER_DEBUG);
        $o .= conversation($a,$r,'search',false);
index 8fd890804f136f0fc1e4d5c755f311558bc8fdea..06ac0794b8b8427b368493f5b7e71ac146d20487 100644 (file)
@@ -38,84 +38,84 @@ function settings_init(App $a)
        // These lines provide the javascript needed by the acl selector
 
        $tpl = get_markup_template('settings/head.tpl');
-       $a->page['htmlhead'] .= replace_macros($tpl,array(
+       $a->page['htmlhead'] .= replace_macros($tpl,[
                '$ispublic' => t('everybody')
-       ));
+       ]);
 
-       $tabs = array(
-               array(
+       $tabs = [
+               [
                        'label' => t('Account'),
                        'url'   => 'settings',
                        'selected'      =>  (($a->argc == 1) && ($a->argv[0] === 'settings')?'active':''),
                        'accesskey' => 'o',
-               ),
-       );
+               ],
+       ];
 
        if (Feature::get()) {
-               $tabs[] =       array(
+               $tabs[] =       [
                                        'label' => t('Additional features'),
                                        'url'   => 'settings/features',
                                        'selected'      => (($a->argc > 1) && ($a->argv[1] === 'features') ? 'active' : ''),
                                        'accesskey' => 't',
-                               );
+                               ];
        }
 
-       $tabs[] =       array(
+       $tabs[] =       [
                'label' => t('Display'),
                'url'   => 'settings/display',
                'selected'      => (($a->argc > 1) && ($a->argv[1] === 'display')?'active':''),
                'accesskey' => 'i',
-       );
+       ];
 
-       $tabs[] =       array(
+       $tabs[] =       [
                'label' => t('Social Networks'),
                'url'   => 'settings/connectors',
                'selected'      => (($a->argc > 1) && ($a->argv[1] === 'connectors')?'active':''),
                'accesskey' => 'w',
-       );
+       ];
 
-       $tabs[] =       array(
+       $tabs[] =       [
                'label' => t('Plugins'),
                'url'   => 'settings/addon',
                'selected'      => (($a->argc > 1) && ($a->argv[1] === 'addon')?'active':''),
                'accesskey' => 'l',
-       );
+       ];
 
-       $tabs[] =       array(
+       $tabs[] =       [
                'label' => t('Delegations'),
                'url'   => 'delegate',
                'selected'      => (($a->argc == 1) && ($a->argv[0] === 'delegate')?'active':''),
                'accesskey' => 'd',
-       );
+       ];
 
-       $tabs[] =       array(
+       $tabs[] =       [
                'label' => t('Connected apps'),
                'url' => 'settings/oauth',
                'selected' => (($a->argc > 1) && ($a->argv[1] === 'oauth')?'active':''),
                'accesskey' => 'b',
-       );
+       ];
 
-       $tabs[] =       array(
+       $tabs[] =       [
                'label' => t('Export personal data'),
                'url' => 'uexport',
                'selected' => (($a->argc == 1) && ($a->argv[0] === 'uexport')?'active':''),
                'accesskey' => 'e',
-       );
+       ];
 
-       $tabs[] =       array(
+       $tabs[] =       [
                'label' => t('Remove account'),
                'url' => 'removeme',
                'selected' => (($a->argc == 1) && ($a->argv[0] === 'removeme')?'active':''),
                'accesskey' => 'r',
-       );
+       ];
 
 
        $tabtpl = get_markup_template("generic_links_widget.tpl");
-       $a->page['aside'] = replace_macros($tabtpl, array(
+       $a->page['aside'] = replace_macros($tabtpl, [
                '$title' => t('Settings'),
                '$class' => 'settings-widget',
                '$items' => $tabs,
-       ));
+       ]);
 
 }
 
@@ -231,12 +231,12 @@ function settings_post(App $a)
                                        intval(local_user())
                                );
                                if (!DBM::is_result($r)) {
-                                       dba::insert('mailacct', array('uid' => local_user()));
+                                       dba::insert('mailacct', ['uid' => local_user()]);
                                }
                                if (strlen($mail_pass)) {
                                        $pass = '';
                                        openssl_public_encrypt($mail_pass, $pass, $a->user['pubkey']);
-                                       dba::update('mailacct', array('pass' => bin2hex($pass)), array('uid' => local_user()));
+                                       dba::update('mailacct', ['pass' => bin2hex($pass)], ['uid' => local_user()]);
                                }
                                $r = q("UPDATE `mailacct` SET `server` = '%s', `port` = %d, `ssltype` = '%s', `user` = '%s',
                                        `action` = %d, `movetofolder` = '%s',
@@ -466,13 +466,13 @@ function settings_post(App $a)
        }
 
        // Adjust the page flag if the account type doesn't fit to the page flag.
-       if (($account_type == ACCOUNT_TYPE_PERSON) && !in_array($page_flags, array(PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE))) {
+       if (($account_type == ACCOUNT_TYPE_PERSON) && !in_array($page_flags, [PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE])) {
                $page_flags = PAGE_NORMAL;
-       } elseif (($account_type == ACCOUNT_TYPE_ORGANISATION) && !in_array($page_flags, array(PAGE_SOAPBOX))) {
+       } elseif (($account_type == ACCOUNT_TYPE_ORGANISATION) && !in_array($page_flags, [PAGE_SOAPBOX])) {
                $page_flags = PAGE_SOAPBOX;
-       } elseif (($account_type == ACCOUNT_TYPE_NEWS) && !in_array($page_flags, array(PAGE_SOAPBOX))) {
+       } elseif (($account_type == ACCOUNT_TYPE_NEWS) && !in_array($page_flags, [PAGE_SOAPBOX])) {
                $page_flags = PAGE_SOAPBOX;
-       } elseif (($account_type == ACCOUNT_TYPE_COMMUNITY) && !in_array($page_flags, array(PAGE_COMMUNITY, PAGE_PRVGROUP))) {
+       } elseif (($account_type == ACCOUNT_TYPE_COMMUNITY) && !in_array($page_flags, [PAGE_COMMUNITY, PAGE_PRVGROUP])) {
                $page_flags = PAGE_COMMUNITY;
        }
 
@@ -669,17 +669,17 @@ function settings_content(App $a)
        if (($a->argc > 1) && ($a->argv[1] === 'oauth')) {
                if (($a->argc > 2) && ($a->argv[2] === 'add')) {
                        $tpl = get_markup_template('settings/oauth_edit.tpl');
-                       $o .= replace_macros($tpl, array(
+                       $o .= replace_macros($tpl, [
                                '$form_security_token' => get_form_security_token("settings_oauth"),
                                '$title'        => t('Add application'),
                                '$submit'       => t('Save Settings'),
                                '$cancel'       => t('Cancel'),
-                               '$name'         => array('name', t('Name'), '', ''),
-                               '$key'          => array('key', t('Consumer Key'), '', ''),
-                               '$secret'       => array('secret', t('Consumer Secret'), '', ''),
-                               '$redirect'     => array('redirect', t('Redirect'), '', ''),
-                               '$icon'         => array('icon', t('Icon url'), '', ''),
-                       ));
+                               '$name'         => ['name', t('Name'), '', ''],
+                               '$key'          => ['key', t('Consumer Key'), '', ''],
+                               '$secret'       => ['secret', t('Consumer Secret'), '', ''],
+                               '$redirect'     => ['redirect', t('Redirect'), '', ''],
+                               '$icon'         => ['icon', t('Icon url'), '', ''],
+                       ]);
                        return $o;
                }
 
@@ -695,17 +695,17 @@ function settings_content(App $a)
                        $app = $r[0];
 
                        $tpl = get_markup_template('settings/oauth_edit.tpl');
-                       $o .= replace_macros($tpl, array(
+                       $o .= replace_macros($tpl, [
                                '$form_security_token' => get_form_security_token("settings_oauth"),
                                '$title'        => t('Add application'),
                                '$submit'       => t('Update'),
                                '$cancel'       => t('Cancel'),
-                               '$name'         => array('name', t('Name'), $app['name'] , ''),
-                               '$key'          => array('key', t('Consumer Key'), $app['client_id'], ''),
-                               '$secret'       => array('secret', t('Consumer Secret'), $app['pw'], ''),
-                               '$redirect'     => array('redirect', t('Redirect'), $app['redirect_uri'], ''),
-                               '$icon'         => array('icon', t('Icon url'), $app['icon'], ''),
-                       ));
+                               '$name'         => ['name', t('Name'), $app['name'] , ''],
+                               '$key'          => ['key', t('Consumer Key'), $app['client_id'], ''],
+                               '$secret'       => ['secret', t('Consumer Secret'), $app['pw'], ''],
+                               '$redirect'     => ['redirect', t('Redirect'), $app['redirect_uri'], ''],
+                               '$icon'         => ['icon', t('Icon url'), $app['icon'], ''],
+                       ]);
                        return $o;
                }
 
@@ -729,7 +729,7 @@ function settings_content(App $a)
 
 
                $tpl = get_markup_template('settings/oauth.tpl');
-               $o .= replace_macros($tpl, array(
+               $o .= replace_macros($tpl, [
                        '$form_security_token' => get_form_security_token("settings_oauth"),
                        '$baseurl'      => System::baseUrl(true),
                        '$title'        => t('Connected Apps'),
@@ -740,7 +740,7 @@ function settings_content(App $a)
                        '$noname'       => t('No name'),
                        '$remove'       => t('Remove authorization'),
                        '$apps'         => $r,
-               ));
+               ]);
                return $o;
        }
 
@@ -756,33 +756,33 @@ function settings_content(App $a)
 
 
                $tpl = get_markup_template('settings/addons.tpl');
-               $o .= replace_macros($tpl, array(
+               $o .= replace_macros($tpl, [
                        '$form_security_token' => get_form_security_token("settings_addon"),
                        '$title'        => t('Plugin Settings'),
                        '$settings_addons' => $settings_addons
-               ));
+               ]);
                return $o;
        }
 
        if (($a->argc > 1) && ($a->argv[1] === 'features')) {
 
-               $arr = array();
+               $arr = [];
                $features = Feature::get();
                foreach ($features as $fname => $fdata) {
-                       $arr[$fname] = array();
+                       $arr[$fname] = [];
                        $arr[$fname][0] = $fdata[0];
                        foreach (array_slice($fdata,1) as $f) {
-                               $arr[$fname][1][] = array('feature_' .$f[0], $f[1],((intval(Feature::isEnabled(local_user(), $f[0]))) ? "1" : ''), $f[2],array(t('Off'), t('On')));
+                               $arr[$fname][1][] = ['feature_' .$f[0], $f[1],((intval(Feature::isEnabled(local_user(), $f[0]))) ? "1" : ''), $f[2],[t('Off'), t('On')]];
                        }
                }
 
                $tpl = get_markup_template('settings/features.tpl');
-               $o .= replace_macros($tpl, array(
+               $o .= replace_macros($tpl, [
                        '$form_security_token' => get_form_security_token("settings_features"),
                        '$title'               => t('Additional Features'),
                        '$features'            => $arr,
                        '$submit'              => t('Save Settings'),
-               ));
+               ]);
                return $o;
        }
 
@@ -835,7 +835,7 @@ function settings_content(App $a)
 
                $mail_disabled_message = (($mail_disabled) ? t('Email access is disabled on this site.') : '');
 
-               $o .= replace_macros($tpl, array(
+               $o .= replace_macros($tpl, [
                        '$form_security_token' => get_form_security_token("settings_connectors"),
 
                        '$title'        => t('Social Networks'),
@@ -844,10 +844,10 @@ function settings_content(App $a)
                        '$ostat_enabled' => $ostat_enabled,
 
                        '$general_settings' => t('General Social Media Settings'),
-                       '$no_intelligent_shortening' => array('no_intelligent_shortening', t('Disable intelligent shortening'), $no_intelligent_shortening, t('Normally the system tries to find the best link to add to shortened posts. If this option is enabled then every shortened post will always point to the original friendica post.')),
-                       '$ostatus_autofriend' => array('snautofollow', t('Automatically follow any GNU Social (OStatus) followers/mentioners'), $ostatus_autofriend, t('If you receive a message from an unknown OStatus user, this option decides what to do. If it is checked, a new contact will be created for every unknown user.')),
+                       '$no_intelligent_shortening' => ['no_intelligent_shortening', t('Disable intelligent shortening'), $no_intelligent_shortening, t('Normally the system tries to find the best link to add to shortened posts. If this option is enabled then every shortened post will always point to the original friendica post.')],
+                       '$ostatus_autofriend' => ['snautofollow', t('Automatically follow any GNU Social (OStatus) followers/mentioners'), $ostatus_autofriend, t('If you receive a message from an unknown OStatus user, this option decides what to do. If it is checked, a new contact will be created for every unknown user.')],
                        '$default_group' => Group::displayGroupSelection(local_user(), $default_group, t("Default group for OStatus contacts")),
-                       '$legacy_contact' => array('legacy_contact', t('Your legacy GNU Social account'), $legacy_contact, t('If you enter your old GNU Social/Statusnet account name here (in the format user@domain.tld), your contacts will be added automatically. The field will be emptied when done.')),
+                       '$legacy_contact' => ['legacy_contact', t('Your legacy GNU Social account'), $legacy_contact, t('If you enter your old GNU Social/Statusnet account name here (in the format user@domain.tld), your contacts will be added automatically. The field will be emptied when done.')],
 
                        '$repair_ostatus_url' => System::baseUrl() . '/repair_ostatus',
                        '$repair_ostatus_text' => t('Repair OStatus subscriptions'),
@@ -856,19 +856,19 @@ function settings_content(App $a)
 
                        '$h_imap' => t('Email/Mailbox Setup'),
                        '$imap_desc' => t("If you wish to communicate with email contacts using this service \x28optional\x29, please specify how to connect to your mailbox."),
-                       '$imap_lastcheck' => array('imap_lastcheck', t('Last successful email check:'), $mail_chk, ''),
+                       '$imap_lastcheck' => ['imap_lastcheck', t('Last successful email check:'), $mail_chk, ''],
                        '$mail_disabled' => $mail_disabled_message,
-                       '$mail_server'  => array('mail_server',  t('IMAP server name:'), $mail_server, ''),
-                       '$mail_port'    => array('mail_port',    t('IMAP port:'), $mail_port, ''),
-                       '$mail_ssl'             => array('mail_ssl',     t('Security:'), strtoupper($mail_ssl), '', array('notls'=>t('None'), 'TLS'=>'TLS', 'SSL'=>'SSL')),
-                       '$mail_user'    => array('mail_user',    t('Email login name:'), $mail_user, ''),
-                       '$mail_pass'    => array('mail_pass',    t('Email password:'), '', ''),
-                       '$mail_replyto' => array('mail_replyto', t('Reply-to address:'), $mail_replyto, 'Optional'),
-                       '$mail_pubmail' => array('mail_pubmail', t('Send public posts to all email contacts:'), $mail_pubmail, ''),
-                       '$mail_action'  => array('mail_action',  t('Action after import:'), $mail_action, '', array(0=>t('None'), /*1=>t('Delete'),*/ 2=>t('Mark as seen'), 3=>t('Move to folder'))),
-                       '$mail_movetofolder'    => array('mail_movetofolder',    t('Move to folder:'), $mail_movetofolder, ''),
+                       '$mail_server'  => ['mail_server',  t('IMAP server name:'), $mail_server, ''],
+                       '$mail_port'    => ['mail_port',         t('IMAP port:'), $mail_port, ''],
+                       '$mail_ssl'             => ['mail_ssl',          t('Security:'), strtoupper($mail_ssl), '', ['notls'=>t('None'), 'TLS'=>'TLS', 'SSL'=>'SSL']],
+                       '$mail_user'    => ['mail_user',    t('Email login name:'), $mail_user, ''],
+                       '$mail_pass'    => ['mail_pass',         t('Email password:'), '', ''],
+                       '$mail_replyto' => ['mail_replyto', t('Reply-to address:'), $mail_replyto, 'Optional'],
+                       '$mail_pubmail' => ['mail_pubmail', t('Send public posts to all email contacts:'), $mail_pubmail, ''],
+                       '$mail_action'  => ['mail_action',       t('Action after import:'), $mail_action, '', [0=>t('None'), /*1=>t('Delete'),*/ 2=>t('Mark as seen'), 3=>t('Move to folder')]],
+                       '$mail_movetofolder'    => ['mail_movetofolder',         t('Move to folder:'), $mail_movetofolder, ''],
                        '$submit' => t('Save Settings'),
-               ));
+               ]);
 
                call_hooks('display_settings', $o);
                return $o;
@@ -889,7 +889,7 @@ function settings_content(App $a)
 
                $allowed_themes_str = Config::get('system', 'allowed_themes');
                $allowed_themes_raw = explode(',', $allowed_themes_str);
-               $allowed_themes = array();
+               $allowed_themes = [];
                if (count($allowed_themes_raw)) {
                        foreach ($allowed_themes_raw as $x) {
                                if (strlen(trim($x)) && is_dir("view/theme/$x")) {
@@ -899,8 +899,8 @@ function settings_content(App $a)
                }
 
 
-               $themes = array();
-               $mobile_themes = array("---" => t('No special theme for mobile devices'));
+               $themes = [];
+               $mobile_themes = ["---" => t('No special theme for mobile devices')];
                if ($allowed_themes) {
                        foreach ($allowed_themes as $theme) {
                                $is_experimental = file_exists('view/theme/' . $theme . '/experimental');
@@ -938,7 +938,7 @@ function settings_content(App $a)
 
                $nosmile = PConfig::get(local_user(), 'system', 'no_smilies', 0);
                $first_day_of_week = PConfig::get(local_user(), 'system', 'first_day_of_week', 0);
-               $weekdays = array(0 => t("Sunday"), 1 => t("Monday"));
+               $weekdays = [0 => t("Sunday"), 1 => t("Monday")];
 
                $noinfo = PConfig::get(local_user(), 'system', 'ignore_info', 0);
                $infinite_scroll = PConfig::get(local_user(), 'system', 'infinite_scroll', 0);
@@ -953,39 +953,39 @@ function settings_content(App $a)
                }
 
                $tpl = get_markup_template('settings/display.tpl');
-               $o = replace_macros($tpl, array(
+               $o = replace_macros($tpl, [
                        '$ptitle'       => t('Display Settings'),
                        '$form_security_token' => get_form_security_token("settings_display"),
                        '$submit'       => t('Save Settings'),
                        '$baseurl' => System::baseUrl(true),
                        '$uid' => local_user(),
 
-                       '$theme'        => array('theme', t('Display Theme:'), $theme_selected, '', $themes, true),
-                       '$mobile_theme' => array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, false),
-                       '$nowarn_insecure' => array('nowarn_insecure',  t('Suppress warning of insecure networks'), $nowarn_insecure, t("Should the system suppress the warning that the current group contains members of networks that can't receive non public postings.")),
-                       '$ajaxint'   => array('browser_update',  t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds. Enter -1 to disable it.')),
-                       '$itemspage_network'   => array('itemspage_network',  t("Number of items to display per page:"), $itemspage_network, t('Maximum of 100 items')),
-                       '$itemspage_mobile_network'   => array('itemspage_mobile_network',  t("Number of items to display per page when viewed from mobile device:"), $itemspage_mobile_network, t('Maximum of 100 items')),
-                       '$nosmile'      => array('nosmile', t("Don't show emoticons"), $nosmile, ''),
+                       '$theme'        => ['theme', t('Display Theme:'), $theme_selected, '', $themes, true],
+                       '$mobile_theme' => ['mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, false],
+                       '$nowarn_insecure' => ['nowarn_insecure',  t('Suppress warning of insecure networks'), $nowarn_insecure, t("Should the system suppress the warning that the current group contains members of networks that can't receive non public postings.")],
+                       '$ajaxint'   => ['browser_update',  t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds. Enter -1 to disable it.')],
+                       '$itemspage_network'   => ['itemspage_network',  t("Number of items to display per page:"), $itemspage_network, t('Maximum of 100 items')],
+                       '$itemspage_mobile_network'   => ['itemspage_mobile_network',  t("Number of items to display per page when viewed from mobile device:"), $itemspage_mobile_network, t('Maximum of 100 items')],
+                       '$nosmile'      => ['nosmile', t("Don't show emoticons"), $nosmile, ''],
                        '$calendar_title' => t('Calendar'),
-                       '$first_day_of_week'    => array('first_day_of_week', t('Beginning of week:'), $first_day_of_week, '', $weekdays, false),
-                       '$noinfo'       => array('noinfo', t("Don't show notices"), $noinfo, ''),
-                       '$infinite_scroll'      => array('infinite_scroll', t("Infinite scroll"), $infinite_scroll, ''),
-                       '$no_auto_update'       => array('no_auto_update', t("Automatic updates only at the top of the network page"), $no_auto_update, t('When disabled, the network page is updated all the time, which could be confusing while reading.')),
-                       '$bandwidth_saver' => array('bandwidth_saver', t('Bandwith Saver Mode'), $bandwidth_saver, t('When enabled, embedded content is not displayed on automatic updates, they only show on page reload.')),
-                       '$smart_threading' => array('smart_threading', t('Smart Threading'), $smart_threading, t('When enabled, suppress extraneous thread indentation while keeping it where it matters. Only works if threading is available and enabled.')),
+                       '$first_day_of_week'    => ['first_day_of_week', t('Beginning of week:'), $first_day_of_week, '', $weekdays, false],
+                       '$noinfo'       => ['noinfo', t("Don't show notices"), $noinfo, ''],
+                       '$infinite_scroll'      => ['infinite_scroll', t("Infinite scroll"), $infinite_scroll, ''],
+                       '$no_auto_update'       => ['no_auto_update', t("Automatic updates only at the top of the network page"), $no_auto_update, t('When disabled, the network page is updated all the time, which could be confusing while reading.')],
+                       '$bandwidth_saver' => ['bandwidth_saver', t('Bandwith Saver Mode'), $bandwidth_saver, t('When enabled, embedded content is not displayed on automatic updates, they only show on page reload.')],
+                       '$smart_threading' => ['smart_threading', t('Smart Threading'), $smart_threading, t('When enabled, suppress extraneous thread indentation while keeping it where it matters. Only works if threading is available and enabled.')],
 
                        '$d_tset' => t('General Theme Settings'),
                        '$d_ctset' => t('Custom Theme Settings'),
                        '$d_cset' => t('Content Settings'),
                        'stitle' => t('Theme settings'),
                        '$theme_config' => $theme_config,
-               ));
+               ]);
 
                $tpl = get_markup_template('settings/display_end.tpl');
-               $a->page['end'] .= replace_macros($tpl, array(
-                       '$theme'        => array('theme', t('Display Theme:'), $theme_selected, '', $themes)
-               ));
+               $a->page['end'] .= replace_macros($tpl, [
+                       '$theme'        => ['theme', t('Display Theme:'), $theme_selected, '', $themes]
+               ]);
 
                return $o;
        }
@@ -1034,13 +1034,13 @@ function settings_content(App $a)
 
        // Set the account type to "Community" when the page is a community page but the account type doesn't fit
        // This is only happening on the first visit after the update
-       if (in_array($a->user['page-flags'], array(PAGE_COMMUNITY, PAGE_PRVGROUP)) &&
+       if (in_array($a->user['page-flags'], [PAGE_COMMUNITY, PAGE_PRVGROUP]) &&
                ($a->user['account-type'] != ACCOUNT_TYPE_COMMUNITY))
                $a->user['account-type'] = ACCOUNT_TYPE_COMMUNITY;
 
        $pageset_tpl = get_markup_template('settings/pagetypes.tpl');
 
-       $pagetype = replace_macros($pageset_tpl, array(
+       $pagetype = replace_macros($pageset_tpl, [
                '$account_types'        => t("Account Types"),
                '$user'                 => t("Personal Page Subtypes"),
                '$community'            => t("Community Forum Subtypes"),
@@ -1050,93 +1050,93 @@ function settings_content(App $a)
                '$type_news'            => ACCOUNT_TYPE_NEWS,
                '$type_community'       => ACCOUNT_TYPE_COMMUNITY,
 
-               '$account_person'       => array('account-type', t('Personal Page'), ACCOUNT_TYPE_PERSON,
+               '$account_person'       => ['account-type', t('Personal Page'), ACCOUNT_TYPE_PERSON,
                                                                        t('Account for a personal profile.'),
-                                                                       ($a->user['account-type'] == ACCOUNT_TYPE_PERSON)),
+                                                                       ($a->user['account-type'] == ACCOUNT_TYPE_PERSON)],
 
-               '$account_organisation' => array('account-type', t('Organisation Page'), ACCOUNT_TYPE_ORGANISATION,
+               '$account_organisation' => ['account-type', t('Organisation Page'), ACCOUNT_TYPE_ORGANISATION,
                                                                        t('Account for an organisation that automatically approves contact requests as "Followers".'),
-                                                                       ($a->user['account-type'] == ACCOUNT_TYPE_ORGANISATION)),
+                                                                       ($a->user['account-type'] == ACCOUNT_TYPE_ORGANISATION)],
 
-               '$account_news'         => array('account-type', t('News Page'), ACCOUNT_TYPE_NEWS,
+               '$account_news'         => ['account-type', t('News Page'), ACCOUNT_TYPE_NEWS,
                                                                        t('Account for a news reflector that automatically approves contact requests as "Followers".'),
-                                                                       ($a->user['account-type'] == ACCOUNT_TYPE_NEWS)),
+                                                                       ($a->user['account-type'] == ACCOUNT_TYPE_NEWS)],
 
-               '$account_community'    => array('account-type', t('Community Forum'), ACCOUNT_TYPE_COMMUNITY,
+               '$account_community'    => ['account-type', t('Community Forum'), ACCOUNT_TYPE_COMMUNITY,
                                                                        t('Account for community discussions.'),
-                                                                       ($a->user['account-type'] == ACCOUNT_TYPE_COMMUNITY)),
+                                                                       ($a->user['account-type'] == ACCOUNT_TYPE_COMMUNITY)],
 
-               '$page_normal'          => array('page-flags', t('Normal Account Page'), PAGE_NORMAL,
+               '$page_normal'          => ['page-flags', t('Normal Account Page'), PAGE_NORMAL,
                                                                        t('Account for a regular personal profile that requires manual approval of "Friends" and "Followers".'),
-                                                                       ($a->user['page-flags'] == PAGE_NORMAL)),
+                                                                       ($a->user['page-flags'] == PAGE_NORMAL)],
 
-               '$page_soapbox'         => array('page-flags', t('Soapbox Page'), PAGE_SOAPBOX,
+               '$page_soapbox'         => ['page-flags', t('Soapbox Page'), PAGE_SOAPBOX,
                                                                        t('Account for a public profile that automatically approves contact requests as "Followers".'),
-                                                                       ($a->user['page-flags'] == PAGE_SOAPBOX)),
+                                                                       ($a->user['page-flags'] == PAGE_SOAPBOX)],
 
-               '$page_community'       => array('page-flags', t('Public Forum'), PAGE_COMMUNITY,
+               '$page_community'       => ['page-flags', t('Public Forum'), PAGE_COMMUNITY,
                                                                        t('Automatically approves all contact requests.'),
-                                                                       ($a->user['page-flags'] == PAGE_COMMUNITY)),
+                                                                       ($a->user['page-flags'] == PAGE_COMMUNITY)],
 
-               '$page_freelove'        => array('page-flags', t('Automatic Friend Page'), PAGE_FREELOVE,
+               '$page_freelove'        => ['page-flags', t('Automatic Friend Page'), PAGE_FREELOVE,
                                                                        t('Account for a popular profile that automatically approves contact requests as "Friends".'),
-                                                                       ($a->user['page-flags'] == PAGE_FREELOVE)),
+                                                                       ($a->user['page-flags'] == PAGE_FREELOVE)],
 
-               '$page_prvgroup'        => array('page-flags', t('Private Forum [Experimental]'), PAGE_PRVGROUP,
+               '$page_prvgroup'        => ['page-flags', t('Private Forum [Experimental]'), PAGE_PRVGROUP,
                                                                        t('Requires manual approval of contact requests.'),
-                                                                       ($a->user['page-flags'] == PAGE_PRVGROUP)),
+                                                                       ($a->user['page-flags'] == PAGE_PRVGROUP)],
 
 
-       ));
+       ]);
 
        $noid = Config::get('system', 'no_openid');
 
        if ($noid) {
                $openid_field = false;
        } else {
-               $openid_field = array('openid_url', t('OpenID:'), $openid, t("\x28Optional\x29 Allow this OpenID to login to this account."), "", "", "url");
+               $openid_field = ['openid_url', t('OpenID:'), $openid, t("\x28Optional\x29 Allow this OpenID to login to this account."), "", "", "url"];
        }
 
        $opt_tpl = get_markup_template("field_yesno.tpl");
        if (Config::get('system', 'publish_all')) {
                $profile_in_dir = '<input type="hidden" name="profile_in_directory" value="1" />';
        } else {
-               $profile_in_dir = replace_macros($opt_tpl, array(
-                       '$field' => array('profile_in_directory', t('Publish your default profile in your local site directory?'), $profile['publish'], t("Your profile may be visible in public."), array(t('No'), t('Yes')))
-               ));
+               $profile_in_dir = replace_macros($opt_tpl, [
+                       '$field' => ['profile_in_directory', t('Publish your default profile in your local site directory?'), $profile['publish'], t("Your profile may be visible in public."), [t('No'), t('Yes')]]
+               ]);
        }
 
        if (strlen(Config::get('system', 'directory'))) {
-               $profile_in_net_dir = replace_macros($opt_tpl, array(
-                       '$field' => array('profile_in_netdirectory', t('Publish your default profile in the global social directory?'), $profile['net-publish'], '', array(t('No'), t('Yes')))
-               ));
+               $profile_in_net_dir = replace_macros($opt_tpl, [
+                       '$field' => ['profile_in_netdirectory', t('Publish your default profile in the global social directory?'), $profile['net-publish'], '', [t('No'), t('Yes')]]
+               ]);
        } else {
                $profile_in_net_dir = '';
        }
 
-       $hide_friends = replace_macros($opt_tpl, array(
-               '$field' => array('hide-friends', t('Hide your contact/friend list from viewers of your default profile?'), $profile['hide-friends'], '', array(t('No'), t('Yes'))),
-       ));
+       $hide_friends = replace_macros($opt_tpl, [
+               '$field' => ['hide-friends', t('Hide your contact/friend list from viewers of your default profile?'), $profile['hide-friends'], '', [t('No'), t('Yes')]],
+       ]);
 
-       $hide_wall = replace_macros($opt_tpl, array(
-               '$field' => array('hidewall', t('Hide your profile details from unknown viewers?'), $a->user['hidewall'], t("If enabled, posting public messages to Diaspora and other networks isn't possible."), array(t('No'), t('Yes'))),
-       ));
+       $hide_wall = replace_macros($opt_tpl, [
+               '$field' => ['hidewall', t('Hide your profile details from unknown viewers?'), $a->user['hidewall'], t("If enabled, posting public messages to Diaspora and other networks isn't possible."), [t('No'), t('Yes')]],
+       ]);
 
-       $blockwall = replace_macros($opt_tpl, array(
-               '$field' => array('blockwall', t('Allow friends to post to your profile page?'), (intval($a->user['blockwall']) ? '0' : '1'), '', array(t('No'), t('Yes'))),
-       ));
+       $blockwall = replace_macros($opt_tpl, [
+               '$field' => ['blockwall', t('Allow friends to post to your profile page?'), (intval($a->user['blockwall']) ? '0' : '1'), '', [t('No'), t('Yes')]],
+       ]);
 
-       $blocktags = replace_macros($opt_tpl, array(
-               '$field' => array('blocktags', t('Allow friends to tag your posts?'), (intval($a->user['blocktags']) ? '0' : '1'), '', array(t('No'), t('Yes'))),
-       ));
+       $blocktags = replace_macros($opt_tpl, [
+               '$field' => ['blocktags', t('Allow friends to tag your posts?'), (intval($a->user['blocktags']) ? '0' : '1'), '', [t('No'), t('Yes')]],
+       ]);
 
-       $suggestme = replace_macros($opt_tpl, array(
-               '$field' => array('suggestme', t('Allow us to suggest you as a potential friend to new members?'), $suggestme, '', array(t('No'), t('Yes'))),
-       ));
+       $suggestme = replace_macros($opt_tpl, [
+               '$field' => ['suggestme', t('Allow us to suggest you as a potential friend to new members?'), $suggestme, '', [t('No'), t('Yes')]],
+       ]);
 
-       $unkmail = replace_macros($opt_tpl, array(
-               '$field' => array('unkmail', t('Permit unknown people to send you private mail?'), $unkmail, '', array(t('No'), t('Yes'))),
-       ));
+       $unkmail = replace_macros($opt_tpl, [
+               '$field' => ['unkmail', t('Permit unknown people to send you private mail?'), $unkmail, '', [t('No'), t('Yes')]],
+       ]);
 
        if (!$profile['publish'] && !$profile['net-publish']) {
                info(t('Profile is <strong>not published</strong>.') . EOL);
@@ -1144,23 +1144,23 @@ function settings_content(App $a)
 
        $tpl_addr = get_markup_template('settings/nick_set.tpl');
 
-       $prof_addr = replace_macros($tpl_addr,array(
+       $prof_addr = replace_macros($tpl_addr,[
                '$desc' => t("Your Identity Address is <strong>'%s'</strong> or '%s'.", $nickname . '@' . $a->get_hostname() . $a->get_path(), System::baseUrl() . '/profile/' . $nickname),
                '$basepath' => $a->get_hostname()
-       ));
+       ]);
 
        $stpl = get_markup_template('settings/settings.tpl');
 
-       $expire_arr = array(
-               'days' => array('expire',  t("Automatically expire posts after this many days:"), $expire, t('If empty, posts will not expire. Expired posts will be deleted')),
+       $expire_arr = [
+               'days' => ['expire',  t("Automatically expire posts after this many days:"), $expire, t('If empty, posts will not expire. Expired posts will be deleted')],
                'advanced' => t('Advanced expiration settings'),
                'label' => t('Advanced Expiration'),
-               'items' => array('expire_items',  t("Expire posts:"), $expire_items, '', array(t('No'), t('Yes'))),
-               'notes' => array('expire_notes',  t("Expire personal notes:"), $expire_notes, '', array(t('No'), t('Yes'))),
-               'starred' => array('expire_starred',  t("Expire starred posts:"), $expire_starred, '', array(t('No'), t('Yes'))),
-               'photos' => array('expire_photos',  t("Expire photos:"), $expire_photos, '', array(t('No'), t('Yes'))),
-               'network_only' => array('expire_network_only',  t("Only expire posts by others:"), $expire_network_only, '', array(t('No'), t('Yes'))),
-       );
+               'items' => ['expire_items',  t("Expire posts:"), $expire_items, '', [t('No'), t('Yes')]],
+               'notes' => ['expire_notes',  t("Expire personal notes:"), $expire_notes, '', [t('No'), t('Yes')]],
+               'starred' => ['expire_starred',  t("Expire starred posts:"), $expire_starred, '', [t('No'), t('Yes')]],
+               'photos' => ['expire_photos',  t("Expire photos:"), $expire_photos, '', [t('No'), t('Yes')]],
+               'network_only' => ['expire_network_only',  t("Only expire posts by others:"), $expire_network_only, '', [t('No'), t('Yes')]],
+       ];
 
        $group_select = Group::displayGroupSelection(local_user(), $a->user['def_gid']);
 
@@ -1172,7 +1172,7 @@ function settings_content(App $a)
 
        $query_str = $a->query_string;
        if (strpos($query_str, 'public=1') !== false) {
-               $query_str = str_replace(array('?public=1', '&public=1'), array('', ''), $query_str);
+               $query_str = str_replace(['?public=1', '&public=1'], ['', ''], $query_str);
        }
 
        // I think $a->query_string may never have ? in it, but I could be wrong
@@ -1188,7 +1188,7 @@ function settings_content(App $a)
        $lang_choices = get_available_languages();
 
        /// @TODO Fix indending (or so)
-       $o .= replace_macros($stpl, array(
+       $o .= replace_macros($stpl, [
                '$ptitle'       => t('Account Settings'),
 
                '$submit'       => t('Save Settings'),
@@ -1198,25 +1198,25 @@ function settings_content(App $a)
                '$nickname_block' => $prof_addr,
 
                '$h_pass'       => t('Password Settings'),
-               '$password1'=> array('password', t('New Password:'), '', ''),
-               '$password2'=> array('confirm', t('Confirm:'), '', t('Leave password fields blank unless changing')),
-               '$password3'=> array('opassword', t('Current Password:'), '', t('Your current password to confirm the changes')),
-               '$password4'=> array('mpassword', t('Password:'), '', t('Your current password to confirm the changes')),
+               '$password1'=> ['password', t('New Password:'), '', ''],
+               '$password2'=> ['confirm', t('Confirm:'), '', t('Leave password fields blank unless changing')],
+               '$password3'=> ['opassword', t('Current Password:'), '', t('Your current password to confirm the changes')],
+               '$password4'=> ['mpassword', t('Password:'), '', t('Your current password to confirm the changes')],
                '$oid_enable' => (!Config::get('system', 'no_openid')),
                '$openid'       => $openid_field,
 
                '$h_basic'      => t('Basic Settings'),
-               '$username' => array('username',  t('Full Name:'), $username, ''),
-               '$email'        => array('email', t('Email Address:'), $email, '', '', '', 'email'),
-               '$timezone' => array('timezone_select' , t('Your Timezone:'), select_timezone($timezone), ''),
-               '$language' => array('language', t('Your Language:'), $language, t('Set the language we use to show you friendica interface and to send you emails'), $lang_choices),
-               '$defloc'       => array('defloc', t('Default Post Location:'), $defloc, ''),
-               '$allowloc' => array('allow_location', t('Use Browser Location:'), ($a->user['allow_location'] == 1), ''),
+               '$username' => ['username',  t('Full Name:'), $username, ''],
+               '$email'        => ['email', t('Email Address:'), $email, '', '', '', 'email'],
+               '$timezone' => ['timezone_select' , t('Your Timezone:'), select_timezone($timezone), ''],
+               '$language' => ['language', t('Your Language:'), $language, t('Set the language we use to show you friendica interface and to send you emails'), $lang_choices],
+               '$defloc'       => ['defloc', t('Default Post Location:'), $defloc, ''],
+               '$allowloc' => ['allow_location', t('Use Browser Location:'), ($a->user['allow_location'] == 1), ''],
 
 
                '$h_prv'        => t('Security and Privacy Settings'),
 
-               '$maxreq'       => array('maxreq', t('Maximum Friend Requests/Day:'), $maxreq , t("\x28to prevent spam abuse\x29")),
+               '$maxreq'       => ['maxreq', t('Maximum Friend Requests/Day:'), $maxreq , t("\x28to prevent spam abuse\x29")],
                '$permissions' => t('Default Post Permissions'),
                '$permdesc' => t("\x28click to open/close\x29"),
                '$visibility' => $profile['net-publish'],
@@ -1245,33 +1245,33 @@ function settings_content(App $a)
                '$hide_friends' => $hide_friends,
                '$hide_wall' => $hide_wall,
                '$unkmail' => $unkmail,
-               '$cntunkmail'   => array('cntunkmail', t('Maximum private messages per day from unknown people:'), $cntunkmail , t("\x28to prevent spam abuse\x29")),
+               '$cntunkmail'   => ['cntunkmail', t('Maximum private messages per day from unknown people:'), $cntunkmail , t("\x28to prevent spam abuse\x29")],
 
 
                '$h_not'        => t('Notification Settings'),
                '$activity_options' => t('By default post a status message when:'),
-               '$post_newfriend' => array('post_newfriend',  t('accepting a friend request'), $post_newfriend, ''),
-               '$post_joingroup' => array('post_joingroup',  t('joining a forum/community'), $post_joingroup, ''),
-               '$post_profilechange' => array('post_profilechange',  t('making an <em>interesting</em> profile change'), $post_profilechange, ''),
+               '$post_newfriend' => ['post_newfriend',  t('accepting a friend request'), $post_newfriend, ''],
+               '$post_joingroup' => ['post_joingroup',  t('joining a forum/community'), $post_joingroup, ''],
+               '$post_profilechange' => ['post_profilechange',  t('making an <em>interesting</em> profile change'), $post_profilechange, ''],
                '$lbl_not'      => t('Send a notification email when:'),
-               '$notify1'      => array('notify1', t('You receive an introduction'), ($notify & NOTIFY_INTRO), NOTIFY_INTRO, ''),
-               '$notify2'      => array('notify2', t('Your introductions are confirmed'), ($notify & NOTIFY_CONFIRM), NOTIFY_CONFIRM, ''),
-               '$notify3'      => array('notify3', t('Someone writes on your profile wall'), ($notify & NOTIFY_WALL), NOTIFY_WALL, ''),
-               '$notify4'      => array('notify4', t('Someone writes a followup comment'), ($notify & NOTIFY_COMMENT), NOTIFY_COMMENT, ''),
-               '$notify5'      => array('notify5', t('You receive a private message'), ($notify & NOTIFY_MAIL), NOTIFY_MAIL, ''),
-               '$notify6'  => array('notify6', t('You receive a friend suggestion'), ($notify & NOTIFY_SUGGEST), NOTIFY_SUGGEST, ''),
-               '$notify7'  => array('notify7', t('You are tagged in a post'), ($notify & NOTIFY_TAGSELF), NOTIFY_TAGSELF, ''),
-               '$notify8'  => array('notify8', t('You are poked/prodded/etc. in a post'), ($notify & NOTIFY_POKE), NOTIFY_POKE, ''),
-
-               '$desktop_notifications' => array('desktop_notifications', t('Activate desktop notifications') , false, t('Show desktop popup on new notifications')),
-
-               '$email_textonly' => array('email_textonly', t('Text-only notification emails'),
+               '$notify1'      => ['notify1', t('You receive an introduction'), ($notify & NOTIFY_INTRO), NOTIFY_INTRO, ''],
+               '$notify2'      => ['notify2', t('Your introductions are confirmed'), ($notify & NOTIFY_CONFIRM), NOTIFY_CONFIRM, ''],
+               '$notify3'      => ['notify3', t('Someone writes on your profile wall'), ($notify & NOTIFY_WALL), NOTIFY_WALL, ''],
+               '$notify4'      => ['notify4', t('Someone writes a followup comment'), ($notify & NOTIFY_COMMENT), NOTIFY_COMMENT, ''],
+               '$notify5'      => ['notify5', t('You receive a private message'), ($notify & NOTIFY_MAIL), NOTIFY_MAIL, ''],
+               '$notify6'  => ['notify6', t('You receive a friend suggestion'), ($notify & NOTIFY_SUGGEST), NOTIFY_SUGGEST, ''],
+               '$notify7'  => ['notify7', t('You are tagged in a post'), ($notify & NOTIFY_TAGSELF), NOTIFY_TAGSELF, ''],
+               '$notify8'  => ['notify8', t('You are poked/prodded/etc. in a post'), ($notify & NOTIFY_POKE), NOTIFY_POKE, ''],
+
+               '$desktop_notifications' => ['desktop_notifications', t('Activate desktop notifications') , false, t('Show desktop popup on new notifications')],
+
+               '$email_textonly' => ['email_textonly', t('Text-only notification emails'),
                                                                        PConfig::get(local_user(), 'system', 'email_textonly'),
-                                                                       t('Send text only notification emails, without the html part')),
+                                                                       t('Send text only notification emails, without the html part')],
 
-               '$detailed_notif' => array('detailed_notif', t('Show detailled notifications'),
+               '$detailed_notif' => ['detailed_notif', t('Show detailled notifications'),
                                                                        PConfig::get(local_user(), 'system', 'detailed_notif'),
-                                                                       t('Per default the notificiation are condensed to a single notification per item. When enabled, every notification is displayed.')),
+                                                                       t('Per default the notificiation are condensed to a single notification per item. When enabled, every notification is displayed.')],
 
                '$h_advn' => t('Advanced Account/Page Type Settings'),
                '$h_descadvn' => t('Change the behaviour of this account for special situations'),
@@ -1281,7 +1281,7 @@ function settings_content(App $a)
                '$relocate_text' => t("If you have moved this profile from another server, and some of your contacts don't receive your updates, try pushing this button."),
                '$relocate_button' => t("Resend relocate message to contacts"),
 
-       ));
+       ]);
 
        call_hooks('settings_form', $o);
 
index e97fa82dc89c3d029d09802557ac9691ef957563..f67dd3d200c96aa74c37602e2a360cc439db4638 100644 (file)
@@ -34,17 +34,17 @@ function share_init(App $a) {
 }
 
 function share_header($author, $profile, $avatar, $guid, $posted, $link) {
-       $header = "[share author='".str_replace(array("'", "[", "]"), array("&#x27;", "&#x5B;", "&#x5D;"), $author).
-               "' profile='".str_replace(array("'", "[", "]"), array("&#x27;", "&#x5B;", "&#x5D;"), $profile).
-               "' avatar='".str_replace(array("'", "[", "]"), array("&#x27;", "&#x5B;", "&#x5D;"), $avatar);
+       $header = "[share author='".str_replace(["'", "[", "]"], ["&#x27;", "&#x5B;", "&#x5D;"], $author).
+               "' profile='".str_replace(["'", "[", "]"], ["&#x27;", "&#x5B;", "&#x5D;"], $profile).
+               "' avatar='".str_replace(["'", "[", "]"], ["&#x27;", "&#x5B;", "&#x5D;"], $avatar);
 
        if ($guid) {
-               $header .= "' guid='".str_replace(array("'", "[", "]"), array("&#x27;", "&#x5B;", "&#x5D;"), $guid);
+               $header .= "' guid='".str_replace(["'", "[", "]"], ["&#x27;", "&#x5B;", "&#x5D;"], $guid);
        }
        if ($posted) {
-               $header .= "' posted='".str_replace(array("'", "[", "]"), array("&#x27;", "&#x5B;", "&#x5D;"), $posted);
+               $header .= "' posted='".str_replace(["'", "[", "]"], ["&#x27;", "&#x5B;", "&#x5D;"], $posted);
        }
-       $header .= "' link='".str_replace(array("'", "[", "]"), array("&#x27;", "&#x5B;", "&#x5D;"), $link)."']";
+       $header .= "' link='".str_replace(["'", "[", "]"], ["&#x27;", "&#x5B;", "&#x5D;"], $link)."']";
 
        return $header;
 }
index b19ba2e43609bd1ab719423200d645b2afaf35e3..d96a4bfc6dcdf34ddcfe571a64e15f9f249d70c8 100644 (file)
@@ -14,9 +14,9 @@ function smilies_content(App $a)
 {
        if ($a->argv[1] === "json") {
                $tmp = Smilies::getList();
-               $results = array();
+               $results = [];
                for ($i = 0; $i < count($tmp['texts']); $i++) {
-                       $results[] = array('text' => $tmp['texts'][$i], 'icon' => $tmp['icons'][$i]);
+                       $results[] = ['text' => $tmp['texts'][$i], 'icon' => $tmp['icons'][$i]];
                }
                json_return_and_die($results);
        } else {
index 9b2263da778de9e027f7089fa053918d95eb08d2..21eb10ab4803cf5f849a5cda57b148a851e20161 100644 (file)
@@ -16,7 +16,7 @@ function statistics_json_init(App $a) {
                killme();
        }
 
-       $statistics = array(
+       $statistics = [
                "name" => $a->config["sitename"],
                "network" => FRIENDICA_PLATFORM,
                "version" => FRIENDICA_VERSION . "-" . DB_UPDATE_VERSION,
@@ -25,9 +25,9 @@ function statistics_json_init(App $a) {
                "active_users_halfyear" => Config::get('nodeinfo', 'active_users_halfyear'),
                "active_users_monthly" => Config::get('nodeinfo', 'active_users_monthly'),
                "local_posts" => Config::get('nodeinfo', 'local_posts')
-       );
+       ];
 
-       $statistics["services"] = array();
+       $statistics["services"] = [];
        $statistics["services"]["appnet"] = plugin_enabled("appnet");
        $statistics["services"]["blogger"] = plugin_enabled("blogger");
        $statistics["services"]["buffer"] = plugin_enabled("buffer");
index 9200c335e1b7b457eefe2441629691fc617d15b8..20405ba2d420c0285c514c96f0dc9466dd1667c8 100644 (file)
@@ -110,7 +110,7 @@ EOT;
                return;
        }
 
-       $arr = array();
+       $arr = [];
 
        $arr['guid'] = get_guid(32);
        $arr['uri'] = $uri;
index c3986e255576fe693a67873fe94661614cecad71..8a25fb0b213771e3a5ba035b102211ee4894c492 100644 (file)
@@ -22,15 +22,15 @@ function suggest_init(App $a) {
                        // <form> can't take arguments in its "action" parameter
                        // so add any arguments as hidden inputs
                        $query = explode_querystring($a->query_string);
-                       $inputs = array();
+                       $inputs = [];
                        foreach ($query['args'] as $arg) {
                                if (strpos($arg, 'confirm=') === false) {
                                        $arg_parts = explode('=', $arg);
-                                       $inputs[] = array('name' => $arg_parts[0], 'value' => $arg_parts[1]);
+                                       $inputs[] = ['name' => $arg_parts[0], 'value' => $arg_parts[1]];
                                }
                        }
 
-                       $a->page['content'] = replace_macros(get_markup_template('confirm.tpl'), array(
+                       $a->page['content'] = replace_macros(get_markup_template('confirm.tpl'), [
                                '$method' => 'get',
                                '$message' => t('Do you really want to delete this suggestion?'),
                                '$extra_inputs' => $inputs,
@@ -38,13 +38,13 @@ function suggest_init(App $a) {
                                '$confirm_url' => $query['base'],
                                '$confirm_name' => 'confirmed',
                                '$cancel' => t('Cancel'),
-                       ));
+                       ]);
                        $a->error = 1; // Set $a->error so the other module functions don't execute
                        return;
                }
                // Now check how the user responded to the confirmation query
                if (!$_REQUEST['canceled']) {
-                       dba::insert('gcign', array('uid' => local_user(), 'gcid' => $_GET['ignore']));
+                       dba::insert('gcign', ['uid' => local_user(), 'gcid' => $_GET['ignore']]);
                }
        }
 
@@ -77,15 +77,15 @@ function suggest_content(App $a) {
 
                $connlnk = System::baseUrl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
                $ignlnk = System::baseUrl() . '/suggest?ignore=' . $rr['id'];
-               $photo_menu = array(
-                       'profile' => array(t("View Profile"), Profile::zrl($rr["url"])),
-                       'follow' => array(t("Connect/Follow"), $connlnk),
-                       'hide' => array(t('Ignore/Hide'), $ignlnk)
-               );
+               $photo_menu = [
+                       'profile' => [t("View Profile"), Profile::zrl($rr["url"])],
+                       'follow' => [t("Connect/Follow"), $connlnk],
+                       'hide' => [t('Ignore/Hide'), $ignlnk]
+               ];
 
                $contact_details = Contact::getDetailsByURL($rr["url"], local_user(), $rr);
 
-               $entry = array(
+               $entry = [
                        'url' => Profile::zrl($rr['url']),
                        'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']),
                        'img_hover' => $rr['url'],
@@ -103,16 +103,16 @@ function suggest_content(App $a) {
                        'ignore' => t('Ignore/Hide'),
                        'network' => ContactSelector::networkToName($rr['network'], $rr['url']),
                        'id' => ++$id,
-               );
+               ];
                $entries[] = $entry;
        }
 
        $tpl = get_markup_template('viewcontact_template.tpl');
 
-       $o .= replace_macros($tpl,array(
+       $o .= replace_macros($tpl,[
                '$title' => t('Friend Suggestions'),
                '$contacts' => $entries,
-       ));
+       ]);
 
        return $o;
 }
index c7e8a9469aed35207dfc48a6ca269514cd968c96..90fd2414b8af9bbd5a951f4a4a38bb0db2b3a062 100644 (file)
@@ -17,7 +17,7 @@ function tagger_content(App $a) {
 
        $term = notags(trim($_GET['term']));
        // no commas allowed
-       $term = str_replace(array(',',' '),array('','_'),$term);
+       $term = str_replace([',',' '],['','_'],$term);
 
        if(! $term)
                return;
@@ -104,7 +104,7 @@ EOT;
 
        $termlink = html_entity_decode('&#x2317;') . '[url=' . System::baseUrl() . '/search?tag=' . urlencode($term) . ']'. $term . '[/url]';
 
-       $arr = array();
+       $arr = [];
 
        $arr['guid'] = get_guid(32);
        $arr['uri'] = $uri;
index 39608250805d123041bb24805e132460abce6406..5881817b300e962a300e6a9514da281332bbe61a 100644 (file)
@@ -36,26 +36,26 @@ function uexport_content(App $a) {
         * options shown on "Export personal data" page
         * list of array( 'link url', 'link text', 'help text' )
         */
-       $options = array(
-               array('uexport/account', t('Export account'), t('Export your account info and contacts. Use this to make a backup of your account and/or to move it to another server.')),
-               array('uexport/backup', t('Export all'), t('Export your accout info, contacts and all your items as json. Could be a very big file, and could take a lot of time. Use this to make a full backup of your account (photos are not exported)')),
-       );
+       $options = [
+               ['uexport/account', t('Export account'), t('Export your account info and contacts. Use this to make a backup of your account and/or to move it to another server.')],
+               ['uexport/backup', t('Export all'), t('Export your accout info, contacts and all your items as json. Could be a very big file, and could take a lot of time. Use this to make a full backup of your account (photos are not exported)')],
+       ];
        call_hooks('uexport_options', $options);
 
        $tpl = get_markup_template("uexport.tpl");
-       return replace_macros($tpl, array(
+       return replace_macros($tpl, [
                '$baseurl' => System::baseUrl(),
                '$title' => t('Export personal data'),
                '$options' => $options
-       ));
+       ]);
 }
 
 function _uexport_multirow($query) {
-       $result = array();
+       $result = [];
        $r = q($query);
        if (DBM::is_result($r)) {
                foreach ($r as $rr) {
-                       $p = array();
+                       $p = [];
                        foreach ($rr as $k => $v) {
                                $p[$k] = $v;
                        }
@@ -66,7 +66,7 @@ function _uexport_multirow($query) {
 }
 
 function _uexport_row($query) {
-       $result = array();
+       $result = [];
        $r = q($query);
        if (DBM::is_result($r)) {
                foreach ($r as $rr) {
@@ -112,7 +112,7 @@ function uexport_account($a) {
                sprintf("SELECT `group_member`.`gid`, `group_member`.`contact-id` FROM `group_member` INNER JOIN `group` ON `group`.`id` = `group_member`.`gid` WHERE `group`.`uid` = %d", intval(local_user()))
        );
 
-       $output = array(
+       $output = [
                'version' => FRIENDICA_VERSION,
                'schema' => DB_UPDATE_VERSION,
                'baseurl' => System::baseUrl(),
@@ -123,7 +123,7 @@ function uexport_account($a) {
                'pconfig' => $pconfig,
                'group' => $group,
                'group_member' => $group_member,
-       );
+       ];
 
        //echo "<pre>"; var_dump(json_encode($output)); killme();
        echo json_encode($output, JSON_PARTIAL_OUTPUT_ON_ERROR);
@@ -146,14 +146,14 @@ function uexport_all(App $a) {
        // chunk the output to avoid exhausting memory
 
        for ($x = 0; $x < $total; $x += 500) {
-               $item = array();
+               $item = [];
                $r = q("SELECT * FROM `item` WHERE `uid` = %d LIMIT %d, %d",
                        intval(local_user()),
                        intval($x),
                        intval(500)
                );
 
-               $output = array('item' => $r);
+               $output = ['item' => $r];
                echo json_encode($output, JSON_PARTIAL_OUTPUT_ON_ERROR). "\n";
        }
 }
index 114e4d0ab6b9af7248a11bdfac0fc0f8c7836b32..8516613410a00884eeff267843094ec5820890a7 100644 (file)
@@ -64,14 +64,14 @@ function uimport_content(App $a) {
        }
 
        $tpl = get_markup_template("uimport.tpl");
-       return replace_macros($tpl, array(
+       return replace_macros($tpl, [
                '$regbutt' => t('Import'),
-               '$import' => array(
+               '$import' => [
                        'title' => t("Move account"),
                        'intro' => t("You can import an account from another Friendica server."),
                        'instruct' => t("You need to export your account from the old server and upload it here. We will recreate your old account here with all your contacts. We will try also to inform your friends that you moved here."),
                        'warn' => t("This feature is experimental. We can't import contacts from the OStatus network (GNU Social/Statusnet) or from Diaspora"),
-                       'field' => array('accountfile', t('Account file'), '<input id="id_accountfile" name="accountfile" type="file">', t('To export your account, go to "Settings->Export your personal data" and select "Export account"')),
-               ),
-       ));
+                       'field' => ['accountfile', t('Account file'), '<input id="id_accountfile" name="accountfile" type="file">', t('To export your account, go to "Settings->Export your personal data" and select "Export account"')],
+               ],
+       ]);
 }
index b84e1079d27923b135ad8826a317fea89907fc38..246cb8bad03a7cb53451d2219cfcfee732f23c63 100644 (file)
@@ -32,7 +32,7 @@ function unfollow_post(App $a)
        if (!DBM::is_result($contact)) {
                notice(t("Contact wasn't found or can't be unfollowed."));
        } else {
-               if (in_array($contact['network'], array(NETWORK_OSTATUS, NETWORK_DIASPORA))) {
+               if (in_array($contact['network'], [NETWORK_OSTATUS, NETWORK_DIASPORA])) {
                        $r = q("SELECT `contact`.*, `user`.* FROM `contact` INNER JOIN `user` ON `contact`.`uid` = `user`.`uid`
                                WHERE `user`.`uid` = %d AND `contact`.`self` LIMIT 1",
                                intval($uid)
@@ -41,7 +41,7 @@ function unfollow_post(App $a)
                                Contact::terminateFriendship($r[0], $contact);
                        }
                }
-               dba::update('contact', array('rel' => CONTACT_IS_FOLLOWER), array('id' => $contact['id']));
+               dba::update('contact', ['rel' => CONTACT_IS_FOLLOWER], ['id' => $contact['id']]);
 
                info(t('Contact unfollowed').EOL);
                goaway(System::baseUrl().'/contacts/'.$contact['id']);
@@ -74,7 +74,7 @@ function unfollow_content(App $a) {
                // NOTREACHED
        }
 
-       if (!in_array($contact['network'], array(NETWORK_DIASPORA, NETWORK_OSTATUS))) {
+       if (!in_array($contact['network'], [NETWORK_DIASPORA, NETWORK_OSTATUS])) {
                notice(t("Unfollowing is currently not supported by your network.").EOL);
                $submit = "";
                // NOTREACHED
@@ -98,7 +98,7 @@ function unfollow_content(App $a) {
 
        $header = t("Disconnect/Unfollow");
 
-       $o  = replace_macros($tpl,array(
+       $o  = replace_macros($tpl,[
                        '$header' => htmlentities($header),
                        '$desc' => "",
                        '$pls_answer' => "",
@@ -123,12 +123,12 @@ function unfollow_content(App $a) {
                        '$request' => $request,
                        '$keywords' => "",
                        '$keywords_label' => ""
-       ));
+       ]);
 
        $a->page['aside'] = "";
        Profile::load($a, "", 0, Contact::getDetailsByURL($contact["url"]));
 
-       $o .= replace_macros(get_markup_template('section_title.tpl'), array('$title' => t('Status Messages and Posts')));
+       $o .= replace_macros(get_markup_template('section_title.tpl'), ['$title' => t('Status Messages and Posts')]);
 
        // Show last public posts
        $o .= Contact::getPostsFromUrl($contact["url"]);
index 1a9f57a39687c2a2c123c9809b694bd17edd126d..6dfbb74ed3a68f27dffdaec9673b5131ea79ed59 100644 (file)
@@ -48,13 +48,13 @@ function videos_init(App $a) {
 
                $tpl = get_markup_template("vcard-widget.tpl");
 
-               $vcard_widget = replace_macros($tpl, array(
+               $vcard_widget = replace_macros($tpl, [
                        '$name' => $profile['name'],
                        '$photo' => $profile['photo'],
                        '$addr' => defaults($profile, 'addr', ''),
                        '$account_type' => $account_type,
                        '$pdesc' => defaults($profile, 'pdesc', ''),
-               ));
+               ]);
 
 
                /*$sql_extra = permissions_sql($a->data['user']['uid']);
@@ -97,14 +97,14 @@ function videos_init(App $a) {
 
 
                $tpl = get_markup_template("videos_head.tpl");
-               $a->page['htmlhead'] .= replace_macros($tpl,array(
+               $a->page['htmlhead'] .= replace_macros($tpl,[
                        '$baseurl' => System::baseUrl(),
-               ));
+               ]);
 
                $tpl = get_markup_template("videos_end.tpl");
-               $a->page['end'] .= replace_macros($tpl,array(
+               $a->page['end'] .= replace_macros($tpl,[
                        '$baseurl' => System::baseUrl(),
-               ));
+               ]);
 
        }
 
@@ -130,19 +130,19 @@ function videos_post(App $a) {
                        }
 
                        $drop_url = $a->query_string;
-                       $a->page['content'] = replace_macros(get_markup_template('confirm.tpl'), array(
+                       $a->page['content'] = replace_macros(get_markup_template('confirm.tpl'), [
                                '$method' => 'post',
                                '$message' => t('Do you really want to delete this video?'),
-                               '$extra_inputs' => array(
-                                       array('name'=>'id', 'value'=> $_POST['id']),
-                                       array('name'=>'delete', 'value'=>'x')
-                               ),
+                               '$extra_inputs' => [
+                                       ['name'=>'id', 'value'=> $_POST['id']],
+                                       ['name'=>'delete', 'value'=>'x']
+                               ],
                                '$confirm' => t('Delete Video'),
                                '$confirm_url' => $drop_url,
                                '$confirm_name' => 'confirm', // Needed so that confirmation will bring us back into this if statement
                                '$cancel' => t('Cancel'),
 
-                       ));
+                       ]);
                        $a->error = 1; // Set $a->error so the other module functions don't execute
                        return;
                }
@@ -380,37 +380,37 @@ function videos_content(App $a) {
 
 
 
-       $videos = array();
+       $videos = [];
        if (DBM::is_result($r)) {
                foreach ($r as $rr) {
                        $alt_e = $rr['filename'];
                        $name_e = $rr['album'];
 
-                       $videos[] = array(
+                       $videos[] = [
                                'id'       => $rr['id'],
                                'link'     => System::baseUrl() . '/videos/' . $a->data['user']['nickname'] . '/video/' . $rr['resource-id'],
                                'title'    => t('View Video'),
                                'src'      => System::baseUrl() . '/attach/' . $rr['id'] . '?attachment=0',
                                'alt'      => $alt_e,
                                'mime'     => $rr['filetype'],
-                               'album' => array(
+                               'album' => [
                                        'link'  => System::baseUrl() . '/videos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($rr['album']),
                                        'name'  => $name_e,
                                        'alt'   => t('View Album'),
-                               ),
+                               ],
 
-                       );
+                       ];
                }
        }
 
        $tpl = get_markup_template('videos_recent.tpl');
-       $o .= replace_macros($tpl, array(
+       $o .= replace_macros($tpl, [
                '$title'      => t('Recent Videos'),
                '$can_post'   => $can_post,
-               '$upload'     => array(t('Upload New Videos'), System::baseUrl().'/videos/'.$a->data['user']['nickname'].'/upload'),
+               '$upload'     => [t('Upload New Videos'), System::baseUrl().'/videos/'.$a->data['user']['nickname'].'/upload'],
                '$videos'     => $videos,
                '$delete_url' => (($can_post)?System::baseUrl().'/videos/'.$a->data['user']['nickname']:False)
-       ));
+       ]);
 
 
        $o .= paginate($a);
index 64dd24e16c2cdac31d51947378e29590f4d243a8..a918c1ae57963eb06ce1f188f8c5863bdc2e0805 100644 (file)
@@ -83,7 +83,7 @@ function viewcontacts_content(App $a) {
                return $o;
        }
 
-       $contacts = array();
+       $contacts = [];
 
        foreach ($r as $rr) {
                /// @TODO This triggers an E_NOTICE if 'self' is not there
@@ -104,7 +104,7 @@ function viewcontacts_content(App $a) {
 
                $contact_details = Contact::getDetailsByURL($rr['url'], $a->profile['uid'], $rr);
 
-               $contacts[] = array(
+               $contacts[] = [
                        'id' => $rr['id'],
                        'img_hover' => sprintf( t('Visit %s\'s profile [%s]'), $contact_details['name'], $rr['url']),
                        'photo_menu' => Contact::photoMenu($rr),
@@ -119,16 +119,16 @@ function viewcontacts_content(App $a) {
                        'sparkle' => '',
                        'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']),
                        'network' => ContactSelector::networkToName($rr['network'], $rr['url']),
-               );
+               ];
        }
 
 
        $tpl = get_markup_template("viewcontact_template.tpl");
-       $o .= replace_macros($tpl, array(
+       $o .= replace_macros($tpl, [
                '$title' => t('Contacts'),
                '$contacts' => $contacts,
                '$paginate' => paginate($a),
-       ));
+       ]);
 
 
        return $o;
index cfb1558a24caf17bde98d74cdd34c410a3cfbd0d..472a8073247e9a96d7150d50da9e6150a43367a7 100644 (file)
@@ -20,7 +20,7 @@ function wall_attach_post(App $a) {
                );
                if (! DBM::is_result($r)) {
                        if ($r_json) {
-                               echo json_encode(array('error'=>t('Invalid request.')));
+                               echo json_encode(['error'=>t('Invalid request.')]);
                                killme();
                        }
                        return;
@@ -28,7 +28,7 @@ function wall_attach_post(App $a) {
 
        } else {
                if ($r_json) {
-                       echo json_encode(array('error'=>t('Invalid request.')));
+                       echo json_encode(['error'=>t('Invalid request.')]);
                        killme();
                }
                return;
@@ -70,7 +70,7 @@ function wall_attach_post(App $a) {
        }
        if(! $can_post) {
                if ($r_json) {
-                       echo json_encode(array('error'=>t('Permission denied.')));
+                       echo json_encode(['error'=>t('Permission denied.')]);
                        killme();
                }
                notice( t('Permission denied.') . EOL );
@@ -79,7 +79,7 @@ function wall_attach_post(App $a) {
 
        if(! x($_FILES,'userfile')) {
                if ($r_json) {
-                       echo json_encode(array('error'=>t('Invalid request.')));
+                       echo json_encode(['error'=>t('Invalid request.')]);
                }
                killme();
        }
@@ -99,7 +99,7 @@ function wall_attach_post(App $a) {
        if($filesize <=0) {
                $msg = t('Sorry, maybe your upload is bigger than the PHP configuration allows') . EOL .(t('Or - did you try to upload an empty file?'));
                if ($r_json) {
-                       echo json_encode(array('error'=>$msg));
+                       echo json_encode(['error'=>$msg]);
                } else {
                        notice( $msg. EOL );
                }
@@ -110,7 +110,7 @@ function wall_attach_post(App $a) {
        if(($maxfilesize) && ($filesize > $maxfilesize)) {
                $msg = sprintf(t('File exceeds size limit of %s'), formatBytes($maxfilesize));
                if ($r_json) {
-                       echo json_encode(array('error'=>$msg));
+                       echo json_encode(['error'=>$msg]);
                } else {
                        echo  $msg. EOL ;
                }
@@ -123,9 +123,9 @@ function wall_attach_post(App $a) {
        $hash = get_guid(64);
        $created = datetime_convert();
 
-       $fields = array('uid' => $page_owner_uid, 'hash' => $hash, 'filename' => $filename, 'filetype' => $mimetype,
+       $fields = ['uid' => $page_owner_uid, 'hash' => $hash, 'filename' => $filename, 'filetype' => $mimetype,
                'filesize' => $filesize, 'data' => $filedata, 'created' => $created, 'edited' => $created,
-               'allow_cid' => '<' . $page_owner_cid . '>', 'allow_gid' => '','deny_cid' => '', 'deny_gid' => '');
+               'allow_cid' => '<' . $page_owner_cid . '>', 'allow_gid' => '','deny_cid' => '', 'deny_gid' => ''];
 
        $r = dba::insert('attach', $fields);
 
@@ -134,7 +134,7 @@ function wall_attach_post(App $a) {
        if(! $r) {
                $msg =  t('File upload failed.');
                if ($r_json) {
-                       echo json_encode(array('error'=>$msg));
+                       echo json_encode(['error'=>$msg]);
                } else {
                        echo  $msg. EOL ;
                }
@@ -150,7 +150,7 @@ function wall_attach_post(App $a) {
        if (! DBM::is_result($r)) {
                $msg = t('File upload failed.');
                if ($r_json) {
-                       echo json_encode(array('error'=>$msg));
+                       echo json_encode(['error'=>$msg]);
                } else {
                        echo  $msg. EOL ;
                }
@@ -158,7 +158,7 @@ function wall_attach_post(App $a) {
        }
 
        if ($r_json) {
-               echo json_encode(array('ok'=>true));
+               echo json_encode(['ok'=>true]);
                killme();
        }
 
index a608743d07ff6292799f3c50fe8484b27591093d..8708390e938bea56dd4d02b40a830fe1a7f48240 100644 (file)
@@ -35,7 +35,7 @@ function wall_upload_post(App $a, $desktopmode = true) {
 
                        if (! DBM::is_result($r)) {
                                if ($r_json) {
-                                       echo json_encode(array('error'=>t('Invalid request.')));
+                                       echo json_encode(['error'=>t('Invalid request.')]);
                                        killme();
                                }
                                return;
@@ -51,7 +51,7 @@ function wall_upload_post(App $a, $desktopmode = true) {
                }
        } else {
                if ($r_json) {
-                       echo json_encode(array('error'=>t('Invalid request.')));
+                       echo json_encode(['error'=>t('Invalid request.')]);
                        killme();
                }
                return;
@@ -100,7 +100,7 @@ function wall_upload_post(App $a, $desktopmode = true) {
 
        if (! $can_post) {
                if ($r_json) {
-                       echo json_encode(array('error'=>t('Permission denied.')));
+                       echo json_encode(['error'=>t('Permission denied.')]);
                        killme();
                }
                notice(t('Permission denied.') . EOL);
@@ -109,7 +109,7 @@ function wall_upload_post(App $a, $desktopmode = true) {
 
        if (! x($_FILES, 'userfile') && ! x($_FILES, 'media')) {
                if ($r_json) {
-                       echo json_encode(array('error'=>t('Invalid request.')));
+                       echo json_encode(['error'=>t('Invalid request.')]);
                }
                killme();
        }
@@ -149,7 +149,7 @@ function wall_upload_post(App $a, $desktopmode = true) {
 
        if ($src=="") {
                if ($r_json) {
-                       echo json_encode(array('error'=>t('Invalid request.')));
+                       echo json_encode(['error'=>t('Invalid request.')]);
                        killme();
                }
                notice(t('Invalid request.').EOL);
@@ -182,7 +182,7 @@ function wall_upload_post(App $a, $desktopmode = true) {
        if (($maximagesize) && ($filesize > $maximagesize)) {
                $msg = sprintf(t('Image exceeds size limit of %s'), formatBytes($maximagesize));
                if ($r_json) {
-                       echo json_encode(array('error'=>$msg));
+                       echo json_encode(['error'=>$msg]);
                } else {
                        echo  $msg. EOL;
                }
@@ -196,7 +196,7 @@ function wall_upload_post(App $a, $desktopmode = true) {
        if (! $Image->isValid()) {
                $msg = t('Unable to process image.');
                if ($r_json) {
-                       echo json_encode(array('error'=>$msg));
+                       echo json_encode(['error'=>$msg]);
                } else {
                        echo  $msg. EOL;
                }
@@ -235,7 +235,7 @@ function wall_upload_post(App $a, $desktopmode = true) {
        if (! $r) {
                $msg = t('Image upload failed.');
                if ($r_json) {
-                       echo json_encode(array('error'=>$msg));
+                       echo json_encode(['error'=>$msg]);
                } else {
                        echo  $msg. EOL;
                }
@@ -268,12 +268,12 @@ function wall_upload_post(App $a, $desktopmode = true) {
                );
                if (!$r) {
                        if ($r_json) {
-                               echo json_encode(array('error'=>''));
+                               echo json_encode(['error'=>'']);
                                killme();
                        }
                        return false;
                }
-               $picture = array();
+               $picture = [];
 
                $picture["id"]        = $r[0]["id"];
                $picture["size"]      = $r[0]["datasize"];
@@ -285,7 +285,7 @@ function wall_upload_post(App $a, $desktopmode = true) {
                $picture["preview"]   = System::baseUrl() . "/photo/{$hash}-{$smallest}." . $Image->getExt();
 
                if ($r_json) {
-                       echo json_encode(array('picture'=>$picture));
+                       echo json_encode(['picture'=>$picture]);
                        killme();
                }
                return $picture;
@@ -293,7 +293,7 @@ function wall_upload_post(App $a, $desktopmode = true) {
 
 
        if ($r_json) {
-               echo json_encode(array('ok'=>true));
+               echo json_encode(['ok'=>true]);
                killme();
        }
 
index cd43f0e03d0df8f3115d49aaa932adfdfb27cfc8..547290ca9ad473fbacf3da7b41c25678fc76b691 100644 (file)
@@ -114,21 +114,21 @@ function wallmessage_content(App $a) {
        }
 
        $tpl = get_markup_template('wallmsg-header.tpl');
-       $a->page['htmlhead'] .= replace_macros($tpl, array(
+       $a->page['htmlhead'] .= replace_macros($tpl, [
                '$baseurl' => System::baseUrl(true),
                '$nickname' => $user['nickname'],
                '$linkurl' => t('Please enter a link URL:')
-       ));
+       ]);
 
        $tpl = get_markup_template('wallmsg-end.tpl');
-       $a->page['end'] .= replace_macros($tpl, array(
+       $a->page['end'] .= replace_macros($tpl, [
                '$baseurl' => System::baseUrl(true),
                '$nickname' => $user['nickname'],
                '$linkurl' => t('Please enter a link URL:')
-       ));
+       ]);
 
        $tpl = get_markup_template('wallmessage.tpl');
-       $o .= replace_macros($tpl,array(
+       $o .= replace_macros($tpl,[
                '$header' => t('Send Private Message'),
                '$subheader' => sprintf( t('If you wish for %s to respond, please check that the privacy settings on your site allow private mail from unknown senders.'), $user['username']),
                '$to' => t('To:'),
@@ -144,7 +144,7 @@ function wallmessage_content(App $a) {
                '$upload' => t('Upload photo'),
                '$insert' => t('Insert web link'),
                '$wait' => t('Please wait')
-       ));
+       ]);
 
        return $o;
 }
index d72315a5b51e77c25444fa363885074910f0b7b5..85d3b31200481aa01384927f9d0b206c411b333f 100644 (file)
@@ -7,8 +7,8 @@ function webfinger_content(App $a) {
 
        if (!local_user()) {
                http_status_exit(403,
-                               array("title" => t("Public access denied."),
-                                       "description" => t("Only logged in users are permitted to perform a probing.")));
+                               ["title" => t("Public access denied."),
+                                       "description" => t("Only logged in users are permitted to perform a probing.")]);
                killme();
        }
 
index 05b07dc162505a1bc76248a90ab686081f253123..e5b537cd9749c41d8dd83b8f4cf4b2549db06b21 100644 (file)
@@ -64,21 +64,21 @@ function xrd_json($a, $uri, $alias, $profile_url, $r)
        header('Access-Control-Allow-Origin: *');
        header("Content-type: application/json; charset=utf-8");
 
-       $json = array('subject' => $uri,
-                       'aliases' => array($alias, $profile_url),
-                       'links' => array(array('rel' => NAMESPACE_DFRN, 'href' => $profile_url),
-                                       array('rel' => NAMESPACE_FEED, 'type' => 'application/atom+xml', 'href' => System::baseUrl().'/dfrn_poll/'.$r['nickname']),
-                                       array('rel' => 'http://webfinger.net/rel/profile-page', 'type' => 'text/html', 'href' => $profile_url),
-                                       array('rel' => 'http://microformats.org/profile/hcard', 'type' => 'text/html', 'href' => System::baseUrl().'/hcard/'.$r['nickname']),
-                                       array('rel' => NAMESPACE_POCO, 'href' => System::baseUrl().'/poco/'.$r['nickname']),
-                                       array('rel' => 'http://webfinger.net/rel/avatar', 'type' => 'image/jpeg', 'href' => System::baseUrl().'/photo/profile/'.$r['uid'].'.jpg'),
-                                       array('rel' => 'http://joindiaspora.com/seed_location', 'type' => 'text/html', 'href' => System::baseUrl()),
-                                       array('rel' => 'salmon', 'href' => System::baseUrl().'/salmon/'.$r['nickname']),
-                                       array('rel' => 'http://salmon-protocol.org/ns/salmon-replies', 'href' => System::baseUrl().'/salmon/'.$r['nickname']),
-                                       array('rel' => 'http://salmon-protocol.org/ns/salmon-mention', 'href' => System::baseUrl().'/salmon/'.$r['nickname'].'/mention'),
-                                       array('rel' => 'http://ostatus.org/schema/1.0/subscribe', 'template' => System::baseUrl().'/follow?url={uri}'),
-                                       array('rel' => 'magic-public-key', 'href' => 'data:application/magic-public-key,'.$salmon_key)
-       ));
+       $json = ['subject' => $uri,
+                       'aliases' => [$alias, $profile_url],
+                       'links' => [['rel' => NAMESPACE_DFRN, 'href' => $profile_url],
+                                       ['rel' => NAMESPACE_FEED, 'type' => 'application/atom+xml', 'href' => System::baseUrl().'/dfrn_poll/'.$r['nickname']],
+                                       ['rel' => 'http://webfinger.net/rel/profile-page', 'type' => 'text/html', 'href' => $profile_url],
+                                       ['rel' => 'http://microformats.org/profile/hcard', 'type' => 'text/html', 'href' => System::baseUrl().'/hcard/'.$r['nickname']],
+                                       ['rel' => NAMESPACE_POCO, 'href' => System::baseUrl().'/poco/'.$r['nickname']],
+                                       ['rel' => 'http://webfinger.net/rel/avatar', 'type' => 'image/jpeg', 'href' => System::baseUrl().'/photo/profile/'.$r['uid'].'.jpg'],
+                                       ['rel' => 'http://joindiaspora.com/seed_location', 'type' => 'text/html', 'href' => System::baseUrl()],
+                                       ['rel' => 'salmon', 'href' => System::baseUrl().'/salmon/'.$r['nickname']],
+                                       ['rel' => 'http://salmon-protocol.org/ns/salmon-replies', 'href' => System::baseUrl().'/salmon/'.$r['nickname']],
+                                       ['rel' => 'http://salmon-protocol.org/ns/salmon-mention', 'href' => System::baseUrl().'/salmon/'.$r['nickname'].'/mention'],
+                                       ['rel' => 'http://ostatus.org/schema/1.0/subscribe', 'template' => System::baseUrl().'/follow?url={uri}'],
+                                       ['rel' => 'magic-public-key', 'href' => 'data:application/magic-public-key,'.$salmon_key]
+       ]];
        echo json_encode($json);
        killme();
 }
@@ -92,7 +92,7 @@ function xrd_xml($a, $uri, $alias, $profile_url, $r)
 
        $tpl = get_markup_template('xrd_person.tpl');
 
-       $o = replace_macros($tpl, array(
+       $o = replace_macros($tpl, [
                '$nick'        => $r['nickname'],
                '$accturi'     => $uri,
                '$alias'       => $alias,
@@ -105,10 +105,10 @@ function xrd_xml($a, $uri, $alias, $profile_url, $r)
                '$salmon'      => System::baseUrl() . '/salmon/'        . $r['nickname'],
                '$salmen'      => System::baseUrl() . '/salmon/'        . $r['nickname'] . '/mention',
                '$subscribe'   => System::baseUrl() . '/follow?url={uri}',
-               '$modexp'      => 'data:application/magic-public-key,'  . $salmon_key)
+               '$modexp'      => 'data:application/magic-public-key,'  . $salmon_key]
        );
 
-       $arr = array('user' => $r, 'xml' => $o);
+       $arr = ['user' => $r, 'xml' => $o];
        call_hooks('personal_xrd', $arr);
 
        echo $arr['xml'];
index cd39604789288903c780ffa5e25ab3e075894110..fdd928ba1a1c7b64a226301fd8ca1a5fdfa78d79 100644 (file)
@@ -46,7 +46,7 @@ class App {
        public $contacts;
        public $page_contact;
        public $content;
-       public $data = array();
+       public $data = [];
        public $error = false;
        public $cmd;
        public $argv;
@@ -60,15 +60,15 @@ class App {
        public $timezone;
        public $interactive = true;
        public $plugins;
-       public $plugins_admin = array();
-       public $apps = array();
+       public $plugins_admin = [];
+       public $apps = [];
        public $identities;
        public $is_mobile = false;
        public $is_tablet = false;
        public $is_friendica_app;
-       public $performance = array();
-       public $callstack = array();
-       public $theme_info = array();
+       public $performance = [];
+       public $callstack = [];
+       public $theme_info = [];
        public $backend = true;
        public $nav_sel;
        public $category;
@@ -87,34 +87,34 @@ class App {
         * Mostly unimplemented yet. Only options 'template_engine' and
         * beyond are used.
         */
-       public $theme = array(
+       public $theme = [
                'sourcename' => '',
                'videowidth' => 425,
                'videoheight' => 350,
                'force_max_items' => 0,
                'stylesheet' => '',
                'template_engine' => 'smarty3',
-       );
+       ];
 
        /**
         * @brief An array of registered template engines ('name'=>'class name')
         */
-       public $template_engines = array();
+       public $template_engines = [];
 
        /**
         * @brief An array of instanced template engines ('name'=>'instance')
         */
-       public $template_engine_instance = array();
+       public $template_engine_instance = [];
        public $process_id;
        public $queue;
-       private $ldelim = array(
+       private $ldelim = [
                'internal' => '',
                'smarty3' => '{{'
-       );
-       private $rdelim = array(
+       ];
+       private $rdelim = [
                'internal' => '',
                'smarty3' => '}}'
-       );
+       ];
        private $scheme;
        private $hostname;
        private $db;
@@ -160,16 +160,16 @@ class App {
                $this->performance['marktime'] = 0;
                $this->performance['markstart'] = microtime(true);
 
-               $this->callstack['database'] = array();
-               $this->callstack['database_write'] = array();
-               $this->callstack['network'] = array();
-               $this->callstack['file'] = array();
-               $this->callstack['rendering'] = array();
-               $this->callstack['parser'] = array();
+               $this->callstack['database'] = [];
+               $this->callstack['database_write'] = [];
+               $this->callstack['network'] = [];
+               $this->callstack['file'] = [];
+               $this->callstack['rendering'] = [];
+               $this->callstack['parser'] = [];
 
-               $this->config = array();
-               $this->page = array();
-               $this->pager = array();
+               $this->config = [];
+               $this->page = [];
+               $this->pager = [];
 
                $this->query_string = '';
 
@@ -274,7 +274,7 @@ class App {
                        $this->module = str_replace('-', '_', $this->module);
                } else {
                        $this->argc = 1;
-                       $this->argv = array('home');
+                       $this->argv = ['home'];
                        $this->module = 'home';
                }
 
@@ -517,7 +517,7 @@ class App {
                $invinite_scroll = infinite_scroll_data($this->module);
 
                $tpl = get_markup_template('head.tpl');
-               $this->page['htmlhead'] = replace_macros($tpl, array(
+               $this->page['htmlhead'] = replace_macros($tpl, [
                                '$baseurl' => $this->get_baseurl(),
                                '$local_user' => local_user(),
                                '$generator' => 'Friendica' . ' ' . FRIENDICA_VERSION,
@@ -529,7 +529,7 @@ class App {
                                '$touch_icon' => $touch_icon,
                                '$stylesheet' => $stylesheet,
                                '$infinite_scroll' => $invinite_scroll,
-                       )) . $this->page['htmlhead'];
+                       ]) . $this->page['htmlhead'];
        }
 
        function init_page_end() {
@@ -537,9 +537,9 @@ class App {
                        $this->page['end'] = '';
                }
                $tpl = get_markup_template('end.tpl');
-               $this->page['end'] = replace_macros($tpl, array(
+               $this->page['end'] = replace_macros($tpl, [
                                '$baseurl' => $this->get_baseurl()
-                       )) . $this->page['end'];
+                       ]) . $this->page['end'];
        }
 
        function set_curl_code($code) {
@@ -709,7 +709,7 @@ class App {
 
                $r = q('SELECT `pid` FROM `process` WHERE `pid` = %d', intval(getmypid()));
                if (!DBM::is_result($r)) {
-                       dba::insert('process', array('pid' => getmypid(), 'command' => $command, 'created' => datetime_convert()));
+                       dba::insert('process', ['pid' => getmypid(), 'command' => $command, 'created' => datetime_convert()]);
                }
                dba::commit();
        }
@@ -724,7 +724,7 @@ class App {
                if (DBM::is_result($r)) {
                        foreach ($r AS $process) {
                                if (!posix_kill($process['pid'], 0)) {
-                                       dba::delete('process', array('pid' => $process['pid']));
+                                       dba::delete('process', ['pid' => $process['pid']]);
                                }
                        }
                }
@@ -735,7 +735,7 @@ class App {
         * @brief Remove the active process from the "process" table
         */
        function end_process() {
-               dba::delete('process', array('pid' => getmypid()));
+               dba::delete('process', ['pid' => getmypid()]);
        }
 
        function get_useragent() {
@@ -760,7 +760,7 @@ class App {
         * @return bool Is it a known backend?
         */
        function is_backend() {
-               static $backends = array();
+               static $backends = [];
                $backends[] = '_well_known';
                $backends[] = 'api';
                $backends[] = 'dfrn_notify';
@@ -837,7 +837,7 @@ class App {
 
                $memdata = explode("\n", file_get_contents('/proc/meminfo'));
 
-               $meminfo = array();
+               $meminfo = [];
                foreach ($memdata as $line) {
                        list($key, $val) = explode(':', $line);
                        $meminfo[$key] = (int) trim(str_replace('kB', '', $val));
@@ -924,9 +924,9 @@ class App {
                }
 
                if (Config::get('system', 'proc_windows')) {
-                       $resource = proc_open('cmd /c start /b ' . $cmdline, array(), $foo, $this->get_basepath());
+                       $resource = proc_open('cmd /c start /b ' . $cmdline, [], $foo, $this->get_basepath());
                } else {
-                       $resource = proc_open($cmdline . ' &', array(), $foo, $this->get_basepath());
+                       $resource = proc_open($cmdline . ' &', [], $foo, $this->get_basepath());
                }
                if (!is_resource($resource)) {
                        logger('We got no resource for command ' . $cmdline, LOGGER_DEBUG);
index 368ec98575aad93773a6fe5b0943c5cac966d872..4eb2e74aa298aed87909d6d454f3db4485dc1f27 100644 (file)
@@ -49,14 +49,14 @@ class ContactSelector
                $o = '';
                $o .= "<select id=\"contact-poll-interval\" name=\"poll\" $dis />" . "\r\n";
 
-               $rep = array(
+               $rep = [
                        0 => t('Frequently'),
                        1 => t('Hourly'),
                        2 => t('Twice daily'),
                        3 => t('Daily'),
                        4 => t('Weekly'),
                        5 => t('Monthly')
-               );
+               ];
 
                foreach ($rep as $k => $v) {
                        $selected = (($k == $current) ? " selected=\"selected\" " : "");
@@ -73,7 +73,7 @@ class ContactSelector
         */
        public static function networkToName($s, $profile = "")
        {
-               $nets = array(
+               $nets = [
                        NETWORK_DFRN     => t('Friendica'),
                        NETWORK_OSTATUS  => t('OStatus'),
                        NETWORK_FEED     => t('RSS/Atom'),
@@ -91,7 +91,7 @@ class ContactSelector
                        NETWORK_STATUSNET => t('GNU Social Connector'),
                        NETWORK_PNUT      => t('pnut'),
                        NETWORK_APPNET => t('App.net')
-               );
+               ];
 
                call_hooks('network_to_name', $nets);
 
@@ -100,7 +100,7 @@ class ContactSelector
 
                $networkname = str_replace($search, $replace, $s);
 
-               if ((in_array($s, array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) && ($profile != "")) {
+               if ((in_array($s, [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS])) && ($profile != "")) {
                        $r = dba::fetch_first("SELECT `gserver`.`platform` FROM `gcontact`
                                        INNER JOIN `gserver` ON `gserver`.`nurl` = `gcontact`.`server_url`
                                        WHERE `gcontact`.`nurl` = ? AND `platform` != ''", normalise_link($profile));
index c98a53c544f65e2e66e91dcf4842b6bf6b3c6378..6d90c3fbc41085981fa9338b4c3bf6e4027d6222 100644 (file)
@@ -35,7 +35,7 @@ class Feature
                        $x = self::getDefault($feature);
                }
 
-               $arr = array('uid' => $uid, 'feature' => $feature, 'enabled' => $x);
+               $arr = ['uid' => $uid, 'feature' => $feature, 'enabled' => $x];
                call_hooks('isEnabled', $arr);
                return($arr['enabled']);
        }
@@ -72,62 +72,62 @@ class Feature
         */
        public static function get($filtered = true)
        {
-               $arr = array(
+               $arr = [
 
                        // General
-                       'general' => array(
+                       'general' => [
                                t('General Features'),
                                //array('expire',         t('Content Expiration'),              t('Remove old posts/comments after a period of time')),
-                               array('multi_profiles', t('Multiple Profiles'),                 t('Ability to create multiple profiles'), false, Config::get('feature_lock', 'multi_profiles', false)),
-                               array('photo_location', t('Photo Location'),                    t('Photo metadata is normally stripped. This extracts the location (if present) prior to stripping metadata and links it to a map.'), false, Config::get('feature_lock', 'photo_location', false)),
-                               array('export_calendar', t('Export Public Calendar'),           t('Ability for visitors to download the public calendar'), false, Config::get('feature_lock', 'export_calendar', false)),
-                       ),
+                               ['multi_profiles', t('Multiple Profiles'),                      t('Ability to create multiple profiles'), false, Config::get('feature_lock', 'multi_profiles', false)],
+                               ['photo_location', t('Photo Location'),                 t('Photo metadata is normally stripped. This extracts the location (if present) prior to stripping metadata and links it to a map.'), false, Config::get('feature_lock', 'photo_location', false)],
+                               ['export_calendar', t('Export Public Calendar'),                t('Ability for visitors to download the public calendar'), false, Config::get('feature_lock', 'export_calendar', false)],
+                       ],
 
                        // Post composition
-                       'composition' => array(
+                       'composition' => [
                                t('Post Composition Features'),
-                               array('preview',        t('Post Preview'),                      t('Allow previewing posts and comments before publishing them'), false, Config::get('feature_lock', 'preview', false)),
-                               array('aclautomention', t('Auto-mention Forums'),               t('Add/remove mention when a forum page is selected/deselected in ACL window.'), false, Config::get('feature_lock', 'aclautomention', false)),
-                       ),
+                               ['preview',     t('Post Preview'),                      t('Allow previewing posts and comments before publishing them'), false, Config::get('feature_lock', 'preview', false)],
+                               ['aclautomention',      t('Auto-mention Forums'),               t('Add/remove mention when a forum page is selected/deselected in ACL window.'), false, Config::get('feature_lock', 'aclautomention', false)],
+                       ],
 
                        // Network sidebar widgets
-                       'widgets' => array(
+                       'widgets' => [
                                t('Network Sidebar Widgets'),
-                               array('archives',       t('Search by Date'),                    t('Ability to select posts by date ranges'), false, Config::get('feature_lock', 'archives', false)),
-                               array('forumlist_widget', t('List Forums'),                     t('Enable widget to display the forums your are connected with'), true, Config::get('feature_lock', 'forumlist_widget', false)),
-                               array('groups',         t('Group Filter'),                      t('Enable widget to display Network posts only from selected group'), false, Config::get('feature_lock', 'groups', false)),
-                               array('networks',       t('Network Filter'),                    t('Enable widget to display Network posts only from selected network'), false, Config::get('feature_lock', 'networks', false)),
-                               array('savedsearch',    t('Saved Searches'),                    t('Save search terms for re-use'), false, Config::get('feature_lock', 'savedsearch', false)),
-                       ),
+                               ['archives',    t('Search by Date'),                    t('Ability to select posts by date ranges'), false, Config::get('feature_lock', 'archives', false)],
+                               ['forumlist_widget', t('List Forums'),                  t('Enable widget to display the forums your are connected with'), true, Config::get('feature_lock', 'forumlist_widget', false)],
+                               ['groups',              t('Group Filter'),                      t('Enable widget to display Network posts only from selected group'), false, Config::get('feature_lock', 'groups', false)],
+                               ['networks',    t('Network Filter'),                    t('Enable widget to display Network posts only from selected network'), false, Config::get('feature_lock', 'networks', false)],
+                               ['savedsearch', t('Saved Searches'),                    t('Save search terms for re-use'), false, Config::get('feature_lock', 'savedsearch', false)],
+                       ],
 
                        // Network tabs
-                       'net_tabs' => array(
+                       'net_tabs' => [
                                t('Network Tabs'),
-                               array('personal_tab',   t('Network Personal Tab'),              t('Enable tab to display only Network posts that you\'ve interacted on'), false, Config::get('feature_lock', 'personal_tab', false)),
-                               array('new_tab',        t('Network New Tab'),                   t('Enable tab to display only new Network posts (from the last 12 hours)'), false, Config::get('feature_lock', 'new_tab', false)),
-                               array('link_tab',       t('Network Shared Links Tab'),          t('Enable tab to display only Network posts with links in them'), false, Config::get('feature_lock', 'link_tab', false)),
-                       ),
+                               ['personal_tab',        t('Network Personal Tab'),              t('Enable tab to display only Network posts that you\'ve interacted on'), false, Config::get('feature_lock', 'personal_tab', false)],
+                               ['new_tab',     t('Network New Tab'),                   t('Enable tab to display only new Network posts (from the last 12 hours)'), false, Config::get('feature_lock', 'new_tab', false)],
+                               ['link_tab',    t('Network Shared Links Tab'),          t('Enable tab to display only Network posts with links in them'), false, Config::get('feature_lock', 'link_tab', false)],
+                       ],
 
                        // Item tools
-                       'tools' => array(
+                       'tools' => [
                                t('Post/Comment Tools'),
-                               array('multi_delete',   t('Multiple Deletion'),                 t('Select and delete multiple posts/comments at once'), false, Config::get('feature_lock', 'multi_delete', false)),
-                               array('edit_posts',     t('Edit Sent Posts'),                   t('Edit and correct posts and comments after sending'), false, Config::get('feature_lock', 'edit_posts', false)),
-                               array('commtag',        t('Tagging'),                           t('Ability to tag existing posts'), false, Config::get('feature_lock', 'commtag', false)),
-                               array('categories',     t('Post Categories'),                   t('Add categories to your posts'), false, Config::get('feature_lock', 'categories', false)),
-                               array('filing',         t('Saved Folders'),                     t('Ability to file posts under folders'), false, Config::get('feature_lock', 'filing', false)),
-                               array('dislike',        t('Dislike Posts'),                     t('Ability to dislike posts/comments'), false, Config::get('feature_lock', 'dislike', false)),
-                               array('star_posts',     t('Star Posts'),                        t('Ability to mark special posts with a star indicator'), false, Config::get('feature_lock', 'star_posts', false)),
-                               array('ignore_posts',   t('Mute Post Notifications'),           t('Ability to mute notifications for a thread'), false, Config::get('feature_lock', 'ignore_posts', false)),
-                       ),
+                               ['multi_delete',        t('Multiple Deletion'),                 t('Select and delete multiple posts/comments at once'), false, Config::get('feature_lock', 'multi_delete', false)],
+                               ['edit_posts',  t('Edit Sent Posts'),                   t('Edit and correct posts and comments after sending'), false, Config::get('feature_lock', 'edit_posts', false)],
+                               ['commtag',     t('Tagging'),                           t('Ability to tag existing posts'), false, Config::get('feature_lock', 'commtag', false)],
+                               ['categories',  t('Post Categories'),                   t('Add categories to your posts'), false, Config::get('feature_lock', 'categories', false)],
+                               ['filing',              t('Saved Folders'),                     t('Ability to file posts under folders'), false, Config::get('feature_lock', 'filing', false)],
+                               ['dislike',     t('Dislike Posts'),                     t('Ability to dislike posts/comments'), false, Config::get('feature_lock', 'dislike', false)],
+                               ['star_posts',  t('Star Posts'),                        t('Ability to mark special posts with a star indicator'), false, Config::get('feature_lock', 'star_posts', false)],
+                               ['ignore_posts',        t('Mute Post Notifications'),           t('Ability to mute notifications for a thread'), false, Config::get('feature_lock', 'ignore_posts', false)],
+                       ],
 
                        // Advanced Profile Settings
-                       'advanced_profile' => array(
+                       'advanced_profile' => [
                                t('Advanced Profile Settings'),
-                               array('forumlist_profile', t('List Forums'),                    t('Show visitors public community forums at the Advanced Profile Page'), false, Config::get('feature_lock', 'forumlist_profile', false)),
-                               array('tagadelic',      t('Tag Cloud'),                         t('Provide a personal tag cloud on your profile page'), false, Config::get('feature_lock', 'tagadelic', false)),
-                       ),
-               );
+                               ['forumlist_profile', t('List Forums'),                 t('Show visitors public community forums at the Advanced Profile Page'), false, Config::get('feature_lock', 'forumlist_profile', false)],
+                               ['tagadelic',   t('Tag Cloud'),                         t('Provide a personal tag cloud on your profile page'), false, Config::get('feature_lock', 'tagadelic', false)],
+                       ],
+               ];
 
                // removed any locked features and remove the entire category if this makes it empty
 
index 3a564e328df228e99537728436d676952d03b5ab..3d84b95a38e691e4299018eedd9ce9198c713c61 100644 (file)
@@ -35,7 +35,7 @@ class ForumManager
         */
        public static function getList($uid, $lastitem, $showhidden = true, $showprivate = false)
        {
-               $forumlist = array();
+               $forumlist = [];
 
                $order = (($showhidden) ? '' : ' AND NOT `hidden` ');
                $order .= (($lastitem) ? ' ORDER BY `last-item` DESC ' : ' ORDER BY `name` ASC ');
@@ -59,13 +59,13 @@ class ForumManager
                }
 
                while ($contact = dba::fetch($contacts)) {
-                       $forumlist[] = array(
+                       $forumlist[] = [
                                'url'   => $contact['url'],
                                'name'  => $contact['name'],
                                'id'    => $contact['id'],
                                'micro' => $contact['micro'],
                                'thumb' => $contact['thumb'],
-                       );
+                       ];
                }
                dba::close($contacts);
 
@@ -104,7 +104,7 @@ class ForumManager
                        foreach ($contacts as $contact) {
                                $selected = (($cid == $contact['id']) ? ' forum-selected' : '');
 
-                               $entry = array(
+                               $entry = [
                                        'url' => 'network?f=&cid=' . $contact['id'],
                                        'external_url' => 'redir/' . $contact['id'],
                                        'name' => $contact['name'],
@@ -112,7 +112,7 @@ class ForumManager
                                        'selected'      => $selected,
                                        'micro' => System::removedBaseUrl(proxy_url($contact['micro'], false, PROXY_SIZE_MICRO)),
                                        'id' => ++$id,
-                               );
+                               ];
                                $entries[] = $entry;
                        }
 
@@ -120,13 +120,13 @@ class ForumManager
 
                        $o .= replace_macros(
                                $tpl,
-                               array(
+                               [
                                        '$title'        => t('Forums'),
                                        '$forums'       => $entries,
                                        '$link_desc'    => t('External link to forum'),
                                        '$total'        => $total,
                                        '$visible_forums' => $visible_forums,
-                                       '$showmore'     => t('show more'))
+                                       '$showmore'     => t('show more')]
                        );
                }
 
index 29f41a1717d1736e5251ec264efe49a712c1c514..a8780d4d51e225349cede4a654a495c8f2f00c54 100644 (file)
@@ -67,7 +67,7 @@ class OEmbed
                // These media files should now be caught in bbcode.php
                // left here as a fallback in case this is called from another source
 
-               $noexts = array("mp3", "mp4", "ogg", "ogv", "oga", "ogm", "webm");
+               $noexts = ["mp3", "mp4", "ogg", "ogv", "oga", "ogm", "webm"];
                $ext = pathinfo(strtolower($embedurl), PATHINFO_EXTENSION);
 
 
@@ -125,7 +125,7 @@ class OEmbed
 
                // Always embed the SSL version
                if (isset($j->html)) {
-                       $j->html = str_replace(array("http://www.youtube.com/", "http://player.vimeo.com/"), array("https://www.youtube.com/", "https://player.vimeo.com/"), $j->html);
+                       $j->html = str_replace(["http://www.youtube.com/", "http://player.vimeo.com/"], ["https://www.youtube.com/", "https://player.vimeo.com/"], $j->html);
                }
 
                $j->embedurl = $embedurl;
@@ -175,14 +175,14 @@ class OEmbed
                                        $th = 120;
                                        $tw = $th * $tr;
                                        $tpl = get_markup_template('oembed_video.tpl');
-                                       $ret .= replace_macros($tpl, array(
+                                       $ret .= replace_macros($tpl, [
                                                '$baseurl' => System::baseUrl(),
                                                '$embedurl' => $embedurl,
                                                '$escapedhtml' => base64_encode($jhtml),
                                                '$tw' => $tw,
                                                '$th' => $th,
                                                '$turl' => $j->thumbnail_url,
-                                       ));
+                                       ]);
                                } else {
                                        $ret = $jhtml;
                                }
@@ -317,8 +317,8 @@ class OEmbed
        public static function getHTML($url, $title = null)
        {
                // Always embed the SSL version
-               $url = str_replace(array("http://www.youtube.com/", "http://player.vimeo.com/"),
-                                       array("https://www.youtube.com/", "https://player.vimeo.com/"), $url);
+               $url = str_replace(["http://www.youtube.com/", "http://player.vimeo.com/"],
+                                       ["https://www.youtube.com/", "https://player.vimeo.com/"], $url);
 
                $o = self::fetchURL($url, !self::isAllowedURL($url));
 
index ce785d66f44f48687160a8ed334a6fe01d3550ed..201530cb823102ae9aa025652c1e165e045ff9b0 100644 (file)
@@ -61,7 +61,7 @@ class Smilies
         */
        public static function getList()
        {
-               $texts =  array(
+               $texts =  [
                        '&lt;3',
                        '&lt;/3',
                        '&lt;\\3',
@@ -98,9 +98,9 @@ class Smilies
                        'red#',
                        'red#matrix'
 
-               );
+               ];
 
-               $icons = array(
+               $icons = [
                '<img class="smiley" src="' . System::baseUrl() . '/images/smiley-heart.gif" alt="&lt;3" title="&lt;3" />',
                '<img class="smiley" src="' . System::baseUrl() . '/images/smiley-brokenheart.gif" alt="&lt;/3" title="&lt;/3" />',
                '<img class="smiley" src="' . System::baseUrl() . '/images/smiley-brokenheart.gif" alt="&lt;\\3" title="&lt;\\3" />',
@@ -136,9 +136,9 @@ class Smilies
                '<a href="https://friendi.ca">~friendica <img class="smiley" src="' . System::baseUrl() . '/images/friendica-16.png" alt="~friendica" title="~friendica" /></a>',
                '<a href="http://redmatrix.me/">red<img class="smiley" src="' . System::baseUrl() . '/images/rm-16.png" alt="red#" title="red#" />matrix</a>',
                '<a href="http://redmatrix.me/">red<img class="smiley" src="' . System::baseUrl() . '/images/rm-16.png" alt="red#matrix" title="red#matrix" />matrix</a>'
-               );
+               ];
 
-               $params = array('texts' => $texts, 'icons' => $icons);
+               $params = ['texts' => $texts, 'icons' => $icons];
                call_hooks('smilie', $params);
 
                return $params;
@@ -175,7 +175,7 @@ class Smilies
                $params = self::getList();
 
                if ($no_images) {
-                       $cleaned = array('texts' => array(), 'icons' => array());
+                       $cleaned = ['texts' => [], 'icons' => []];
                        $icons = $params['icons'];
                        foreach ($icons as $key => $icon) {
                                if (!strstr($icon, '<img ')) {
index 0d3c2ebe9348d0f433b43f7e926792c74b5fe24e..05ccdd4feca7e07febc8245ac9ae2296906832d2 100644 (file)
@@ -146,8 +146,8 @@ class Cache
                        $memcache->set(get_app()->get_hostname().":".$key, serialize($value), MEMCACHE_COMPRESSED, self::duration($duration));
                        return;
                }
-               $fields = array('v' => serialize($value), 'expire_mode' => $duration, 'updated' => datetime_convert());
-               $condition = array('k' => $key);
+               $fields = ['v' => serialize($value), 'expire_mode' => $duration, 'updated' => datetime_convert()];
+               $condition = ['k' => $key];
                dba::update('cache', $fields, $condition, true);
        }
 
@@ -163,68 +163,68 @@ class Cache
                // Clear long lasting cache entries only once a day
                if (Config::get("system", "cache_cleared_day") < time() - self::duration(CACHE_DAY)) {
                        if ($max_level == CACHE_MONTH) {
-                               $condition = array("`updated` < ? AND `expire_mode` = ?",
+                               $condition = ["`updated` < ? AND `expire_mode` = ?",
                                                datetime_convert('UTC', 'UTC', "now - 30 days"),
-                                               CACHE_MONTH);
+                                               CACHE_MONTH];
                                dba::delete('cache', $condition);
                        }
 
                        if ($max_level <= CACHE_WEEK) {
-                               $condition = array("`updated` < ? AND `expire_mode` = ?",
+                               $condition = ["`updated` < ? AND `expire_mode` = ?",
                                                datetime_convert('UTC', 'UTC', "now - 7 days"),
-                                               CACHE_WEEK);
+                                               CACHE_WEEK];
                                dba::delete('cache', $condition);
                        }
 
                        if ($max_level <= CACHE_DAY) {
-                               $condition = array("`updated` < ? AND `expire_mode` = ?",
+                               $condition = ["`updated` < ? AND `expire_mode` = ?",
                                                datetime_convert('UTC', 'UTC', "now - 1 days"),
-                                               CACHE_DAY);
+                                               CACHE_DAY];
                                dba::delete('cache', $condition);
                        }
                        Config::set("system", "cache_cleared_day", time());
                }
 
                if (($max_level <= CACHE_HOUR) && (Config::get("system", "cache_cleared_hour")) < time() - self::duration(CACHE_HOUR)) {
-                       $condition = array("`updated` < ? AND `expire_mode` = ?",
+                       $condition = ["`updated` < ? AND `expire_mode` = ?",
                                        datetime_convert('UTC', 'UTC', "now - 1 hours"),
-                                       CACHE_HOUR);
+                                       CACHE_HOUR];
                        dba::delete('cache', $condition);
 
                        Config::set("system", "cache_cleared_hour", time());
                }
 
                if (($max_level <= CACHE_HALF_HOUR) && (Config::get("system", "cache_cleared_half_hour")) < time() - self::duration(CACHE_HALF_HOUR)) {
-                       $condition = array("`updated` < ? AND `expire_mode` = ?",
+                       $condition = ["`updated` < ? AND `expire_mode` = ?",
                                        datetime_convert('UTC', 'UTC', "now - 30 minutes"),
-                                       CACHE_HALF_HOUR);
+                                       CACHE_HALF_HOUR];
                        dba::delete('cache', $condition);
 
                        Config::set("system", "cache_cleared_half_hour", time());
                }
 
                if (($max_level <= CACHE_QUARTER_HOUR) && (Config::get("system", "cache_cleared_quarter_hour")) < time() - self::duration(CACHE_QUARTER_HOUR)) {
-                       $condition = array("`updated` < ? AND `expire_mode` = ?",
+                       $condition = ["`updated` < ? AND `expire_mode` = ?",
                                        datetime_convert('UTC', 'UTC', "now - 15 minutes"),
-                                       CACHE_QUARTER_HOUR);
+                                       CACHE_QUARTER_HOUR];
                        dba::delete('cache', $condition);
 
                        Config::set("system", "cache_cleared_quarter_hour", time());
                }
 
                if (($max_level <= CACHE_FIVE_MINUTES) && (Config::get("system", "cache_cleared_five_minute")) < time() - self::duration(CACHE_FIVE_MINUTES)) {
-                       $condition = array("`updated` < ? AND `expire_mode` = ?",
+                       $condition = ["`updated` < ? AND `expire_mode` = ?",
                                        datetime_convert('UTC', 'UTC', "now - 5 minutes"),
-                                       CACHE_FIVE_MINUTES);
+                                       CACHE_FIVE_MINUTES];
                        dba::delete('cache', $condition);
 
                        Config::set("system", "cache_cleared_five_minute", time());
                }
 
                if (($max_level <= CACHE_MINUTE) && (Config::get("system", "cache_cleared_minute")) < time() - self::duration(CACHE_MINUTE)) {
-                       $condition = array("`updated` < ? AND `expire_mode` = ?",
+                       $condition = ["`updated` < ? AND `expire_mode` = ?",
                                        datetime_convert('UTC', 'UTC', "now - 1 minutes"),
-                                       CACHE_MINUTE);
+                                       CACHE_MINUTE];
                        dba::delete('cache', $condition);
 
                        Config::set("system", "cache_cleared_minute", time());
index b0c05fff8d4f1eb17714ff899ba19b85dd940dbd..5e162a3fa4e36536c9dbb562071b669099d7396a 100644 (file)
@@ -49,7 +49,7 @@ class Config
 
                $a = get_app();
 
-               $r = dba::select('config', array('v', 'k'), array('cat' => $family));
+               $r = dba::select('config', ['v', 'k'], ['cat' => $family]);
                while ($rr = dba::fetch($r)) {
                        $k = $rr['k'];
                        if ($family === 'config') {
@@ -161,7 +161,7 @@ class Config
                // manage array value
                $dbvalue = (is_array($value) ? serialize($value) : $dbvalue);
 
-               $ret = dba::update('config', array('v' => $dbvalue), array('cat' => $family, 'k' => $key), true);
+               $ret = dba::update('config', ['v' => $dbvalue], ['cat' => $family, 'k' => $key], true);
 
                if ($ret) {
                        self::$in_db[$family][$key] = true;
@@ -188,7 +188,7 @@ class Config
                        unset(self::$in_db[$family][$key]);
                }
 
-               $ret = dba::delete('config', array('cat' => $family, 'k' => $key));
+               $ret = dba::delete('config', ['cat' => $family, 'k' => $key]);
 
                return $ret;
        }
index e3f3da49830036d7beb9fc260891421212eac770..f78e99db55c1dc28273860ecde06087bfc802fae 100644 (file)
@@ -40,7 +40,7 @@ class NotificationsManager extends BaseObject
         */
        private function _set_extra($notes)
        {
-               $rets = array();
+               $rets = [];
                foreach ($notes as $n) {
                        $local_time = datetime_convert('UTC', date_default_timezone_get(), $n['date']);
                        $n['timestamp'] = strtotime($local_time);
@@ -63,9 +63,9 @@ class NotificationsManager extends BaseObject
         *
         * @return array of results or false on errors
         */
-       public function getAll($filter = array(), $order = "-date", $limit = "")
+       public function getAll($filter = [], $order = "-date", $limit = "")
        {
-               $filter_str = array();
+               $filter_str = [];
                $filter_sql = "";
                foreach ($filter as $column => $value) {
                        $filter_str[] = sprintf("`%s` = '%s'", $column, dbesc($value));
@@ -75,7 +75,7 @@ class NotificationsManager extends BaseObject
                }
 
                $aOrder = explode(" ", $order);
-               $asOrder = array();
+               $asOrder = [];
                foreach ($aOrder as $o) {
                        $dir = "asc";
                        if ($o[0] === "-") {
@@ -165,43 +165,43 @@ class NotificationsManager extends BaseObject
         */
        public function getTabs()
        {
-               $tabs = array(
-                       array(
+               $tabs = [
+                       [
                                'label' => t('System'),
                                'url'   => 'notifications/system',
                                'sel'   => ((self::getApp()->argv[1] == 'system') ? 'active' : ''),
                                'id'    => 'system-tab',
                                'accesskey' => 'y',
-                       ),
-                       array(
+                       ],
+                       [
                                'label' => t('Network'),
                                'url'   => 'notifications/network',
                                'sel'   => ((self::getApp()->argv[1] == 'network') ? 'active' : ''),
                                'id'    => 'network-tab',
                                'accesskey' => 'w',
-                       ),
-                       array(
+                       ],
+                       [
                                'label' => t('Personal'),
                                'url'   => 'notifications/personal',
                                'sel'   => ((self::getApp()->argv[1] == 'personal') ? 'active' : ''),
                                'id'    => 'personal-tab',
                                'accesskey' => 'r',
-                       ),
-                       array(
+                       ],
+                       [
                                'label' => t('Home'),
                                'url'   => 'notifications/home',
                                'sel'   => ((self::getApp()->argv[1] == 'home') ? 'active' : ''),
                                'id'    => 'home-tab',
                                'accesskey' => 'h',
-                       ),
-                       array(
+                       ],
+                       [
                                'label' => t('Introductions'),
                                'url'   => 'notifications/intros',
                                'sel'   => ((self::getApp()->argv[1] == 'intros') ? 'active' : ''),
                                'id'    => 'intro-tab',
                                'accesskey' => 'i',
-                       ),
-               );
+                       ],
+               ];
 
                return $tabs;
        }
@@ -223,8 +223,8 @@ class NotificationsManager extends BaseObject
         */
        private function formatNotifs($notifs, $ident = "")
        {
-               $notif = array();
-               $arr = array();
+               $notif = [];
+               $arr = [];
 
                if (DBM::is_result($notifs)) {
                        foreach ($notifs as $it) {
@@ -272,7 +272,7 @@ class NotificationsManager extends BaseObject
                                // Transform the different types of notification in an usable array
                                switch ($it['verb']) {
                                        case ACTIVITY_LIKE:
-                                               $notif = array(
+                                               $notif = [
                                                        'label' => 'like',
                                                        'link' => System::baseUrl(true) . '/display/' . $it['pguid'],
                                                        'image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
@@ -281,11 +281,11 @@ class NotificationsManager extends BaseObject
                                                        'when' => $default_item_when,
                                                        'ago' => $default_item_ago,
                                                        'seen' => $it['seen']
-                                               );
+                                               ];
                                                break;
 
                                        case ACTIVITY_DISLIKE:
-                                               $notif = array(
+                                               $notif = [
                                                        'label' => 'dislike',
                                                        'link' => System::baseUrl(true) . '/display/' . $it['pguid'],
                                                        'image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
@@ -294,11 +294,11 @@ class NotificationsManager extends BaseObject
                                                        'when' => $default_item_when,
                                                        'ago' => $default_item_ago,
                                                        'seen' => $it['seen']
-                                               );
+                                               ];
                                                break;
 
                                        case ACTIVITY_ATTEND:
-                                               $notif = array(
+                                               $notif = [
                                                        'label' => 'attend',
                                                        'link' => System::baseUrl(true) . '/display/' . $it['pguid'],
                                                        'image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
@@ -307,11 +307,11 @@ class NotificationsManager extends BaseObject
                                                        'when' => $default_item_when,
                                                        'ago' => $default_item_ago,
                                                        'seen' => $it['seen']
-                                               );
+                                               ];
                                                break;
 
                                        case ACTIVITY_ATTENDNO:
-                                               $notif = array(
+                                               $notif = [
                                                        'label' => 'attendno',
                                                        'link' => System::baseUrl(true) . '/display/' . $it['pguid'],
                                                        'image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
@@ -320,11 +320,11 @@ class NotificationsManager extends BaseObject
                                                        'when' => $default_item_when,
                                                        'ago' => $default_item_ago,
                                                        'seen' => $it['seen']
-                                               );
+                                               ];
                                                break;
 
                                        case ACTIVITY_ATTENDMAYBE:
-                                               $notif = array(
+                                               $notif = [
                                                        'label' => 'attendmaybe',
                                                        'link' => System::baseUrl(true) . '/display/' . $it['pguid'],
                                                        'image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
@@ -333,7 +333,7 @@ class NotificationsManager extends BaseObject
                                                        'when' => $default_item_when,
                                                        'ago' => $default_item_ago,
                                                        'seen' => $it['seen']
-                                               );
+                                               ];
                                                break;
 
                                        case ACTIVITY_FRIEND:
@@ -341,7 +341,7 @@ class NotificationsManager extends BaseObject
                                                $obj = parse_xml_string($xmlhead . $it['object']);
                                                $it['fname'] = $obj->title;
 
-                                               $notif = array(
+                                               $notif = [
                                                        'label' => 'friend',
                                                        'link' => System::baseUrl(true) . '/display/' . $it['pguid'],
                                                        'image' => proxy_url($it['author-avatar'], false, PROXY_SIZE_MICRO),
@@ -350,11 +350,11 @@ class NotificationsManager extends BaseObject
                                                        'when' => $default_item_when,
                                                        'ago' => $default_item_ago,
                                                        'seen' => $it['seen']
-                                               );
+                                               ];
                                                break;
 
                                        default:
-                                               $notif = array(
+                                               $notif = [
                                                        'label' => $default_item_label,
                                                        'link' => $default_item_link,
                                                        'image' => $default_item_image,
@@ -363,7 +363,7 @@ class NotificationsManager extends BaseObject
                                                        'when' => $default_item_when,
                                                        'ago' => $default_item_ago,
                                                        'seen' => $it['seen']
-                                               );
+                                               ];
                                }
 
                                $arr[] = $notif;
@@ -420,7 +420,7 @@ class NotificationsManager extends BaseObject
        {
                $ident = 'network';
                $total = $this->networkTotal($seen);
-               $notifs = array();
+               $notifs = [];
                $sql_seen = "";
 
                if ($seen === 0) {
@@ -496,7 +496,7 @@ class NotificationsManager extends BaseObject
        {
                $ident = 'system';
                $total = $this->systemTotal($seen);
-               $notifs = array();
+               $notifs = [];
                $sql_seen = "";
 
                if ($seen === 0) {
@@ -532,7 +532,7 @@ class NotificationsManager extends BaseObject
        {
                $myurl = System::baseUrl(true) . '/profile/' . self::getApp()->user['nickname'];
                $myurl = substr($myurl, strpos($myurl, '://') + 3);
-               $myurl = str_replace(array('www.', '.'), array('', '\\.'), $myurl);
+               $myurl = str_replace(['www.', '.'], ['', '\\.'], $myurl);
                $diasp_url = str_replace('/profile/', '/u/', $myurl);
                $sql_extra = sprintf(
                        " AND ( `item`.`author-link` regexp '%s' OR `item`.`tag` regexp '%s' OR `item`.`tag` regexp '%s' ) ",
@@ -594,7 +594,7 @@ class NotificationsManager extends BaseObject
                $ident = 'personal';
                $total = $this->personalTotal($seen);
                $sql_extra = $this->personalSqlExtra();
-               $notifs = array();
+               $notifs = [];
                $sql_seen = "";
 
                if ($seen === 0) {
@@ -619,11 +619,11 @@ class NotificationsManager extends BaseObject
                        $notifs = $this->formatNotifs($r, $ident);
                }
 
-               $arr = array(
+               $arr = [
                        'notifications' => $notifs,
                        'ident' => $ident,
                        'total' => $total,
-               );
+               ];
 
                return $arr;
        }
@@ -674,7 +674,7 @@ class NotificationsManager extends BaseObject
        {
                $ident = 'home';
                $total = $this->homeTotal($seen);
-               $notifs = array();
+               $notifs = [];
                $sql_seen = "";
 
                if ($seen === 0) {
@@ -752,7 +752,7 @@ class NotificationsManager extends BaseObject
        {
                $ident = 'introductions';
                $total = $this->introTotal($all);
-               $notifs = array();
+               $notifs = [];
                $sql_extra = "";
 
                if (!$all) {
@@ -807,7 +807,7 @@ class NotificationsManager extends BaseObject
                        if ($it['fid']) {
                                $return_addr = bin2hex(self::getApp()->user['nickname'] . '@' . self::getApp()->get_hostname() . ((self::getApp()->path) ? '/' . self::getApp()->path : ''));
 
-                               $intro = array(
+                               $intro = [
                                        'label' => 'friend_suggestion',
                                        'notify_type' => t('Friend Suggestion'),
                                        'intro_id' => $it['intro_id'],
@@ -821,7 +821,7 @@ class NotificationsManager extends BaseObject
                                        'knowyou' => $knowyou,
                                        'note' => $it['note'],
                                        'request' => $it['frequest'] . '?addr=' . $return_addr,
-                               );
+                               ];
 
                                // Normal connection requests
                        } else {
@@ -833,7 +833,7 @@ class NotificationsManager extends BaseObject
                                        $it['gabout'] = "";
                                        $it['ggender'] = "";
                                }
-                               $intro = array(
+                               $intro = [
                                        'label' => (($it['network'] !== NETWORK_OSTATUS) ? 'friend_request' : 'follower'),
                                        'notify_type' => (($it['network'] !== NETWORK_OSTATUS) ? t('Friend/Connect Request') : t('New Follower')),
                                        'dfrn_id' => $it['issued-id'],
@@ -854,7 +854,7 @@ class NotificationsManager extends BaseObject
                                        'network' => $it['gnetwork'],
                                        'knowyou' => $it['knowyou'],
                                        'note' => $it['note'],
-                               );
+                               ];
                        }
 
                        $arr[] = $intro;
index ad658f8f8ad77ebcdab8ae1ad61cba9b3bf3b07d..82d46908388e3131c7768c63a051fbf917d3c405 100644 (file)
@@ -41,7 +41,7 @@ class PConfig
        {
                $a = get_app();
 
-               $r = dba::select('pconfig', array('v', 'k'), array('cat' => $family, 'uid' => $uid));
+               $r = dba::select('pconfig', ['v', 'k'], ['cat' => $family, 'uid' => $uid]);
                if (DBM::is_result($r)) {
                        while ($rr = dba::fetch($r)) {
                                $k = $rr['k'];
@@ -140,7 +140,7 @@ class PConfig
                // manage array value
                $dbvalue = (is_array($value) ? serialize($value) : $dbvalue);
 
-               $ret = dba::update('pconfig', array('v' => $dbvalue), array('uid' => $uid, 'cat' => $family, 'k' => $key), true);
+               $ret = dba::update('pconfig', ['v' => $dbvalue], ['uid' => $uid, 'cat' => $family, 'k' => $key], true);
 
                if ($ret) {
                        self::$in_db[$uid][$family][$key] = true;
@@ -170,7 +170,7 @@ class PConfig
                        unset(self::$in_db[$uid][$family][$key]);
                }
 
-               $ret = dba::delete('pconfig', array('uid' => $uid, 'cat' => $family, 'k' => $key));
+               $ret = dba::delete('pconfig', ['uid' => $uid, 'cat' => $family, 'k' => $key]);
 
                return $ret;
        }
index 4ec5b2ad352480fe259757a9e8f84f467f8413ff..469016770c5b69b5532975d8b49b1546f6d82c55 100644 (file)
@@ -54,12 +54,12 @@ class System extends BaseObject
                array_shift($trace);
                array_shift($trace);
 
-               $callstack = array();
+               $callstack = [];
                $counter = 0;
-               $previous = array('class' => '', 'function' => '');
+               $previous = ['class' => '', 'function' => ''];
 
                // The ignore list contains all functions that are only wrapper functions
-               $ignore = array('get_config', 'get_pconfig', 'set_config', 'set_pconfig', 'fetch_url', 'probe_url');
+               $ignore = ['get_config', 'get_pconfig', 'set_config', 'set_pconfig', 'fetch_url', 'probe_url'];
 
                while ($func = array_pop($trace)) {
                        if (!empty($func['class'])) {
@@ -75,7 +75,7 @@ class System extends BaseObject
                        }
                }
 
-               $callstack2 = array();
+               $callstack2 = [];
                while ((count($callstack2) < $depth) && (count($callstack) > 0)) {
                        $callstack2[] = array_pop($callstack);
                }
index 5ad4f5777967e00c2e2986c52da06f6020db233a..f3170c71519520ccf5bf017d536e611d974f36ca 100644 (file)
@@ -27,7 +27,7 @@ class UserImport
                if (self::IMPORT_DEBUG) {
                        return 1;
                }
-       
+
                return dba::lastInsertId();
        }
 
@@ -42,7 +42,7 @@ class UserImport
                $query = sprintf("SHOW COLUMNS IN `%s`", dbesc($table));
                logger("uimport: $query", LOGGER_DEBUG);
                $r = q($query);
-               $tcols = array();
+               $tcols = [];
                // get a plain array of column names
                foreach ($r as $tcol) {
                        $tcols[] = $tcol['Field'];
@@ -156,7 +156,7 @@ class UserImport
                unset($account['user']['expire_notification_sent']);
 
                $callback = function (&$value) use ($oldbaseurl, $oldaddr, $newbaseurl, $newaddr) {
-                       $value =  str_replace(array($oldbaseurl, $oldaddr), array($newbaseurl, $newaddr), $value);
+                       $value =  str_replace([$oldbaseurl, $oldaddr], [$newbaseurl, $newaddr], $value);
                };
 
                array_walk($account['user'], $callback);
@@ -177,8 +177,8 @@ class UserImport
 
                foreach ($account['profile'] as &$profile) {
                        foreach ($profile as $k => &$v) {
-                               $v = str_replace(array($oldbaseurl, $oldaddr), array($newbaseurl, $newaddr), $v);
-                               foreach (array("profile", "avatar") as $k) {
+                               $v = str_replace([$oldbaseurl, $oldaddr], [$newbaseurl, $newaddr], $v);
+                               foreach (["profile", "avatar"] as $k) {
                                        $v = str_replace($oldbaseurl . "/photo/" . $k . "/" . $olduid . ".jpg", $newbaseurl . "/photo/" . $k . "/" . $newuid . ".jpg", $v);
                                }
                        }
@@ -187,7 +187,7 @@ class UserImport
                        if ($r === false) {
                                logger("uimport:insert profile " . $profile['profile-name'] . " : ERROR : " . dba::errorMessage(), LOGGER_NORMAL);
                                info(t("User profile creation error"));
-                               dba::delete('user', array('uid' => $newuid));
+                               dba::delete('user', ['uid' => $newuid]);
                                return;
                        }
                }
@@ -196,8 +196,8 @@ class UserImport
                foreach ($account['contact'] as &$contact) {
                        if ($contact['uid'] == $olduid && $contact['self'] == '1') {
                                foreach ($contact as $k => &$v) {
-                                       $v = str_replace(array($oldbaseurl, $oldaddr), array($newbaseurl, $newaddr), $v);
-                                       foreach (array("profile", "avatar", "micro") as $k) {
+                                       $v = str_replace([$oldbaseurl, $oldaddr], [$newbaseurl, $newaddr], $v);
+                                       foreach (["profile", "avatar", "micro"] as $k) {
                                                $v = str_replace($oldbaseurl . "/photo/" . $k . "/" . $olduid . ".jpg", $newbaseurl . "/photo/" . $k . "/" . $newuid . ".jpg", $v);
                                        }
                                }
index 48f689d61dea81d5fe43bf047c92e92991aa463e..da7425a61682ae22d315e99f9567450baadf5798 100644 (file)
@@ -164,7 +164,7 @@ class Worker
         */
        private static function highestPriority()
        {
-               $condition = array("`executed` <= ? AND NOT `done`", NULL_DATE);
+               $condition = ["`executed` <= ? AND NOT `done`", NULL_DATE];
                $workerqueue = dba::selectFirst('workerqueue', ['priority'], $condition, ['order' => ['priority']]);
                if (DBM::is_result($workerqueue)) {
                        return $workerqueue["priority"];
@@ -182,7 +182,7 @@ class Worker
         */
        private static function processWithPriorityActive($priority)
        {
-               $condition = array("`priority` <= ? AND `executed` > ? AND NOT `done`", $priority, NULL_DATE);
+               $condition = ["`priority` <= ? AND `executed` > ? AND NOT `done`", $priority, NULL_DATE];
                return dba::exists('workerqueue', $condition);
        }
 
@@ -233,7 +233,7 @@ class Worker
 
                        if ($age > 1) {
                                $stamp = (float)microtime(true);
-                               dba::update('workerqueue', array('executed' => datetime_convert()), array('pid' => $mypid, 'done' => false));
+                               dba::update('workerqueue', ['executed' => datetime_convert()], ['pid' => $mypid, 'done' => false]);
                                self::$db_duration += (microtime(true) - $stamp);
                        }
 
@@ -242,7 +242,7 @@ class Worker
                        self::execFunction($queue, $include, $argv, true);
 
                        $stamp = (float)microtime(true);
-                       if (dba::update('workerqueue', array('done' => true), array('id' => $queue["id"]))) {
+                       if (dba::update('workerqueue', ['done' => true], ['id' => $queue["id"]])) {
                                Config::set('system', 'last_poller_execution', datetime_convert());
                        }
                        self::$db_duration = (microtime(true) - $stamp);
@@ -257,7 +257,7 @@ class Worker
 
                if (!validate_include($include)) {
                        logger("Include file ".$argv[0]." is not valid!");
-                       dba::delete('workerqueue', array('id' => $queue["id"]));
+                       dba::delete('workerqueue', ['id' => $queue["id"]]);
                        return true;
                }
 
@@ -276,20 +276,20 @@ class Worker
 
                        if ($age > 1) {
                                $stamp = (float)microtime(true);
-                               dba::update('workerqueue', array('executed' => datetime_convert()), array('pid' => $mypid, 'done' => false));
+                               dba::update('workerqueue', ['executed' => datetime_convert()], ['pid' => $mypid, 'done' => false]);
                                self::$db_duration += (microtime(true) - $stamp);
                        }
 
                        self::execFunction($queue, $funcname, $argv, false);
 
                        $stamp = (float)microtime(true);
-                       if (dba::update('workerqueue', array('done' => true), array('id' => $queue["id"]))) {
+                       if (dba::update('workerqueue', ['done' => true], ['id' => $queue["id"]])) {
                                Config::set('system', 'last_poller_execution', datetime_convert());
                        }
                        self::$db_duration = (microtime(true) - $stamp);
                } else {
                        logger("Function ".$funcname." does not exist");
-                       dba::delete('workerqueue', array('id' => $queue["id"]));
+                       dba::delete('workerqueue', ['id' => $queue["id"]]);
                }
 
                return true;
@@ -330,7 +330,7 @@ class Worker
                        $a->performance["parser"] = 0;
                        $a->performance["marktime"] = 0;
                        $a->performance["markstart"] = microtime(true);
-                       $a->callstack = array();
+                       $a->callstack = [];
                }
 
                // For better logging create a new process id for every worker call
@@ -528,27 +528,27 @@ class Worker
        {
                $entries = dba::select(
                        'workerqueue',
-                       array('id', 'pid', 'executed', 'priority', 'parameter'),
-                       array('`executed` > ? AND NOT `done` AND `pid` != 0', NULL_DATE),
-                       array('order' => array('priority', 'created'))
+                       ['id', 'pid', 'executed', 'priority', 'parameter'],
+                       ['`executed` > ? AND NOT `done` AND `pid` != 0', NULL_DATE],
+                       ['order' => ['priority', 'created']]
                );
 
                while ($entry = dba::fetch($entries)) {
                        if (!posix_kill($entry["pid"], 0)) {
                                dba::update(
                                        'workerqueue',
-                                       array('executed' => NULL_DATE, 'pid' => 0),
-                                       array('id' => $entry["id"])
+                                       ['executed' => NULL_DATE, 'pid' => 0],
+                                       ['id' => $entry["id"]]
                                );
                        } else {
                                // Kill long running processes
                                // Check if the priority is in a valid range
-                               if (!in_array($entry["priority"], array(PRIORITY_CRITICAL, PRIORITY_HIGH, PRIORITY_MEDIUM, PRIORITY_LOW, PRIORITY_NEGLIGIBLE))) {
+                               if (!in_array($entry["priority"], [PRIORITY_CRITICAL, PRIORITY_HIGH, PRIORITY_MEDIUM, PRIORITY_LOW, PRIORITY_NEGLIGIBLE])) {
                                        $entry["priority"] = PRIORITY_MEDIUM;
                                }
 
                                // Define the maximum durations
-                               $max_duration_defaults = array(PRIORITY_CRITICAL => 720, PRIORITY_HIGH => 10, PRIORITY_MEDIUM => 60, PRIORITY_LOW => 180, PRIORITY_NEGLIGIBLE => 720);
+                               $max_duration_defaults = [PRIORITY_CRITICAL => 720, PRIORITY_HIGH => 10, PRIORITY_MEDIUM => 60, PRIORITY_LOW => 180, PRIORITY_NEGLIGIBLE => 720];
                                $max_duration = $max_duration_defaults[$entry["priority"]];
 
                                $argv = json_decode($entry["parameter"]);
@@ -572,8 +572,8 @@ class Worker
                                        }
                                        dba::update(
                                                'workerqueue',
-                                               array('executed' => NULL_DATE, 'created' => datetime_convert(), 'priority' => $new_priority, 'pid' => 0),
-                                               array('id' => $entry["id"])
+                                               ['executed' => NULL_DATE, 'created' => datetime_convert(), 'priority' => $new_priority, 'pid' => 0],
+                                               ['id' => $entry["id"]]
                                        );
                                } else {
                                        logger("Worker process ".$entry["pid"]." (".implode(" ", $argv).") now runs for ".round($duration)." of ".$max_duration." allowed minutes. That's okay.", LOGGER_DEBUG);
@@ -610,7 +610,7 @@ class Worker
 
                        if (Config::get('system', 'worker_debug')) {
                                // Create a list of queue entries grouped by their priority
-                               $listitem = array();
+                               $listitem = [];
 
                                // Adding all processes with no workerqueue entry
                                $processes = dba::p(
@@ -636,8 +636,8 @@ class Worker
                                }
                                dba::close($entries);
 
-                               $intervals = array(1, 10, 60);
-                               $jobs_per_minute = array();
+                               $intervals = [1, 10, 60];
+                               $jobs_per_minute = [];
                                foreach ($intervals as $interval) {
                                        $jobs = dba::p("SELECT COUNT(*) AS `jobs` FROM `workerqueue` WHERE `done` AND `executed` > UTC_TIMESTAMP() - INTERVAL ".intval($interval)." MINUTE");
                                        if ($job = dba::fetch($jobs)) {
@@ -707,7 +707,7 @@ class Worker
                if (!DBM::is_result($r)) {
                        return false;
                }
-               $priorities = array();
+               $priorities = [];
                while ($line = dba::fetch($r)) {
                        $priorities[] = $line["priority"];
                }
@@ -823,7 +823,7 @@ class Worker
                if ($found) {
                        $condition = "`id` IN (".substr(str_repeat("?, ", count($ids)), 0, -2).") AND `pid` = 0 AND NOT `done`";
                        array_unshift($ids, $condition);
-                       dba::update('workerqueue', array('executed' => datetime_convert(), 'pid' => $mypid), $ids);
+                       dba::update('workerqueue', ['executed' => datetime_convert(), 'pid' => $mypid], $ids);
                }
 
                return $found;
@@ -840,7 +840,7 @@ class Worker
                $stamp = (float)microtime(true);
 
                // There can already be jobs for us in the queue.
-               $r = dba::select('workerqueue', array(), array('pid' => getmypid(), 'done' => false));
+               $r = dba::select('workerqueue', [], ['pid' => getmypid(), 'done' => false]);
                if (DBM::is_result($r)) {
                        self::$db_duration += (microtime(true) - $stamp);
                        return dba::inArray($r);
@@ -860,7 +860,7 @@ class Worker
                Lock::remove('poller_worker_process');
 
                if ($found) {
-                       $r = dba::select('workerqueue', array(), array('pid' => getmypid(), 'done' => false));
+                       $r = dba::select('workerqueue', [], ['pid' => getmypid(), 'done' => false]);
                        return dba::inArray($r);
                }
                return false;
@@ -874,7 +874,7 @@ class Worker
        {
                $mypid = getmypid();
 
-               dba::update('workerqueue', array('executed' => NULL_DATE, 'pid' => 0), array('pid' => $mypid, 'done' => false));
+               dba::update('workerqueue', ['executed' => NULL_DATE, 'pid' => 0], ['pid' => $mypid, 'done' => false]);
        }
 
        /**
@@ -950,8 +950,8 @@ class Worker
                $timeout = Config::get("system", "frontend_worker_timeout", 10);
 
                /// @todo We should clean up the corresponding workerqueue entries as well
-               $condition = array("`created` < ? AND `command` = 'worker.php'",
-                               datetime_convert('UTC', 'UTC', "now - ".$timeout." minutes"));
+               $condition = ["`created` < ? AND `command` = 'worker.php'",
+                               datetime_convert('UTC', 'UTC', "now - ".$timeout." minutes")];
                dba::delete('process', $condition);
        }
 
@@ -981,7 +981,7 @@ class Worker
         */
        public static function spawnWorker()
        {
-               $args = array("scripts/worker.php", "no_cron");
+               $args = ["scripts/worker.php", "no_cron"];
                get_app()->proc_run($args);
        }
 
@@ -1005,7 +1005,7 @@ class Worker
        {
                $proc_args = func_get_args();
 
-               $args = array();
+               $args = [];
                if (!count($proc_args)) {
                        return false;
                }
@@ -1029,7 +1029,7 @@ class Worker
                // Now we add the run parameters back to the array
                array_unshift($args, $run_parameter);
 
-               $arr = array('args' => $args, 'run_cmd' => true);
+               $arr = ['args' => $args, 'run_cmd' => true];
 
                call_hooks("proc_run", $arr);
                if (!$arr['run_cmd'] || !count($args)) {
@@ -1058,7 +1058,7 @@ class Worker
                array_shift($argv);
 
                $parameters = json_encode($argv);
-               $found = dba::exists('workerqueue', array('parameter' => $parameters, 'done' => false));
+               $found = dba::exists('workerqueue', ['parameter' => $parameters, 'done' => false]);
 
                // Quit if there was a database error - a precaution for the update process to 3.5.3
                if (dba::errorNo() != 0) {
@@ -1066,7 +1066,7 @@ class Worker
                }
 
                if (!$found) {
-                       dba::insert('workerqueue', array('parameter' => $parameters, 'created' => $created, 'priority' => $priority));
+                       dba::insert('workerqueue', ['parameter' => $parameters, 'created' => $created, 'priority' => $priority]);
                }
 
                // Should we quit and wait for the worker to be called as a cronjob?
index e59249e1b9b266b66429949930361229e9e7b415..8a57d04a60080f28cd0cf02e86f60759b48fb12a 100644 (file)
@@ -25,15 +25,15 @@ class DBM
        public static function processlist()
        {
                $r = q("SHOW PROCESSLIST");
-               $s = array();
+               $s = [];
 
                $processes = 0;
-               $states = array();
+               $states = [];
                foreach ($r as $process) {
                        $state = trim($process["State"]);
 
                        // Filter out all non blocking processes
-                       if (!in_array($state, array("", "init", "statistics", "updating"))) {
+                       if (!in_array($state, ["", "init", "statistics", "updating"])) {
                                ++$states[$state];
                                ++$processes;
                        }
@@ -46,7 +46,7 @@ class DBM
                        }
                        $statelist .= $state.": ".$usage;
                }
-               return(array("list" => $statelist, "amount" => $processes));
+               return(["list" => $statelist, "amount" => $processes]);
        }
 
        /**
index 9e0f3eeacde36a998ec44457c33f2698e9ffb303..91a8ffdaf5d8691b5f046971885831ae3ab4e8c1 100644 (file)
@@ -79,12 +79,12 @@ class DBStructure {
                        $preamble = sprintf($preamble, $update_id);
                        $body = sprintf($body, $error_message);
 
-                       notification(array(
+                       notification([
                                'type' => SYSTEM_EMAIL,
                                'to_email' => $admin['email'],
                                'preamble' => $preamble,
                                'body' => $body,
-                               'language' => $lang)
+                               'language' => $lang]
                        );
                }
 
@@ -105,16 +105,16 @@ class DBStructure {
                if (DBM::is_result($table_status)) {
                        $table_status = $table_status[0];
                } else {
-                       $table_status = array();
+                       $table_status = [];
                }
 
-               $fielddata = array();
-               $indexdata = array();
+               $fielddata = [];
+               $indexdata = [];
 
                if (DBM::is_result($indexes)) {
                        foreach ($indexes AS $index) {
                                if ($index['Key_name'] != 'PRIMARY' && $index['Non_unique'] == '0' && !isset($indexdata[$index["Key_name"]])) {
-                                       $indexdata[$index["Key_name"]] = array('UNIQUE');
+                                       $indexdata[$index["Key_name"]] = ['UNIQUE'];
                                }
 
                                $column = $index["Column_name"];
@@ -158,7 +158,7 @@ class DBStructure {
                        }
                }
 
-               return array("fields" => $fielddata, "indexes" => $indexdata, "table_status" => $table_status);
+               return ["fields" => $fielddata, "indexes" => $indexdata, "table_status" => $table_status];
        }
 
        public static function printStructure() {
@@ -212,7 +212,7 @@ class DBStructure {
                logger('updating structure', LOGGER_DEBUG);
 
                // Get the current structure
-               $database = array();
+               $database = [];
 
                if (is_null($tables)) {
                        $tables = q("SHOW TABLES");
@@ -553,8 +553,8 @@ class DBStructure {
        private static function createTable($name, $fields, $verbose, $action, $indexes=null) {
                $r = true;
 
-               $sql_rows = array();
-               $primary_keys = array();
+               $sql_rows = [];
+               $primary_keys = [];
                foreach ($fields AS $fieldname => $field) {
                        $sql_rows[] = "`".dbesc($fieldname)."` ".self::FieldCommand($field);
                        if (x($field,'primary') && $field['primary']!='') {
@@ -658,1131 +658,1131 @@ class DBStructure {
        }
 
        public static function definition() {
-               $database = array();
+               $database = [];
 
-               $database["addon"] = array(
+               $database["addon"] = [
                                "comment" => "registered plugins",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "name" => array("type" => "varchar(190)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "version" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "installed" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "hidden" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "timestamp" => array("type" => "bigint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "plugin_admin" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "name" => array("UNIQUE", "name"),
-                                               )
-                               );
-               $database["attach"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "name" => ["type" => "varchar(190)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "version" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "installed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "timestamp" => ["type" => "bigint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "plugin_admin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "name" => ["UNIQUE", "name"],
+                                               ]
+                               ];
+               $database["attach"] = [
                                "comment" => "file attachments",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "hash" => array("type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "filename" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "filetype" => array("type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "filesize" => array("type" => "int", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "data" => array("type" => "longblob", "not null" => "1", "comment" => ""),
-                                               "created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "edited" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "allow_cid" => array("type" => "mediumtext", "comment" => ""),
-                                               "allow_gid" => array("type" => "mediumtext", "comment" => ""),
-                                               "deny_cid" => array("type" => "mediumtext", "comment" => ""),
-                                               "deny_gid" => array("type" => "mediumtext", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               )
-                               );
-               $database["auth_codes"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "hash" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "filetype" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "filesize" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "data" => ["type" => "longblob", "not null" => "1", "comment" => ""],
+                                               "created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "edited" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "allow_cid" => ["type" => "mediumtext", "comment" => ""],
+                                               "allow_gid" => ["type" => "mediumtext", "comment" => ""],
+                                               "deny_cid" => ["type" => "mediumtext", "comment" => ""],
+                                               "deny_gid" => ["type" => "mediumtext", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               ]
+                               ];
+               $database["auth_codes"] = [
                                "comment" => "OAuth usage",
-                               "fields" => array(
-                                               "id" => array("type" => "varchar(40)", "not null" => "1", "primary" => "1", "comment" => ""),
-                                               "client_id" => array("type" => "varchar(20)", "not null" => "1", "default" => "", "relation" => array("clients" => "client_id"), "comment" => ""),
-                                               "redirect_uri" => array("type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "expires" => array("type" => "int", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "scope" => array("type" => "varchar(250)", "not null" => "1", "default" => "", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               )
-                               );
-               $database["cache"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "varchar(40)", "not null" => "1", "primary" => "1", "comment" => ""],
+                                               "client_id" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "relation" => ["clients" => "client_id"], "comment" => ""],
+                                               "redirect_uri" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "expires" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "scope" => ["type" => "varchar(250)", "not null" => "1", "default" => "", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               ]
+                               ];
+               $database["cache"] = [
                                "comment" => "Used to store different data that doesn't to be stored for a long time",
-                               "fields" => array(
-                                               "k" => array("type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => ""),
-                                               "v" => array("type" => "mediumtext", "comment" => ""),
-                                               "expire_mode" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "updated" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("k"),
-                                               "expire_mode_updated" => array("expire_mode", "updated"),
-                                               )
-                               );
-               $database["challenge"] = array(
+                               "fields" => [
+                                               "k" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => ""],
+                                               "v" => ["type" => "mediumtext", "comment" => ""],
+                                               "expire_mode" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "updated" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["k"],
+                                               "expire_mode_updated" => ["expire_mode", "updated"],
+                                               ]
+                               ];
+               $database["challenge"] = [
                                "comment" => "",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "challenge" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "dfrn-id" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "expire" => array("type" => "int", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "type" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "last_update" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               )
-                               );
-               $database["clients"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "challenge" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "dfrn-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "expire" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "type" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "last_update" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               ]
+                               ];
+               $database["clients"] = [
                                "comment" => "OAuth usage",
-                               "fields" => array(
-                                               "client_id" => array("type" => "varchar(20)", "not null" => "1", "primary" => "1", "comment" => ""),
-                                               "pw" => array("type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "redirect_uri" => array("type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "name" => array("type" => "text", "comment" => ""),
-                                               "icon" => array("type" => "text", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("client_id"),
-                                               )
-                               );
-               $database["config"] = array(
+                               "fields" => [
+                                               "client_id" => ["type" => "varchar(20)", "not null" => "1", "primary" => "1", "comment" => ""],
+                                               "pw" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "redirect_uri" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "name" => ["type" => "text", "comment" => ""],
+                                               "icon" => ["type" => "text", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["client_id"],
+                                               ]
+                               ];
+               $database["config"] = [
                                "comment" => "main configuration storage",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "cat" => array("type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "k" => array("type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "v" => array("type" => "mediumtext", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "cat_k" => array("UNIQUE", "cat", "k"),
-                                               )
-                               );
-               $database["contact"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "cat" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "k" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "v" => ["type" => "mediumtext", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "cat_k" => ["UNIQUE", "cat", "k"],
+                                               ]
+                               ];
+               $database["contact"] = [
                                "comment" => "contact table",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "self" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "remote_self" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "rel" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "duplex" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "network" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "name" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "nick" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "location" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "about" => array("type" => "text", "comment" => ""),
-                                               "keywords" => array("type" => "text", "comment" => ""),
-                                               "gender" => array("type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "xmpp" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "attag" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "avatar" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "photo" => array("type" => "text", "comment" => ""),
-                                               "thumb" => array("type" => "text", "comment" => ""),
-                                               "micro" => array("type" => "text", "comment" => ""),
-                                               "site-pubkey" => array("type" => "text", "comment" => ""),
-                                               "issued-id" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "dfrn-id" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "url" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "nurl" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "addr" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "alias" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "pubkey" => array("type" => "text", "comment" => ""),
-                                               "prvkey" => array("type" => "text", "comment" => ""),
-                                               "batch" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "request" => array("type" => "text", "comment" => ""),
-                                               "notify" => array("type" => "text", "comment" => ""),
-                                               "poll" => array("type" => "text", "comment" => ""),
-                                               "confirm" => array("type" => "text", "comment" => ""),
-                                               "poco" => array("type" => "text", "comment" => ""),
-                                               "aes_allow" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "ret-aes" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "usehub" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "subhub" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "hub-verify" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "last-update" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "success_update" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "failure_update" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "name-date" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "uri-date" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "avatar-date" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "term-date" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "last-item" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "priority" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "blocked" => array("type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""),
-                                               "readonly" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "writable" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "forum" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "prv" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "contact-type" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "hidden" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "archive" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "pending" => array("type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""),
-                                               "rating" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "reason" => array("type" => "text", "comment" => ""),
-                                               "closeness" => array("type" => "tinyint", "not null" => "1", "default" => "99", "comment" => ""),
-                                               "info" => array("type" => "mediumtext", "comment" => ""),
-                                               "profile-id" => array("type" => "int", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "bdyear" => array("type" => "varchar(4)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "bd" => array("type" => "date", "not null" => "1", "default" => "0001-01-01", "comment" => ""),
-                                               "notify_new_posts" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "fetch_further_information" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "ffi_keyword_blacklist" => array("type" => "text", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "uid_name" => array("uid", "name(190)"),
-                                               "self_uid" => array("self", "uid"),
-                                               "alias_uid" => array("alias(32)", "uid"),
-                                               "pending_uid" => array("pending", "uid"),
-                                               "blocked_uid" => array("blocked", "uid"),
-                                               "uid_rel_network_poll" => array("uid", "rel", "network(4)", "poll(64)", "archive"),
-                                               "uid_network_batch" => array("uid", "network(4)", "batch(64)"),
-                                               "addr_uid" => array("addr(32)", "uid"),
-                                               "nurl_uid" => array("nurl(32)", "uid"),
-                                               "nick_uid" => array("nick(32)", "uid"),
-                                               "dfrn-id" => array("dfrn-id(64)"),
-                                               "issued-id" => array("issued-id(64)"),
-                                               )
-                               );
-               $database["conv"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "remote_self" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "rel" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "network" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "about" => ["type" => "text", "comment" => ""],
+                                               "keywords" => ["type" => "text", "comment" => ""],
+                                               "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "attag" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "avatar" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "photo" => ["type" => "text", "comment" => ""],
+                                               "thumb" => ["type" => "text", "comment" => ""],
+                                               "micro" => ["type" => "text", "comment" => ""],
+                                               "site-pubkey" => ["type" => "text", "comment" => ""],
+                                               "issued-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "dfrn-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "pubkey" => ["type" => "text", "comment" => ""],
+                                               "prvkey" => ["type" => "text", "comment" => ""],
+                                               "batch" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "request" => ["type" => "text", "comment" => ""],
+                                               "notify" => ["type" => "text", "comment" => ""],
+                                               "poll" => ["type" => "text", "comment" => ""],
+                                               "confirm" => ["type" => "text", "comment" => ""],
+                                               "poco" => ["type" => "text", "comment" => ""],
+                                               "aes_allow" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "ret-aes" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "usehub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "subhub" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "hub-verify" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "last-update" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "success_update" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "failure_update" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "name-date" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "uri-date" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "avatar-date" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "term-date" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "last-item" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "priority" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
+                                               "readonly" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "writable" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "forum" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "prv" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "hidden" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "archive" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "pending" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
+                                               "rating" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "reason" => ["type" => "text", "comment" => ""],
+                                               "closeness" => ["type" => "tinyint", "not null" => "1", "default" => "99", "comment" => ""],
+                                               "info" => ["type" => "mediumtext", "comment" => ""],
+                                               "profile-id" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "bdyear" => ["type" => "varchar(4)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "bd" => ["type" => "date", "not null" => "1", "default" => "0001-01-01", "comment" => ""],
+                                               "notify_new_posts" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "fetch_further_information" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "ffi_keyword_blacklist" => ["type" => "text", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "uid_name" => ["uid", "name(190)"],
+                                               "self_uid" => ["self", "uid"],
+                                               "alias_uid" => ["alias(32)", "uid"],
+                                               "pending_uid" => ["pending", "uid"],
+                                               "blocked_uid" => ["blocked", "uid"],
+                                               "uid_rel_network_poll" => ["uid", "rel", "network(4)", "poll(64)", "archive"],
+                                               "uid_network_batch" => ["uid", "network(4)", "batch(64)"],
+                                               "addr_uid" => ["addr(32)", "uid"],
+                                               "nurl_uid" => ["nurl(32)", "uid"],
+                                               "nick_uid" => ["nick(32)", "uid"],
+                                               "dfrn-id" => ["dfrn-id(64)"],
+                                               "issued-id" => ["issued-id(64)"],
+                                               ]
+                               ];
+               $database["conv"] = [
                                "comment" => "private messages",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "guid" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "recips" => array("type" => "text", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "creator" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "updated" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "subject" => array("type" => "text", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "uid" => array("uid"),
-                                               )
-                               );
-               $database["conversation"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "recips" => ["type" => "text", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "creator" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "updated" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "subject" => ["type" => "text", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "uid" => ["uid"],
+                                               ]
+                               ];
+               $database["conversation"] = [
                                "comment" => "Raw data and structure information for messages",
-                               "fields" => array(
-                                               "item-uri" => array("type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => ""),
-                                               "reply-to-uri" => array("type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "conversation-uri" => array("type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "conversation-href" => array("type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "protocol" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "source" => array("type" => "mediumtext", "comment" => ""),
-                                               "received" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("item-uri"),
-                                               "conversation-uri" => array("conversation-uri"),
-                                               "received" => array("received"),
-                                               )
-                               );
-               $database["event"] = array(
+                               "fields" => [
+                                               "item-uri" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => ""],
+                                               "reply-to-uri" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "conversation-uri" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "conversation-href" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "protocol" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "source" => ["type" => "mediumtext", "comment" => ""],
+                                               "received" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["item-uri"],
+                                               "conversation-uri" => ["conversation-uri"],
+                                               "received" => ["received"],
+                                               ]
+                               ];
+               $database["event"] = [
                                "comment" => "Events",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "guid" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "cid" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("contact" => "id"), "comment" => ""),
-                                               "uri" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "edited" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "start" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "finish" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "summary" => array("type" => "text", "comment" => ""),
-                                               "desc" => array("type" => "text", "comment" => ""),
-                                               "location" => array("type" => "text", "comment" => ""),
-                                               "type" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "nofinish" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "adjust" => array("type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""),
-                                               "ignore" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "allow_cid" => array("type" => "mediumtext", "comment" => ""),
-                                               "allow_gid" => array("type" => "mediumtext", "comment" => ""),
-                                               "deny_cid" => array("type" => "mediumtext", "comment" => ""),
-                                               "deny_gid" => array("type" => "mediumtext", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "uid_start" => array("uid", "start"),
-                                               )
-                               );
-               $database["fcontact"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "cid" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
+                                               "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "edited" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "start" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "finish" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "summary" => ["type" => "text", "comment" => ""],
+                                               "desc" => ["type" => "text", "comment" => ""],
+                                               "location" => ["type" => "text", "comment" => ""],
+                                               "type" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "nofinish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "adjust" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
+                                               "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "allow_cid" => ["type" => "mediumtext", "comment" => ""],
+                                               "allow_gid" => ["type" => "mediumtext", "comment" => ""],
+                                               "deny_cid" => ["type" => "mediumtext", "comment" => ""],
+                                               "deny_gid" => ["type" => "mediumtext", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "uid_start" => ["uid", "start"],
+                                               ]
+                               ];
+               $database["fcontact"] = [
                                "comment" => "Diaspora compatible contacts - used in the Diaspora implementation",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "guid" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "url" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "name" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "photo" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "request" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "nick" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "addr" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "batch" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "notify" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "poll" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "confirm" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "priority" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "network" => array("type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "alias" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "pubkey" => array("type" => "text", "comment" => ""),
-                                               "updated" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "addr" => array("addr(32)"),
-                                               "url" => array("UNIQUE", "url(190)"),
-                                               )
-                               );
-               $database["fsuggest"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "request" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "batch" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "notify" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "poll" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "confirm" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "priority" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "network" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "pubkey" => ["type" => "text", "comment" => ""],
+                                               "updated" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "addr" => ["addr(32)"],
+                                               "url" => ["UNIQUE", "url(190)"],
+                                               ]
+                               ];
+               $database["fsuggest"] = [
                                "comment" => "friend suggestion stuff",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "cid" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("contact" => "id"), "comment" => ""),
-                                               "name" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "url" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "request" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "photo" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "note" => array("type" => "text", "comment" => ""),
-                                               "created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               )
-                               );
-               $database["gcign"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "cid" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
+                                               "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "request" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "note" => ["type" => "text", "comment" => ""],
+                                               "created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               ]
+                               ];
+               $database["gcign"] = [
                                "comment" => "contacts ignored by friend suggestions",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "gcid" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("gcontact" => "id"), "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "uid" => array("uid"),
-                                               "gcid" => array("gcid"),
-                                               )
-                               );
-               $database["gcontact"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "gcid" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["gcontact" => "id"], "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "uid" => ["uid"],
+                                               "gcid" => ["gcid"],
+                                               ]
+                               ];
+               $database["gcontact"] = [
                                "comment" => "global contacts",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "name" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "nick" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "url" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "nurl" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "photo" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "connect" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "updated" => array("type" => "datetime", "default" => NULL_DATE, "comment" => ""),
-                                               "last_contact" => array("type" => "datetime", "default" => NULL_DATE, "comment" => ""),
-                                               "last_failure" => array("type" => "datetime", "default" => NULL_DATE, "comment" => ""),
-                                               "location" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "about" => array("type" => "text", "comment" => ""),
-                                               "keywords" => array("type" => "text", "comment" => ""),
-                                               "gender" => array("type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "birthday" => array("type" => "varchar(32)", "not null" => "1", "default" => "0001-01-01", "comment" => ""),
-                                               "community" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "contact-type" => array("type" => "tinyint", "not null" => "1", "default" => "-1", "comment" => ""),
-                                               "hide" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "nsfw" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "network" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "addr" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "notify" => array("type" => "text", "comment" => ""),
-                                               "alias" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "generation" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "server_url" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "nurl" => array("UNIQUE", "nurl(190)"),
-                                               "name" => array("name(64)"),
-                                               "nick" => array("nick(32)"),
-                                               "addr" => array("addr(64)"),
-                                               "hide_network_updated" => array("hide", "network(4)", "updated"),
-                                               "updated" => array("updated"),
-                                               )
-                               );
-               $database["glink"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "nick" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "connect" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "updated" => ["type" => "datetime", "default" => NULL_DATE, "comment" => ""],
+                                               "last_contact" => ["type" => "datetime", "default" => NULL_DATE, "comment" => ""],
+                                               "last_failure" => ["type" => "datetime", "default" => NULL_DATE, "comment" => ""],
+                                               "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "about" => ["type" => "text", "comment" => ""],
+                                               "keywords" => ["type" => "text", "comment" => ""],
+                                               "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "birthday" => ["type" => "varchar(32)", "not null" => "1", "default" => "0001-01-01", "comment" => ""],
+                                               "community" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "contact-type" => ["type" => "tinyint", "not null" => "1", "default" => "-1", "comment" => ""],
+                                               "hide" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "nsfw" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "network" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "addr" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "notify" => ["type" => "text", "comment" => ""],
+                                               "alias" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "generation" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "server_url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "nurl" => ["UNIQUE", "nurl(190)"],
+                                               "name" => ["name(64)"],
+                                               "nick" => ["nick(32)"],
+                                               "addr" => ["addr(64)"],
+                                               "hide_network_updated" => ["hide", "network(4)", "updated"],
+                                               "updated" => ["updated"],
+                                               ]
+                               ];
+               $database["glink"] = [
                                "comment" => "'friends of friends' linkages derived from poco",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "cid" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("contact" => "id"), "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "gcid" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("gcontact" => "id"), "comment" => ""),
-                                               "zcid" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("gcontact" => "id"), "comment" => ""),
-                                               "updated" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "cid_uid_gcid_zcid" => array("UNIQUE", "cid","uid","gcid","zcid"),
-                                               "gcid" => array("gcid"),
-                                               )
-                               );
-               $database["group"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "cid" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "gcid" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["gcontact" => "id"], "comment" => ""],
+                                               "zcid" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["gcontact" => "id"], "comment" => ""],
+                                               "updated" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "cid_uid_gcid_zcid" => ["UNIQUE", "cid","uid","gcid","zcid"],
+                                               "gcid" => ["gcid"],
+                                               ]
+                               ];
+               $database["group"] = [
                                "comment" => "privacy groups, group info",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "visible" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "deleted" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "name" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "uid" => array("uid"),
-                                               )
-                               );
-               $database["group_member"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "uid" => ["uid"],
+                                               ]
+                               ];
+               $database["group_member"] = [
                                "comment" => "privacy groups, member info",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "gid" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("group" => "id"), "comment" => ""),
-                                               "contact-id" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("contact" => "id"), "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "contactid" => array("contact-id"),
-                                               "gid_contactid" => array("UNIQUE", "gid", "contact-id"),
-                                               )
-                               );
-               $database["gserver"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "gid" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["group" => "id"], "comment" => ""],
+                                               "contact-id" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "contactid" => ["contact-id"],
+                                               "gid_contactid" => ["UNIQUE", "gid", "contact-id"],
+                                               ]
+                               ];
+               $database["gserver"] = [
                                "comment" => "Global servers",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "url" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "nurl" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "version" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "site_name" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "info" => array("type" => "text", "comment" => ""),
-                                               "register_policy" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "registered-users" => array("type" => "int", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "poco" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "noscrape" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "network" => array("type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "platform" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "last_poco_query" => array("type" => "datetime", "default" => NULL_DATE, "comment" => ""),
-                                               "last_contact" => array("type" => "datetime", "default" => NULL_DATE, "comment" => ""),
-                                               "last_failure" => array("type" => "datetime", "default" => NULL_DATE, "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "nurl" => array("UNIQUE", "nurl(190)"),
-                                               )
-                               );
-               $database["hook"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "nurl" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "version" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "site_name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "info" => ["type" => "text", "comment" => ""],
+                                               "register_policy" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "registered-users" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "poco" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "noscrape" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "network" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "platform" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "last_poco_query" => ["type" => "datetime", "default" => NULL_DATE, "comment" => ""],
+                                               "last_contact" => ["type" => "datetime", "default" => NULL_DATE, "comment" => ""],
+                                               "last_failure" => ["type" => "datetime", "default" => NULL_DATE, "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "nurl" => ["UNIQUE", "nurl(190)"],
+                                               ]
+                               ];
+               $database["hook"] = [
                                "comment" => "plugin hook registry",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "hook" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "file" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "function" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "priority" => array("type" => "smallint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "hook_file_function" => array("UNIQUE", "hook(50)","file(80)","function(60)"),
-                                               )
-                               );
-               $database["intro"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "hook" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "file" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "function" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "priority" => ["type" => "smallint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "hook_file_function" => ["UNIQUE", "hook(50)","file(80)","function(60)"],
+                                               ]
+                               ];
+               $database["intro"] = [
                                "comment" => "",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "fid" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("fcontact" => "id"), "comment" => ""),
-                                               "contact-id" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("contact" => "id"), "comment" => ""),
-                                               "knowyou" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "duplex" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "note" => array("type" => "text", "comment" => ""),
-                                               "hash" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "datetime" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "blocked" => array("type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""),
-                                               "ignore" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               )
-                               );
-               $database["item"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "fid" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["fcontact" => "id"], "comment" => ""],
+                                               "contact-id" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
+                                               "knowyou" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "duplex" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "note" => ["type" => "text", "comment" => ""],
+                                               "hash" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "datetime" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "blocked" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
+                                               "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               ]
+                               ];
+               $database["item"] = [
                                "comment" => "All posts",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "relation" => array("thread" => "iid")),
-                                               "guid" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "uri" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "contact-id" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("contact" => "id"), "comment" => ""),
-                                               "gcontact-id" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("gcontact" => "id"), "comment" => ""),
-                                               "type" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "wall" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "gravity" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "parent" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("item" => "id"), "comment" => ""),
-                                               "parent-uri" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "extid" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "thr-parent" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "edited" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "commented" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "received" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "changed" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "owner-id" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("contact" => "id"), "comment" => ""),
-                                               "owner-name" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "owner-link" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "owner-avatar" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "author-id" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("contact" => "id"), "comment" => ""),
-                                               "author-name" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "author-link" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "author-avatar" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "title" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "body" => array("type" => "mediumtext", "comment" => ""),
-                                               "app" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "verb" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "object-type" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "object" => array("type" => "text", "comment" => ""),
-                                               "target-type" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "target" => array("type" => "text", "comment" => ""),
-                                               "postopts" => array("type" => "text", "comment" => ""),
-                                               "plink" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "resource-id" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "event-id" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("event" => "id"), "comment" => ""),
-                                               "tag" => array("type" => "mediumtext", "comment" => ""),
-                                               "attach" => array("type" => "mediumtext", "comment" => ""),
-                                               "inform" => array("type" => "mediumtext", "comment" => ""),
-                                               "file" => array("type" => "mediumtext", "comment" => ""),
-                                               "location" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "coord" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "allow_cid" => array("type" => "mediumtext", "comment" => ""),
-                                               "allow_gid" => array("type" => "mediumtext", "comment" => ""),
-                                               "deny_cid" => array("type" => "mediumtext", "comment" => ""),
-                                               "deny_gid" => array("type" => "mediumtext", "comment" => ""),
-                                               "private" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "pubmail" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "moderated" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "visible" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "spam" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "starred" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "bookmark" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "unseen" => array("type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""),
-                                               "deleted" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "origin" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "forum_mode" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "last-child" => array("type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""),
-                                               "mention" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "network" => array("type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "rendered-hash" => array("type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "rendered-html" => array("type" => "mediumtext", "comment" => ""),
-                                               "global" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "guid" => array("guid(191)"),
-                                               "uri" => array("uri(191)"),
-                                               "parent" => array("parent"),
-                                               "parent-uri" => array("parent-uri(191)"),
-                                               "extid" => array("extid(191)"),
-                                               "uid_id" => array("uid","id"),
-                                               "uid_contactid_id" => array("uid","contact-id","id"),
-                                               "uid_created" => array("uid","created"),
-                                               "uid_unseen_contactid" => array("uid","unseen","contact-id"),
-                                               "uid_network_received" => array("uid","network(4)","received"),
-                                               "uid_network_commented" => array("uid","network(4)","commented"),
-                                               "uid_thrparent" => array("uid","thr-parent(190)"),
-                                               "uid_parenturi" => array("uid","parent-uri(190)"),
-                                               "uid_contactid_created" => array("uid","contact-id","created"),
-                                               "authorid_created" => array("author-id","created"),
-                                               "ownerid" => array("owner-id"),
-                                               "uid_uri" => array("uid", "uri(190)"),
-                                               "resource-id" => array("resource-id(191)"),
-                                               "contactid_allowcid_allowpid_denycid_denygid" => array("contact-id","allow_cid(10)","allow_gid(10)","deny_cid(10)","deny_gid(10)"), //
-                                               "uid_type_changed" => array("uid","type(190)","changed"),
-                                               "contactid_verb" => array("contact-id","verb(190)"),
-                                               "deleted_changed" => array("deleted","changed"),
-                                               "uid_wall_changed" => array("uid","wall","changed"),
-                                               "uid_eventid" => array("uid","event-id"),
-                                               "uid_authorlink" => array("uid","author-link(190)"),
-                                               "uid_ownerlink" => array("uid","owner-link(190)"),
-                                               )
-                               );
-               $database["locks"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "relation" => ["thread" => "iid"]],
+                                               "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "contact-id" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
+                                               "gcontact-id" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["gcontact" => "id"], "comment" => ""],
+                                               "type" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "gravity" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "parent" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => ""],
+                                               "parent-uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "extid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "thr-parent" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "edited" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "commented" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "received" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "changed" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "owner-id" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
+                                               "owner-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "owner-link" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "owner-avatar" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "author-id" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
+                                               "author-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "author-link" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "author-avatar" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "body" => ["type" => "mediumtext", "comment" => ""],
+                                               "app" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "verb" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "object-type" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "object" => ["type" => "text", "comment" => ""],
+                                               "target-type" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "target" => ["type" => "text", "comment" => ""],
+                                               "postopts" => ["type" => "text", "comment" => ""],
+                                               "plink" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "resource-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "event-id" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["event" => "id"], "comment" => ""],
+                                               "tag" => ["type" => "mediumtext", "comment" => ""],
+                                               "attach" => ["type" => "mediumtext", "comment" => ""],
+                                               "inform" => ["type" => "mediumtext", "comment" => ""],
+                                               "file" => ["type" => "mediumtext", "comment" => ""],
+                                               "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "allow_cid" => ["type" => "mediumtext", "comment" => ""],
+                                               "allow_gid" => ["type" => "mediumtext", "comment" => ""],
+                                               "deny_cid" => ["type" => "mediumtext", "comment" => ""],
+                                               "deny_gid" => ["type" => "mediumtext", "comment" => ""],
+                                               "private" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "moderated" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "spam" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "starred" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "bookmark" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
+                                               "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "forum_mode" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "last-child" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
+                                               "mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "network" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "rendered-hash" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "rendered-html" => ["type" => "mediumtext", "comment" => ""],
+                                               "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "guid" => ["guid(191)"],
+                                               "uri" => ["uri(191)"],
+                                               "parent" => ["parent"],
+                                               "parent-uri" => ["parent-uri(191)"],
+                                               "extid" => ["extid(191)"],
+                                               "uid_id" => ["uid","id"],
+                                               "uid_contactid_id" => ["uid","contact-id","id"],
+                                               "uid_created" => ["uid","created"],
+                                               "uid_unseen_contactid" => ["uid","unseen","contact-id"],
+                                               "uid_network_received" => ["uid","network(4)","received"],
+                                               "uid_network_commented" => ["uid","network(4)","commented"],
+                                               "uid_thrparent" => ["uid","thr-parent(190)"],
+                                               "uid_parenturi" => ["uid","parent-uri(190)"],
+                                               "uid_contactid_created" => ["uid","contact-id","created"],
+                                               "authorid_created" => ["author-id","created"],
+                                               "ownerid" => ["owner-id"],
+                                               "uid_uri" => ["uid", "uri(190)"],
+                                               "resource-id" => ["resource-id(191)"],
+                                               "contactid_allowcid_allowpid_denycid_denygid" => ["contact-id","allow_cid(10)","allow_gid(10)","deny_cid(10)","deny_gid(10)"], //
+                                               "uid_type_changed" => ["uid","type(190)","changed"],
+                                               "contactid_verb" => ["contact-id","verb(190)"],
+                                               "deleted_changed" => ["deleted","changed"],
+                                               "uid_wall_changed" => ["uid","wall","changed"],
+                                               "uid_eventid" => ["uid","event-id"],
+                                               "uid_authorlink" => ["uid","author-link(190)"],
+                                               "uid_ownerlink" => ["uid","owner-link(190)"],
+                                               ]
+                               ];
+               $database["locks"] = [
                                "comment" => "",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "name" => array("type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "locked" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "pid" => array("type" => "int", "not null" => "1", "default" => "0", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               )
-                               );
-               $database["mail"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "name" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "locked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "pid" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               ]
+                               ];
+               $database["mail"] = [
                                "comment" => "private messages",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "guid" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "from-name" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "from-photo" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "from-url" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "contact-id" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "relation" => array("contact" => "id"), "comment" => ""),
-                                               "convid" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("conv" => "id"), "comment" => ""),
-                                               "title" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "body" => array("type" => "mediumtext", "comment" => ""),
-                                               "seen" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "reply" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "replied" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "unknown" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "uri" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "parent-uri" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "uid_seen" => array("uid", "seen"),
-                                               "convid" => array("convid"),
-                                               "uri" => array("uri(64)"),
-                                               "parent-uri" => array("parent-uri(64)"),
-                                               "contactid" => array("contact-id(32)"),
-                                               )
-                               );
-               $database["mailacct"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "from-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "from-photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "from-url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "contact-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "relation" => ["contact" => "id"], "comment" => ""],
+                                               "convid" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["conv" => "id"], "comment" => ""],
+                                               "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "body" => ["type" => "mediumtext", "comment" => ""],
+                                               "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "reply" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "replied" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "unknown" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "parent-uri" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "uid_seen" => ["uid", "seen"],
+                                               "convid" => ["convid"],
+                                               "uri" => ["uri(64)"],
+                                               "parent-uri" => ["parent-uri(64)"],
+                                               "contactid" => ["contact-id(32)"],
+                                               ]
+                               ];
+               $database["mailacct"] = [
                                "comment" => "Mail account data for fetching mails",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "server" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "port" => array("type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "ssltype" => array("type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "mailbox" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "user" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "pass" => array("type" => "text", "comment" => ""),
-                                               "reply_to" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "action" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "movetofolder" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "pubmail" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "last_check" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               )
-                               );
-               $database["manage"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "server" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "port" => ["type" => "smallint unsigned", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "ssltype" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "mailbox" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "user" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "pass" => ["type" => "text", "comment" => ""],
+                                               "reply_to" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "action" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "movetofolder" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "last_check" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               ]
+                               ];
+               $database["manage"] = [
                                "comment" => "table of accounts that can manage each other",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "mid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "uid_mid" => array("UNIQUE", "uid","mid"),
-                                               )
-                               );
-               $database["notify"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "mid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "uid_mid" => ["UNIQUE", "uid","mid"],
+                                               ]
+                               ];
+               $database["notify"] = [
                                "comment" => "notifications",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "hash" => array("type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "type" => array("type" => "smallint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "name" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "url" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "photo" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "date" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "msg" => array("type" => "mediumtext", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "link" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "iid" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("item" => "id"), "comment" => ""),
-                                               "parent" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("item" => "id"), "comment" => ""),
-                                               "seen" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "verb" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "otype" => array("type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "name_cache" => array("type" => "tinytext", "comment" => ""),
-                                               "msg_cache" => array("type" => "mediumtext", "comment" => "")
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "hash_uid" => array("hash", "uid"),
-                                               "seen_uid_date" => array("seen", "uid", "date"),
-                                               "uid_date" => array("uid", "date"),
-                                               "uid_type_link" => array("uid", "type", "link(190)"),
-                                               )
-                               );
-               $database["notify-threads"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "hash" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "type" => ["type" => "smallint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "date" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "msg" => ["type" => "mediumtext", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "link" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "iid" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => ""],
+                                               "parent" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => ""],
+                                               "seen" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "verb" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "otype" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "name_cache" => ["type" => "tinytext", "comment" => ""],
+                                               "msg_cache" => ["type" => "mediumtext", "comment" => ""]
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "hash_uid" => ["hash", "uid"],
+                                               "seen_uid_date" => ["seen", "uid", "date"],
+                                               "uid_date" => ["uid", "date"],
+                                               "uid_type_link" => ["uid", "type", "link(190)"],
+                                               ]
+                               ];
+               $database["notify-threads"] = [
                                "comment" => "",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "notify-id" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("notify" => "id"), "comment" => ""),
-                                               "master-parent-item" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("item" => "id"), "comment" => ""),
-                                               "parent-item" => array("type" => "int", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "receiver-uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               )
-                               );
-               $database["oembed"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "notify-id" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["notify" => "id"], "comment" => ""],
+                                               "master-parent-item" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => ""],
+                                               "parent-item" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "receiver-uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               ]
+                               ];
+               $database["oembed"] = [
                                "comment" => "cache for OEmbed queries",
-                               "fields" => array(
-                                               "url" => array("type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => ""),
-                                               "maxwidth" => array("type" => "mediumint", "not null" => "1", "primary" => "1", "comment" => ""),
-                                               "content" => array("type" => "mediumtext", "comment" => ""),
-                                               "created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("url", "maxwidth"),
-                                               "created" => array("created"),
-                                               )
-                               );
-               $database["parsed_url"] = array(
+                               "fields" => [
+                                               "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => ""],
+                                               "maxwidth" => ["type" => "mediumint", "not null" => "1", "primary" => "1", "comment" => ""],
+                                               "content" => ["type" => "mediumtext", "comment" => ""],
+                                               "created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["url", "maxwidth"],
+                                               "created" => ["created"],
+                                               ]
+                               ];
+               $database["parsed_url"] = [
                                "comment" => "cache for 'parse_url' queries",
-                               "fields" => array(
-                                               "url" => array("type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => ""),
-                                               "guessing" => array("type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""),
-                                               "oembed" => array("type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""),
-                                               "content" => array("type" => "mediumtext", "comment" => ""),
-                                               "created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("url", "guessing", "oembed"),
-                                               "created" => array("created"),
-                                               )
-                               );
-               $database["participation"] = array(
+                               "fields" => [
+                                               "url" => ["type" => "varbinary(255)", "not null" => "1", "primary" => "1", "comment" => ""],
+                                               "guessing" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
+                                               "oembed" => ["type" => "boolean", "not null" => "1", "default" => "0", "primary" => "1", "comment" => ""],
+                                               "content" => ["type" => "mediumtext", "comment" => ""],
+                                               "created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["url", "guessing", "oembed"],
+                                               "created" => ["created"],
+                                               ]
+                               ];
+               $database["participation"] = [
                                "comment" => "Storage for participation messages from Diaspora",
-                               "fields" => array(
-                                               "iid" => array("type" => "int", "not null" => "1", "primary" => "1", "relation" => array("item" => "id"), "comment" => ""),
-                                               "server" => array("type" => "varchar(60)", "not null" => "1", "primary" => "1", "comment" => ""),
-                                               "cid" => array("type" => "int", "not null" => "1", "relation" => array("contact" => "id"), "comment" => ""),
-                                               "fid" => array("type" => "int", "not null" => "1", "relation" => array("fcontact" => "id"), "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("iid", "server")
-                                               )
-                               );
-               $database["pconfig"] = array(
+                               "fields" => [
+                                               "iid" => ["type" => "int", "not null" => "1", "primary" => "1", "relation" => ["item" => "id"], "comment" => ""],
+                                               "server" => ["type" => "varchar(60)", "not null" => "1", "primary" => "1", "comment" => ""],
+                                               "cid" => ["type" => "int", "not null" => "1", "relation" => ["contact" => "id"], "comment" => ""],
+                                               "fid" => ["type" => "int", "not null" => "1", "relation" => ["fcontact" => "id"], "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["iid", "server"]
+                                               ]
+                               ];
+               $database["pconfig"] = [
                                "comment" => "personal (per user) configuration storage",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "cat" => array("type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "k" => array("type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "v" => array("type" => "mediumtext", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "uid_cat_k" => array("UNIQUE", "uid", "cat", "k"),
-                                               )
-                               );
-               $database["photo"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "cat" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "k" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "v" => ["type" => "mediumtext", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "uid_cat_k" => ["UNIQUE", "uid", "cat", "k"],
+                                               ]
+                               ];
+               $database["photo"] = [
                                "comment" => "photo storage",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "contact-id" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("contact" => "id"), "comment" => ""),
-                                               "guid" => array("type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "resource-id" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "edited" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "title" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "desc" => array("type" => "text", "comment" => ""),
-                                               "album" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "filename" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "type" => array("type" => "varchar(128)", "not null" => "1", "default" => "image/jpeg"),
-                                               "height" => array("type" => "smallint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "width" => array("type" => "smallint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "datasize" => array("type" => "int", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "data" => array("type" => "mediumblob", "not null" => "1", "comment" => ""),
-                                               "scale" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "profile" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "allow_cid" => array("type" => "mediumtext", "comment" => ""),
-                                               "allow_gid" => array("type" => "mediumtext", "comment" => ""),
-                                               "deny_cid" => array("type" => "mediumtext", "comment" => ""),
-                                               "deny_gid" => array("type" => "mediumtext", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "contactid" => array("contact-id"),
-                                               "uid_contactid" => array("uid", "contact-id"),
-                                               "uid_profile" => array("uid", "profile"),
-                                               "uid_album_scale_created" => array("uid", "album(32)", "scale", "created"),
-                                               "uid_album_resource-id_created" => array("uid", "album(32)", "resource-id(64)", "created"),
-                                               "resource-id" => array("resource-id(64)"),
-                                               )
-                               );
-               $database["poll"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "contact-id" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
+                                               "guid" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "resource-id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "edited" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "title" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "desc" => ["type" => "text", "comment" => ""],
+                                               "album" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "filename" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "type" => ["type" => "varchar(128)", "not null" => "1", "default" => "image/jpeg"],
+                                               "height" => ["type" => "smallint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "width" => ["type" => "smallint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "datasize" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "data" => ["type" => "mediumblob", "not null" => "1", "comment" => ""],
+                                               "scale" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "profile" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "allow_cid" => ["type" => "mediumtext", "comment" => ""],
+                                               "allow_gid" => ["type" => "mediumtext", "comment" => ""],
+                                               "deny_cid" => ["type" => "mediumtext", "comment" => ""],
+                                               "deny_gid" => ["type" => "mediumtext", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "contactid" => ["contact-id"],
+                                               "uid_contactid" => ["uid", "contact-id"],
+                                               "uid_profile" => ["uid", "profile"],
+                                               "uid_album_scale_created" => ["uid", "album(32)", "scale", "created"],
+                                               "uid_album_resource-id_created" => ["uid", "album(32)", "resource-id(64)", "created"],
+                                               "resource-id" => ["resource-id(64)"],
+                                               ]
+                               ];
+               $database["poll"] = [
                                "comment" => "Currently unused table for storing poll results",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "q0" => array("type" => "text", "comment" => ""),
-                                               "q1" => array("type" => "text", "comment" => ""),
-                                               "q2" => array("type" => "text", "comment" => ""),
-                                               "q3" => array("type" => "text", "comment" => ""),
-                                               "q4" => array("type" => "text", "comment" => ""),
-                                               "q5" => array("type" => "text", "comment" => ""),
-                                               "q6" => array("type" => "text", "comment" => ""),
-                                               "q7" => array("type" => "text", "comment" => ""),
-                                               "q8" => array("type" => "text", "comment" => ""),
-                                               "q9" => array("type" => "text", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "uid" => array("uid"),
-                                               )
-                               );
-               $database["poll_result"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "q0" => ["type" => "text", "comment" => ""],
+                                               "q1" => ["type" => "text", "comment" => ""],
+                                               "q2" => ["type" => "text", "comment" => ""],
+                                               "q3" => ["type" => "text", "comment" => ""],
+                                               "q4" => ["type" => "text", "comment" => ""],
+                                               "q5" => ["type" => "text", "comment" => ""],
+                                               "q6" => ["type" => "text", "comment" => ""],
+                                               "q7" => ["type" => "text", "comment" => ""],
+                                               "q8" => ["type" => "text", "comment" => ""],
+                                               "q9" => ["type" => "text", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "uid" => ["uid"],
+                                               ]
+                               ];
+               $database["poll_result"] = [
                                "comment" => "data for polls - currently unused",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "poll_id" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("poll" => "id")),
-                                               "choice" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "poll_id" => array("poll_id"),
-                                               )
-                               );
-               $database["process"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "poll_id" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["poll" => "id"]],
+                                               "choice" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "poll_id" => ["poll_id"],
+                                               ]
+                               ];
+               $database["process"] = [
                                "comment" => "Currently running system processes",
-                               "fields" => array(
-                                               "pid" => array("type" => "int", "not null" => "1", "primary" => "1", "comment" => ""),
-                                               "command" => array("type" => "varbinary(32)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("pid"),
-                                               "command" => array("command"),
-                                               )
-                               );
-               $database["profile"] = array(
+                               "fields" => [
+                                               "pid" => ["type" => "int", "not null" => "1", "primary" => "1", "comment" => ""],
+                                               "command" => ["type" => "varbinary(32)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["pid"],
+                                               "command" => ["command"],
+                                               ]
+                               ];
+               $database["profile"] = [
                                "comment" => "user profiles data",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "profile-name" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "is-default" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "hide-friends" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "name" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "pdesc" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "dob" => array("type" => "varchar(32)", "not null" => "1", "default" => "0001-01-01", "comment" => ""),
-                                               "address" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "locality" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "region" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "postal-code" => array("type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "country-name" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "hometown" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "gender" => array("type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "marital" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "with" => array("type" => "text", "comment" => ""),
-                                               "howlong" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "sexual" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "politic" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "religion" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "pub_keywords" => array("type" => "text", "comment" => ""),
-                                               "prv_keywords" => array("type" => "text", "comment" => ""),
-                                               "likes" => array("type" => "text", "comment" => ""),
-                                               "dislikes" => array("type" => "text", "comment" => ""),
-                                               "about" => array("type" => "text", "comment" => ""),
-                                               "summary" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "music" => array("type" => "text", "comment" => ""),
-                                               "book" => array("type" => "text", "comment" => ""),
-                                               "tv" => array("type" => "text", "comment" => ""),
-                                               "film" => array("type" => "text", "comment" => ""),
-                                               "interest" => array("type" => "text", "comment" => ""),
-                                               "romance" => array("type" => "text", "comment" => ""),
-                                               "work" => array("type" => "text", "comment" => ""),
-                                               "education" => array("type" => "text", "comment" => ""),
-                                               "contact" => array("type" => "text", "comment" => ""),
-                                               "homepage" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "xmpp" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "photo" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "thumb" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "publish" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "net-publish" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "uid_is-default" => array("uid", "is-default"),
-                                               )
-                               );
-               $database["profile_check"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "profile-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "is-default" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "hide-friends" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "pdesc" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "dob" => ["type" => "varchar(32)", "not null" => "1", "default" => "0001-01-01", "comment" => ""],
+                                               "address" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "locality" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "region" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "postal-code" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "country-name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "hometown" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "gender" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "marital" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "with" => ["type" => "text", "comment" => ""],
+                                               "howlong" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "sexual" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "politic" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "religion" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "pub_keywords" => ["type" => "text", "comment" => ""],
+                                               "prv_keywords" => ["type" => "text", "comment" => ""],
+                                               "likes" => ["type" => "text", "comment" => ""],
+                                               "dislikes" => ["type" => "text", "comment" => ""],
+                                               "about" => ["type" => "text", "comment" => ""],
+                                               "summary" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "music" => ["type" => "text", "comment" => ""],
+                                               "book" => ["type" => "text", "comment" => ""],
+                                               "tv" => ["type" => "text", "comment" => ""],
+                                               "film" => ["type" => "text", "comment" => ""],
+                                               "interest" => ["type" => "text", "comment" => ""],
+                                               "romance" => ["type" => "text", "comment" => ""],
+                                               "work" => ["type" => "text", "comment" => ""],
+                                               "education" => ["type" => "text", "comment" => ""],
+                                               "contact" => ["type" => "text", "comment" => ""],
+                                               "homepage" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "xmpp" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "photo" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "thumb" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "net-publish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "uid_is-default" => ["uid", "is-default"],
+                                               ]
+                               ];
+               $database["profile_check"] = [
                                "comment" => "DFRN remote auth use",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "cid" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("contact" => "id"), "comment" => ""),
-                                               "dfrn_id" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "sec" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "expire" => array("type" => "int", "not null" => "1", "default" => "0", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               )
-                               );
-               $database["push_subscriber"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "cid" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
+                                               "dfrn_id" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "sec" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "expire" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               ]
+                               ];
+               $database["push_subscriber"] = [
                                "comment" => "Used for OStatus: Contains feed subscribers",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "callback_url" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "topic" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "nickname" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "push" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "last_update" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "secret" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               )
-                               );
-               $database["queue"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "callback_url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "topic" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "push" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "last_update" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "secret" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               ]
+                               ];
+               $database["queue"] = [
                                "comment" => "Queue for messages that couldn't be delivered",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "cid" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("contact" => "id"), "comment" => ""),
-                                               "network" => array("type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "last" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "content" => array("type" => "mediumtext", "comment" => ""),
-                                               "batch" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "cid" => array("cid"),
-                                               "created" => array("created"),
-                                               "last" => array("last"),
-                                               "network" => array("network"),
-                                               "batch" => array("batch"),
-                                               )
-                               );
-               $database["register"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "cid" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
+                                               "network" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "last" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "content" => ["type" => "mediumtext", "comment" => ""],
+                                               "batch" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "cid" => ["cid"],
+                                               "created" => ["created"],
+                                               "last" => ["last"],
+                                               "network" => ["network"],
+                                               "batch" => ["batch"],
+                                               ]
+                               ];
+               $database["register"] = [
                                "comment" => "registrations requiring admin approval",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "hash" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "password" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "language" => array("type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "note" => array("type" => "text", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               )
-                               );
-               $database["search"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "hash" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "language" => ["type" => "varchar(16)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "note" => ["type" => "text", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               ]
+                               ];
+               $database["search"] = [
                                "comment" => "",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "term" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "uid" => array("uid"),
-                                               )
-                               );
-               $database["session"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "term" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "uid" => ["uid"],
+                                               ]
+                               ];
+               $database["session"] = [
                                "comment" => "web session storage",
-                               "fields" => array(
-                                               "id" => array("type" => "bigint", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "sid" => array("type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "data" => array("type" => "text", "comment" => ""),
-                                               "expire" => array("type" => "int", "not null" => "1", "default" => "0", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "sid" => array("sid(64)"),
-                                               "expire" => array("expire"),
-                                               )
-                               );
-               $database["sign"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "bigint", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "sid" => ["type" => "varbinary(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "data" => ["type" => "text", "comment" => ""],
+                                               "expire" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "sid" => ["sid(64)"],
+                                               "expire" => ["expire"],
+                                               ]
+                               ];
+               $database["sign"] = [
                                "comment" => "Diaspora signatures",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "iid" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("item" => "id"), "comment" => ""),
-                                               "signed_text" => array("type" => "mediumtext", "comment" => ""),
-                                               "signature" => array("type" => "text", "comment" => ""),
-                                               "signer" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "iid" => array("UNIQUE", "iid"),
-                                               )
-                               );
-               $database["term"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "iid" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => ""],
+                                               "signed_text" => ["type" => "mediumtext", "comment" => ""],
+                                               "signature" => ["type" => "text", "comment" => ""],
+                                               "signer" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "iid" => ["UNIQUE", "iid"],
+                                               ]
+                               ];
+               $database["term"] = [
                                "comment" => "item taxonomy (categories, tags, etc.) table",
-                               "fields" => array(
-                                               "tid" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "oid" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("item" => "id"), "comment" => ""),
-                                               "otype" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "type" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "term" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "url" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "guid" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "received" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "global" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "aid" => array("type" => "int", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("tid"),
-                                               "oid_otype_type_term" => array("oid","otype","type","term(32)"),
-                                               "uid_otype_type_term_global_created" => array("uid","otype","type","term(32)","global","created"),
-                                               "uid_otype_type_url" => array("uid","otype","type","url(64)"),
-                                               "guid" => array("guid(64)"),
-                                               )
-                               );
-               $database["thread"] = array(
+                               "fields" => [
+                                               "tid" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "oid" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["item" => "id"], "comment" => ""],
+                                               "otype" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "term" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "url" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "guid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "received" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "global" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "aid" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["tid"],
+                                               "oid_otype_type_term" => ["oid","otype","type","term(32)"],
+                                               "uid_otype_type_term_global_created" => ["uid","otype","type","term(32)","global","created"],
+                                               "uid_otype_type_url" => ["uid","otype","type","url(64)"],
+                                               "guid" => ["guid(64)"],
+                                               ]
+                               ];
+               $database["thread"] = [
                                "comment" => "Thread related data",
-                               "fields" => array(
-                                               "iid" => array("type" => "int", "not null" => "1", "default" => "0", "primary" => "1", "relation" => array("item" => "id"), "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               "contact-id" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("contact" => "id"), "comment" => ""),
-                                               "gcontact-id" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("gcontact" => "id"), "comment" => ""),
-                                               "owner-id" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("contact" => "id"), "comment" => ""),
-                                               "author-id" => array("type" => "int", "not null" => "1", "default" => "0", "relation" => array("contact" => "id"), "comment" => ""),
-                                               "created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "edited" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "commented" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "received" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "changed" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "wall" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "private" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "pubmail" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "moderated" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "visible" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "spam" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "starred" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "ignored" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "bookmark" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "unseen" => array("type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""),
-                                               "deleted" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "origin" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "forum_mode" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "mention" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "network" => array("type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("iid"),
-                                               "uid_network_commented" => array("uid","network","commented"),
-                                               "uid_network_created" => array("uid","network","created"),
-                                               "uid_contactid_commented" => array("uid","contact-id","commented"),
-                                               "uid_contactid_created" => array("uid","contact-id","created"),
-                                               "contactid" => array("contact-id"),
-                                               "ownerid" => array("owner-id"),
-                                               "authorid" => array("author-id"),
-                                               "uid_created" => array("uid","created"),
-                                               "uid_commented" => array("uid","commented"),
-                                               "uid_wall_created" => array("uid","wall","created"),
-                                               "private_wall_commented" => array("private","wall","commented"),
-                                               )
-                               );
-               $database["tokens"] = array(
+                               "fields" => [
+                                               "iid" => ["type" => "int", "not null" => "1", "default" => "0", "primary" => "1", "relation" => ["item" => "id"], "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               "contact-id" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
+                                               "gcontact-id" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["gcontact" => "id"], "comment" => ""],
+                                               "owner-id" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
+                                               "author-id" => ["type" => "int", "not null" => "1", "default" => "0", "relation" => ["contact" => "id"], "comment" => ""],
+                                               "created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "edited" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "commented" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "received" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "changed" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "wall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "private" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "pubmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "moderated" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "spam" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "starred" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "ignored" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "bookmark" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "unseen" => ["type" => "boolean", "not null" => "1", "default" => "1", "comment" => ""],
+                                               "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "origin" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "forum_mode" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "mention" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "network" => ["type" => "varchar(32)", "not null" => "1", "default" => "", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["iid"],
+                                               "uid_network_commented" => ["uid","network","commented"],
+                                               "uid_network_created" => ["uid","network","created"],
+                                               "uid_contactid_commented" => ["uid","contact-id","commented"],
+                                               "uid_contactid_created" => ["uid","contact-id","created"],
+                                               "contactid" => ["contact-id"],
+                                               "ownerid" => ["owner-id"],
+                                               "authorid" => ["author-id"],
+                                               "uid_created" => ["uid","created"],
+                                               "uid_commented" => ["uid","commented"],
+                                               "uid_wall_created" => ["uid","wall","created"],
+                                               "private_wall_commented" => ["private","wall","commented"],
+                                               ]
+                               ];
+               $database["tokens"] = [
                                "comment" => "OAuth usage",
-                               "fields" => array(
-                                               "id" => array("type" => "varchar(40)", "not null" => "1", "primary" => "1", "comment" => ""),
-                                               "secret" => array("type" => "text", "comment" => ""),
-                                               "client_id" => array("type" => "varchar(20)", "not null" => "1", "default" => "", "relation" => array("clients" => "client_id")),
-                                               "expires" => array("type" => "int", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "scope" => array("type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "default" => "0", "relation" => array("user" => "uid"), "comment" => "User id"),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               )
-                               );
-               $database["user"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "varchar(40)", "not null" => "1", "primary" => "1", "comment" => ""],
+                                               "secret" => ["type" => "text", "comment" => ""],
+                                               "client_id" => ["type" => "varchar(20)", "not null" => "1", "default" => "", "relation" => ["clients" => "client_id"]],
+                                               "expires" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "scope" => ["type" => "varchar(200)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "default" => "0", "relation" => ["user" => "uid"], "comment" => "User id"],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               ]
+                               ];
+               $database["user"] = [
                                "comment" => "The local users",
-                               "fields" => array(
-                                               "uid" => array("type" => "mediumint", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "guid" => array("type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "username" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "password" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "nickname" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "email" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "openid" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "timezone" => array("type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "language" => array("type" => "varchar(32)", "not null" => "1", "default" => "en", "comment" => ""),
-                                               "register_date" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "login_date" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "default-location" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "allow_location" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "theme" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "pubkey" => array("type" => "text", "comment" => ""),
-                                               "prvkey" => array("type" => "text", "comment" => ""),
-                                               "spubkey" => array("type" => "text", "comment" => ""),
-                                               "sprvkey" => array("type" => "text", "comment" => ""),
-                                               "verified" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "blocked" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "blockwall" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "hidewall" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "blocktags" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "unkmail" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "cntunkmail" => array("type" => "int", "not null" => "1", "default" => "10", "comment" => ""),
-                                               "notify-flags" => array("type" => "smallint unsigned", "not null" => "1", "default" => "65535", "comment" => ""),
-                                               "page-flags" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "account-type" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "prvnets" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "pwdreset" => array("type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""),
-                                               "maxreq" => array("type" => "int", "not null" => "1", "default" => "10", "comment" => ""),
-                                               "expire" => array("type" => "int", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "account_removed" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "account_expired" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "account_expires_on" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "expire_notification_sent" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""),
-                                               "def_gid" => array("type" => "int", "not null" => "1", "default" => "0", "comment" => ""),
-                                               "allow_cid" => array("type" => "mediumtext", "comment" => ""),
-                                               "allow_gid" => array("type" => "mediumtext", "comment" => ""),
-                                               "deny_cid" => array("type" => "mediumtext", "comment" => ""),
-                                               "deny_gid" => array("type" => "mediumtext", "comment" => ""),
-                                               "openidserver" => array("type" => "text", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("uid"),
-                                               "nickname" => array("nickname(32)"),
-                                               )
-                               );
-               $database["userd"] = array(
+                               "fields" => [
+                                               "uid" => ["type" => "mediumint", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "guid" => ["type" => "varchar(64)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "username" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "password" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "nickname" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "email" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "openid" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "timezone" => ["type" => "varchar(128)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "language" => ["type" => "varchar(32)", "not null" => "1", "default" => "en", "comment" => ""],
+                                               "register_date" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "login_date" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "default-location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "allow_location" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "theme" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "pubkey" => ["type" => "text", "comment" => ""],
+                                               "prvkey" => ["type" => "text", "comment" => ""],
+                                               "spubkey" => ["type" => "text", "comment" => ""],
+                                               "sprvkey" => ["type" => "text", "comment" => ""],
+                                               "verified" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "blocked" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "blockwall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "hidewall" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "blocktags" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "unkmail" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "cntunkmail" => ["type" => "int", "not null" => "1", "default" => "10", "comment" => ""],
+                                               "notify-flags" => ["type" => "smallint unsigned", "not null" => "1", "default" => "65535", "comment" => ""],
+                                               "page-flags" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "account-type" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "prvnets" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "pwdreset" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""],
+                                               "maxreq" => ["type" => "int", "not null" => "1", "default" => "10", "comment" => ""],
+                                               "expire" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "account_removed" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "account_expired" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "account_expires_on" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "expire_notification_sent" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => ""],
+                                               "def_gid" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => ""],
+                                               "allow_cid" => ["type" => "mediumtext", "comment" => ""],
+                                               "allow_gid" => ["type" => "mediumtext", "comment" => ""],
+                                               "deny_cid" => ["type" => "mediumtext", "comment" => ""],
+                                               "deny_gid" => ["type" => "mediumtext", "comment" => ""],
+                                               "openidserver" => ["type" => "text", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["uid"],
+                                               "nickname" => ["nickname(32)"],
+                                               ]
+                               ];
+               $database["userd"] = [
                                "comment" => "Deleted usernames",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""),
-                                               "username" => array("type" => "varchar(255)", "not null" => "1", "comment" => ""),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "username" => array("username(32)"),
-                                               )
-                               );
-               $database["workerqueue"] = array(
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => ""],
+                                               "username" => ["type" => "varchar(255)", "not null" => "1", "comment" => ""],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "username" => ["username(32)"],
+                                               ]
+                               ];
+               $database["workerqueue"] = [
                                "comment" => "Background tasks queue entries",
-                               "fields" => array(
-                                               "id" => array("type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented worker task id"),
-                                               "parameter" => array("type" => "text", "comment" => "Task command"),
-                                               "priority" => array("type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Task priority"),
-                                               "created" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => "Creation date"),
-                                               "pid" => array("type" => "int", "not null" => "1", "default" => "0", "comment" => "Process id of the worker"),
-                                               "executed" => array("type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => "Execution date"),
-                                               "done" => array("type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marked when the task was done, will be deleted later"),
-                                               ),
-                               "indexes" => array(
-                                               "PRIMARY" => array("id"),
-                                               "pid" => array("pid"),
-                                               "parameter" => array("parameter(64)"),
-                                               "priority_created" => array("priority", "created"),
-                                               "executed" => array("executed"),
-                                               )
-                               );
+                               "fields" => [
+                                               "id" => ["type" => "int", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "Auto incremented worker task id"],
+                                               "parameter" => ["type" => "text", "comment" => "Task command"],
+                                               "priority" => ["type" => "tinyint", "not null" => "1", "default" => "0", "comment" => "Task priority"],
+                                               "created" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => "Creation date"],
+                                               "pid" => ["type" => "int", "not null" => "1", "default" => "0", "comment" => "Process id of the worker"],
+                                               "executed" => ["type" => "datetime", "not null" => "1", "default" => NULL_DATE, "comment" => "Execution date"],
+                                               "done" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Marked when the task was done, will be deleted later"],
+                                               ],
+                               "indexes" => [
+                                               "PRIMARY" => ["id"],
+                                               "pid" => ["pid"],
+                                               "parameter" => ["parameter(64)"],
+                                               "priority_created" => ["priority", "created"],
+                                               "executed" => ["executed"],
+                                               ]
+                               ];
 
                return($database);
        }
index 96a2e32c6d24959c03e8dfb34b90fbf5fd57c002..2f3328a24ee296e9b7c8544ab3838e80152f2da4 100644 (file)
@@ -150,11 +150,11 @@ class Contact extends BaseObject
 
                $archive = PConfig::get($contact['uid'], 'system', 'archive_removed_contacts');
                if ($archive) {
-                       dba::update('contact', array('archive' => true, 'network' => 'none', 'writable' => false), array('id' => $id));
+                       dba::update('contact', ['archive' => true, 'network' => 'none', 'writable' => false], ['id' => $id]);
                        return;
                }
 
-               dba::delete('contact', array('id' => $id));
+               dba::delete('contact', ['id' => $id]);
 
                // Delete the rest in the background
                Worker::add(PRIORITY_LOW, 'RemoveContact', $id);
@@ -171,7 +171,7 @@ class Contact extends BaseObject
        {
                if ($contact['network'] === NETWORK_OSTATUS) {
                        // create an unfollow slap
-                       $item = array();
+                       $item = [];
                        $item['verb'] = NAMESPACE_OSTATUS . "/unfollow";
                        $item['follow'] = $contact["url"];
                        $slap = OStatus::salmon($item, $user);
@@ -206,10 +206,10 @@ class Contact extends BaseObject
                }
 
                if ($contact['term-date'] <= NULL_DATE) {
-                       dba::update('contact', array('term-date' => datetime_convert()), array('id' => $contact['id']));
+                       dba::update('contact', ['term-date' => datetime_convert()], ['id' => $contact['id']]);
 
                        if ($contact['url'] != '') {
-                               dba::update('contact', array('term-date' => datetime_convert()), array('`nurl` = ? AND `term-date` <= ? AND NOT `self`', normalise_link($contact['url']), NULL_DATE));
+                               dba::update('contact', ['term-date' => datetime_convert()], ['`nurl` = ? AND `term-date` <= ? AND NOT `self`', normalise_link($contact['url']), NULL_DATE]);
                        }
                } else {
                        /* @todo
@@ -225,10 +225,10 @@ class Contact extends BaseObject
                                 * delete, though if the owner tries to unarchive them we'll start
                                 * the whole process over again.
                                 */
-                               dba::update('contact', array('archive' => 1), array('id' => $contact['id']));
+                               dba::update('contact', ['archive' => 1], ['id' => $contact['id']]);
 
                                if ($contact['url'] != '') {
-                                       dba::update('contact', array('archive' => 1), array('nurl' => normalise_link($contact['url']), 'self' => false));
+                                       dba::update('contact', ['archive' => 1], ['nurl' => normalise_link($contact['url']), 'self' => false]);
                                }
                        }
                }
@@ -244,7 +244,7 @@ class Contact extends BaseObject
         */
        public static function unmarkForArchival(array $contact)
        {
-               $condition = array('`id` = ? AND (`term-date` > ? OR `archive`)', $contact['id'], NULL_DATE);
+               $condition = ['`id` = ? AND (`term-date` > ? OR `archive`)', $contact['id'], NULL_DATE];
                $exists = dba::exists('contact', $condition);
 
                // We don't need to update, we never marked this contact for archival
@@ -253,11 +253,11 @@ class Contact extends BaseObject
                }
 
                // It's a miracle. Our dead contact has inexplicably come back to life.
-               $fields = array('term-date' => NULL_DATE, 'archive' => false);
-               dba::update('contact', $fields, array('id' => $contact['id']));
+               $fields = ['term-date' => NULL_DATE, 'archive' => false];
+               dba::update('contact', $fields, ['id' => $contact['id']]);
 
                if ($contact['url'] != '') {
-                       dba::update('contact', $fields, array('nurl' => normalise_link($contact['url'])));
+                       dba::update('contact', $fields, ['nurl' => normalise_link($contact['url'])]);
                }
        }
 
@@ -275,7 +275,7 @@ class Contact extends BaseObject
         */
        public static function getDetailsByURL($url, $uid = -1, array $default = [])
        {
-               static $cache = array();
+               static $cache = [];
 
                if ($url == '') {
                        return $default;
@@ -387,7 +387,7 @@ class Contact extends BaseObject
                }
 
                if ((($profile["addr"] == "") || ($profile["name"] == "")) && ($profile["gid"] != 0)
-                       && in_array($profile["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))
+                       && in_array($profile["network"], [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS])
                ) {
                        Worker::add(PRIORITY_LOW, "UpdateGContact", $profile["gid"]);
                }
@@ -417,10 +417,10 @@ class Contact extends BaseObject
         */
        public static function getDetailsByAddr($addr, $uid = -1)
        {
-               static $cache = array();
+               static $cache = [];
 
                if ($addr == '') {
-                       return array();
+                       return [];
                }
 
                if ($uid == -1) {
@@ -490,7 +490,7 @@ class Contact extends BaseObject
                if ($contact['uid'] != $uid) {
                        if ($uid == 0) {
                                $profile_link = Profile::zrl($contact['url']);
-                               $menu = array('profile' => array(t('View Profile'), $profile_link, true));
+                               $menu = ['profile' => [t('View Profile'), $profile_link, true]];
 
                                return $menu;
                        }
@@ -502,10 +502,10 @@ class Contact extends BaseObject
                        } else {
                                $profile_link = Profile::zrl($contact['url']);
                                $connlnk = 'follow/?url=' . $contact['url'];
-                               $menu = array(
-                                       'profile' => array(t('View Profile'), $profile_link, true),
-                                       'follow' => array(t('Connect/Follow'), $connlnk, true)
-                               );
+                               $menu = [
+                                       'profile' => [t('View Profile'), $profile_link, true],
+                                       'follow' => [t('Connect/Follow'), $connlnk, true]
+                               ];
 
                                return $menu;
                        }
@@ -529,7 +529,7 @@ class Contact extends BaseObject
                        $profile_link = $profile_link . '?url=profile';
                }
 
-               if (in_array($contact['network'], array(NETWORK_DFRN, NETWORK_DIASPORA))) {
+               if (in_array($contact['network'], [NETWORK_DFRN, NETWORK_DIASPORA])) {
                        $pm_url = System::baseUrl() . '/message/new/' . $contact['id'];
                }
 
@@ -561,7 +561,7 @@ class Contact extends BaseObject
 
                call_hooks('contact_photo_menu', $args);
 
-               $menucondensed = array();
+               $menucondensed = [];
 
                foreach ($menu as $menuname => $menuitem) {
                        if ($menuitem[1] != '') {
@@ -625,7 +625,7 @@ class Contact extends BaseObject
                        intval($start),
                        intval($count)
                );
-               
+
                return $r;
        }
 
@@ -702,7 +702,7 @@ class Contact extends BaseObject
                $data = Probe::uri($url, "", $uid);
 
                // Last try in gcontact for unsupported networks
-               if (!in_array($data["network"], array(NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA, NETWORK_PUMPIO, NETWORK_MAIL))) {
+               if (!in_array($data["network"], [NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA, NETWORK_PUMPIO, NETWORK_MAIL])) {
                        if ($uid != 0) {
                                return 0;
                        }
@@ -775,7 +775,7 @@ class Contact extends BaseObject
                                if ($data['about'] != '') {
                                        unset($gcontact['about']);
                                }
-                               dba::update('contact', $gcontact, array('id' => $contact_id));
+                               dba::update('contact', $gcontact, ['id' => $contact_id]);
                        }
 
                        if (count($contacts) > 1 && $uid == 0 && $contact_id != 0 && $data["url"] != "") {
@@ -794,12 +794,12 @@ class Contact extends BaseObject
                        return $contact_id;
                }
 
-               $updated = array('addr' => $data['addr'],
+               $updated = ['addr' => $data['addr'],
                        'alias' => $data['alias'],
                        'url' => $data['url'],
                        'nurl' => normalise_link($data['url']),
                        'name' => $data['name'],
-                       'nick' => $data['nick']);
+                       'nick' => $data['nick']];
 
                // Only fill the pubkey if it was empty before. We have to prevent identity theft.
                if (!empty($contact['pubkey'])) {
@@ -827,7 +827,7 @@ class Contact extends BaseObject
 
                $updated['avatar-date'] = datetime_convert();
 
-               dba::update('contact', $updated, array('id' => $contact_id), $contact);
+               dba::update('contact', $updated, ['id' => $contact_id], $contact);
 
                return $contact_id;
        }
@@ -896,7 +896,7 @@ class Contact extends BaseObject
                        return '';
                }
 
-               if (in_array($r[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""))) {
+               if (in_array($r[0]["network"], [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""])) {
                        $sql = "(`item`.`uid` = 0 OR (`item`.`uid` = %d AND NOT `item`.`global`))";
                } else {
                        $sql = "`item`.`uid` = %d";
@@ -1013,7 +1013,7 @@ class Contact extends BaseObject
                if (!DBM::is_result($contact)) {
                        return false;
                } else {
-                       $data = array($contact["photo"], $contact["thumb"], $contact["micro"]);
+                       $data = [$contact["photo"], $contact["thumb"], $contact["micro"]];
                }
 
                if (($contact["avatar"] != $avatar) || $force) {
@@ -1022,8 +1022,8 @@ class Contact extends BaseObject
                        if ($photos) {
                                dba::update(
                                        'contact',
-                                       array('avatar' => $avatar, 'photo' => $photos[0], 'thumb' => $photos[1], 'micro' => $photos[2], 'avatar-date' => datetime_convert()),
-                                       array('id' => $cid)
+                                       ['avatar' => $avatar, 'photo' => $photos[0], 'thumb' => $photos[1], 'micro' => $photos[2], 'avatar-date' => datetime_convert()],
+                                       ['id' => $cid]
                                );
 
                                // Update the public contact (contact id = 0)
@@ -1122,7 +1122,7 @@ class Contact extends BaseObject
         */
        public static function createFromProbe($uid, $url, $interactive = false, $network = '')
        {
-               $result = array('cid' => -1, 'success' => false, 'message' => '');
+               $result = ['cid' => -1, 'success' => false, 'message' => ''];
 
                $a = get_app();
 
@@ -1144,7 +1144,7 @@ class Contact extends BaseObject
                        return $result;
                }
 
-               $arr = array('url' => $url, 'contact' => array());
+               $arr = ['url' => $url, 'contact' => []];
 
                call_hooks('follow', $arr);
 
@@ -1217,7 +1217,7 @@ class Contact extends BaseObject
 
                $hidden = (($ret['network'] === NETWORK_MAIL) ? 1 : 0);
 
-               if (in_array($ret['network'], array(NETWORK_MAIL, NETWORK_DIASPORA))) {
+               if (in_array($ret['network'], [NETWORK_MAIL, NETWORK_DIASPORA])) {
                        $writeable = 1;
                }
 
@@ -1244,10 +1244,10 @@ class Contact extends BaseObject
                        // update contact
                        $new_relation = (($r[0]['rel'] == CONTACT_IS_FOLLOWER) ? CONTACT_IS_FRIEND : CONTACT_IS_SHARING);
 
-                       $fields = array('rel' => $new_relation, 'subhub' => $subhub, 'readonly' => false);
-                       dba::update('contact', $fields, array('id' => $r[0]['id']));
+                       $fields = ['rel' => $new_relation, 'subhub' => $subhub, 'readonly' => false];
+                       dba::update('contact', $fields, ['id' => $r[0]['id']]);
                } else {
-                       $new_relation = ((in_array($ret['network'], array(NETWORK_MAIL))) ? CONTACT_IS_FRIEND : CONTACT_IS_SHARING);
+                       $new_relation = ((in_array($ret['network'], [NETWORK_MAIL])) ? CONTACT_IS_FRIEND : CONTACT_IS_SHARING);
 
                        // create contact record
                        dba::insert('contact', [
@@ -1302,7 +1302,7 @@ class Contact extends BaseObject
                if (DBM::is_result($r)) {
                        if (($contact['network'] == NETWORK_OSTATUS) && (strlen($contact['notify']))) {
                                // create a follow slap
-                               $item = array();
+                               $item = [];
                                $item['verb'] = ACTIVITY_FOLLOW;
                                $item['follow'] = $contact["url"];
                                $slap = OStatus::salmon($item, $r[0]);
index f7984f0d37203dcfa6c2e2da44503a72fe93b7d5..8e78dc68fd00a5b964206187aa32f97a94a1ebe8 100644 (file)
@@ -157,7 +157,7 @@ class GContact
                        throw new Exception("This (".$gcontact['url'].") doesn't seem to be an url.");
                }
 
-               if (in_array($urlparts["host"], array("www.facebook.com", "facebook.com", "twitter.com", "identi.ca", "alpha.app.net"))) {
+               if (in_array($urlparts["host"], ["www.facebook.com", "facebook.com", "twitter.com", "identi.ca", "alpha.app.net"])) {
                        throw new Exception('Contact from a non federated network ignored. ('.$gcontact['url'].')');
                }
 
@@ -168,7 +168,7 @@ class GContact
                }
 
                // Assure that there are no parameter fragments in the profile url
-               if (in_array($gcontact['network'], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""))) {
+               if (in_array($gcontact['network'], [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""])) {
                        $gcontact['url'] = self::cleanContactUrl($gcontact['url']);
                }
 
@@ -254,7 +254,7 @@ class GContact
                        throw new Exception('No name and photo for URL '.$gcontact['url']);
                }
 
-               if (!in_array($gcontact['network'], array(NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA))) {
+               if (!in_array($gcontact['network'], [NETWORK_DFRN, NETWORK_OSTATUS, NETWORK_DIASPORA])) {
                        throw new Exception('No federated network ('.$gcontact['network'].') detected for URL '.$gcontact['url']);
                }
 
@@ -456,7 +456,7 @@ class GContact
        public static function suggestionQuery($uid, $start = 0, $limit = 80)
        {
                if (!$uid) {
-                       return array();
+                       return [];
                }
 
                /*
@@ -468,7 +468,7 @@ class GContact
                //      return $list;
                //}
 
-               $network = array(NETWORK_DFRN);
+               $network = [NETWORK_DFRN];
 
                if (Config::get('system', 'diaspora_enabled')) {
                        $network[] = NETWORK_DIASPORA;
@@ -532,7 +532,7 @@ class GContact
                        intval($limit)
                );
 
-               $list = array();
+               $list = [];
                foreach ($r2 as $suggestion) {
                        $list[$suggestion["nurl"]] = $suggestion;
                }
@@ -560,7 +560,7 @@ class GContact
        {
                $a = get_app();
 
-               $done = array();
+               $done = [];
 
                /// @TODO Check if it is really neccessary to poll the own server
                PortableContact::loadWorker(0, 0, 0, System::baseUrl() . '/poco');
@@ -665,7 +665,7 @@ class GContact
                $gcontact_id = 0;
                $doprobing = false;
 
-               if (in_array($contact["network"], array(NETWORK_PHANTOM))) {
+               if (in_array($contact["network"], [NETWORK_PHANTOM])) {
                        logger("Invalid network for contact url ".$contact["url"]." - Called by: ".System::callstack(), LOGGER_DEBUG);
                        return false;
                }
@@ -683,7 +683,7 @@ class GContact
                self::fixAlternateContactAddress($contact);
 
                // Remove unwanted parts from the contact url (e.g. "?zrl=...")
-               if (in_array($contact["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) {
+               if (in_array($contact["network"], [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS])) {
                        $contact["url"] = self::cleanContactUrl($contact["url"]);
                }
 
@@ -697,7 +697,7 @@ class GContact
                        $gcontact_id = $r[0]["id"];
 
                        // Update every 90 days
-                       if (in_array($r[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""))) {
+                       if (in_array($r[0]["network"], [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""])) {
                                $last_failure_str = $r[0]["last_failure"];
                                $last_failure = strtotime($r[0]["last_failure"]);
                                $last_contact_str = $r[0]["last_contact"];
@@ -731,7 +731,7 @@ class GContact
                        if (DBM::is_result($r)) {
                                $gcontact_id = $r[0]["id"];
 
-                               $doprobing = in_array($r[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""));
+                               $doprobing = in_array($r[0]["network"], [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""]);
                        }
                }
                dba::unlock();
@@ -774,7 +774,7 @@ class GContact
                );
 
                // Get all field names
-               $fields = array();
+               $fields = [];
                foreach ($public_contact[0] as $field => $data) {
                        $fields[$field] = $data;
                }
@@ -855,11 +855,11 @@ class GContact
 
                if ($update) {
                        logger("Update gcontact for ".$contact["url"], LOGGER_DEBUG);
-                       $condition = array('`nurl` = ? AND (`generation` = 0 OR `generation` >= ?)',
-                                       normalise_link($contact["url"]), $contact["generation"]);
+                       $condition = ['`nurl` = ? AND (`generation` = 0 OR `generation` >= ?)',
+                                       normalise_link($contact["url"]), $contact["generation"]];
                        $contact["updated"] = DBM::date($contact["updated"]);
 
-                       $updated = array('photo' => $contact['photo'], 'name' => $contact['name'],
+                       $updated = ['photo' => $contact['photo'], 'name' => $contact['name'],
                                        'nick' => $contact['nick'], 'addr' => $contact['addr'],
                                        'network' => $contact['network'], 'birthday' => $contact['birthday'],
                                        'gender' => $contact['gender'], 'keywords' => $contact['keywords'],
@@ -868,34 +868,34 @@ class GContact
                                        'notify' => $contact['notify'], 'url' => $contact['url'],
                                        'location' => $contact['location'], 'about' => $contact['about'],
                                        'generation' => $contact['generation'], 'updated' => $contact['updated'],
-                                       'server_url' => $contact['server_url'], 'connect' => $contact['connect']);
+                                       'server_url' => $contact['server_url'], 'connect' => $contact['connect']];
 
                        dba::update('gcontact', $updated, $condition, $fields);
 
                        // Now update the contact entry with the user id "0" as well.
                        // This is used for the shadow copies of public items.
-                       
+
                        $public_contact = dba::selectFirst('contact', ['id'], ['nurl' => normalise_link($contact["url"]), 'uid' => 0]);
                        if (DBM::is_result($public_contact)) {
                                logger("Update public contact ".$public_contact["id"], LOGGER_DEBUG);
 
                                Contact::updateAvatar($contact["photo"], 0, $public_contact["id"]);
 
-                               $fields = array('name', 'nick', 'addr',
+                               $fields = ['name', 'nick', 'addr',
                                                'network', 'bd', 'gender',
                                                'keywords', 'alias', 'contact-type',
-                                               'url', 'location', 'about');
+                                               'url', 'location', 'about'];
                                $old_contact = dba::selectFirst('contact', $fields, ['id' => $public_contact["id"]]);
 
                                // Update it with the current values
-                               $fields = array('name' => $contact['name'], 'nick' => $contact['nick'],
+                               $fields = ['name' => $contact['name'], 'nick' => $contact['nick'],
                                                'addr' => $contact['addr'], 'network' => $contact['network'],
                                                'bd' => $contact['birthday'], 'gender' => $contact['gender'],
                                                'keywords' => $contact['keywords'], 'alias' => $contact['alias'],
                                                'contact-type' => $contact['contact-type'], 'url' => $contact['url'],
-                                               'location' => $contact['location'], 'about' => $contact['about']);
+                                               'location' => $contact['location'], 'about' => $contact['about']];
 
-                               dba::update('contact', $fields, array('id' => $public_contact["id"]), $old_contact);
+                               dba::update('contact', $fields, ['id' => $public_contact["id"]], $old_contact);
                        }
                }
 
@@ -912,7 +912,7 @@ class GContact
        {
                $data = Probe::uri($url);
 
-               if (in_array($data["network"], array(NETWORK_PHANTOM))) {
+               if (in_array($data["network"], [NETWORK_PHANTOM])) {
                        logger("Invalid network for contact url ".$data["url"]." - Called by: ".System::callstack(), LOGGER_DEBUG);
                        return;
                }
@@ -944,24 +944,24 @@ class GContact
                );
 
                $location = Profile::formatLocation(
-                       array("locality" => $r[0]["locality"], "region" => $r[0]["region"], "country-name" => $r[0]["country-name"])
+                       ["locality" => $r[0]["locality"], "region" => $r[0]["region"], "country-name" => $r[0]["country-name"]]
                );
 
                // The "addr" field was added in 3.4.3 so it can be empty for older users
                if ($r[0]["addr"] != "") {
-                       $addr = $r[0]["nickname"].'@'.str_replace(array("http://", "https://"), "", System::baseUrl());
+                       $addr = $r[0]["nickname"].'@'.str_replace(["http://", "https://"], "", System::baseUrl());
                } else {
                        $addr = $r[0]["addr"];
                }
 
-               $gcontact = array("name" => $r[0]["name"], "location" => $location, "about" => $r[0]["about"],
+               $gcontact = ["name" => $r[0]["name"], "location" => $location, "about" => $r[0]["about"],
                                "gender" => $r[0]["gender"], "keywords" => $r[0]["pub_keywords"],
                                "birthday" => $r[0]["dob"], "photo" => $r[0]["photo"],
                                "notify" => $r[0]["notify"], "url" => $r[0]["url"],
                                "hide" => ($r[0]["hidewall"] || !$r[0]["net-publish"]),
                                "nick" => $r[0]["nickname"], "addr" => $addr,
                                "connect" => $addr, "server_url" => System::baseUrl(),
-                               "generation" => 1, "network" => NETWORK_DFRN);
+                               "generation" => 1, "network" => NETWORK_DFRN];
 
                self::update($gcontact);
        }
@@ -1014,13 +1014,13 @@ class GContact
                        foreach ($statistics->users as $nick => $user) {
                                $profile_url = $server."/".$user->nickname;
 
-                               $contact = array("url" => $profile_url,
+                               $contact = ["url" => $profile_url,
                                                "name" => $user->fullname,
                                                "addr" => $user->nickname."@".$hostname,
                                                "nick" => $user->nickname,
                                                "about" => $user->bio,
                                                "network" => NETWORK_OSTATUS,
-                                               "photo" => System::baseUrl()."/images/person-175.jpg");
+                                               "photo" => System::baseUrl()."/images/person-175.jpg"];
                                self::getId($contact);
                        }
                }
index 1746a3962ec94547ed487136eae9ce2897cce28f..a5cd57d47d6c9c0b8d09b7238f13556d9427de98 100644 (file)
@@ -330,10 +330,10 @@ class Group extends BaseObject
                        $label = t('Default privacy group for new contacts');
                }
 
-               $o = replace_macros(get_markup_template('group_selection.tpl'), array(
+               $o = replace_macros(get_markup_template('group_selection.tpl'), [
                        '$label' => $label,
                        '$groups' => $display_groups
-               ));
+               ]);
                return $o;
        }
 
@@ -369,7 +369,7 @@ class Group extends BaseObject
 
                $stmt = dba::select('group', [], ['deleted' => 0, 'uid' => local_user()], ['order' => ['name']]);
 
-               $member_of = array();
+               $member_of = [];
                if ($cid) {
                        $member_of = self::getIdsByContactId($cid);
                }
index 62b6088d974bcbc6c8240b075f8815a26f26332b..ef59eee7e9aa932ce09808c40273521d2f992e37 100644 (file)
@@ -171,7 +171,7 @@ class Photo
                        $micro = System::baseUrl() . '/images/person-48.jpg';
                }
 
-               return array($image_url, $thumb, $micro);
+               return [$image_url, $thumb, $micro];
        }
 
        /**
@@ -184,9 +184,9 @@ class Photo
                $degrees = count($exifCoord) > 0 ? self::gps2Num($exifCoord[0]) : 0;
                $minutes = count($exifCoord) > 1 ? self::gps2Num($exifCoord[1]) : 0;
                $seconds = count($exifCoord) > 2 ? self::gps2Num($exifCoord[2]) : 0;
-       
+
                $flip = ($hemi == 'W' || $hemi == 'S') ? -1 : 1;
-       
+
                return floatval($flip * ($degrees + ($minutes / 60) + ($seconds / 3600)));
        }
 
@@ -197,15 +197,15 @@ class Photo
        private static function gps2Num($coordPart)
        {
                $parts = explode('/', $coordPart);
-       
+
                if (count($parts) <= 0) {
                        return 0;
                }
-       
+
                if (count($parts) == 1) {
                        return $parts[0];
                }
-       
+
                return floatval($parts[0]) / floatval($parts[1]);
        }
 
index 573af02c94f1c90d51ff446d37f962fb575ac607..b47a53c9e9579f2a5dd5d50b325294ccfd0e7a4b 100644 (file)
@@ -84,7 +84,7 @@ class Profile
         * @param array   $profiledata  array
         * @param boolean $show_connect Show connect link
         */
-       public static function load(App $a, $nickname, $profile = 0, $profiledata = array(), $show_connect = true)
+       public static function load(App $a, $nickname, $profile = 0, $profiledata = [], $show_connect = true)
        {
                $user = dba::selectFirst('user', ['uid'], ['nickname' => $nickname]);
 
@@ -160,10 +160,10 @@ class Profile
                if (local_user() && local_user() == $a->profile['uid'] && $profiledata) {
                        $a->page['aside'] .= replace_macros(
                                get_markup_template('profile_edlink.tpl'),
-                               array(
+                               [
                                        '$editprofile' => t('Edit profile'),
                                        '$profid' => $a->profile['id']
-                               )
+                               ]
                        );
                }
 
@@ -314,7 +314,7 @@ class Profile
                                $profile_url = normalise_link(System::baseUrl() . '/profile/' . $profile['nickname']);
                        }
 
-                       if (dba::exists('contact', array('pending' => false, 'uid' => local_user(), 'nurl' => $profile_url))) {
+                       if (dba::exists('contact', ['pending' => false, 'uid' => local_user(), 'nurl' => $profile_url])) {
                                $connect = false;
                        }
                }
@@ -365,21 +365,21 @@ class Profile
 
                // show edit profile to yourself
                if (!$is_contact && $profile['uid'] == local_user() && Feature::isEnabled(local_user(), 'multi_profiles')) {
-                       $profile['edit'] = array(System::baseUrl() . '/profiles', t('Profiles'), '', t('Manage/edit profiles'));
+                       $profile['edit'] = [System::baseUrl() . '/profiles', t('Profiles'), '', t('Manage/edit profiles')];
                        $r = q(
                                "SELECT * FROM `profile` WHERE `uid` = %d",
                                local_user()
                        );
 
-                       $profile['menu'] = array(
+                       $profile['menu'] = [
                                'chg_photo' => t('Change profile photo'),
                                'cr_new' => t('Create New Profile'),
-                               'entries' => array(),
-                       );
+                               'entries' => [],
+                       ];
 
                        if (DBM::is_result($r)) {
                                foreach ($r as $rr) {
-                                       $profile['menu']['entries'][] = array(
+                                       $profile['menu']['entries'][] = [
                                                'photo' => $rr['thumb'],
                                                'id' => $rr['id'],
                                                'alt' => t('Profile Image'),
@@ -387,17 +387,17 @@ class Profile
                                                'isdefault' => $rr['is-default'],
                                                'visibile_to_everybody' => t('visible to everybody'),
                                                'edit_visibility' => t('Edit visibility'),
-                                       );
+                                       ];
                                }
                        }
                }
                if (!$is_contact && $profile['uid'] == local_user() && !Feature::isEnabled(local_user(), 'multi_profiles')) {
-                       $profile['edit'] = array(System::baseUrl() . '/profiles/' . $profile['id'], t('Edit profile'), '', t('Edit profile'));
-                       $profile['menu'] = array(
+                       $profile['edit'] = [System::baseUrl() . '/profiles/' . $profile['id'], t('Edit profile'), '', t('Edit profile')];
+                       $profile['menu'] = [
                                'chg_photo' => t('Change profile photo'),
                                'cr_new' => null,
-                               'entries' => array(),
-                       );
+                               'entries' => [],
+                       ];
                }
 
                // Fetch the account type
@@ -428,7 +428,7 @@ class Profile
                $lastname = $split_name['last'];
 
                if (x($profile, 'guid')) {
-                       $diaspora = array(
+                       $diaspora = [
                                'guid' => $profile['guid'],
                                'podloc' => System::baseUrl(),
                                'searchable' => (($profile['publish'] && $profile['net-publish']) ? 'true' : 'false' ),
@@ -439,7 +439,7 @@ class Profile
                                'photo300' => $profile['contact_photo'],
                                'photo100' => $profile['contact_thumb'],
                                'photo50' => $profile['contact_micro'],
-                       );
+                       ];
                } else {
                        $diaspora = false;
                }
@@ -476,7 +476,7 @@ class Profile
                        }
                }
 
-               $p = array();
+               $p = [];
                foreach ($profile as $k => $v) {
                        $k = str_replace('-', '_', $k);
                        $p[$k] = $v;
@@ -497,7 +497,7 @@ class Profile
                }
 
                $tpl = get_markup_template('profile_vcard.tpl');
-               $o .= replace_macros($tpl, array(
+               $o .= replace_macros($tpl, [
                        '$profile' => $p,
                        '$xmpp' => $xmpp,
                        '$connect' => $connect,
@@ -516,9 +516,9 @@ class Profile
                        '$updated' => $updated,
                        '$diaspora' => $diaspora,
                        '$contact_block' => $contact_block,
-               ));
+               ]);
 
-               $arr = array('profile' => &$profile, 'entry' => &$o);
+               $arr = ['profile' => &$profile, 'entry' => &$o];
 
                call_hooks('profile_sidebar', $arr);
 
@@ -564,7 +564,7 @@ class Profile
                if (DBM::is_result($r)) {
                        $total = 0;
                        $now = strtotime('now');
-                       $cids = array();
+                       $cids = [];
 
                        $istoday = false;
                        foreach ($r as $rr) {
@@ -604,7 +604,7 @@ class Profile
                        }
                }
                $tpl = get_markup_template('birthdays_reminder.tpl');
-               return replace_macros($tpl, array(
+               return replace_macros($tpl, [
                        '$baseurl' => System::baseUrl(),
                        '$classtoday' => $classtoday,
                        '$count' => $total,
@@ -613,7 +613,7 @@ class Profile
                        '$events' => $r,
                        '$lbr' => '{', // raw brackets mess up if/endif macro processing
                        '$rbr' => '}'
-               ));
+               ]);
        }
 
        public static function getEvents()
@@ -645,7 +645,7 @@ class Profile
                        datetime_convert('UTC', 'UTC', 'now - 1 days')
                );
 
-               $r = array();
+               $r = [];
 
                if (DBM::is_result($s)) {
                        $istoday = false;
@@ -691,14 +691,14 @@ class Profile
                        $classtoday = (($istoday) ? 'event-today' : '');
                }
                $tpl = get_markup_template('events_reminder.tpl');
-               return replace_macros($tpl, array(
+               return replace_macros($tpl, [
                        '$baseurl' => System::baseUrl(),
                        '$classtoday' => $classtoday,
                        '$count' => count($r),
                        '$event_reminders' => t('Event Reminders'),
                        '$event_title' => t('Events this week:'),
                        '$events' => $r,
-               ));
+               ]);
        }
 
        public static function getAdvanced(App $a)
@@ -708,18 +708,18 @@ class Profile
 
                $o .= replace_macros(
                        get_markup_template('section_title.tpl'),
-                       array('$title' => t('Profile'))
+                       ['$title' => t('Profile')]
                );
 
                if ($a->profile['name']) {
                        $tpl = get_markup_template('profile_advanced.tpl');
 
-                       $profile = array();
+                       $profile = [];
 
-                       $profile['fullname'] = array(t('Full Name:'), $a->profile['name']);
+                       $profile['fullname'] = [t('Full Name:'), $a->profile['name']];
 
                        if ($a->profile['gender']) {
-                               $profile['gender'] = array(t('Gender:'), $a->profile['gender']);
+                               $profile['gender'] = [t('Gender:'), $a->profile['gender']];
                        }
 
                        if (($a->profile['dob']) && ($a->profile['dob'] > '0001-01-01')) {
@@ -730,18 +730,18 @@ class Profile
                                        day_translate(datetime_convert('UTC', 'UTC', $a->profile['dob'] . ' 00:00 +00:00', $year_bd_format))
                                        : day_translate(datetime_convert('UTC', 'UTC', '2001-' . substr($a->profile['dob'], 5) . ' 00:00 +00:00', $short_bd_format));
 
-                               $profile['birthday'] = array(t('Birthday:'), $val);
+                               $profile['birthday'] = [t('Birthday:'), $val];
                        }
 
                        if (!empty($a->profile['dob'])
                                && $a->profile['dob'] > '0001-01-01'
                                && $age = age($a->profile['dob'], $a->profile['timezone'], '')
                        ) {
-                               $profile['age'] = array(t('Age:'), $age);
+                               $profile['age'] = [t('Age:'), $age];
                        }
 
                        if ($a->profile['marital']) {
-                               $profile['marital'] = array(t('Status:'), $a->profile['marital']);
+                               $profile['marital'] = [t('Status:'), $a->profile['marital']];
                        }
 
                        /// @TODO Maybe use x() here, plus below?
@@ -754,92 +754,92 @@ class Profile
                        }
 
                        if ($a->profile['sexual']) {
-                               $profile['sexual'] = array(t('Sexual Preference:'), $a->profile['sexual']);
+                               $profile['sexual'] = [t('Sexual Preference:'), $a->profile['sexual']];
                        }
 
                        if ($a->profile['homepage']) {
-                               $profile['homepage'] = array(t('Homepage:'), linkify($a->profile['homepage']));
+                               $profile['homepage'] = [t('Homepage:'), linkify($a->profile['homepage'])];
                        }
 
                        if ($a->profile['hometown']) {
-                               $profile['hometown'] = array(t('Hometown:'), linkify($a->profile['hometown']));
+                               $profile['hometown'] = [t('Hometown:'), linkify($a->profile['hometown'])];
                        }
 
                        if ($a->profile['pub_keywords']) {
-                               $profile['pub_keywords'] = array(t('Tags:'), $a->profile['pub_keywords']);
+                               $profile['pub_keywords'] = [t('Tags:'), $a->profile['pub_keywords']];
                        }
 
                        if ($a->profile['politic']) {
-                               $profile['politic'] = array(t('Political Views:'), $a->profile['politic']);
+                               $profile['politic'] = [t('Political Views:'), $a->profile['politic']];
                        }
 
                        if ($a->profile['religion']) {
-                               $profile['religion'] = array(t('Religion:'), $a->profile['religion']);
+                               $profile['religion'] = [t('Religion:'), $a->profile['religion']];
                        }
 
                        if ($txt = prepare_text($a->profile['about'])) {
-                               $profile['about'] = array(t('About:'), $txt);
+                               $profile['about'] = [t('About:'), $txt];
                        }
 
                        if ($txt = prepare_text($a->profile['interest'])) {
-                               $profile['interest'] = array(t('Hobbies/Interests:'), $txt);
+                               $profile['interest'] = [t('Hobbies/Interests:'), $txt];
                        }
 
                        if ($txt = prepare_text($a->profile['likes'])) {
-                               $profile['likes'] = array(t('Likes:'), $txt);
+                               $profile['likes'] = [t('Likes:'), $txt];
                        }
 
                        if ($txt = prepare_text($a->profile['dislikes'])) {
-                               $profile['dislikes'] = array(t('Dislikes:'), $txt);
+                               $profile['dislikes'] = [t('Dislikes:'), $txt];
                        }
 
                        if ($txt = prepare_text($a->profile['contact'])) {
-                               $profile['contact'] = array(t('Contact information and Social Networks:'), $txt);
+                               $profile['contact'] = [t('Contact information and Social Networks:'), $txt];
                        }
 
                        if ($txt = prepare_text($a->profile['music'])) {
-                               $profile['music'] = array(t('Musical interests:'), $txt);
+                               $profile['music'] = [t('Musical interests:'), $txt];
                        }
 
                        if ($txt = prepare_text($a->profile['book'])) {
-                               $profile['book'] = array(t('Books, literature:'), $txt);
+                               $profile['book'] = [t('Books, literature:'), $txt];
                        }
 
                        if ($txt = prepare_text($a->profile['tv'])) {
-                               $profile['tv'] = array(t('Television:'), $txt);
+                               $profile['tv'] = [t('Television:'), $txt];
                        }
 
                        if ($txt = prepare_text($a->profile['film'])) {
-                               $profile['film'] = array(t('Film/dance/culture/entertainment:'), $txt);
+                               $profile['film'] = [t('Film/dance/culture/entertainment:'), $txt];
                        }
 
                        if ($txt = prepare_text($a->profile['romance'])) {
-                               $profile['romance'] = array(t('Love/Romance:'), $txt);
+                               $profile['romance'] = [t('Love/Romance:'), $txt];
                        }
 
                        if ($txt = prepare_text($a->profile['work'])) {
-                               $profile['work'] = array(t('Work/employment:'), $txt);
+                               $profile['work'] = [t('Work/employment:'), $txt];
                        }
 
                        if ($txt = prepare_text($a->profile['education'])) {
-                               $profile['education'] = array(t('School/education:'), $txt);
+                               $profile['education'] = [t('School/education:'), $txt];
                        }
 
                        //show subcribed forum if it is enabled in the usersettings
                        if (Feature::isEnabled($uid, 'forumlist_profile')) {
-                               $profile['forumlist'] = array(t('Forums:'), ForumManager::profileAdvanced($uid));
+                               $profile['forumlist'] = [t('Forums:'), ForumManager::profileAdvanced($uid)];
                        }
 
                        if ($a->profile['uid'] == local_user()) {
-                               $profile['edit'] = array(System::baseUrl() . '/profiles/' . $a->profile['id'], t('Edit profile'), '', t('Edit profile'));
+                               $profile['edit'] = [System::baseUrl() . '/profiles/' . $a->profile['id'], t('Edit profile'), '', t('Edit profile')];
                        }
 
-                       return replace_macros($tpl, array(
+                       return replace_macros($tpl, [
                                '$title' => t('Profile'),
                                '$basic' => t('Basic'),
                                '$advanced' => t('Advanced'),
                                '$profile' => $profile
-                       ));
+                       ]);
                }
 
                return '';
@@ -858,92 +858,92 @@ class Profile
 
                $url = System::baseUrl() . '/profile/' . $nickname;
 
-               $tabs = array(
-                       array(
+               $tabs = [
+                       [
                                'label' => t('Status'),
                                'url'   => $url,
                                'sel'   => !$tab && $a->argv[0] == 'profile' ? 'active' : '',
                                'title' => t('Status Messages and Posts'),
                                'id'    => 'status-tab',
                                'accesskey' => 'm',
-                       ),
-                       array(
+                       ],
+                       [
                                'label' => t('Profile'),
                                'url'   => $url . '/?tab=profile',
                                'sel'   => $tab == 'profile' ? 'active' : '',
                                'title' => t('Profile Details'),
                                'id'    => 'profile-tab',
                                'accesskey' => 'r',
-                       ),
-                       array(
+                       ],
+                       [
                                'label' => t('Photos'),
                                'url'   => System::baseUrl() . '/photos/' . $nickname,
                                'sel'   => !$tab && $a->argv[0] == 'photos' ? 'active' : '',
                                'title' => t('Photo Albums'),
                                'id'    => 'photo-tab',
                                'accesskey' => 'h',
-                       ),
-                       array(
+                       ],
+                       [
                                'label' => t('Videos'),
                                'url'   => System::baseUrl() . '/videos/' . $nickname,
                                'sel'   => !$tab && $a->argv[0] == 'videos' ? 'active' : '',
                                'title' => t('Videos'),
                                'id'    => 'video-tab',
                                'accesskey' => 'v',
-                       ),
-               );
+                       ],
+               ];
 
                // the calendar link for the full featured events calendar
                if ($is_owner && $a->theme_events_in_profile) {
-                       $tabs[] = array(
+                       $tabs[] = [
                                'label' => t('Events'),
                                'url'   => System::baseUrl() . '/events',
                                'sel'   => !$tab && $a->argv[0] == 'events' ? 'active' : '',
                                'title' => t('Events and Calendar'),
                                'id'    => 'events-tab',
                                'accesskey' => 'e',
-                       );
+                       ];
                        // if the user is not the owner of the calendar we only show a calendar
                        // with the public events of the calendar owner
                } elseif (!$is_owner) {
-                       $tabs[] = array(
+                       $tabs[] = [
                                'label' => t('Events'),
                                'url'   => System::baseUrl() . '/cal/' . $nickname,
                                'sel'   => !$tab && $a->argv[0] == 'cal' ? 'active' : '',
                                'title' => t('Events and Calendar'),
                                'id'    => 'events-tab',
                                'accesskey' => 'e',
-                       );
+                       ];
                }
 
                if ($is_owner) {
-                       $tabs[] = array(
+                       $tabs[] = [
                                'label' => t('Personal Notes'),
                                'url'   => System::baseUrl() . '/notes',
                                'sel'   => !$tab && $a->argv[0] == 'notes' ? 'active' : '',
                                'title' => t('Only You Can See This'),
                                'id'    => 'notes-tab',
                                'accesskey' => 't',
-                       );
+                       ];
                }
 
                if ((!$is_owner) && ((count($a->profile)) || (!$a->profile['hide-friends']))) {
-                       $tabs[] = array(
+                       $tabs[] = [
                                'label' => t('Contacts'),
                                'url'   => System::baseUrl() . '/viewcontacts/' . $nickname,
                                'sel'   => !$tab && $a->argv[0] == 'viewcontacts' ? 'active' : '',
                                'title' => t('Contacts'),
                                'id'    => 'viewcontacts-tab',
                                'accesskey' => 'k',
-                       );
+                       ];
                }
 
-               $arr = array('is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => $tab, 'tabs' => $tabs);
+               $arr = ['is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => $tab, 'tabs' => $tabs];
                call_hooks('profile_tabs', $arr);
 
                $tpl = get_markup_template('common_tabs.tpl');
 
-               return replace_macros($tpl, array('$tabs' => $arr['tabs']));
+               return replace_macros($tpl, ['$tabs' => $arr['tabs']]);
        }
 
        /**
@@ -969,13 +969,13 @@ class Profile
                        $urlparts = parse_url($my_url);
 
                        $result = Cache::get('gprobe:' . $urlparts['host']);
-                       if ((!is_null($result)) && (in_array($result['network'], array(NETWORK_FEED, NETWORK_PHANTOM)))) {
+                       if ((!is_null($result)) && (in_array($result['network'], [NETWORK_FEED, NETWORK_PHANTOM]))) {
                                logger('DDoS attempt detected for ' . $urlparts['host'] . ' by ' . $_SERVER['REMOTE_ADDR'] . '. server data: ' . print_r($_SERVER, true), LOGGER_DEBUG);
                                return;
                        }
 
                        Worker::add(PRIORITY_LOW, 'GProbe', $my_url);
-                       $arr = array('zrl' => $my_url, 'url' => $a->cmd);
+                       $arr = ['zrl' => $my_url, 'url' => $a->cmd];
                        call_hooks('zrl_init', $arr);
                }
        }
index 7a6faaf66bbf2f545daab34d82a98b0280b9c8e0..2ba0f05bd81a279ed5d27a95fdd738eb941a9571 100644 (file)
@@ -217,8 +217,8 @@ class User
                                $openid = new \LightOpenID;
                                $openid->identity = $openid_url;
                                $openid->returnUrl = System::baseUrl() . '/openid';
-                               $openid->required = array('namePerson/friendly', 'contact/email', 'namePerson');
-                               $openid->optional = array('namePerson/first', 'media/image/aspect11', 'media/image/default');
+                               $openid->required = ['namePerson/friendly', 'contact/email', 'namePerson'];
+                               $openid->optional = ['namePerson/first', 'media/image/aspect11', 'media/image/default'];
                                try {
                                        $authurl = $openid->authUrl();
                                } catch (Exception $e) {
@@ -456,11 +456,11 @@ class User
 
                $body = sprintf($body, $username, $sitename);
 
-               return notification(array(
+               return notification([
                        'type' => SYSTEM_EMAIL,
                        'to_email' => $email,
                        'subject'=> sprintf( t('Registration at %s'), $sitename),
-                       'body' => $body));
+                       'body' => $body]);
        }
 
        /**
@@ -510,12 +510,12 @@ class User
                $preamble = sprintf($preamble, $username, $sitename);
                $body = sprintf($body, $email, $sitename, $siteurl, $username, $password);
 
-               return notification(array(
+               return notification([
                        'type' => SYSTEM_EMAIL,
                        'to_email' => $email,
                        'subject'=> sprintf( t('Registration details for %s'), $sitename),
                        'preamble'=> $preamble,
-                       'body' => $body));
+                       'body' => $body]);
        }
 
        /**
index 13d2d5ef69e458cda602f920fb3357c1452395d5..f1b41123f4d6ea07f2d697aa3ab0b5fa036ae829 100644 (file)
@@ -80,12 +80,12 @@ class Login extends BaseModule
                if (x($_POST, 'auth-params') && $_POST['auth-params'] === 'login') {
                        $record = null;
 
-                       $addon_auth = array(
+                       $addon_auth = [
                                'username' => trim($_POST['username']),
                                'password' => trim($_POST['password']),
                                'authenticated' => 0,
                                'user_record' => null
-                       );
+                       ];
 
                        /*
                         * A plugin indicates successful login by setting 'authenticated' to non-zero value and returning a user record
@@ -244,10 +244,10 @@ class Login extends BaseModule
                $o = '';
                $reg = false;
                if ($register) {
-                       $reg = array(
+                       $reg = [
                                'title' => t('Create a New Account'),
                                'desc' => t('Register')
-                       );
+                       ];
                }
 
                $noid = Config::get('system', 'no_openid');
@@ -277,12 +277,12 @@ class Login extends BaseModule
                                '$logout'       => t('Logout'),
                                '$login'        => t('Login'),
 
-                               '$lname'        => array('username', t('Nickname or Email: ') , '', ''),
-                               '$lpassword'    => array('password', t('Password: '), '', ''),
-                               '$lremember'    => array('remember', t('Remember me'), 0,  ''),
+                               '$lname'        => ['username', t('Nickname or Email: ') , '', ''],
+                               '$lpassword'    => ['password', t('Password: '), '', ''],
+                               '$lremember'    => ['remember', t('Remember me'), 0,  ''],
 
                                '$openid'       => !$noid,
-                               '$lopenid'      => array('openid_url', t('Or login using OpenID: '),'',''),
+                               '$lopenid'      => ['openid_url', t('Or login using OpenID: '),'',''],
 
                                '$hiddens'      => $hiddens,
 
index f30fb861bc7d3b6dee89c6446c0d319d92590d5b..e5f3941bb5525e0bcbcd873aff8a82a4e00ea19d 100644 (file)
@@ -22,7 +22,7 @@ class Oembed extends BaseModule
 \r
                // Unused form: /oembed/b2h?url=...\r
                if ($a->argv[1] == 'b2h') {\r
-                       $url = array("", trim(hex2bin($_REQUEST['url'])));\r
+                       $url = ["", trim(hex2bin($_REQUEST['url']))];\r
                        echo Content\OEmbed::replaceCallback($url);\r
                        killme();\r
                }\r
index fa4de46e4fe1c76a7376480d1fd950e7a8b7a595..e0c048781344f2fc2637e9ea2efa42fcfb5c2fed 100644 (file)
@@ -44,7 +44,7 @@ class FKOAuthDataStore extends OAuthDataStore
        {
                logger(__function__ . ":" . $consumer_key);
 
-               $s = dba::select('clients', array('client_id', 'pw', 'redirect_uri'), array('client_id' => $consumer_key));
+               $s = dba::select('clients', ['client_id', 'pw', 'redirect_uri'], ['client_id' => $consumer_key]);
                $r = dba::inArray($s);
 
                if (DBM::is_result($r)) {
@@ -64,7 +64,7 @@ class FKOAuthDataStore extends OAuthDataStore
        {
                logger(__function__ . ":" . $consumer . ", " . $token_type . ", " . $token);
 
-               $s = dba::select('tokens', array('id', 'secret', 'scope', 'expires', 'uid'), array('client_id' => $consumer->key, 'scope' => $token_type, 'id' => $token));
+               $s = dba::select('tokens', ['id', 'secret', 'scope', 'expires', 'uid'], ['client_id' => $consumer->key, 'scope' => $token_type, 'id' => $token]);
                $r = dba::inArray($s);
 
                if (DBM::is_result($r)) {
@@ -114,12 +114,12 @@ class FKOAuthDataStore extends OAuthDataStore
 
                $r = dba::insert(
                        'tokens',
-                       array(
+                       [
                                'id' => $key,
                                'secret' => $sec,
                                'client_id' => $k,
                                'scope' => 'request',
-                               'expires' => time() + REQUEST_TOKEN_DURATION)
+                               'expires' => time() + REQUEST_TOKEN_DURATION]
                );
 
                if (!$r) {
@@ -155,13 +155,13 @@ class FKOAuthDataStore extends OAuthDataStore
                        $sec = self::genToken();
                        $r = dba::insert(
                                'tokens',
-                               array(
+                               [
                                        'id' => $key,
                                        'secret' => $sec,
                                        'client_id' => $consumer->key,
                                        'scope' => 'access',
                                        'expires' => time() + ACCESS_TOKEN_DURATION,
-                                       'uid' => $uverifier)
+                                       'uid' => $uverifier]
                        );
 
                        if ($r) {
@@ -169,7 +169,7 @@ class FKOAuthDataStore extends OAuthDataStore
                        }
                }
 
-               dba::delete('tokens', array('id' => $token->key));
+               dba::delete('tokens', ['id' => $token->key]);
 
                if (!is_null($ret) && !is_null($uverifier)) {
                        Config::delete("oauth", $verifier);
index 57c1ed284c9945c69066a0ae3263c32017547b76..2cc855216b000429e6d480ea42fbe0749251c984 100644 (file)
@@ -44,12 +44,12 @@ class Probe
         */
        private static function rearrangeData($data)
        {
-               $fields = array("name", "nick", "guid", "url", "addr", "alias",
+               $fields = ["name", "nick", "guid", "url", "addr", "alias",
                                "photo", "community", "keywords", "location", "about",
                                "batch", "notify", "poll", "request", "confirm", "poco",
-                               "priority", "network", "pubkey", "baseurl");
+                               "priority", "network", "pubkey", "baseurl"];
 
-               $newdata = array();
+               $newdata = [];
                foreach ($fields as $field) {
                        if (isset($data[$field])) {
                                $newdata[$field] = $data[$field];
@@ -107,7 +107,7 @@ class Probe
 
                logger("Probing for ".$host, LOGGER_DEBUG);
 
-               $ret = z_fetch_url($ssl_url, false, $redirects, array('timeout' => $xrd_timeout, 'accept_content' => 'application/xrd+xml'));
+               $ret = z_fetch_url($ssl_url, false, $redirects, ['timeout' => $xrd_timeout, 'accept_content' => 'application/xrd+xml']);
                if ($ret['success']) {
                        $xml = $ret['body'];
                        $xrd = parse_xml_string($xml, false);
@@ -115,7 +115,7 @@ class Probe
                }
 
                if (!is_object($xrd)) {
-                       $ret = z_fetch_url($url, false, $redirects, array('timeout' => $xrd_timeout, 'accept_content' => 'application/xrd+xml'));
+                       $ret = z_fetch_url($url, false, $redirects, ['timeout' => $xrd_timeout, 'accept_content' => 'application/xrd+xml']);
                        if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
                                logger("Probing timeout for ".$url, LOGGER_DEBUG);
                                return false;
@@ -126,16 +126,16 @@ class Probe
                }
                if (!is_object($xrd)) {
                        logger("No xrd object found for ".$host, LOGGER_DEBUG);
-                       return array();
+                       return [];
                }
 
                $links = XML::elementToArray($xrd);
                if (!isset($links["xrd"]["link"])) {
                        logger("No xrd data found for ".$host, LOGGER_DEBUG);
-                       return array();
+                       return [];
                }
 
-               $lrdd = array();
+               $lrdd = [];
                // The following webfinger path is defined in RFC 7033 https://tools.ietf.org/html/rfc7033
                // Problem is that Hubzilla currently doesn't provide all data in the JSON webfinger
                // compared to the XML webfinger. So this is commented out by now.
@@ -223,13 +223,13 @@ class Probe
                $webfinger = null;
 
                if (is_bool($lrdd)) {
-                       return array();
+                       return [];
                }
 
                if (!$lrdd) {
                        $parts = @parse_url($uri);
                        if (!$parts) {
-                               return array();
+                               return [];
                        }
 
                        $host = $parts["host"];
@@ -249,7 +249,7 @@ class Probe
 
                if (!$lrdd) {
                        logger("No lrdd data found for ".$uri, LOGGER_DEBUG);
-                       return array();
+                       return [];
                }
 
                foreach ($lrdd as $type => $template) {
@@ -284,17 +284,17 @@ class Probe
                        return false;
                }
 
-               $data = array();
+               $data = [];
 
                foreach ($webfinger["links"] as $link) {
-                       $data[] = array("@attributes" => $link);
+                       $data[] = ["@attributes" => $link];
                }
 
                if (is_array($webfinger["aliases"])) {
                        foreach ($webfinger["aliases"] as $alias) {
-                               $data[] = array("@attributes" =>
-                                                       array("rel" => "alias",
-                                                               "href" => $alias));
+                               $data[] = ["@attributes" =>
+                                                       ["rel" => "alias",
+                                                               "href" => $alias]];
                        }
                }
 
@@ -365,7 +365,7 @@ class Probe
                $data = self::rearrangeData($data);
 
                // Only store into the cache if the value seems to be valid
-               if (!in_array($data['network'], array(NETWORK_PHANTOM, NETWORK_MAIL))) {
+               if (!in_array($data['network'], [NETWORK_PHANTOM, NETWORK_MAIL])) {
                        Cache::set("Probe::uri:".$network.":".$uri, $data, CACHE_DAY);
 
                        /// @todo temporary fix - we need a real contact update function that updates only changing fields
@@ -380,7 +380,7 @@ class Probe
                                && $data["addr"]
                                && $data["poll"]
                        ) {
-                               $fields = array('name' => $data['name'],
+                               $fields = ['name' => $data['name'],
                                                'nick' => $data['nick'],
                                                'url' => $data['url'],
                                                'addr' => $data['addr'],
@@ -390,9 +390,9 @@ class Probe
                                                'about' => $data['about'],
                                                'notify' => $data['notify'],
                                                'network' => $data['network'],
-                                               'server_url' => $data['baseurl']);
+                                               'server_url' => $data['baseurl']];
 
-                               $fieldnames = array();
+                               $fieldnames = [];
 
                                foreach ($fields as $key => $val) {
                                        if (empty($val)) {
@@ -404,13 +404,13 @@ class Probe
 
                                $fields['updated'] = DBM::date();
 
-                               $condition = array('nurl' => normalise_link($data["url"]));
+                               $condition = ['nurl' => normalise_link($data["url"])];
 
                                $old_fields = dba::selectFirst('gcontact', $fieldnames, $condition);
 
                                dba::update('gcontact', $fields, $condition, $old_fields);
 
-                               $fields = array('name' => $data['name'],
+                               $fields = ['name' => $data['name'],
                                                'nick' => $data['nick'],
                                                'url' => $data['url'],
                                                'addr' => $data['addr'],
@@ -425,9 +425,9 @@ class Probe
                                                'confirm' => $data['confirm'],
                                                'poco' => $data['poco'],
                                                'network' => $data['network'],
-                                               'success_update' => DBM::date());
+                                               'success_update' => DBM::date()];
 
-                               $fieldnames = array();
+                               $fieldnames = [];
 
                                foreach ($fields as $key => $val) {
                                        if (empty($val)) {
@@ -437,7 +437,7 @@ class Probe
                                        }
                                }
 
-                               $condition = array('nurl' => normalise_link($data["url"]), 'self' => false, 'uid' => 0);
+                               $condition = ['nurl' => normalise_link($data["url"]), 'self' => false, 'uid' => 0];
 
                                $old_fields = dba::selectFirst('contact', $fieldnames, $condition);
 
@@ -537,12 +537,12 @@ class Probe
                        }
 
                        if ($host == 'twitter.com') {
-                               return array("network" => NETWORK_TWITTER);
+                               return ["network" => NETWORK_TWITTER];
                        }
                        $lrdd = self::hostMeta($host);
 
                        if (is_bool($lrdd)) {
-                               return array();
+                               return [];
                        }
 
                        $path_parts = explode("/", trim($parts["path"], "/"));
@@ -578,12 +578,12 @@ class Probe
                        $nick = substr($uri, 0, strpos($uri, '@'));
 
                        if (strpos($uri, '@twitter.com')) {
-                               return array("network" => NETWORK_TWITTER);
+                               return ["network" => NETWORK_TWITTER];
                        }
                        $lrdd = self::hostMeta($host);
 
                        if (is_bool($lrdd)) {
-                               return array();
+                               return [];
                        }
 
                        if (!$lrdd) {
@@ -639,7 +639,7 @@ class Probe
 
                logger("Probing ".$uri, LOGGER_DEBUG);
 
-               if (in_array($network, array("", NETWORK_DFRN))) {
+               if (in_array($network, ["", NETWORK_DFRN])) {
                        $result = self::dfrn($webfinger);
                }
                if ((!$result && ($network == "")) || ($network == NETWORK_DIASPORA)) {
@@ -692,7 +692,7 @@ class Probe
                $xrd_timeout = Config::get('system', 'xrd_timeout', 20);
                $redirects = 0;
 
-               $ret = z_fetch_url($url, false, $redirects, array('timeout' => $xrd_timeout, 'accept_content' => $type));
+               $ret = z_fetch_url($url, false, $redirects, ['timeout' => $xrd_timeout, 'accept_content' => $type]);
                if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
                        return false;
                }
@@ -720,7 +720,7 @@ class Probe
                        return false;
                }
 
-               $webfinger = array();
+               $webfinger = [];
 
                if (!empty($xrd_arr["xrd"]["subject"])) {
                        $webfinger["subject"] = $xrd_arr["xrd"]["subject"];
@@ -730,7 +730,7 @@ class Probe
                        $webfinger["aliases"] = $xrd_arr["xrd"]["alias"];
                }
 
-               $webfinger["links"] = array();
+               $webfinger["links"] = [];
 
                foreach ($xrd_arr["xrd"]["link"] as $value => $data) {
                        if (!empty($data["@attributes"])) {
@@ -875,12 +875,12 @@ class Probe
         */
        public static function profile($profile_link)
        {
-               $data = array();
+               $data = [];
 
                logger("Check profile ".$profile_link, LOGGER_DEBUG);
 
                // Fetch data via noscrape - this is faster
-               $noscrape_url = str_replace(array("/hcard/", "/profile/"), "/noscrape/", $profile_link);
+               $noscrape_url = str_replace(["/hcard/", "/profile/"], "/noscrape/", $profile_link);
                $data = self::pollNoscrape($noscrape_url, $data);
 
                if (!isset($data["notify"])
@@ -894,7 +894,7 @@ class Probe
                        $data = self::pollHcard($profile_link, $data, true);
                }
 
-               $prof_data = array();
+               $prof_data = [];
                $prof_data["addr"]         = $data["addr"];
                $prof_data["nick"]         = $data["nick"];
                $prof_data["dfrn-request"] = $data["request"];
@@ -921,7 +921,7 @@ class Probe
        private static function dfrn($webfinger)
        {
                $hcard_url = "";
-               $data = array();
+               $data = [];
                foreach ($webfinger["links"] as $link) {
                        if (($link["rel"] == NAMESPACE_DFRN) && ($link["href"] != "")) {
                                $data["network"] = NETWORK_DFRN;
@@ -1053,10 +1053,10 @@ class Probe
                        }
                }
 
-               $avatar = array();
+               $avatar = [];
                $photos = $xpath->query("//*[contains(concat(' ', @class, ' '), ' photo ') or contains(concat(' ', @class, ' '), ' avatar ')]", $vcard); // */
                foreach ($photos as $photo) {
-                       $attr = array();
+                       $attr = [];
                        foreach ($photo->attributes as $attribute) {
                                $attr[$attribute->name] = trim($attribute->value);
                        }
@@ -1083,7 +1083,7 @@ class Probe
                        if ($search->length > 0) {
                                foreach ($search as $link) {
                                        //$data["request"] = $search->item(0)->nodeValue;
-                                       $attr = array();
+                                       $attr = [];
                                        foreach ($link->attributes as $attribute) {
                                                $attr[$attribute->name] = trim($attribute->value);
                                        }
@@ -1112,7 +1112,7 @@ class Probe
        private static function diaspora($webfinger)
        {
                $hcard_url = "";
-               $data = array();
+               $data = [];
                foreach ($webfinger["links"] as $link) {
                        if (($link["rel"] == "http://microformats.org/profile/hcard") && ($link["href"] != "")) {
                                $hcard_url = $link["href"];
@@ -1194,7 +1194,7 @@ class Probe
         */
        private static function ostatus($webfinger, $short = false)
        {
-               $data = array();
+               $data = [];
 
                if (is_array($webfinger["aliases"])) {
                        foreach ($webfinger["aliases"] as $alias) {
@@ -1323,7 +1323,7 @@ class Probe
 
                $xpath = new DomXPath($doc);
 
-               $data = array();
+               $data = [];
 
                // This is ugly - but pump.io doesn't seem to know a better way for it
                $data["name"] = trim($xpath->query("//h1[@class='media-header']")->item(0)->nodeValue);
@@ -1356,7 +1356,7 @@ class Probe
         */
        private static function pumpio($webfinger)
        {
-               $data = array();
+               $data = [];
                foreach ($webfinger["links"] as $link) {
                        if (($link["rel"] == "http://webfinger.net/rel/profile-page")
                                && ($link["type"] == "text/html")
@@ -1425,7 +1425,7 @@ class Probe
                $feed_url = "";
 
                foreach ($feeds as $feed) {
-                       $attr = array();
+                       $attr = [];
                        foreach ($feed->attributes as $attribute) {
                                $attr[$attribute->name] = trim($attribute->value);
                        }
@@ -1538,7 +1538,7 @@ class Probe
 
                $phost = substr($uri, strpos($uri, '@') + 1);
 
-               $data = array();
+               $data = [];
                $data["addr"]    = $uri;
                $data["network"] = NETWORK_MAIL;
                $data["name"]    = substr($uri, 0, strpos($uri, '@'));
index a0b8af05a9c3f638a00953601c86e63c7194d3af..3501d82704c47bf19afca85ab4288cf6469bb8f3 100644 (file)
@@ -41,13 +41,13 @@ class Image
                if (class_exists('Imagick')) {
                        // Imagick::queryFormats won't help us a lot there...
                        // At least, not yet, other parts of friendica uses this array
-                       $t = array(
+                       $t = [
                                'image/jpeg' => 'jpg',
                                'image/png' => 'png',
                                'image/gif' => 'gif'
-                       );
+                       ];
                } else {
-                       $t = array();
+                       $t = [];
                        $t['image/jpeg'] ='jpg';
                        if (imagetypes() & IMG_PNG) {
                                $t['image/png'] = 'png';
@@ -113,11 +113,11 @@ class Image
         */
        public static function getFormatsMap()
        {
-               $m = array(
+               $m = [
                        'image/jpeg' => 'JPG',
                        'image/png' => 'PNG',
                        'image/gif' => 'GIF'
-               );
+               ];
                return $m;
        }
 
@@ -726,7 +726,7 @@ class Image
                $type = null;
                if ($fromcurl) {
                        $a = get_app();
-                       $headers=array();
+                       $headers=[];
                        $h = explode("\n", $a->get_curl_headers());
                        foreach ($h as $l) {
                                list($k,$v) = array_map("trim", explode(":", trim($l), 2));
@@ -767,7 +767,7 @@ class Image
         */
        public static function getInfoFromURL($url)
        {
-               $data = array();
+               $data = [];
 
                $data = Cache::get($url);
 
@@ -850,7 +850,7 @@ class Image
                                }
                        }
                }
-               return array("width" => $dest_width, "height" => $dest_height);
+               return ["width" => $dest_width, "height" => $dest_height];
        }
 
        /**
@@ -871,7 +871,7 @@ class Image
 
                if (!DBM::is_result($r)) {
                        logger("Can't detect user data for uid ".$uid, LOGGER_DEBUG);
-                       return(array());
+                       return([]);
                }
 
                $page_owner_nick  = $r[0]['nickname'];
@@ -882,7 +882,7 @@ class Image
 
                if ((strlen($imagedata) == 0) && ($url == "")) {
                        logger("No image data and no url provided", LOGGER_DEBUG);
-                       return(array());
+                       return([]);
                } elseif (strlen($imagedata) == 0) {
                        logger("Uploading picture from ".$url, LOGGER_DEBUG);
 
@@ -895,7 +895,7 @@ class Image
 
                if (($maximagesize) && (strlen($imagedata) > $maximagesize)) {
                        logger("Image exceeds size limit of ".$maximagesize, LOGGER_DEBUG);
-                       return(array());
+                       return([]);
                }
 
                $tempfile = tempnam(get_temppath(), "cache");
@@ -909,7 +909,7 @@ class Image
                if (!isset($data["mime"])) {
                        unlink($tempfile);
                        logger("File is no picture", LOGGER_DEBUG);
-                       return(array());
+                       return([]);
                }
 
                $Image = new Image($imagedata, $data["mime"]);
@@ -917,7 +917,7 @@ class Image
                if (!$Image->isValid()) {
                        unlink($tempfile);
                        logger("Picture is no valid picture", LOGGER_DEBUG);
-                       return(array());
+                       return([]);
                }
 
                $Image->orient($tempfile);
@@ -948,11 +948,11 @@ class Image
 
                if (!$r) {
                        logger("Picture couldn't be stored", LOGGER_DEBUG);
-                       return(array());
+                       return([]);
                }
 
-               $image = array("page" => System::baseUrl().'/photos/'.$page_owner_nick.'/image/'.$hash,
-                       "full" => System::baseUrl()."/photo/{$hash}-0.".$Image->getExt());
+               $image = ["page" => System::baseUrl().'/photos/'.$page_owner_nick.'/image/'.$hash,
+                       "full" => System::baseUrl()."/photo/{$hash}-0.".$Image->getExt()];
 
                if ($width > 800 || $height > 800) {
                        $image["large"] = System::baseUrl()."/photo/{$hash}-0.".$Image->getExt();
index 9a131e90375d0dca2d74bc43a144427b533c64b8..a26004e0f3a8f6bfa6accdc458adc7ae5448c1bf 100644 (file)
@@ -23,16 +23,16 @@ require_once 'include/conversation.php';
  */
 class Post extends BaseObject
 {
-       private $data = array();
+       private $data = [];
        private $template = null;
-       private $available_templates = array(
+       private $available_templates = [
                'wall' => 'wall_thread.tpl',
                'wall2wall' => 'wallwall_thread.tpl'
-       );
+       ];
        private $comment_box_template = 'comment_item.tpl';
        private $toplevel = false;
        private $writable = false;
-       private $children = array();
+       private $children = [];
        private $parent = null;
        private $thread = null;
        private $redirect_url = null;
@@ -107,7 +107,7 @@ class Post extends BaseObject
        {
                require_once "mod/proxy.php";
 
-               $result = array();
+               $result = [];
 
                $a = self::getApp();
 
@@ -119,11 +119,11 @@ class Post extends BaseObject
                // between creation time and edit time of a second. Thats why we add the notice
                // only if the difference is more than 1 second.
                if (strtotime($item['edited']) - strtotime($item['created']) > 1) {
-                       $edited = array(
+                       $edited = [
                                'label'    => t('This entry was edited'),
                                'date'     => datetime_convert('UTC', date_default_timezone_get(), $item['edited'], 'r'),
                                'relative' => relative_date($item['edited'])
-                       );
+                       ];
                }
                $commentww = '';
                $sparkle = '';
@@ -147,9 +147,9 @@ class Post extends BaseObject
 
                if (local_user() && link_compare($a->contact['url'], $item['author-link'])) {
                        if ($item["event-id"] != 0) {
-                               $edpost = array("events/event/" . $item['event-id'], t("Edit"));
+                               $edpost = ["events/event/" . $item['event-id'], t("Edit")];
                        } else {
-                               $edpost = array("editpost/" . $item['id'], t("Edit"));
+                               $edpost = ["editpost/" . $item['id'], t("Edit")];
                        }
                        $dropping = in_array($item['uid'], [0, local_user()]);
                } else {
@@ -167,12 +167,12 @@ class Post extends BaseObject
                        $dropping = true;
                }
 
-               $drop = array(
+               $drop = [
                        'dropping' => $dropping,
                        'pagedrop' => ((Feature::isEnabled($conv->getProfileOwner(), 'multi_delete')) ? $item['pagedrop'] : ''),
                        'select'   => t('Select'),
                        'delete'   => t('Delete'),
-               );
+               ];
 
                $filer = (($conv->getProfileOwner() == local_user()) ? t("save to folder") : false);
 
@@ -212,12 +212,12 @@ class Post extends BaseObject
                        }
                }
 
-               $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
+               $locate = ['location' => $item['location'], 'coord' => $item['coord'], 'html' => ''];
                call_hooks('render_location', $locate);
                $location = ((strlen($locate['html'])) ? $locate['html'] : render_location_dummy($locate));
 
                // process action responses - e.g. like/dislike/attend/agree/whatever
-               $response_verbs = array('like', 'dislike');
+               $response_verbs = ['like', 'dislike'];
 
                $isevent = false;
                $attend = [];
@@ -227,7 +227,7 @@ class Post extends BaseObject
                        $response_verbs[] = 'attendmaybe';
                        if ($conv->isWritable()) {
                                $isevent = true;
-                               $attend = array(t('I will attend'), t('I will not attend'), t('I might attend'));
+                               $attend = [t('I will attend'), t('I will not attend'), t('I might attend')];
                        }
                }
 
@@ -254,31 +254,31 @@ class Post extends BaseObject
                        if ($conv->getProfileOwner() == local_user()) {
                                $isstarred = (($item['starred']) ? "starred" : "unstarred");
 
-                               $star = array(
+                               $star = [
                                        'do'        => t("add star"),
                                        'undo'      => t("remove star"),
                                        'toggle'    => t("toggle star status"),
                                        'classdo'   => $item['starred'] ? "hidden" : "",
                                        'classundo' => $item['starred'] ? "" : "hidden",
                                        'starred'   => t('starred'),
-                               );
+                               ];
                                $thread = dba::selectFirst('thread', ['ignored'], ['uid' => $item['uid'], 'iid' => $item['id']]);
                                if (DBM::is_result($thread)) {
-                                       $ignore = array(
+                                       $ignore = [
                                                'do'        => t("ignore thread"),
                                                'undo'      => t("unignore thread"),
                                                'toggle'    => t("toggle ignore status"),
                                                'classdo'   => $thread['ignored'] ? "hidden" : "",
                                                'classundo' => $thread['ignored'] ? "" : "hidden",
                                                'ignored'   => t('ignored'),
-                                       );
+                                       ];
                                }
 
                                if (Feature::isEnabled($conv->getProfileOwner(), 'commtag')) {
-                                       $tagger = array(
+                                       $tagger = [
                                                'add'   => t("add tag"),
                                                'class' => "",
-                                       );
+                                       ];
                                }
                        }
                } else {
@@ -286,12 +286,12 @@ class Post extends BaseObject
                }
 
                if ($conv->isWritable()) {
-                       $buttons = array(
-                               'like'    => array(t("I like this \x28toggle\x29"), t("like")),
-                               'dislike' => Feature::isEnabled($conv->getProfileOwner(), 'dislike') ? array(t("I don't like this \x28toggle\x29"), t("dislike")) : '',
-                       );
+                       $buttons = [
+                               'like'    => [t("I like this \x28toggle\x29"), t("like")],
+                               'dislike' => Feature::isEnabled($conv->getProfileOwner(), 'dislike') ? [t("I don't like this \x28toggle\x29"), t("dislike")] : '',
+                       ];
                        if ($shareable) {
-                               $buttons['share'] = array(t('Share this'), t('share'));
+                               $buttons['share'] = [t('Share this'), t('share')];
                        }
 
                        // If a contact isn't writable, we cannot send a like or dislike to it
@@ -322,7 +322,7 @@ class Post extends BaseObject
 
                // Disable features that aren't available in several networks
                /// @todo Add NETWORK_DIASPORA when it will pass this information
-               if (!in_array($item["item_network"], array(NETWORK_DFRN)) && isset($buttons["dislike"])) {
+               if (!in_array($item["item_network"], [NETWORK_DFRN]) && isset($buttons["dislike"])) {
                        unset($buttons["dislike"]);
                        $isevent = false;
                        $tagger = '';
@@ -336,7 +336,7 @@ class Post extends BaseObject
                        unset($buttons["like"]);
                }
 
-               $tmp_item = array(
+               $tmp_item = [
                        'template'        => $this->getTemplate(),
                        'type'            => implode("", array_slice(explode("/", $item['verb']), -1)),
                        'tags'            => $item['tags'],
@@ -401,14 +401,14 @@ class Post extends BaseObject
                        'received'        => $item['received'],
                        'commented'       => $item['commented'],
                        'created_date'    => $item['created'],
-               );
+               ];
 
-               $arr = array('item' => $item, 'output' => $tmp_item);
+               $arr = ['item' => $item, 'output' => $tmp_item];
                call_hooks('display_item', $arr);
 
                $result = $arr['output'];
 
-               $result['children'] = array();
+               $result['children'] = [];
                $children = $this->getChildren();
                $nb_children = count($children);
                if ($nb_children > 0) {
@@ -774,7 +774,7 @@ class Post extends BaseObject
                        }
 
                        $template = get_markup_template($this->getCommentBoxTemplate());
-                       $comment_box = replace_macros($template, array(
+                       $comment_box = replace_macros($template, [
                                '$return_path' => $a->query_string,
                                '$threaded'    => $this->isThreaded(),
                                '$jsreload'    => '',
@@ -801,7 +801,7 @@ class Post extends BaseObject
                                '$sourceapp'   => t($a->sourcename),
                                '$ww'          => $conv->getMode() === 'network' ? $ww : '',
                                '$rand_num'    => random_digits(12)
-                       ));
+                       ]);
                }
 
                return $comment_box;
index cf1ddceac25253a636b8ff309df04e025bcfe6a0..799029a28117ec8844481b76aa0c6651957e540a 100644 (file)
@@ -17,7 +17,7 @@ require_once 'include/text.php';
  */
 class Thread extends BaseObject
 {
-       private $parents = array();
+       private $parents = [];
        private $mode = null;
        private $writable = false;
        private $profile_owner = 0;
@@ -172,7 +172,7 @@ class Thread extends BaseObject
        public function getTemplateData($conv_responses)
        {
                $a = self::getApp();
-               $result = array();
+               $result = [];
                $i = 0;
 
                foreach ($this->parents as $item) {
index 094c37717a25a100b96635ac6669dde40f79bb82..ab1074ac1dc67be2afa65b956c787b44372dbda9 100644 (file)
@@ -475,7 +475,7 @@ class DFRN
                                WHERE `profile` = 1 AND `uid` = %d ORDER BY scale;",
                        $uid
                );
-               $photos = array();
+               $photos = [];
                $ext = Image::supportedTypes();
 
                foreach ($rp as $p) {
@@ -544,13 +544,13 @@ class DFRN
                XML::addElement($doc, $root, "id", System::baseUrl()."/profile/".$owner["nick"]);
                XML::addElement($doc, $root, "title", $owner["name"]);
 
-               $attributes = array("uri" => "https://friendi.ca", "version" => FRIENDICA_VERSION."-".DB_UPDATE_VERSION);
+               $attributes = ["uri" => "https://friendi.ca", "version" => FRIENDICA_VERSION."-".DB_UPDATE_VERSION];
                XML::addElement($doc, $root, "generator", FRIENDICA_PLATFORM, $attributes);
 
-               $attributes = array("rel" => "license", "href" => "http://creativecommons.org/licenses/by/3.0/");
+               $attributes = ["rel" => "license", "href" => "http://creativecommons.org/licenses/by/3.0/"];
                XML::addElement($doc, $root, "link", "", $attributes);
 
-               $attributes = array("rel" => "alternate", "type" => "text/html", "href" => $alternatelink);
+               $attributes = ["rel" => "alternate", "type" => "text/html", "href" => $alternatelink];
                XML::addElement($doc, $root, "link", "", $attributes);
 
 
@@ -558,13 +558,13 @@ class DFRN
                        // DFRN itself doesn't uses this. But maybe someone else wants to subscribe to the public feed.
                        OStatus::hublinks($doc, $root, $owner["nick"]);
 
-                       $attributes = array("rel" => "salmon", "href" => System::baseUrl()."/salmon/".$owner["nick"]);
+                       $attributes = ["rel" => "salmon", "href" => System::baseUrl()."/salmon/".$owner["nick"]];
                        XML::addElement($doc, $root, "link", "", $attributes);
 
-                       $attributes = array("rel" => "http://salmon-protocol.org/ns/salmon-replies", "href" => System::baseUrl()."/salmon/".$owner["nick"]);
+                       $attributes = ["rel" => "http://salmon-protocol.org/ns/salmon-replies", "href" => System::baseUrl()."/salmon/".$owner["nick"]];
                        XML::addElement($doc, $root, "link", "", $attributes);
 
-                       $attributes = array("rel" => "http://salmon-protocol.org/ns/salmon-mention", "href" => System::baseUrl()."/salmon/".$owner["nick"]);
+                       $attributes = ["rel" => "http://salmon-protocol.org/ns/salmon-mention", "href" => System::baseUrl()."/salmon/".$owner["nick"]];
                        XML::addElement($doc, $root, "link", "", $attributes);
                }
 
@@ -617,18 +617,18 @@ class DFRN
                $uridate = datetime_convert('UTC', 'UTC', $owner['uri-date'].'+00:00', ATOM_TIME);
                $picdate = datetime_convert('UTC', 'UTC', $owner['avatar-date'].'+00:00', ATOM_TIME);
 
-               $attributes = array();
+               $attributes = [];
 
                if (!$public || !$hidewall) {
-                       $attributes = array("dfrn:updated" => $namdate);
+                       $attributes = ["dfrn:updated" => $namdate];
                }
 
                XML::addElement($doc, $author, "name", $owner["name"], $attributes);
                XML::addElement($doc, $author, "uri", System::baseUrl().'/profile/'.$owner["nickname"], $attributes);
                XML::addElement($doc, $author, "dfrn:handle", $owner["addr"], $attributes);
 
-               $attributes = array("rel" => "photo", "type" => "image/jpeg",
-                                       "media:width" => 175, "media:height" => 175, "href" => $owner['photo']);
+               $attributes = ["rel" => "photo", "type" => "image/jpeg",
+                                       "media:width" => 175, "media:height" => 175, "href" => $owner['photo']];
 
                if (!$public || !$hidewall) {
                        $attributes["dfrn:updated"] = $picdate;
@@ -753,20 +753,20 @@ class DFRN
                /// @Todo
                /// - Check real image type and image size
                /// - Check which of these boths elements we should use
-               $attributes = array(
+               $attributes = [
                                "rel" => "photo",
                                "type" => "image/jpeg",
                                "media:width" => 80,
                                "media:height" => 80,
-                               "href" => $contact["photo"]);
+                               "href" => $contact["photo"]];
                XML::addElement($doc, $author, "link", "", $attributes);
 
-               $attributes = array(
+               $attributes = [
                                "rel" => "avatar",
                                "type" => "image/jpeg",
                                "media:width" => 80,
                                "media:height" => 80,
-                               "href" => $contact["photo"]);
+                               "href" => $contact["photo"]];
                XML::addElement($doc, $author, "link", "", $attributes);
 
                return $author;
@@ -813,7 +813,7 @@ class DFRN
                                        $data = parse_xml_string("<dummy>" . $r->link . "</dummy>", false);
                                        if (is_object($data)) {
                                                foreach ($data->link as $link) {
-                                                       $attributes = array();
+                                                       $attributes = [];
                                                        foreach ($link->attributes() as $parameter => $value) {
                                                                $attributes[$parameter] = $value;
                                                        }
@@ -821,12 +821,12 @@ class DFRN
                                                }
                                        }
                                } else {
-                                       $attributes = array("rel" => "alternate", "type" => "text/html", "href" => $r->link);
+                                       $attributes = ["rel" => "alternate", "type" => "text/html", "href" => $r->link];
                                        XML::addElement($doc, $entry, "link", "", $attributes);
                                }
                        }
                        if ($r->content) {
-                               XML::addElement($doc, $entry, "content", bbcode($r->content), array("type" => "html"));
+                               XML::addElement($doc, $entry, "content", bbcode($r->content), ["type" => "html"]);
                        }
 
                        return $entry;
@@ -853,9 +853,9 @@ class DFRN
                                $matches = false;
                                $cnt = preg_match('|\[attach\]href=\"(.*?)\" length=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"|', $r, $matches);
                                if ($cnt) {
-                                       $attributes = array("rel" => "enclosure",
+                                       $attributes = ["rel" => "enclosure",
                                                        "href" => $matches[1],
-                                                       "type" => $matches[3]);
+                                                       "type" => $matches[3]];
 
                                        if (intval($matches[2])) {
                                                $attributes["length"] = intval($matches[2]);
@@ -887,14 +887,14 @@ class DFRN
         */
        private static function entry($doc, $type, $item, $owner, $comment = false, $cid = 0, $single = false)
        {
-               $mentioned = array();
+               $mentioned = [];
 
                if (!$item['parent']) {
                        return;
                }
 
                if ($item['deleted']) {
-                       $attributes = array("ref" => $item['uri'], "when" => datetime_convert('UTC', 'UTC', $item['edited'] . '+00:00', ATOM_TIME));
+                       $attributes = ["ref" => $item['uri'], "when" => datetime_convert('UTC', 'UTC', $item['edited'] . '+00:00', ATOM_TIME)];
                        return XML::createElement($doc, "at:deleted-entry", "", $attributes);
                }
 
@@ -943,9 +943,9 @@ class DFRN
                if (($item['parent'] != $item['id']) || ($item['parent-uri'] !== $item['uri']) || (($item['thr-parent'] !== '') && ($item['thr-parent'] !== $item['uri']))) {
                        $parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']);
                        $parent = q("SELECT `guid`,`plink` FROM `item` WHERE `uri` = '%s' AND `uid` = %d", dbesc($parent_item), intval($item['uid']));
-                       $attributes = array("ref" => $parent_item, "type" => "text/html",
+                       $attributes = ["ref" => $parent_item, "type" => "text/html",
                                                "href" => $parent[0]['plink'],
-                                               "dfrn:diaspora_guid" => $parent[0]['guid']);
+                                               "dfrn:diaspora_guid" => $parent[0]['guid']];
                        XML::addElement($doc, $entry, "thr:in-reply-to", "", $attributes);
                }
 
@@ -965,9 +965,9 @@ class DFRN
                        }
                }
 
-               $attributes = array(
+               $attributes = [
                                "href" => $conversation_href,
-                               "ref" => $conversation_uri);
+                               "ref" => $conversation_uri];
 
                XML::addElement($doc, $entry, "ostatus:conversation", $conversation_uri, $attributes);
 
@@ -982,7 +982,7 @@ class DFRN
 
                // The "content" field is not read by the receiver. We could remove it when the type is "text"
                // We keep it at the moment, maybe there is some old version that doesn't read "dfrn:env"
-               XML::addElement($doc, $entry, "content", (($type == 'html') ? $htmlbody : $body), array("type" => $type));
+               XML::addElement($doc, $entry, "content", (($type == 'html') ? $htmlbody : $body), ["type" => $type]);
 
                // We save this value in "plink". Maybe we should read it from there as well?
                XML::addElement(
@@ -990,8 +990,8 @@ class DFRN
                        $entry,
                        "link",
                        "",
-                       array("rel" => "alternate", "type" => "text/html",
-                                "href" => System::baseUrl() . "/display/" . $item["guid"])
+                       ["rel" => "alternate", "type" => "text/html",
+                                "href" => System::baseUrl() . "/display/" . $item["guid"]]
                );
 
                // "comment-allow" is some old fashioned stuff for old Friendica versions.
@@ -1021,7 +1021,7 @@ class DFRN
                }
 
                if ($item['app']) {
-                       XML::addElement($doc, $entry, "statusnet:notice_info", "", array("local_id" => $item['id'], "source" => $item['app']));
+                       XML::addElement($doc, $entry, "statusnet:notice_info", "", ["local_id" => $item['id'], "source" => $item['app']]);
                }
 
                XML::addElement($doc, $entry, "dfrn:diaspora_guid", $item["guid"]);
@@ -1029,7 +1029,7 @@ class DFRN
                // The signed text contains the content in Markdown, the sender handle and the signatur for the content
                // It is needed for relayed comments to Diaspora.
                if ($item['signed_text']) {
-                       $sign = base64_encode(json_encode(array('signed_text' => $item['signed_text'],'signature' => $item['signature'],'signer' => $item['signer'])));
+                       $sign = base64_encode(json_encode(['signed_text' => $item['signed_text'],'signature' => $item['signature'],'signer' => $item['signer']]));
                        XML::addElement($doc, $entry, "dfrn:diaspora_signature", $sign);
                }
 
@@ -1058,7 +1058,7 @@ class DFRN
                if (count($tags)) {
                        foreach ($tags as $t) {
                                if (($type != 'html') || ($t[0] != "@")) {
-                                       XML::addElement($doc, $entry, "category", "", array("scheme" => "X-DFRN:".$t[0].":".$t[1], "term" => $t[2]));
+                                       XML::addElement($doc, $entry, "category", "", ["scheme" => "X-DFRN:".$t[0].":".$t[1], "term" => $t[2]]);
                                }
                        }
                }
@@ -1084,9 +1084,9 @@ class DFRN
                                        $entry,
                                        "link",
                                        "",
-                                       array("rel" => "mentioned",
+                                       ["rel" => "mentioned",
                                                        "ostatus:object-type" => ACTIVITY_OBJ_GROUP,
-                                                       "href" => $mention)
+                                                       "href" => $mention]
                                );
                        } else {
                                XML::addElement(
@@ -1094,9 +1094,9 @@ class DFRN
                                        $entry,
                                        "link",
                                        "",
-                                       array("rel" => "mentioned",
+                                       ["rel" => "mentioned",
                                                        "ostatus:object-type" => ACTIVITY_OBJ_PERSON,
-                                                       "href" => $mention)
+                                                       "href" => $mention]
                                );
                        }
                }
@@ -1212,7 +1212,7 @@ class DFRN
                        return (($res->status) ? $res->status : 3);
                }
 
-               $postvars     = array();
+               $postvars     = [];
                $sent_dfrn_id = hex2bin((string) $res->dfrn_id);
                $challenge    = hex2bin((string) $res->challenge);
                $perm         = (($res->perm) ? $res->perm : null);
@@ -1447,7 +1447,7 @@ class DFRN
         */
        private static function fetchauthor($xpath, $context, $importer, $element, $onlyfetch, $xml = "")
        {
-               $author = array();
+               $author = [];
                $author["name"] = $xpath->evaluate($element."/atom:name/text()", $context)->item(0)->nodeValue;
                $author["link"] = $xpath->evaluate($element."/atom:uri/text()", $context)->item(0)->nodeValue;
 
@@ -1475,7 +1475,7 @@ class DFRN
                }
 
                // Until now we aren't serving different sizes - but maybe later
-               $avatarlist = array();
+               $avatarlist = [];
                /// @todo check if "avatar" or "photo" would be the best field in the specification
                $avatars = $xpath->query($element."/atom:link[@rel='avatar']", $context);
                foreach ($avatars as $avatar) {
@@ -1505,7 +1505,7 @@ class DFRN
                if (DBM::is_result($r) && !$onlyfetch) {
                        logger("Check if contact details for contact " . $r[0]["id"] . " (" . $r[0]["nick"] . ") have to be updated.", LOGGER_DEBUG);
 
-                       $poco = array("url" => $contact["url"]);
+                       $poco = ["url" => $contact["url"]];
 
                        // When was the last change to name or uri?
                        $name_element = $xpath->query($element . "/atom:name", $context)->item(0);
@@ -1573,7 +1573,7 @@ class DFRN
                        }
 
                        // Save the keywords into the contact table
-                       $tags = array();
+                       $tags = [];
                        $tagelements = $xpath->evaluate($element . "/poco:tags/text()", $context);
                        foreach ($tagelements as $tag) {
                                $tags[$tag->nodeValue] = $tag->nodeValue;
@@ -1597,7 +1597,7 @@ class DFRN
                        // "poco:birthday" is the birthday in the format "yyyy-mm-dd"
                        $value = $xpath->evaluate($element . "/poco:birthday/text()", $context)->item(0)->nodeValue;
 
-                       if (!in_array($value, array("", "0000-00-00", "0001-01-01"))) {
+                       if (!in_array($value, ["", "0000-00-00", "0001-01-01"])) {
                                $bdyear = date("Y");
                                $value = str_replace("0000", $bdyear, $value);
 
@@ -1616,7 +1616,7 @@ class DFRN
                        }
 
                        // Get all field names
-                       $fields = array();
+                       $fields = [];
                        foreach ($r[0] as $field => $data) {
                                $fields[$field] = $data;
                        }
@@ -1629,7 +1629,7 @@ class DFRN
                        unset($fields["uri-date"]);
 
                        // Update check for this field has to be done differently
-                       $datefields = array("name-date", "uri-date");
+                       $datefields = ["name-date", "uri-date"];
                        foreach ($datefields as $field) {
                                if (strtotime($contact[$field]) > strtotime($r[0][$field])) {
                                        logger("Difference for contact " . $contact["id"] . " in field '" . $field . "'. New value: '" . $contact[$field] . "', old value '" . $r[0][$field] . "'", LOGGER_DEBUG);
@@ -1755,7 +1755,7 @@ class DFRN
                logger("Processing mails");
 
                /// @TODO Rewrite this to one statement
-               $msg = array();
+               $msg = [];
                $msg["uid"] = $importer["importer_uid"];
                $msg["from-name"] = $xpath->query("dfrn:sender/dfrn:name/text()", $mail)->item(0)->nodeValue;
                $msg["from-url"] = $xpath->query("dfrn:sender/dfrn:uri/text()", $mail)->item(0)->nodeValue;
@@ -1773,7 +1773,7 @@ class DFRN
 
                // send notifications.
                /// @TODO Arange this mess
-               $notif_params = array(
+               $notif_params = [
                        "type" => NOTIFY_MAIL,
                        "notify_flags" => $importer["notify-flags"],
                        "language" => $importer["language"],
@@ -1786,7 +1786,7 @@ class DFRN
                        "source_photo" => $importer["thumb"],
                        "verb" => ACTIVITY_POST,
                        "otype" => "mail"
-               );
+               ];
 
                notification($notif_params);
 
@@ -1809,7 +1809,7 @@ class DFRN
                logger("Processing suggestions");
 
                /// @TODO Rewrite this to one statement
-               $suggest = array();
+               $suggest = [];
                $suggest["uid"] = $importer["importer_uid"];
                $suggest["cid"] = $importer["id"];
                $suggest["url"] = $xpath->query("dfrn:url/text()", $suggestion)->item(0)->nodeValue;
@@ -1910,7 +1910,7 @@ class DFRN
                );
 
                notification(
-                       array(
+                       [
                                "type"         => NOTIFY_SUGGEST,
                                "notify_flags" => $importer["notify-flags"],
                                "language"     => $importer["language"],
@@ -1923,7 +1923,7 @@ class DFRN
                                "source_link"  => $importer["url"],
                                "source_photo" => $importer["photo"],
                                "verb"         => ACTIVITY_REQ_FRIEND,
-                               "otype"        => "intro")
+                               "otype"        => "intro"]
                );
 
                return true;
@@ -1943,7 +1943,7 @@ class DFRN
                logger("Processing relocations");
 
                /// @TODO Rewrite this to one statement
-               $relocate = array();
+               $relocate = [];
                $relocate["uid"] = $importer["importer_uid"];
                $relocate["cid"] = $importer["id"];
                $relocate["url"] = $xpath->query("dfrn:url/text()", $relocation)->item(0)->nodeValue;
@@ -2043,12 +2043,12 @@ class DFRN
 
                // update items
                /// @todo This is an extreme performance killer
-               $fields = array(
-                       'owner-link' => array($old["url"], $relocate["url"]),
-                       'author-link' => array($old["url"], $relocate["url"]),
+               $fields = [
+                       'owner-link' => [$old["url"], $relocate["url"]],
+                       'author-link' => [$old["url"], $relocate["url"]],
                        //'owner-avatar' => array($old["photo"], $relocate["photo"]),
                        //'author-avatar' => array($old["photo"], $relocate["photo"]),
-               );
+               ];
                foreach ($fields as $n => $f) {
                        $r = q(
                                "SELECT `id` FROM `item` WHERE `%s` = '%s' AND `uid` = %d LIMIT 1",
@@ -2101,11 +2101,11 @@ class DFRN
                                return false;
                        }
 
-                       $fields = array('title' => $item["title"], 'body' => $item["body"],
+                       $fields = ['title' => $item["title"], 'body' => $item["body"],
                                        'tag' => $item["tag"], 'changed' => datetime_convert(),
-                                       'edited' => datetime_convert("UTC", "UTC", $item["edited"]));
+                                       'edited' => datetime_convert("UTC", "UTC", $item["edited"])];
 
-                       $condition = array("`uri` = ? AND `uid` IN (0, ?)", $item["uri"], $importer["importer_uid"]);
+                       $condition = ["`uri` = ? AND `uid` IN (0, ?)", $item["uri"], $importer["importer_uid"]];
                        dba::update('item', $fields, $condition);
 
                        create_tags_from_itemuri($item["uri"], $importer["importer_uid"]);
@@ -2244,7 +2244,7 @@ class DFRN
                        if ($Blink && link_compare($Blink, System::baseUrl() . "/profile/" . $importer["nickname"])) {
                                // send a notification
                                notification(
-                                       array(
+                                       [
                                        "type"         => NOTIFY_POKE,
                                        "notify_flags" => $importer["notify-flags"],
                                        "language"     => $importer["language"],
@@ -2260,7 +2260,7 @@ class DFRN
                                        "verb"         => $item["verb"],
                                        "otype"        => "person",
                                        "activity"     => $verb,
-                                       "parent"       => $item["parent"])
+                                       "parent"       => $item["parent"]]
                                );
                        }
                }
@@ -2491,7 +2491,7 @@ class DFRN
                $item["created"] = $xpath->query("atom:published/text()", $entry)->item(0)->nodeValue;
 
                $item["body"] = $xpath->query("dfrn:env/text()", $entry)->item(0)->nodeValue;
-               $item["body"] = str_replace(array(' ',"\t","\r","\n"), array('','','',''), $item["body"]);
+               $item["body"] = str_replace([' ',"\t","\r","\n"], ['','','',''], $item["body"]);
                // make sure nobody is trying to sneak some html tags by us
                $item["body"] = notags(base64url_decode($item["body"]));
 
@@ -2643,7 +2643,7 @@ class DFRN
                $entrytype = self::getEntryType($importer, $item);
 
                // Now assign the rest of the values that depend on the type of the message
-               if (in_array($entrytype, array(DFRN_REPLY, DFRN_REPLY_RC))) {
+               if (in_array($entrytype, [DFRN_REPLY, DFRN_REPLY_RC])) {
                        if (!isset($item["object-type"])) {
                                $item["object-type"] = ACTIVITY_OBJ_COMMENT;
                        }
@@ -2728,7 +2728,7 @@ class DFRN
                        return;
                }
 
-               if (in_array($entrytype, array(DFRN_REPLY, DFRN_REPLY_RC))) {
+               if (in_array($entrytype, [DFRN_REPLY, DFRN_REPLY_RC])) {
                        $posted_id = item_store($item);
                        $parent = 0;
 
@@ -2883,7 +2883,7 @@ class DFRN
                                                }
                                                if ($author_remove || $owner_remove) {
                                                        $tags = explode(',', $i[0]["tag"]);
-                                                       $newtags = array();
+                                                       $newtags = [];
                                                        if (count($tags)) {
                                                                foreach ($tags as $tag) {
                                                                        if (trim($tag) !== trim($xo->body)) {
@@ -2990,7 +2990,7 @@ class DFRN
                $xpath->registerNamespace("ostatus", NAMESPACE_OSTATUS);
                $xpath->registerNamespace("statusnet", NAMESPACE_STATUSNET);
 
-               $header = array();
+               $header = [];
                $header["uid"] = $importer["uid"];
                $header["network"] = NETWORK_DFRN;
                $header["type"] = "remote";
@@ -3017,7 +3017,7 @@ class DFRN
                        $accounttype = intval($xpath->evaluate("/atom:feed/dfrn:account_type/text()")->item(0)->nodeValue);
 
                        if ($accounttype != $importer["contact-type"]) {
-                               dba::update('contact', array('contact-type' => $accounttype), array('id' => $importer["id"]));
+                               dba::update('contact', ['contact-type' => $accounttype], ['id' => $importer["id"]]);
                        }
                }
 
@@ -3026,8 +3026,8 @@ class DFRN
                $forum = intval($xpath->evaluate("/atom:feed/dfrn:community/text()")->item(0)->nodeValue);
 
                if ($forum != $importer["forum"]) {
-                       $condition = array('`forum` != ? AND `id` = ?', $forum, $importer["id"]);
-                       dba::update('contact', array('forum' => $forum), $condition);
+                       $condition = ['`forum` != ? AND `id` = ?', $forum, $importer["id"]];
+                       dba::update('contact', ['forum' => $forum], $condition);
                }
 
                // We are processing relocations even if we are ignoring a contact
@@ -3064,7 +3064,7 @@ class DFRN
                                self::processEntry($header, $xpath, $entry, $importer, $xml);
                        }
                } else {
-                       $newentries = array();
+                       $newentries = [];
                        $entries = $xpath->query("/atom:feed/atom:entry");
                        foreach ($entries as $entry) {
                                $created = $xpath->query("atom:published/text()", $entry)->item(0)->nodeValue;
index 230a54135ef7446fab2a01b358e04cf646a856bd..f8e4f35c18d62f5d05a3df011ed4280295488312 100644 (file)
@@ -51,10 +51,10 @@ class Diaspora
        {
                $serverdata = Config::get("system", "relay_server");
                if ($serverdata == "") {
-                       return array();
+                       return [];
                }
 
-               $relay = array();
+               $relay = [];
 
                $servers = explode(",", $serverdata);
 
@@ -215,7 +215,7 @@ class Diaspora
                }
 
                $b64url_data = base64url_encode($data);
-               $msg = str_replace(array("\n", "\r", " ", "\t"), array("", "", "", ""), $b64url_data);
+               $msg = str_replace(["\n", "\r", " ", "\t"], ["", "", "", ""], $b64url_data);
 
                $signable_data = $msg.".".base64url_encode($type).".".base64url_encode($encoding).".".base64url_encode($alg);
 
@@ -305,7 +305,7 @@ class Diaspora
                $base = $basedom->children(NAMESPACE_SALMON_ME);
 
                // Not sure if this cleaning is needed
-               $data = str_replace(array(" ", "\t", "\r", "\n"), array("", "", "", ""), $base->data);
+               $data = str_replace([" ", "\t", "\r", "\n"], ["", "", "", ""], $base->data);
 
                // Build the signed data
                $type = $base->data[0]->attributes()->type[0];
@@ -327,9 +327,9 @@ class Diaspora
                        http_status_exit(400);
                }
 
-               return array('message' => (string)base64url_decode($base->data),
+               return ['message' => (string)base64url_decode($base->data),
                                'author' => unxmlify($author_addr),
-                               'key' => (string)$key);
+                               'key' => (string)$key];
        }
 
        /**
@@ -412,7 +412,7 @@ class Diaspora
                // unpack the  data
 
                // strip whitespace so our data element will return to one big base64 blob
-               $data = str_replace(array(" ", "\t", "\r", "\n"), array("", "", "", ""), $base->data);
+               $data = str_replace([" ", "\t", "\r", "\n"], ["", "", "", ""], $base->data);
 
 
                // stash away some other stuff for later
@@ -463,9 +463,9 @@ class Diaspora
 
                logger('Message verified.');
 
-               return array('message' => (string)$inner_decrypted,
+               return ['message' => (string)$inner_decrypted,
                                'author' => unxmlify($author_link),
-                               'key' => (string)$key);
+                               'key' => (string)$key];
        }
 
 
@@ -504,11 +504,11 @@ class Diaspora
 
                // Process item retractions. This has to be done separated from the other stuff,
                // since retractions for comments could come even from non followers.
-               if (!empty($fields) && in_array($fields->getName(), array('retraction'))) {
+               if (!empty($fields) && in_array($fields->getName(), ['retraction'])) {
                        $target = notags(unxmlify($fields->target_type));
-                       if (in_array($target, array("Comment", "Like", "Post", "Reshare", "StatusMessage"))) {
+                       if (in_array($target, ["Comment", "Like", "Post", "Reshare", "StatusMessage"])) {
                                logger('processing retraction for '.$target, LOGGER_DEBUG);
-                               $importer = array("uid" => 0, "page-flags" => PAGE_FREELOVE);
+                               $importer = ["uid" => 0, "page-flags" => PAGE_FREELOVE];
                                $message_id = self::dispatch($importer, $msg, $fields);
                                return $message_id;
                        }
@@ -532,7 +532,7 @@ class Diaspora
                        logger("Unwanted message from ".$msg["author"]." send by ".$_SERVER["REMOTE_ADDR"]." with ".$_SERVER["HTTP_USER_AGENT"].": ".print_r($msg, true), LOGGER_DEBUG);
                } else {
                        // Use a dummy importer to import the data for the public copy
-                       $importer = array("uid" => 0, "page-flags" => PAGE_FREELOVE);
+                       $importer = ["uid" => 0, "page-flags" => PAGE_FREELOVE];
                        $message_id = self::dispatch($importer, $msg, $fields);
                }
 
@@ -657,7 +657,7 @@ class Diaspora
 
                // All retractions are handled identically from now on.
                // In the new version there will only be "retraction".
-               if (in_array($type, array("signed_retraction", "relayable_retraction")))
+               if (in_array($type, ["signed_retraction", "relayable_retraction"]))
                        $type = "retraction";
 
                if ($type == "request") {
@@ -677,7 +677,7 @@ class Diaspora
                                if ($fieldname == "participant_handles") {
                                        $fieldname = "participants";
                                }
-                               if (in_array($type, array("like", "participation"))) {
+                               if (in_array($type, ["like", "participation"])) {
                                        if ($fieldname == "target_type") {
                                                $fieldname = "parent_type";
                                        }
@@ -710,14 +710,14 @@ class Diaspora
                                $author_signature = base64_decode($entry);
                        } elseif (($fieldname == "parent_author_signature") && ($entry != "")) {
                                $parent_author_signature = base64_decode($entry);
-                       } elseif (!in_array($fieldname, array("author_signature", "parent_author_signature", "target_author_signature"))) {
+                       } elseif (!in_array($fieldname, ["author_signature", "parent_author_signature", "target_author_signature"])) {
                                if ($signed_data != "") {
                                        $signed_data .= ";";
                                }
 
                                $signed_data .= $entry;
                        }
-                       if (!in_array($fieldname, array("parent_author_signature", "target_author_signature"))
+                       if (!in_array($fieldname, ["parent_author_signature", "target_author_signature"])
                                || ($orig_type == "relayable_retraction")
                        ) {
                                XML::copy($entry, $fields, $fieldname);
@@ -725,7 +725,7 @@ class Diaspora
                }
 
                // This is something that shouldn't happen at all.
-               if (in_array($type, array("status_message", "reshare", "profile"))) {
+               if (in_array($type, ["status_message", "reshare", "profile"])) {
                        if ($msg["author"] != $fields->author) {
                                logger("Message handle is not the same as envelope sender. Quitting this message.");
                                return false;
@@ -733,8 +733,8 @@ class Diaspora
                }
 
                // Only some message types have signatures. So we quit here for the other types.
-               if (!in_array($type, array("comment", "like"))) {
-                       return array("fields" => $fields, "relayed" => false);
+               if (!in_array($type, ["comment", "like"])) {
+                       return ["fields" => $fields, "relayed" => false];
                }
                // No author_signature? This is a must, so we quit.
                if (!isset($author_signature)) {
@@ -761,7 +761,7 @@ class Diaspora
                        logger("No valid author signature for author ".$fields->author. " in type ".$type." - signed data: ".$signed_data." - Message: ".$msg["message"]." - Signature ".$author_signature, LOGGER_DEBUG);
                        return false;
                } else {
-                       return array("fields" => $fields, "relayed" => $relayed);
+                       return ["fields" => $fields, "relayed" => $relayed];
                }
        }
 
@@ -1311,7 +1311,7 @@ class Diaspora
                        return false;
                }
 
-               $msg = array("message" => $x, "author" => $author);
+               $msg = ["message" => $x, "author" => $author];
 
                $msg["key"] = self::key($msg["author"]);
 
@@ -1396,7 +1396,7 @@ class Diaspora
                        $network = NETWORK_DIASPORA;
                }
 
-               return array("cid" => $cid, "network" => $network);
+               return ["cid" => $cid, "network" => $network];
        }
 
        /**
@@ -1495,30 +1495,30 @@ class Diaspora
                        return false;
                }
 
-               $fields = array('url' => $data['url'], 'nurl' => normalise_link($data['url']),
+               $fields = ['url' => $data['url'], 'nurl' => normalise_link($data['url']),
                                'name' => $data['name'], 'nick' => $data['nick'],
                                'addr' => $data['addr'], 'batch' => $data['batch'],
                                'notify' => $data['notify'], 'poll' => $data['poll'],
-                               'network' => $data['network']);
+                               'network' => $data['network']];
 
-               dba::update('contact', $fields, array('addr' => $old_handle));
+               dba::update('contact', $fields, ['addr' => $old_handle]);
 
-               $fields = array('url' => $data['url'], 'nurl' => normalise_link($data['url']),
+               $fields = ['url' => $data['url'], 'nurl' => normalise_link($data['url']),
                                'name' => $data['name'], 'nick' => $data['nick'],
                                'addr' => $data['addr'], 'connect' => $data['addr'],
                                'notify' => $data['notify'], 'photo' => $data['photo'],
-                               'server_url' => $data['baseurl'], 'network' => $data['network']);
+                               'server_url' => $data['baseurl'], 'network' => $data['network']];
 
-               dba::update('gcontact', $fields, array('addr' => $old_handle));
+               dba::update('gcontact', $fields, ['addr' => $old_handle]);
 
                logger('Contacts are updated.');
 
                // update items
                /// @todo This is an extreme performance killer
-               $fields = array(
-                       'owner-link' => array($contact["url"], $data["url"]),
-                       'author-link' => array($contact["url"], $data["url"]),
-               );
+               $fields = [
+                       'owner-link' => [$contact["url"], $data["url"]],
+                       'author-link' => [$contact["url"], $data["url"]],
+               ];
                foreach ($fields as $n => $f) {
                        $r = q(
                                "SELECT `id` FROM `item` WHERE `%s` = '%s' AND `uid` = %d LIMIT 1",
@@ -1687,7 +1687,7 @@ class Diaspora
                // Fetch the contact id - if we know this contact
                $author_contact = self::authorContactByUrl($contact, $person, $importer["uid"]);
 
-               $datarray = array();
+               $datarray = [];
 
                $datarray["uid"] = $importer["uid"];
                $datarray["contact-id"] = $author_contact["cid"];
@@ -1743,7 +1743,7 @@ class Diaspora
                if ($message_id && $parent_item["origin"]) {
                        // Formerly we stored the signed text, the signature and the author in different fields.
                        // We now store the raw data so that we are more flexible.
-                       dba::insert('sign', array('iid' => $message_id, 'signed_text' => json_encode($data)));
+                       dba::insert('sign', ['iid' => $message_id, 'signed_text' => json_encode($data)]);
 
                        // notify others
                        Worker::add(PRIORITY_HIGH, "Notifier", "comment-import", $message_id);
@@ -1828,22 +1828,22 @@ class Diaspora
 
                dba::unlock();
 
-               dba::update('conv', array('updated' => datetime_convert()), array('id' => $conversation["id"]));
+               dba::update('conv', ['updated' => datetime_convert()], ['id' => $conversation["id"]]);
 
                notification(
-                       array(
+                       [
                        "type" => NOTIFY_MAIL,
                        "notify_flags" => $importer["notify-flags"],
                        "language" => $importer["language"],
                        "to_name" => $importer["username"],
                        "to_email" => $importer["email"],
                        "uid" =>$importer["uid"],
-                       "item" => array("subject" => $subject, "body" => $body),
+                       "item" => ["subject" => $subject, "body" => $body],
                        "source_name" => $person["name"],
                        "source_link" => $person["url"],
                        "source_photo" => $person["thumb"],
                        "verb" => ACTIVITY_POST,
-                       "otype" => "mail")
+                       "otype" => "mail"]
                );
                return true;
        }
@@ -1956,12 +1956,12 @@ class Diaspora
                $link = '<link rel="alternate" type="text/html" href="'.System::baseUrl()."/display/".$importer["nickname"]."/".$parent_item["id"].'" />';
                $parent_body = $parent_item["body"];
 
-               $xmldata = array("object" => array("type" => $objtype,
+               $xmldata = ["object" => ["type" => $objtype,
                                                "local" => "1",
                                                "id" => $parent_item["uri"],
                                                "link" => $link,
                                                "title" => "",
-                                               "content" => $parent_body));
+                                               "content" => $parent_body]];
 
                return XML::fromArray($xmldata, $xml, true);
        }
@@ -1985,7 +1985,7 @@ class Diaspora
 
                // likes on comments aren't supported by Diaspora - only on posts
                // But maybe this will be supported in the future, so we will accept it.
-               if (!in_array($parent_type, array("Post", "Comment"))) {
+               if (!in_array($parent_type, ["Post", "Comment"])) {
                        return false;
                }
 
@@ -2021,7 +2021,7 @@ class Diaspora
                        $verb = ACTIVITY_DISLIKE;
                }
 
-               $datarray = array();
+               $datarray = [];
 
                $datarray["protocol"] = PROTOCOL_DIASPORA;
 
@@ -2072,7 +2072,7 @@ class Diaspora
                if ($message_id && $origin) {
                        // Formerly we stored the signed text, the signature and the author in different fields.
                        // We now store the raw data so that we are more flexible.
-                       dba::insert('sign', array('iid' => $message_id, 'signed_text' => json_encode($data)));
+                       dba::insert('sign', ['iid' => $message_id, 'signed_text' => json_encode($data)]);
 
                        // notify others
                        Worker::add(PRIORITY_HIGH, "Notifier", "comment-import", $message_id);
@@ -2161,7 +2161,7 @@ class Diaspora
 
                dba::unlock();
 
-               dba::update('conv', array('updated' => datetime_convert()), array('id' => $conversation["id"]));
+               dba::update('conv', ['updated' => datetime_convert()], ['id' => $conversation["id"]]);
                return true;
        }
 
@@ -2284,7 +2284,7 @@ class Diaspora
 
                $tags = explode("#", $tags);
 
-               $keywords = array();
+               $keywords = [];
                foreach ($tags as $tag) {
                        $tag = trim(strtolower($tag));
                        if ($tag != "") {
@@ -2338,11 +2338,11 @@ class Diaspora
                        intval($importer["uid"])
                );
 
-               $gcontact = array("url" => $contact["url"], "network" => NETWORK_DIASPORA, "generation" => 2,
+               $gcontact = ["url" => $contact["url"], "network" => NETWORK_DIASPORA, "generation" => 2,
                                        "photo" => $image_url, "name" => $name, "location" => $location,
                                        "about" => $about, "birthday" => $birthday, "gender" => $gender,
                                        "addr" => $author, "nick" => $nick, "keywords" => $keywords,
-                                       "hide" => !$searchable, "nsfw" => $nsfw);
+                                       "hide" => !$searchable, "nsfw" => $nsfw];
 
                $gcid = GContact::update($gcontact);
 
@@ -2367,8 +2367,8 @@ class Diaspora
                if ($contact["rel"] == CONTACT_IS_SHARING) {
                        dba::update(
                                'contact',
-                               array('rel' => CONTACT_IS_FRIEND, 'writable' => true),
-                               array('id' => $contact["id"], 'uid' => $importer["uid"])
+                               ['rel' => CONTACT_IS_FRIEND, 'writable' => true],
+                               ['id' => $contact["id"], 'uid' => $importer["uid"]]
                        );
                }
                // send notification
@@ -2387,7 +2387,7 @@ class Diaspora
                        // they are not CONTACT_IS_FOLLOWER anymore but that's what we have in the array
 
                        if ($self && $contact["rel"] == CONTACT_IS_FOLLOWER) {
-                               $arr = array();
+                               $arr = [];
                                $arr["protocol"] = PROTOCOL_DIASPORA;
                                $arr["uri"] = $arr["parent-uri"] = item_new_uri($a->get_hostname(), $importer["uid"]);
                                $arr["uid"] = $importer["uid"];
@@ -2439,10 +2439,10 @@ class Diaspora
                $link = '<link rel="alternate" type="text/html" href="'.$contact["url"].'" />'."\n".
                        '<link rel="photo" type="image/jpeg" href="'.$contact["thumb"].'" />'."\n";
 
-               $xmldata = array("object" => array("type" => $objtype,
+               $xmldata = ["object" => ["type" => $objtype,
                                                "title" => $contact["name"],
                                                "id" => $contact["url"]."/".$contact["name"],
-                                               "link" => $link));
+                                               "link" => $link]];
 
                return XML::fromArray($xmldata, $xml, true);
        }
@@ -2492,7 +2492,7 @@ class Diaspora
 
                                // If we are now friends, we are sending a share message.
                                // Normally we needn't to do so, but the first message could have been vanished.
-                               if (in_array($contact["rel"], array(CONTACT_IS_FRIEND))) {
+                               if (in_array($contact["rel"], [CONTACT_IS_FRIEND])) {
                                        $u = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1", intval($importer["uid"]));
                                        if ($u) {
                                                logger("Sending share message to author ".$author." - Contact: ".$contact["id"]." - User: ".$importer["uid"], LOGGER_DEBUG);
@@ -2507,7 +2507,7 @@ class Diaspora
                        }
                }
 
-               if (!$following && $sharing && in_array($importer["page-flags"], array(PAGE_SOAPBOX, PAGE_NORMAL))) {
+               if (!$following && $sharing && in_array($importer["page-flags"], [PAGE_SOAPBOX, PAGE_NORMAL])) {
                        logger("Author ".$author." wants to share with us - but doesn't want to listen. Request is ignored.", LOGGER_DEBUG);
                        return false;
                } elseif (!$following && !$sharing) {
@@ -2621,7 +2621,7 @@ class Diaspora
                                $ret = self::sendShare($u[0], $contact_record);
 
                                // Send the profile data, maybe it weren't transmitted before
-                               self::sendProfile($importer["uid"], array($contact_record));
+                               self::sendProfile($importer["uid"], [$contact_record]);
                        }
                }
 
@@ -2654,7 +2654,7 @@ class Diaspora
                        // Then refetch the content, if it is a reshare from a reshare.
                        // If it is a reshared post from another network then reformat to avoid display problems with two share elements
                        if (self::isReshare($r[0]["body"], true)) {
-                               $r = array();
+                               $r = [];
                        } elseif (self::isReshare($r[0]["body"], false) || strstr($r[0]["body"], "[share")) {
                                $r[0]["body"] = diaspora2bb(bb2diaspora($r[0]["body"]));
 
@@ -2738,7 +2738,7 @@ class Diaspora
 
                $orig_url = System::baseUrl()."/display/".$original_item["guid"];
 
-               $datarray = array();
+               $datarray = [];
 
                $datarray["uid"] = $importer["uid"];
                $datarray["contact-id"] = $contact["id"];
@@ -2819,13 +2819,13 @@ class Diaspora
                }
 
                // Fetch items that are about to be deleted
-               $fields = array('uid', 'id', 'parent', 'parent-uri', 'author-link');
+               $fields = ['uid', 'id', 'parent', 'parent-uri', 'author-link'];
 
                // When we receive a public retraction, we delete every item that we find.
                if ($importer['uid'] == 0) {
-                       $condition = array("`guid` = ? AND NOT `file` LIKE '%%[%%' AND NOT `deleted`", $target_guid);
+                       $condition = ["`guid` = ? AND NOT `file` LIKE '%%[%%' AND NOT `deleted`", $target_guid];
                } else {
-                       $condition = array("`guid` = ? AND `uid` = ? AND NOT `file` LIKE '%%[%%' AND NOT `deleted`", $target_guid, $importer['uid']);
+                       $condition = ["`guid` = ? AND `uid` = ? AND NOT `file` LIKE '%%[%%' AND NOT `deleted`", $target_guid, $importer['uid']];
                }
                $r = dba::select('item', $fields, $condition);
                if (!DBM::is_result($r)) {
@@ -2847,13 +2847,13 @@ class Diaspora
                        // The function "item_drop" doesn't work for that case
                        dba::update(
                                'item',
-                               array(
+                               [
                                        'deleted' => true,
                                        'title' => '',
                                        'body' => '',
                                        'edited' => datetime_convert(),
-                                       'changed' => datetime_convert()),
-                               array('id' => $item["id"])
+                                       'changed' => datetime_convert()],
+                               ['id' => $item["id"]]
                        );
 
                        // Delete the thread - if it is a starting post and not a comment
@@ -2887,7 +2887,7 @@ class Diaspora
                $target_type = notags(unxmlify($data->target_type));
 
                $contact = self::contactByHandle($importer["uid"], $sender);
-               if (!$contact && (in_array($target_type, array("Contact", "Person")))) {
+               if (!$contact && (in_array($target_type, ["Contact", "Person"]))) {
                        logger("cannot find contact for sender: ".$sender." and user ".$importer["uid"]);
                        return false;
                }
@@ -2944,7 +2944,7 @@ class Diaspora
                        return true;
                }
 
-               $address = array();
+               $address = [];
                if ($data->location) {
                        foreach ($data->location->children() as $fieldname => $data) {
                                $address[$fieldname] = notags(unxmlify($data));
@@ -2953,7 +2953,7 @@ class Diaspora
 
                $body = diaspora2bb($text);
 
-               $datarray = array();
+               $datarray = [];
 
                // Attach embedded pictures to the body
                if ($data->photo) {
@@ -3090,14 +3090,14 @@ class Diaspora
 
                $ciphertext = self::aesEncrypt($aes_key, $iv, $msg);
 
-               $json = json_encode(array("iv" => $b_iv, "key" => $b_aes_key));
+               $json = json_encode(["iv" => $b_iv, "key" => $b_aes_key]);
 
                $encrypted_key_bundle = "";
                openssl_public_encrypt($json, $encrypted_key_bundle, $pubkey);
 
                $json_object = json_encode(
-                       array("aes_key" => base64_encode($encrypted_key_bundle),
-                                       "encrypted_magic_envelope" => base64_encode($ciphertext))
+                       ["aes_key" => base64_encode($encrypted_key_bundle),
+                                       "encrypted_magic_envelope" => base64_encode($ciphertext)]
                );
 
                return $json_object;
@@ -3114,7 +3114,7 @@ class Diaspora
        public static function buildMagicEnvelope($msg, $user)
        {
                $b64url_data = base64url_encode($msg);
-               $data = str_replace(array("\n", "\r", " ", "\t"), array("", "", "", ""), $b64url_data);
+               $data = str_replace(["\n", "\r", " ", "\t"], ["", "", "", ""], $b64url_data);
 
                $key_id = base64url_encode(self::myHandle($user));
                $type = "application/xml";
@@ -3130,14 +3130,14 @@ class Diaspora
                $signature = Crypto::rsaSign($signable_data, $user["uprvkey"]);
                $sig = base64url_encode($signature);
 
-               $xmldata = array("me:env" => array("me:data" => $data,
-                                                       "@attributes" => array("type" => $type),
+               $xmldata = ["me:env" => ["me:data" => $data,
+                                                       "@attributes" => ["type" => $type],
                                                        "me:encoding" => $encoding,
                                                        "me:alg" => $alg,
                                                        "me:sig" => $sig,
-                                                       "@attributes2" => array("key_id" => $key_id)));
+                                                       "@attributes2" => ["key_id" => $key_id]]];
 
-               $namespaces = array("me" => "http://salmon-protocol.org/ns/magic-env");
+               $namespaces = ["me" => "http://salmon-protocol.org/ns/magic-env"];
 
                return XML::fromArray($xmldata, $xml, false, $namespaces);
        }
@@ -3230,7 +3230,7 @@ class Diaspora
                        if (!intval(Config::get("system", "diaspora_test"))) {
                                $content_type = (($public_batch) ? "application/magic-envelope+xml" : "application/json");
 
-                               post_url($dest_url."/", $envelope, array("Content-Type: ".$content_type));
+                               post_url($dest_url."/", $envelope, ["Content-Type: ".$content_type]);
                                $return_code = $a->get_curl_code();
                        } else {
                                logger("test_mode");
@@ -3278,7 +3278,7 @@ class Diaspora
         */
        public static function buildPostXml($type, $message)
        {
-               $data = array($type => $message);
+               $data = [$type => $message];
 
                return XML::fromArray($data, $xml);
        }
@@ -3357,10 +3357,10 @@ class Diaspora
 
                $author = self::myHandle($owner);
 
-               $message = array("author" => $author,
+               $message = ["author" => $author,
                                "guid" => get_guid(32),
                                "parent_type" => "Post",
-                               "parent_guid" => $item["guid"]);
+                               "parent_guid" => $item["guid"]];
 
                logger("Send participation for ".$item["guid"]." by ".$author, LOGGER_DEBUG);
 
@@ -3387,9 +3387,9 @@ class Diaspora
                $signed_text = 'AccountMigration:'.$old_handle.':'.$profile['author'];
                $signature = base64_encode(Crypto::rsaSign($signed_text, $owner["uprvkey"], "sha256"));
 
-               $message = array("author" => $old_handle,
+               $message = ["author" => $old_handle,
                                "profile" => $profile,
-                               "signature" => $signature);
+                               "signature" => $signature];
 
                logger("Send account migration ".print_r($message, true), LOGGER_DEBUG);
 
@@ -3427,10 +3427,10 @@ class Diaspora
                }
                */
 
-               $message = array("author" => self::myHandle($owner),
+               $message = ["author" => self::myHandle($owner),
                                "recipient" => $contact["addr"],
                                "following" => "true",
-                               "sharing" => "true");
+                               "sharing" => "true"];
 
                logger("Send share ".print_r($message, true), LOGGER_DEBUG);
 
@@ -3447,10 +3447,10 @@ class Diaspora
         */
        public static function sendUnshare($owner, $contact)
        {
-               $message = array("author" => self::myHandle($owner),
+               $message = ["author" => self::myHandle($owner),
                                "recipient" => $contact["addr"],
                                "following" => "false",
-                               "sharing" => "false");
+                               "sharing" => "false"];
 
                logger("Send unshare ".print_r($message, true), LOGGER_DEBUG);
 
@@ -3510,7 +3510,7 @@ class Diaspora
                                NETWORK_DIASPORA
                        );
                        if ($r) {
-                               $ret= array();
+                               $ret= [];
                                $ret["root_handle"] = self::handleFromContact($r[0]["contact-id"]);
                                $ret["root_guid"] = $guid;
                                return($ret);
@@ -3528,7 +3528,7 @@ class Diaspora
                        $profile = $matches[1];
                }
 
-               $ret= array();
+               $ret= [];
 
                $ret["root_handle"] = preg_replace("=https?://(.*)/u/(.*)=ism", "$2@$1", $profile);
                if (($ret["root_handle"] == $profile) || ($ret["root_handle"] == "")) {
@@ -3565,23 +3565,23 @@ class Diaspora
        {
                $r = q("SELECT `guid`, `uid`, `start`, `finish`, `nofinish`, `summary`, `desc`, `location`, `adjust` FROM `event` WHERE `id` = %d", intval($event_id));
                if (!DBM::is_result($r)) {
-                       return array();
+                       return [];
                }
 
                $event = $r[0];
 
-               $eventdata = array();
+               $eventdata = [];
 
                $r = q("SELECT `timezone` FROM `user` WHERE `uid` = %d", intval($event['uid']));
                if (!DBM::is_result($r)) {
-                       return array();
+                       return [];
                }
 
                $user = $r[0];
 
                $r = q("SELECT `addr`, `nick` FROM `contact` WHERE `uid` = %d AND `self`", intval($event['uid']));
                if (!DBM::is_result($r)) {
-                       return array();
+                       return [];
                }
 
                $owner = $r[0];
@@ -3618,7 +3618,7 @@ class Diaspora
                        $eventdata['description'] = html_entity_decode(bb2diaspora($event['desc']));
                }
                if ($event['location']) {
-                       $location = array();
+                       $location = [];
                        $location["address"] = html_entity_decode(bb2diaspora($event['location']));
                        $location["lat"] = 0;
                        $location["lng"] = 0;
@@ -3655,13 +3655,13 @@ class Diaspora
 
                // Detect a share element and do a reshare
                if (!$item['private'] && ($ret = self::isReshare($item["body"]))) {
-                       $message = array("author" => $myaddr,
+                       $message = ["author" => $myaddr,
                                        "guid" => $item["guid"],
                                        "created_at" => $created,
                                        "root_author" => $ret["root_handle"],
                                        "root_guid" => $ret["root_guid"],
                                        "provider_display_name" => $item["app"],
-                                       "public" => $public);
+                                       "public" => $public];
 
                        $type = "reshare";
                } else {
@@ -3686,7 +3686,7 @@ class Diaspora
                                }
                        }
 
-                       $location = array();
+                       $location = [];
 
                        if ($item["location"] != "")
                                $location["address"] = $item["location"];
@@ -3697,13 +3697,13 @@ class Diaspora
                                $location["lng"] = $coord[1];
                        }
 
-                       $message = array("author" => $myaddr,
+                       $message = ["author" => $myaddr,
                                        "guid" => $item["guid"],
                                        "created_at" => $created,
                                        "public" => $public,
                                        "text" => $body,
                                        "provider_display_name" => $item["app"],
-                                       "location" => $location);
+                                       "location" => $location];
 
                        // Diaspora rejects messages when they contain a location without "lat" or "lng"
                        if (!isset($location["lat"]) || !isset($location["lng"])) {
@@ -3723,7 +3723,7 @@ class Diaspora
                        $type = "status_message";
                }
 
-               $msg = array("type" => $type, "message" => $message);
+               $msg = ["type" => $type, "message" => $message];
 
                Cache::set($cachekey, $msg, CACHE_QUARTER_HOUR);
 
@@ -3774,12 +3774,12 @@ class Diaspora
                        $positive = "false";
                }
 
-               return(array("author" => self::myHandle($owner),
+               return(["author" => self::myHandle($owner),
                                "guid" => $item["guid"],
                                "parent_guid" => $parent["guid"],
                                "parent_type" => $target_type,
                                "positive" => $positive,
-                               "author_signature" => ""));
+                               "author_signature" => ""]);
        }
 
        /**
@@ -3817,11 +3817,11 @@ class Diaspora
                                return false;
                }
 
-               return(array("author" => self::myHandle($owner),
+               return(["author" => self::myHandle($owner),
                                "guid" => $item["guid"],
                                "parent_guid" => $parent["guid"],
                                "status" => $attend_answer,
-                               "author_signature" => ""));
+                               "author_signature" => ""]);
        }
 
        /**
@@ -3856,12 +3856,12 @@ class Diaspora
                $text = html_entity_decode(bb2diaspora($item["body"]));
                $created = datetime_convert("UTC", "UTC", $item["created"], 'Y-m-d\TH:i:s\Z');
 
-               $comment = array("author" => self::myHandle($owner),
+               $comment = ["author" => self::myHandle($owner),
                                "guid" => $item["guid"],
                                "created_at" => $created,
                                "parent_guid" => $parent["guid"],
                                "text" => $text,
-                               "author_signature" => "");
+                               "author_signature" => ""];
 
                // Send the thread parent guid only if it is a threaded comment
                if ($item['thr-parent'] != $item['parent-uri']) {
@@ -3885,10 +3885,10 @@ class Diaspora
         */
        public static function sendFollowup($item, $owner, $contact, $public_batch = false)
        {
-               if (in_array($item['verb'], array(ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE))) {
+               if (in_array($item['verb'], [ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE])) {
                        $message = self::constructAttend($item, $owner);
                        $type = "event_participation";
-               } elseif (in_array($item["verb"], array(ACTIVITY_LIKE, ACTIVITY_DISLIKE))) {
+               } elseif (in_array($item["verb"], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) {
                        $message = self::constructLike($item, $owner);
                        $type = "like";
                } else {
@@ -3919,17 +3919,17 @@ class Diaspora
                $signed_parts = explode(";", $signature['signed_text']);
 
                if ($item["deleted"]) {
-                       $message = array("author" => $signature['signer'],
+                       $message = ["author" => $signature['signer'],
                                        "target_guid" => $signed_parts[0],
-                                       "target_type" => $signed_parts[1]);
-               } elseif (in_array($item["verb"], array(ACTIVITY_LIKE, ACTIVITY_DISLIKE))) {
-                       $message = array("author" => $signed_parts[4],
+                                       "target_type" => $signed_parts[1]];
+               } elseif (in_array($item["verb"], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) {
+                       $message = ["author" => $signed_parts[4],
                                        "guid" => $signed_parts[1],
                                        "parent_guid" => $signed_parts[3],
                                        "parent_type" => $signed_parts[2],
                                        "positive" => $signed_parts[0],
                                        "author_signature" => $signature['signature'],
-                                       "parent_author_signature" => "");
+                                       "parent_author_signature" => ""];
                } else {
                        // Remove the comment guid
                        $guid = array_shift($signed_parts);
@@ -3943,12 +3943,12 @@ class Diaspora
                        // Glue the parts together
                        $text = implode(";", $signed_parts);
 
-                       $message = array("author" => $handle,
+                       $message = ["author" => $handle,
                                        "guid" => $guid,
                                        "parent_guid" => $parent_guid,
                                        "text" => implode(";", $signed_parts),
                                        "author_signature" => $signature['signature'],
-                                       "parent_author_signature" => "");
+                                       "parent_author_signature" => ""];
                }
                return $message;
        }
@@ -3967,7 +3967,7 @@ class Diaspora
        {
                if ($item["deleted"]) {
                        return self::sendRetraction($item, $owner, $contact, $public_batch, true);
-               } elseif (in_array($item["verb"], array(ACTIVITY_LIKE, ACTIVITY_DISLIKE))) {
+               } elseif (in_array($item["verb"], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) {
                        $type = "like";
                } else {
                        $type = "comment";
@@ -3996,7 +3996,7 @@ class Diaspora
                } else {// New way
                        $msg = json_decode($signature['signed_text'], true);
 
-                       $message = array();
+                       $message = [];
                        if (is_array($msg)) {
                                foreach ($msg as $field => $data) {
                                        if (!$item["deleted"]) {
@@ -4041,15 +4041,15 @@ class Diaspora
 
                if ($item['id'] == $item['parent']) {
                        $target_type = "Post";
-               } elseif (in_array($item["verb"], array(ACTIVITY_LIKE, ACTIVITY_DISLIKE))) {
+               } elseif (in_array($item["verb"], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) {
                        $target_type = "Like";
                } else {
                        $target_type = "Comment";
                }
 
-               $message = array("author" => $itemaddr,
+               $message = ["author" => $itemaddr,
                                "target_guid" => $item['guid'],
-                               "target_type" => $target_type);
+                               "target_type" => $target_type];
 
                logger("Got message ".print_r($message, true), LOGGER_DEBUG);
 
@@ -4081,36 +4081,36 @@ class Diaspora
                }
                $cnv = $r[0];
 
-               $conv = array(
+               $conv = [
                        "author" => $cnv["creator"],
                        "guid" => $cnv["guid"],
                        "subject" => $cnv["subject"],
                        "created_at" => datetime_convert("UTC", "UTC", $cnv['created'], 'Y-m-d\TH:i:s\Z'),
                        "participants" => $cnv["recips"]
-               );
+               ];
 
                $body = bb2diaspora($item["body"]);
                $created = datetime_convert("UTC", "UTC", $item["created"], 'Y-m-d\TH:i:s\Z');
 
-               $msg = array(
+               $msg = [
                        "author" => $myaddr,
                        "guid" => $item["guid"],
                        "conversation_guid" => $cnv["guid"],
                        "text" => $body,
                        "created_at" => $created,
-               );
+               ];
 
                if ($item["reply"]) {
                        $message = $msg;
                        $type = "message";
                } else {
-                       $message = array(
+                       $message = [
                                        "author" => $cnv["creator"],
                                        "guid" => $cnv["guid"],
                                        "subject" => $cnv["subject"],
                                        "created_at" => datetime_convert("UTC", "UTC", $cnv['created'], 'Y-m-d\TH:i:s\Z'),
                                        "participants" => $cnv["recips"],
-                                       "message" => $msg);
+                                       "message" => $msg];
 
                        $type = "conversation";
                }
@@ -4193,7 +4193,7 @@ class Diaspora
                );
 
                if (!$r) {
-                       return array();
+                       return [];
                }
 
                $profile = $r[0];
@@ -4235,7 +4235,7 @@ class Diaspora
                        $tags = trim($tags);
                }
 
-               return array("author" => $handle,
+               return ["author" => $handle,
                                "first_name" => $first,
                                "last_name" => $last,
                                "image_url" => $large,
@@ -4247,7 +4247,7 @@ class Diaspora
                                "location" => $location,
                                "searchable" => $searchable,
                                "nsfw" => "false",
-                               "tag_string" => $tags);
+                               "tag_string" => $tags];
        }
 
        /**
@@ -4318,7 +4318,7 @@ class Diaspora
                        return false;
                }
 
-               if (!in_array($r[0]["verb"], array(ACTIVITY_LIKE, ACTIVITY_DISLIKE))) {
+               if (!in_array($r[0]["verb"], [ACTIVITY_LIKE, ACTIVITY_DISLIKE])) {
                        return false;
                }
 
@@ -4333,7 +4333,7 @@ class Diaspora
                 * Now store the signature more flexible to dynamically support new fields.
                 * This will break Diaspora compatibility with Friendica versions prior to 3.5.
                 */
-               dba::insert('sign', array('iid' => $post_id, 'signed_text' => json_encode($message)));
+               dba::insert('sign', ['iid' => $post_id, 'signed_text' => json_encode($message)]);
 
                logger('Stored diaspora like signature');
                return true;
@@ -4369,7 +4369,7 @@ class Diaspora
                 * Now store the signature more flexible to dynamically support new fields.
                 * This will break Diaspora compatibility with Friendica versions prior to 3.5.
                 */
-               dba::insert('sign', array('iid' => $message_id, 'signed_text' => json_encode($message)));
+               dba::insert('sign', ['iid' => $message_id, 'signed_text' => json_encode($message)]);
 
                logger('Stored diaspora comment signature');
                return true;
index 89f7808c9986e30bda4b8c074c109e16a61e537b..ee8c43eff8b77d8bce371eb1920127a148c70f54 100644 (file)
@@ -36,26 +36,26 @@ class Email
        public static function poll($mbox, $email_addr)
        {
                if (!$mbox || !$email_addr) {
-                       return array();
+                       return [];
                }
 
                $search1 = @imap_search($mbox, 'FROM "' . $email_addr . '"', SE_UID);
                if (!$search1) {
-                       $search1 = array();
+                       $search1 = [];
                } else {
                        logger("Found mails from ".$email_addr, LOGGER_DEBUG);
                }
 
                $search2 = @imap_search($mbox, 'TO "' . $email_addr . '"', SE_UID);
                if (!$search2) {
-                       $search2 = array();
+                       $search2 = [];
                } else {
                        logger("Found mails to ".$email_addr, LOGGER_DEBUG);
                }
 
                $search3 = @imap_search($mbox, 'CC "' . $email_addr . '"', SE_UID);
                if (!$search3) {
-                       $search3 = array();
+                       $search3 = [];
                } else {
                        logger("Found mails cc ".$email_addr, LOGGER_DEBUG);
                }
@@ -84,8 +84,8 @@ class Email
         */
        public static function messageMeta($mbox, $uid)
        {
-               $ret = (($mbox && $uid) ? @imap_fetch_overview($mbox, $uid, FT_UID) : array(array())); // POSSIBLE CLEANUP --> array(array()) is probably redundant now
-               return (count($ret)) ? $ret : array();
+               $ret = (($mbox && $uid) ? @imap_fetch_overview($mbox, $uid, FT_UID) : [[]]); // POSSIBLE CLEANUP --> array(array()) is probably redundant now
+               return (count($ret)) ? $ret : [];
        }
 
        /**
@@ -96,7 +96,7 @@ class Email
         */
        public static function getMessage($mbox, $uid, $reply)
        {
-               $ret = array();
+               $ret = [];
 
                $struc = (($mbox && $uid) ? @imap_fetchstructure($mbox, $uid, FT_UID) : null);
 
@@ -179,7 +179,7 @@ class Email
 
                // PARAMETERS
                // get all parameters, like charset, filenames of attachments, etc.
-               $params = array();
+               $params = [];
                if ($p->parameters) {
                        foreach ($p->parameters as $x) {
                                $params[strtolower($x->attribute)] = $x->value;
@@ -388,7 +388,7 @@ class Email
 
        private static function unifyAttributionLine($message)
        {
-               $quotestr = array('quote', 'spoiler');
+               $quotestr = ['quote', 'spoiler'];
                foreach ($quotestr as $quote) {
                        $message = self::saveReplace('/----- Original Message -----\s.*?From: "([^<"].*?)" <(.*?)>\s.*?To: (.*?)\s*?Cc: (.*?)\s*?Sent: (.*?)\s.*?Subject: ([^\n].*)\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message);
                        $message = self::saveReplace('/----- Original Message -----\s.*?From: "([^<"].*?)" <(.*?)>\s.*?To: (.*?)\s*?Sent: (.*?)\s.*?Subject: ([^\n].*)\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message);
@@ -473,7 +473,7 @@ class Email
 
                $cleaned = trim($result[1].$result[2].$result[3]);
 
-               $cleaned = str_replace(array("\n- --\n", "\n- -"), array("\n-- \n", "\n-"), $cleaned);
+               $cleaned = str_replace(["\n- --\n", "\n- -"], ["\n-- \n", "\n-"], $cleaned);
 
                if ($cleaned == '') {
                        $cleaned = $message;
@@ -496,7 +496,7 @@ class Email
 
                // When the signature separator is inside a quote, we don't separate
                if (($sigpos < $quotepos) && ($sigpos != 0)) {
-                       return array('body' => $message, 'sig' => '');
+                       return ['body' => $message, 'sig' => ''];
                }
 
                $pattern = '/(.*)[\r\n]-- [\r\n](.*)/is';
@@ -511,14 +511,14 @@ class Email
                        $sig = '';
                }
 
-               return array('body' => $cleaned, 'sig' => $sig);
+               return ['body' => $cleaned, 'sig' => $sig];
        }
 
        private static function removeLinebreak($message)
        {
                $arrbody = explode("\n", trim($message));
 
-               $lines = array();
+               $lines = [];
                $lineno = 0;
 
                foreach ($arrbody as $i => $line) {
@@ -589,7 +589,7 @@ class Email
        {
                // Convert Quotes
                $arrbody = explode("\n", trim($body));
-               $arrlevel = array();
+               $arrlevel = [];
 
                for ($i = 0; $i < count($arrbody); $i++) {
                        $quotelevel = 0;
@@ -609,7 +609,7 @@ class Email
 
                $quotelevel = 0;
                $previousquote = 0;
-               $arrbodyquoted = array();
+               $arrbodyquoted = [];
 
                for ($i = 0; $i < count($arrbody); $i++) {
                        $previousquote = $quotelevel;
@@ -662,7 +662,7 @@ class Email
                        $message = str_replace("[/quote][quote]", "", $message);
                } while ($message != $oldmessage);
 
-               $quotes = array();
+               $quotes = [];
 
                $startquotes = 0;
 
index 85983c92882324546293c9c1c7f6484a0550f0b4..b629c4ecb9b934e7cdbb71b9b0709e7955b23482 100644 (file)
@@ -65,7 +65,7 @@ class Feed {
                $xpath->registerNamespace('media', "http://search.yahoo.com/mrss/");
                $xpath->registerNamespace('poco', NAMESPACE_POCO);
 
-               $author = array();
+               $author = [];
 
                // Is it RDF?
                if ($xpath->query('/rdf:RDF/rss:channel')->length > 0) {
@@ -185,7 +185,7 @@ class Feed {
                        $author["owner-avatar"] = $contact["thumb"];
                }
 
-               $header = array();
+               $header = [];
                $header["uid"] = $importer["uid"];
                $header["network"] = NETWORK_FEED;
                $header["type"] = "remote";
@@ -208,9 +208,9 @@ class Feed {
                        return;
                }
 
-               $items = array();
+               $items = [];
 
-               $entrylist = array();
+               $entrylist = [];
 
                foreach ($entries AS $entry) {
                        $entrylist[] = $entry;
@@ -309,7 +309,7 @@ class Feed {
                        // <category>Ausland</category>
                        // <media:thumbnail width="152" height="76" url="http://www.taz.de/picture/667875/192/14388767.jpg"/>
 
-                       $attachments = array();
+                       $attachments = [];
 
                        $enclosures = $xpath->query("enclosure", $entry);
                        foreach ($enclosures AS $enclosure) {
@@ -331,7 +331,7 @@ class Feed {
                                        $item["attach"] .= ',';
                                }
 
-                               $attachments[] = array("link" => $href, "type" => $type, "length" => $length);
+                               $attachments[] = ["link" => $href, "type" => $type, "length" => $length];
 
                                $item["attach"] .= '[attach]href="'.$href.'" length="'.$length.'" type="'.$type.'"[/attach]';
                        }
@@ -448,7 +448,7 @@ class Feed {
                }
 
                if ($simulate) {
-                       return array("header" => $author, "items" => $items);
+                       return ["header" => $author, "items" => $items];
                }
        }
 }
index 242af46045ec983525035e32f50727f41c2897fe..6a87d476149455d6972f740f7f66cbeb9b4d3bac 100644 (file)
@@ -35,7 +35,7 @@ require_once 'mod/proxy.php';
 class OStatus
 {
        private static $itemlist;
-       private static $conv_list = array();
+       private static $conv_list = [];
 
        /**
         * @brief Fetches author data
@@ -50,7 +50,7 @@ class OStatus
         */
        private static function fetchAuthor($xpath, $context, $importer, &$contact, $onlyfetch)
        {
-               $author = array();
+               $author = [];
                $author["author-link"] = $xpath->evaluate('atom:author/atom:uri/text()', $context)->item(0)->nodeValue;
                $author["author-name"] = $xpath->evaluate('atom:author/atom:name/text()', $context)->item(0)->nodeValue;
                $addr = $xpath->evaluate('atom:author/atom:email/text()', $context)->item(0)->nodeValue;
@@ -118,7 +118,7 @@ class OStatus
                        }
                }
 
-               $avatarlist = array();
+               $avatarlist = [];
                $avatars = $xpath->query("atom:author/atom:link[@rel='avatar']", $context);
                foreach ($avatars as $avatar) {
                        $href = "";
@@ -196,7 +196,7 @@ class OStatus
 
                        $contact['name-date'] = datetime_convert();
 
-                       dba::update('contact', $contact, array('id' => $contact["id"]), $current);
+                       dba::update('contact', $contact, ['id' => $contact["id"]], $current);
 
                        if (!empty($author["author-avatar"]) && ($author["author-avatar"] != $current['avatar'])) {
                                logger("Update profile picture for contact ".$contact["id"], LOGGER_DEBUG);
@@ -211,13 +211,13 @@ class OStatus
                                $old_contact = dba::selectFirst('contact', $fields, ['id' => $cid]);
 
                                // Update it with the current values
-                               $fields = array('url' => $author["author-link"], 'name' => $contact["name"],
+                               $fields = ['url' => $author["author-link"], 'name' => $contact["name"],
                                                'nurl' => normalise_link($author["author-link"]),
                                                'nick' => $contact["nick"], 'alias' => $contact["alias"],
                                                'about' => $contact["about"], 'location' => $contact["location"],
-                                               'success_update' => datetime_convert(), 'last-update' => datetime_convert());
+                                               'success_update' => datetime_convert(), 'last-update' => datetime_convert()];
 
-                               dba::update('contact', $fields, array('id' => $cid), $old_contact);
+                               dba::update('contact', $fields, ['id' => $cid], $old_contact);
 
                                // Update the avatar
                                Contact::updateAvatar($author["author-avatar"], 0, $cid);
@@ -279,7 +279,7 @@ class OStatus
         */
        private static function readAttributes($element)
        {
-               $attribute = array();
+               $attribute = [];
 
                foreach ($element->attributes as $attributes) {
                        $attribute[$attributes->name] = $attributes->textContent;
@@ -317,8 +317,8 @@ class OStatus
        private static function process($xml, $importer, &$contact, &$hub, $stored = false, $initialize = true)
        {
                if ($initialize) {
-                       self::$itemlist = array();
-                       self::$conv_list = array();
+                       self::$itemlist = [];
+                       self::$conv_list = [];
                }
 
                logger("Import OStatus message", LOGGER_DEBUG);
@@ -350,7 +350,7 @@ class OStatus
                        }
                }
 
-               $header = array();
+               $header = [];
                $header["uid"] = $importer["uid"];
                $header["network"] = NETWORK_OSTATUS;
                $header["type"] = "remote";
@@ -387,7 +387,7 @@ class OStatus
                $entry = $xpath->query('/atom:entry');
 
                // Reverse the order of the entries
-               $entrylist = array();
+               $entrylist = [];
 
                foreach ($entries as $entry) {
                        $entrylist[] = $entry;
@@ -419,19 +419,19 @@ class OStatus
                        $item["verb"] = $xpath->query('activity:verb/text()', $entry)->item(0)->nodeValue;
 
                        // Delete a message
-                       if (in_array($item["verb"], array('qvitter-delete-notice', ACTIVITY_DELETE, 'delete'))) {
+                       if (in_array($item["verb"], ['qvitter-delete-notice', ACTIVITY_DELETE, 'delete'])) {
                                self::deleteNotice($item);
                                continue;
                        }
 
-                       if (in_array($item["verb"], array(NAMESPACE_OSTATUS."/unfavorite", ACTIVITY_UNFAVORITE))) {
+                       if (in_array($item["verb"], [NAMESPACE_OSTATUS."/unfavorite", ACTIVITY_UNFAVORITE])) {
                                // Ignore "Unfavorite" message
                                logger("Ignore unfavorite message ".print_r($item, true), LOGGER_DEBUG);
                                continue;
                        }
 
                        // Deletions come with the same uri, so we check for duplicates after processing deletions
-                       if (dba::exists('item', array('uid' => $importer["uid"], 'uri' => $item["uri"]))) {
+                       if (dba::exists('item', ['uid' => $importer["uid"], 'uri' => $item["uri"]])) {
                                logger('Post with URI '.$item["uri"].' already existed for user '.$importer["uid"].'.', LOGGER_DEBUG);
                                continue;
                        } else {
@@ -470,7 +470,7 @@ class OStatus
                        }
 
                        // http://activitystrea.ms/schema/1.0/rsvp-yes
-                       if (!in_array($item["verb"], array(ACTIVITY_POST, ACTIVITY_LIKE, ACTIVITY_SHARE))) {
+                       if (!in_array($item["verb"], [ACTIVITY_POST, ACTIVITY_LIKE, ACTIVITY_SHARE])) {
                                logger("Unhandled verb ".$item["verb"]." ".print_r($item, true), LOGGER_DEBUG);
                        }
 
@@ -487,7 +487,7 @@ class OStatus
                                        if ($valid) {
                                                // Never post a thread when the only interaction by our contact was a like
                                                $valid = false;
-                                               $verbs = array(ACTIVITY_POST, ACTIVITY_SHARE);
+                                               $verbs = [ACTIVITY_POST, ACTIVITY_SHARE];
                                                foreach (self::$itemlist as $item) {
                                                        if (!empty($item['contact-id']) && in_array($item['verb'], $verbs)) {
                                                                $valid = true;
@@ -496,7 +496,7 @@ class OStatus
                                        }
                                } else {
                                        // But we will only import complete threads
-                                       $valid = dba::exists('item', array('uid' => $importer["uid"], 'uri' => self::$itemlist[0]['parent-uri']));
+                                       $valid = dba::exists('item', ['uid' => $importer["uid"], 'uri' => self::$itemlist[0]['parent-uri']]);
                                }
 
                                if ($valid) {
@@ -510,7 +510,7 @@ class OStatus
                                                }
                                        }
                                        foreach (self::$itemlist as $item) {
-                                               $found = dba::exists('item', array('uid' => $importer["uid"], 'uri' => $item["uri"]));
+                                               $found = dba::exists('item', ['uid' => $importer["uid"], 'uri' => $item["uri"]]);
                                                if ($found) {
                                                        logger("Item with uri ".$item["uri"]." for user ".$importer["uid"]." already exists.", LOGGER_DEBUG);
                                                } elseif ($item['contact-id'] < 0) {
@@ -528,7 +528,7 @@ class OStatus
                                                }
                                        }
                                }
-                               self::$itemlist = array();
+                               self::$itemlist = [];
                        }
                        logger('Processing done for post with URI '.$item["uri"].' for user '.$importer["uid"].'.', LOGGER_DEBUG);
                }
@@ -552,9 +552,9 @@ class OStatus
                // The function "item_drop" doesn't work for that case
                dba::update(
                        'item',
-                       array('deleted' => true, 'title' => '', 'body' => '',
-                                       'edited' => datetime_convert(), 'changed' => datetime_convert()),
-                       array('id' => $deleted["id"])
+                       ['deleted' => true, 'title' => '', 'body' => '',
+                                       'edited' => datetime_convert(), 'changed' => datetime_convert()],
+                       ['id' => $deleted["id"]]
                );
 
                delete_thread($deleted["id"], $deleted["parent-uri"]);
@@ -687,7 +687,7 @@ class OStatus
                }
 
                if (isset($item["parent-uri"]) && ($related != '')) {
-                       if (!dba::exists('item', array('uid' => $importer["uid"], 'uri' => $item['parent-uri']))) {
+                       if (!dba::exists('item', ['uid' => $importer["uid"], 'uri' => $item['parent-uri']])) {
                                self::fetchRelated($related, $item["parent-uri"], $importer);
                        } else {
                                logger('Reply with URI '.$item["uri"].' already existed for user '.$importer["uid"].'.', LOGGER_DEBUG);
@@ -722,7 +722,7 @@ class OStatus
 
                self::$conv_list[$conversation] = true;
 
-               $conversation_data = z_fetch_url($conversation, false, $redirects, array('accept_content' => 'application/atom+xml, text/html'));
+               $conversation_data = z_fetch_url($conversation, false, $redirects, ['accept_content' => 'application/atom+xml, text/html']);
 
                if (!$conversation_data['success']) {
                        return;
@@ -792,7 +792,7 @@ class OStatus
                        $doc2->preserveWhiteSpace = false;
                        $doc2->formatOutput = true;
 
-                       $conv_data = array();
+                       $conv_data = [];
 
                        $conv_data['protocol'] = PROTOCOL_SPLITTED_CONV;
                        $conv_data['network'] = NETWORK_OSTATUS;
@@ -836,10 +836,10 @@ class OStatus
 
                        $conv_data['source'] = $doc2->saveXML();
 
-                       $condition = array('item-uri' => $conv_data['uri'],'protocol' => PROTOCOL_OSTATUS_FEED);
+                       $condition = ['item-uri' => $conv_data['uri'],'protocol' => PROTOCOL_OSTATUS_FEED];
                        if (dba::exists('conversation', $condition)) {
                                logger('Delete deprecated entry for URI '.$conv_data['uri'], LOGGER_DEBUG);
-                               dba::delete('conversation', array('item-uri' => $conv_data['uri']));
+                               dba::delete('conversation', ['item-uri' => $conv_data['uri']]);
                        }
 
                        logger('Store conversation data for uri '.$conv_data['uri'], LOGGER_DEBUG);
@@ -860,7 +860,7 @@ class OStatus
         */
        private static function fetchSelf($self, &$item)
        {
-               $condition = array('`item-uri` = ? AND `protocol` IN (?, ?)', $self, PROTOCOL_DFRN, PROTOCOL_OSTATUS_SALMON);
+               $condition = ['`item-uri` = ? AND `protocol` IN (?, ?)', $self, PROTOCOL_DFRN, PROTOCOL_OSTATUS_SALMON];
                if (dba::exists('conversation', $condition)) {
                        logger('Conversation '.$item['uri'].' is already stored.', LOGGER_DEBUG);
                        return;
@@ -906,12 +906,12 @@ class OStatus
                        }
                        if ($conversation['protocol'] == PROTOCOL_OSTATUS_SALMON) {
                                logger('Delete invalid cached XML for URI '.$related_uri, LOGGER_DEBUG);
-                               dba::delete('conversation', array('item-uri' => $related_uri));
+                               dba::delete('conversation', ['item-uri' => $related_uri]);
                        }
                }
 
                $stored = false;
-               $related_data = z_fetch_url($related, false, $redirects, array('accept_content' => 'application/atom+xml, text/html'));
+               $related_data = z_fetch_url($related, false, $redirects, ['accept_content' => 'application/atom+xml, text/html']);
 
                if (!$related_data['success']) {
                        return;
@@ -1007,10 +1007,10 @@ class OStatus
                $activityobjects = $xpath->query('activity:object', $entry)->item(0);
 
                if (!is_object($activityobjects)) {
-                       return array();
+                       return [];
                }
 
-               $link_data = array();
+               $link_data = [];
 
                $orig_uri = $xpath->query('atom:id/text()', $activityobjects)->item(0)->nodeValue;
 
@@ -1061,7 +1061,7 @@ class OStatus
         */
        private static function processLinks($links, &$item)
        {
-               $link_data = array('add_body' => '', 'self' => '');
+               $link_data = ['add_body' => '', 'self' => ''];
 
                foreach ($links as $link) {
                        $attribute = self::readAttributes($link);
@@ -1216,8 +1216,8 @@ class OStatus
                        $preview = proxy_url($preview, false, PROXY_SIZE_SMALL);
 
                        // Is it a local picture? Then make it smaller here
-                       $preview = str_replace(array("-0.jpg", "-0.png"), array("-2.jpg", "-2.png"), $preview);
-                       $preview = str_replace(array("-1.jpg", "-1.png"), array("-2.jpg", "-2.png"), $preview);
+                       $preview = str_replace(["-0.jpg", "-0.png"], ["-2.jpg", "-2.png"], $preview);
+                       $preview = str_replace(["-1.jpg", "-1.png"], ["-2.jpg", "-2.png"], $preview);
 
                        if (isset($siteinfo["url"])) {
                                $url = $siteinfo["url"];
@@ -1262,7 +1262,7 @@ class OStatus
                        case 'comments': $title = t('%s\'s comments', $owner['name']); break;
                }
 
-               $attributes = array("uri" => "https://friendi.ca", "version" => FRIENDICA_VERSION . "-" . DB_UPDATE_VERSION);
+               $attributes = ["uri" => "https://friendi.ca", "version" => FRIENDICA_VERSION . "-" . DB_UPDATE_VERSION];
                XML::addElement($doc, $root, "generator", FRIENDICA_PLATFORM, $attributes);
                XML::addElement($doc, $root, "id", System::baseUrl() . "/profile/" . $owner["nick"]);
                XML::addElement($doc, $root, "title", $title);
@@ -1273,7 +1273,7 @@ class OStatus
                $author = self::addAuthor($doc, $owner);
                $root->appendChild($author);
 
-               $attributes = array("href" => $owner["url"], "rel" => "alternate", "type" => "text/html");
+               $attributes = ["href" => $owner["url"], "rel" => "alternate", "type" => "text/html"];
                XML::addElement($doc, $root, "link", "", $attributes);
 
                /// @TODO We have to find out what this is
@@ -1284,17 +1284,17 @@ class OStatus
 
                self::hublinks($doc, $root, $owner["nick"]);
 
-               $attributes = array("href" => System::baseUrl() . "/salmon/" . $owner["nick"], "rel" => "salmon");
+               $attributes = ["href" => System::baseUrl() . "/salmon/" . $owner["nick"], "rel" => "salmon"];
                XML::addElement($doc, $root, "link", "", $attributes);
 
-               $attributes = array("href" => System::baseUrl() . "/salmon/" . $owner["nick"], "rel" => "http://salmon-protocol.org/ns/salmon-replies");
+               $attributes = ["href" => System::baseUrl() . "/salmon/" . $owner["nick"], "rel" => "http://salmon-protocol.org/ns/salmon-replies"];
                XML::addElement($doc, $root, "link", "", $attributes);
 
-               $attributes = array("href" => System::baseUrl() . "/salmon/" . $owner["nick"], "rel" => "http://salmon-protocol.org/ns/salmon-mention");
+               $attributes = ["href" => System::baseUrl() . "/salmon/" . $owner["nick"], "rel" => "http://salmon-protocol.org/ns/salmon-mention"];
                XML::addElement($doc, $root, "link", "", $attributes);
 
-               $attributes = array("href" => System::baseUrl() . "/api/statuses/user_timeline/" . $owner["nick"] . ".atom",
-                       "rel" => "self", "type" => "application/atom+xml");
+               $attributes = ["href" => System::baseUrl() . "/api/statuses/user_timeline/" . $owner["nick"] . ".atom",
+                       "rel" => "self", "type" => "application/atom+xml"];
                XML::addElement($doc, $root, "link", "", $attributes);
 
                return $root;
@@ -1311,7 +1311,7 @@ class OStatus
        public static function hublinks($doc, $root, $nick)
        {
                $h = System::baseUrl() . '/pubsubhubbub/'.$nick;
-               XML::addElement($doc, $root, "link", "", array("href" => $h, "rel" => "hub"));
+               XML::addElement($doc, $root, "link", "", ["href" => $h, "rel" => "hub"]);
        }
 
        /**
@@ -1330,18 +1330,18 @@ class OStatus
                switch ($siteinfo["type"]) {
                        case 'photo':
                                $imgdata = Image::getInfoFromURL($siteinfo["image"]);
-                               $attributes = array("rel" => "enclosure",
+                               $attributes = ["rel" => "enclosure",
                                                "href" => $siteinfo["image"],
                                                "type" => $imgdata["mime"],
-                                               "length" => intval($imgdata["size"]));
+                                               "length" => intval($imgdata["size"])];
                                XML::addElement($doc, $root, "link", "", $attributes);
                                break;
                        case 'video':
-                               $attributes = array("rel" => "enclosure",
+                               $attributes = ["rel" => "enclosure",
                                                "href" => $siteinfo["url"],
                                                "type" => "text/html; charset=UTF-8",
                                                "length" => "",
-                                               "title" => $siteinfo["title"]);
+                                               "title" => $siteinfo["title"]];
                                XML::addElement($doc, $root, "link", "", $attributes);
                                break;
                        default:
@@ -1350,10 +1350,10 @@ class OStatus
 
                if (!Config::get('system', 'ostatus_not_attach_preview') && ($siteinfo["type"] != "photo") && isset($siteinfo["image"])) {
                        $imgdata = Image::getInfoFromURL($siteinfo["image"]);
-                       $attributes = array("rel" => "enclosure",
+                       $attributes = ["rel" => "enclosure",
                                        "href" => $siteinfo["image"],
                                        "type" => $imgdata["mime"],
-                                       "length" => intval($imgdata["size"]));
+                                       "length" => intval($imgdata["size"])];
 
                        XML::addElement($doc, $root, "link", "", $attributes);
                }
@@ -1364,9 +1364,9 @@ class OStatus
                                $matches = false;
                                $cnt = preg_match('|\[attach\]href=\"(.*?)\" length=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"|', $r, $matches);
                                if ($cnt) {
-                                       $attributes = array("rel" => "enclosure",
+                                       $attributes = ["rel" => "enclosure",
                                                        "href" => $matches[1],
-                                                       "type" => $matches[3]);
+                                                       "type" => $matches[3]];
 
                                        if (intval($matches[2])) {
                                                $attributes["length"] = intval($matches[2]);
@@ -1402,24 +1402,24 @@ class OStatus
                XML::addElement($doc, $author, "email", $owner["addr"]);
                XML::addElement($doc, $author, "summary", bbcode($owner["about"], false, false, 7));
 
-               $attributes = array("rel" => "alternate", "type" => "text/html", "href" => $owner["url"]);
+               $attributes = ["rel" => "alternate", "type" => "text/html", "href" => $owner["url"]];
                XML::addElement($doc, $author, "link", "", $attributes);
 
-               $attributes = array(
+               $attributes = [
                                "rel" => "avatar",
                                "type" => "image/jpeg", // To-Do?
                                "media:width" => 175,
                                "media:height" => 175,
-                               "href" => $owner["photo"]);
+                               "href" => $owner["photo"]];
                XML::addElement($doc, $author, "link", "", $attributes);
 
                if (isset($owner["thumb"])) {
-                       $attributes = array(
+                       $attributes = [
                                        "rel" => "avatar",
                                        "type" => "image/jpeg", // To-Do?
                                        "media:width" => 80,
                                        "media:height" => 80,
-                                       "href" => $owner["thumb"]);
+                                       "href" => $owner["thumb"]];
                        XML::addElement($doc, $author, "link", "", $attributes);
                }
 
@@ -1442,8 +1442,8 @@ class OStatus
                }
 
                if (count($profile)) {
-                       XML::addElement($doc, $author, "followers", "", array("url" => System::baseUrl()."/viewcontacts/".$owner["nick"]));
-                       XML::addElement($doc, $author, "statusnet:profile_info", "", array("local_id" => $owner["uid"]));
+                       XML::addElement($doc, $author, "followers", "", ["url" => System::baseUrl()."/viewcontacts/".$owner["nick"]]);
+                       XML::addElement($doc, $author, "statusnet:profile_info", "", ["local_id" => $owner["uid"]]);
                }
 
                if ($profile["publish"]) {
@@ -1483,7 +1483,7 @@ class OStatus
         */
        private static function constructObjecttype($item)
        {
-               if (in_array($item['object-type'], array(ACTIVITY_OBJ_NOTE, ACTIVITY_OBJ_COMMENT)))
+               if (in_array($item['object-type'], [ACTIVITY_OBJ_NOTE, ACTIVITY_OBJ_COMMENT]))
                        return $item['object-type'];
                return ACTIVITY_OBJ_NOTE;
        }
@@ -1511,7 +1511,7 @@ class OStatus
 
                if ($item["verb"] == ACTIVITY_LIKE) {
                        return self::likeEntry($doc, $item, $owner, $toplevel);
-               } elseif (in_array($item["verb"], array(ACTIVITY_FOLLOW, NAMESPACE_OSTATUS."/unfollow"))) {
+               } elseif (in_array($item["verb"], [ACTIVITY_FOLLOW, NAMESPACE_OSTATUS."/unfollow"])) {
                        return self::followEntry($doc, $item, $owner, $toplevel);
                } else {
                        return self::noteEntry($doc, $item, $owner, $toplevel);
@@ -1531,8 +1531,8 @@ class OStatus
                $source = $doc->createElement("source");
                XML::addElement($doc, $source, "id", $contact["poll"]);
                XML::addElement($doc, $source, "title", $contact["name"]);
-               XML::addElement($doc, $source, "link", "", array("rel" => "alternate", "type" => "text/html", "href" => $contact["alias"]));
-               XML::addElement($doc, $source, "link", "", array("rel" => "self", "type" => "application/atom+xml", "href" => $contact["poll"]));
+               XML::addElement($doc, $source, "link", "", ["rel" => "alternate", "type" => "text/html", "href" => $contact["alias"]]);
+               XML::addElement($doc, $source, "link", "", ["rel" => "self", "type" => "application/atom+xml", "href" => $contact["poll"]]);
                XML::addElement($doc, $source, "icon", $contact["photo"]);
                XML::addElement($doc, $source, "updated", datetime_convert("UTC", "UTC", $contact["success_update"]."+00:00", ATOM_TIME));
 
@@ -1726,15 +1726,15 @@ class OStatus
                XML::addElement($doc, $object, "id", $contact["alias"]);
                XML::addElement($doc, $object, "title", $contact["nick"]);
 
-               $attributes = array("rel" => "alternate", "type" => "text/html", "href" => $contact["url"]);
+               $attributes = ["rel" => "alternate", "type" => "text/html", "href" => $contact["url"]];
                XML::addElement($doc, $object, "link", "", $attributes);
 
-               $attributes = array(
+               $attributes = [
                                "rel" => "avatar",
                                "type" => "image/jpeg", // To-Do?
                                "media:width" => 175,
                                "media:height" => 175,
-                               "href" => $contact["photo"]);
+                               "href" => $contact["photo"]];
                XML::addElement($doc, $object, "link", "", $attributes);
 
                XML::addElement($doc, $object, "poco:preferredUsername", $contact["nick"]);
@@ -1906,14 +1906,14 @@ class OStatus
 
                $body = bbcode($body, false, false, 7);
 
-               XML::addElement($doc, $entry, "content", $body, array("type" => "html"));
+               XML::addElement($doc, $entry, "content", $body, ["type" => "html"]);
 
-               XML::addElement($doc, $entry, "link", "", array("rel" => "alternate", "type" => "text/html",
-                                                               "href" => System::baseUrl()."/display/".$item["guid"])
+               XML::addElement($doc, $entry, "link", "", ["rel" => "alternate", "type" => "text/html",
+                                                               "href" => System::baseUrl()."/display/".$item["guid"]]
                );
 
                if ($complete && ($item["id"] > 0)) {
-                       XML::addElement($doc, $entry, "status_net", "", array("notice_id" => $item["id"]));
+                       XML::addElement($doc, $entry, "status_net", "", ["notice_id" => $item["id"]]);
                }
 
                XML::addElement($doc, $entry, "activity:verb", $verb);
@@ -1934,7 +1934,7 @@ class OStatus
         */
        private static function entryFooter($doc, $entry, $item, $owner, $complete = true)
        {
-               $mentioned = array();
+               $mentioned = [];
 
                if (($item['parent'] != $item['id']) || ($item['parent-uri'] !== $item['uri']) || (($item['thr-parent'] !== '') && ($item['thr-parent'] !== $item['uri']))) {
                        $parent = q("SELECT `guid`, `author-link`, `owner-link` FROM `item` WHERE `id` = %d", intval($item["parent"]));
@@ -1955,14 +1955,14 @@ class OStatus
                                $parent_plink = System::baseUrl()."/display/".$parent[0]["guid"];
                        }
 
-                       $attributes = array(
+                       $attributes = [
                                        "ref" => $parent_item,
-                                       "href" => $parent_plink);
+                                       "href" => $parent_plink];
                        XML::addElement($doc, $entry, "thr:in-reply-to", "", $attributes);
 
-                       $attributes = array(
+                       $attributes = [
                                        "rel" => "related",
-                                       "href" => $parent_plink);
+                                       "href" => $parent_plink];
                        XML::addElement($doc, $entry, "link", "", $attributes);
                }
 
@@ -1982,12 +1982,12 @@ class OStatus
                                }
                        }
 
-                       XML::addElement($doc, $entry, "link", "", array("rel" => "ostatus:conversation", "href" => $conversation_href));
+                       XML::addElement($doc, $entry, "link", "", ["rel" => "ostatus:conversation", "href" => $conversation_href]);
 
-                       $attributes = array(
+                       $attributes = [
                                        "href" => $conversation_href,
                                        "local_id" => $item["parent"],
-                                       "ref" => $conversation_uri);
+                                       "ref" => $conversation_uri];
 
                        XML::addElement($doc, $entry, "ostatus:conversation", $conversation_uri, $attributes);
                }
@@ -2003,7 +2003,7 @@ class OStatus
                }
 
                // Make sure that mentions are accepted (GNU Social has problems with mixing HTTP and HTTPS)
-               $newmentions = array();
+               $newmentions = [];
                foreach ($mentioned as $mention) {
                        $newmentions[str_replace("http://", "https://", $mention)] = str_replace("http://", "https://", $mention);
                        $newmentions[str_replace("https://", "http://", $mention)] = str_replace("https://", "http://", $mention);
@@ -2018,34 +2018,34 @@ class OStatus
                        );
                        if ($r[0]["forum"] || $r[0]["prv"]) {
                                XML::addElement($doc, $entry, "link", "",
-                                       array(
+                                       [
                                                "rel" => "mentioned",
                                                "ostatus:object-type" => ACTIVITY_OBJ_GROUP,
-                                               "href" => $mention)
+                                               "href" => $mention]
                                );
                        } else {
                                XML::addElement($doc, $entry, "link", "",
-                                       array(
+                                       [
                                                "rel" => "mentioned",
                                                "ostatus:object-type" => ACTIVITY_OBJ_PERSON,
-                                               "href" => $mention)
+                                               "href" => $mention]
                                );
                        }
                }
 
                if (!$item["private"]) {
-                       XML::addElement($doc, $entry, "link", "", array("rel" => "ostatus:attention",
-                                                                       "href" => "http://activityschema.org/collection/public"));
-                       XML::addElement($doc, $entry, "link", "", array("rel" => "mentioned",
+                       XML::addElement($doc, $entry, "link", "", ["rel" => "ostatus:attention",
+                                                                       "href" => "http://activityschema.org/collection/public"]);
+                       XML::addElement($doc, $entry, "link", "", ["rel" => "mentioned",
                                                                        "ostatus:object-type" => "http://activitystrea.ms/schema/1.0/collection",
-                                                                       "href" => "http://activityschema.org/collection/public"));
+                                                                       "href" => "http://activityschema.org/collection/public"]);
                        XML::addElement($doc, $entry, "mastodon:scope", "public");
                }
 
                if (count($tags)) {
                        foreach ($tags as $t) {
                                if ($t[0] != "@") {
-                                       XML::addElement($doc, $entry, "category", "", array("term" => $t[2]));
+                                       XML::addElement($doc, $entry, "category", "", ["term" => $t[2]]);
                                }
                        }
                }
@@ -2058,7 +2058,7 @@ class OStatus
                                $app = "web";
                        }
 
-                       $attributes = array("local_id" => $item["id"], "source" => $app);
+                       $attributes = ["local_id" => $item["id"], "source" => $app];
 
                        if (isset($parent["id"])) {
                                $attributes["repeat_of"] = $parent["id"];
@@ -2174,7 +2174,7 @@ class OStatus
 
                $feeddata = trim($doc->saveXML());
 
-               $msg = array('feed' => $feeddata, 'last_update' => $last_update);
+               $msg = ['feed' => $feeddata, 'last_update' => $last_update];
                Cache::set($cachekey, $msg, CACHE_QUARTER_HOUR);
 
                logger('Feed duration: ' . number_format(microtime(true) - $stamp, 3) . ' - ' . $owner_nick . ' - ' . $filter . ' - ' . $previous_created, LOGGER_DEBUG);
index d60fe3fc82448f671df55cc342748cde9d36c29a..22615fee10663d18540747cf94307504b6f732e3 100644 (file)
@@ -176,7 +176,7 @@ class PortableContact
                                $contact_type = $entry->contactType;
                        }
 
-                       $gcontact = array("url" => $profile_url,
+                       $gcontact = ["url" => $profile_url,
                                        "name" => $name,
                                        "network" => $network,
                                        "photo" => $profile_photo,
@@ -187,7 +187,7 @@ class PortableContact
                                        "connect" => $connect_url,
                                        "updated" => $updated,
                                        "contact-type" => $contact_type,
-                                       "generation" => $generation);
+                                       "generation" => $generation];
 
                        try {
                                $gcontact = GContact::sanitize($gcontact);
@@ -311,7 +311,7 @@ class PortableContact
                        return false;
                }
 
-               $contact = array("url" => $profile);
+               $contact = ["url" => $profile];
 
                if ($gcontacts[0]["created"] <= NULL_DATE) {
                        $contact['created'] = datetime_convert();
@@ -329,7 +329,7 @@ class PortableContact
                        $server_url = normalise_link(self::detectServer($profile));
                }
 
-               if (!in_array($gcontacts[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_FEED, NETWORK_OSTATUS, ""))) {
+               if (!in_array($gcontacts[0]["network"], [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_FEED, NETWORK_OSTATUS, ""])) {
                        logger("Profile ".$profile.": Network type ".$gcontacts[0]["network"]." can't be checked", LOGGER_DEBUG);
                        return false;
                }
@@ -347,7 +347,7 @@ class PortableContact
                        $contact['server_url'] = $server_url;
                }
 
-               if (in_array($gcontacts[0]["network"], array("", NETWORK_FEED))) {
+               if (in_array($gcontacts[0]["network"], ["", NETWORK_FEED])) {
                        $server = q(
                                "SELECT `network` FROM `gserver` WHERE `nurl` = '%s' AND `network` != ''",
                                dbesc(normalise_link($server_url))
@@ -466,7 +466,7 @@ class PortableContact
                        return false;
                }
 
-               if (($data["poll"] == "") || (in_array($data["network"], array(NETWORK_FEED, NETWORK_PHANTOM)))) {
+               if (($data["poll"] == "") || (in_array($data["network"], [NETWORK_FEED, NETWORK_PHANTOM]))) {
                        $fields = ['last_failure' => datetime_convert()];
                        dba::update('gcontact', $fields, ['nurl' => normalise_link($profile)]);
 
@@ -614,7 +614,7 @@ class PortableContact
 
                foreach ($data->entry[0]->urls as $url) {
                        if ($url->type == 'zot') {
-                               $server = array();
+                               $server = [];
                                $server["platform"] = 'Hubzilla';
                                $server["network"] = NETWORK_DIASPORA;
                                return $server;
@@ -674,7 +674,7 @@ class PortableContact
                        return false;
                }
 
-               $server = array();
+               $server = [];
 
                $server['register_policy'] = REGISTER_CLOSED;
 
@@ -757,7 +757,7 @@ class PortableContact
                $list = $xpath->query("//meta[@name]");
 
                foreach ($list as $node) {
-                       $attr = array();
+                       $attr = [];
                        if ($node->attributes->length) {
                                foreach ($node->attributes as $attribute) {
                                        $attr[$attribute->name] = $attribute->value;
@@ -766,8 +766,8 @@ class PortableContact
                        if ($attr['name'] == 'generator') {
                                $version_part = explode(" ", $attr['content']);
                                if (count($version_part) == 2) {
-                                       if (in_array($version_part[0], array("Friendika", "Friendica"))) {
-                                               $server = array();
+                                       if (in_array($version_part[0], ["Friendika", "Friendica"])) {
+                                               $server = [];
                                                $server["platform"] = $version_part[0];
                                                $server["version"] = $version_part[1];
                                                $server["network"] = NETWORK_DFRN;
@@ -780,14 +780,14 @@ class PortableContact
                        $list = $xpath->query("//meta[@property]");
 
                        foreach ($list as $node) {
-                               $attr = array();
+                               $attr = [];
                                if ($node->attributes->length) {
                                        foreach ($node->attributes as $attribute) {
                                                $attr[$attribute->name] = $attribute->value;
                                        }
                                }
-                               if ($attr['property'] == 'generator' && in_array($attr['content'], array("hubzilla", "BlaBlaNet"))) {
-                                       $server = array();
+                               if ($attr['property'] == 'generator' && in_array($attr['content'], ["hubzilla", "BlaBlaNet"])) {
+                                       $server = [];
                                        $server["platform"] = $attr['content'];
                                        $server["version"] = "";
                                        $server["network"] = NETWORK_DIASPORA;
@@ -863,7 +863,7 @@ class PortableContact
                // Mastodon uses the "@" for user profiles.
                // But this can be misunderstood.
                if (parse_url($server_url, PHP_URL_USER) != '') {
-                       dba::update('gserver', array('last_failure' => datetime_convert()), array('nurl' => normalise_link($server_url)));
+                       dba::update('gserver', ['last_failure' => datetime_convert()], ['nurl' => normalise_link($server_url)]);
                        return false;
                }
 
@@ -872,14 +872,14 @@ class PortableContact
                $server_url = str_replace("http://", "https://", $server_url);
 
                // We set the timeout to 20 seconds since this operation should be done in no time if the server was vital
-               $serverret = z_fetch_url($server_url."/.well-known/host-meta", false, $redirects, array('timeout' => 20));
+               $serverret = z_fetch_url($server_url."/.well-known/host-meta", false, $redirects, ['timeout' => 20]);
 
                // Quit if there is a timeout.
                // But we want to make sure to only quit if we are mostly sure that this server url fits.
                if (DBM::is_result($gserver) && ($orig_server_url == $server_url) &&
                        ($serverret['errno'] == CURLE_OPERATION_TIMEDOUT)) {
                        logger("Connection to server ".$server_url." timed out.", LOGGER_DEBUG);
-                       dba::update('gserver', array('last_failure' => datetime_convert()), array('nurl' => normalise_link($server_url)));
+                       dba::update('gserver', ['last_failure' => datetime_convert()], ['nurl' => normalise_link($server_url)]);
                        return false;
                }
 
@@ -889,12 +889,12 @@ class PortableContact
                        $server_url = str_replace("https://", "http://", $server_url);
 
                        // We set the timeout to 20 seconds since this operation should be done in no time if the server was vital
-                       $serverret = z_fetch_url($server_url."/.well-known/host-meta", false, $redirects, array('timeout' => 20));
+                       $serverret = z_fetch_url($server_url."/.well-known/host-meta", false, $redirects, ['timeout' => 20]);
 
                        // Quit if there is a timeout
                        if ($serverret['errno'] == CURLE_OPERATION_TIMEDOUT) {
                                logger("Connection to server ".$server_url." timed out.", LOGGER_DEBUG);
-                               dba::update('gserver', array('last_failure' => datetime_convert()), array('nurl' => normalise_link($server_url)));
+                               dba::update('gserver', ['last_failure' => datetime_convert()], ['nurl' => normalise_link($server_url)]);
                                return false;
                        }
 
@@ -903,7 +903,7 @@ class PortableContact
 
                if (!$serverret["success"] || ($serverret["body"] == "") || (sizeof($xmlobj) == 0) || !is_object($xmlobj)) {
                        // Workaround for bad configured servers (known nginx problem)
-                       if (!in_array($serverret["debug"]["http_code"], array("403", "404"))) {
+                       if (!in_array($serverret["debug"]["http_code"], ["403", "404"])) {
                                $failure = true;
                        }
                        $possible_failure = true;
@@ -1180,7 +1180,7 @@ class PortableContact
 
                // Check for noscrape
                // Friendica servers could be detected as OStatus servers
-               if (!$failure && in_array($network, array(NETWORK_DFRN, NETWORK_OSTATUS))) {
+               if (!$failure && in_array($network, [NETWORK_DFRN, NETWORK_OSTATUS])) {
                        $serverret = z_fetch_url($server_url."/friendica/json");
 
                        if (!$serverret["success"]) {
@@ -1239,7 +1239,7 @@ class PortableContact
                }
 
                // Check again if the server exists
-               $found = dba::exists('gserver', array('nurl' => normalise_link($server_url)));
+               $found = dba::exists('gserver', ['nurl' => normalise_link($server_url)]);
 
                $version = strip_tags($version);
                $site_name = strip_tags($site_name);
@@ -1342,7 +1342,7 @@ class PortableContact
                        $accesstoken = Config::get('system', 'instances_social_key');
                        if (!empty($accesstoken)) {
                                $api = 'https://instances.social/api/1.0/instances/list?count=0';
-                               $header = array('Authorization: Bearer '.$accesstoken);
+                               $header = ['Authorization: Bearer '.$accesstoken];
                                $serverdata = z_fetch_url($api, false, $redirects, ['headers' => $header]);
                                if ($serverdata['success']) {
                                        $servers = json_decode($serverdata['body']);
@@ -1586,7 +1586,7 @@ class PortableContact
 
                                logger("Store profile ".$profile_url, LOGGER_DEBUG);
 
-                               $gcontact = array("url" => $profile_url,
+                               $gcontact = ["url" => $profile_url,
                                                "name" => $name,
                                                "network" => $network,
                                                "photo" => $profile_photo,
@@ -1597,7 +1597,7 @@ class PortableContact
                                                "connect" => $connect_url,
                                                "updated" => $updated,
                                                "contact-type" => $contact_type,
-                                               "generation" => $generation);
+                                               "generation" => $generation];
 
                                try {
                                        $gcontact = GContact::sanitize($gcontact);
index 2bf86f0e36317714ccfbc110de9efc0d0809207e..5b0c66fb9d13271fba3bc392d693e0912d92cd4f 100644 (file)
@@ -22,7 +22,7 @@ class Salmon
         */
        public static function getKey($uri, $keyhash)
        {
-               $ret = array();
+               $ret = [];
 
                logger('Fetching salmon key for '.$uri);
 
@@ -120,22 +120,22 @@ class Salmon
                $signature3  = base64url_encode(Crypto::rsaSign($data, $owner['sprvkey']));
 
                // At first try the non compliant method that works for GNU Social
-               $xmldata = array("me:env" => array("me:data" => $data,
-                               "@attributes" => array("type" => $data_type),
+               $xmldata = ["me:env" => ["me:data" => $data,
+                               "@attributes" => ["type" => $data_type],
                                "me:encoding" => $encoding,
                                "me:alg" => $algorithm,
                                "me:sig" => $signature,
-                               "@attributes2" => array("key_id" => $keyhash)));
+                               "@attributes2" => ["key_id" => $keyhash]]];
 
-               $namespaces = array("me" => "http://salmon-protocol.org/ns/magic-env");
+               $namespaces = ["me" => "http://salmon-protocol.org/ns/magic-env"];
 
                $salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
 
                // slap them
-               post_url($url, $salmon, array(
+               post_url($url, $salmon, [
                        'Content-type: application/magic-envelope+xml',
                        'Content-length: ' . strlen($salmon)
-               ));
+               ]);
 
                $a = get_app();
                $return_code = $a->get_curl_code();
@@ -146,22 +146,22 @@ class Salmon
                        logger('GNU Social salmon failed. Falling back to compliant mode');
 
                        // Now try the compliant mode that normally isn't used for GNU Social
-                       $xmldata = array("me:env" => array("me:data" => $data,
-                                       "@attributes" => array("type" => $data_type),
+                       $xmldata = ["me:env" => ["me:data" => $data,
+                                       "@attributes" => ["type" => $data_type],
                                        "me:encoding" => $encoding,
                                        "me:alg" => $algorithm,
                                        "me:sig" => $signature2,
-                                       "@attributes2" => array("key_id" => $keyhash)));
+                                       "@attributes2" => ["key_id" => $keyhash]]];
 
-                       $namespaces = array("me" => "http://salmon-protocol.org/ns/magic-env");
+                       $namespaces = ["me" => "http://salmon-protocol.org/ns/magic-env"];
 
                        $salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
 
                        // slap them
-                       post_url($url, $salmon, array(
+                       post_url($url, $salmon, [
                                'Content-type: application/magic-envelope+xml',
                                'Content-length: ' . strlen($salmon)
-                       ));
+                       ]);
                        $return_code = $a->get_curl_code();
                }
 
@@ -169,21 +169,21 @@ class Salmon
                        logger('compliant salmon failed. Falling back to old status.net');
 
                        // Last try. This will most likely fail as well.
-                       $xmldata = array("me:env" => array("me:data" => $data,
-                                       "@attributes" => array("type" => $data_type),
+                       $xmldata = ["me:env" => ["me:data" => $data,
+                                       "@attributes" => ["type" => $data_type],
                                        "me:encoding" => $encoding,
                                        "me:alg" => $algorithm,
                                        "me:sig" => $signature3,
-                                       "@attributes2" => array("key_id" => $keyhash)));
+                                       "@attributes2" => ["key_id" => $keyhash]]];
 
-                       $namespaces = array("me" => "http://salmon-protocol.org/ns/magic-env");
+                       $namespaces = ["me" => "http://salmon-protocol.org/ns/magic-env"];
 
                        $salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
 
                        // slap them
-                       post_url($url, $salmon, array(
+                       post_url($url, $salmon, [
                                'Content-type: application/magic-envelope+xml',
-                               'Content-length: ' . strlen($salmon))
+                               'Content-length: ' . strlen($salmon)]
                        );
                        $return_code = $a->get_curl_code();
                }
index adee8cd60e4adb6a3814318b06810aab91fabf60..22cb775336253b8bfb3ca18e0b0d4ce2e3be9ad9 100644 (file)
@@ -96,7 +96,7 @@ class Crypto
                $modulus->SetIntBuffer($Modulus);
                $publicExponent = new ASNValue(ASNValue::TAG_INTEGER);
                $publicExponent->SetIntBuffer($PublicExponent);
-               $keySequenceItems = array($modulus, $publicExponent);
+               $keySequenceItems = [$modulus, $publicExponent];
                $keySequence = new ASNValue(ASNValue::TAG_SEQUENCE);
                $keySequence->SetSequence($keySequenceItems);
                //Encode bit string
@@ -125,7 +125,7 @@ class Crypto
                $modulus->SetIntBuffer($Modulus);
                $publicExponent = new ASNValue(ASNValue::TAG_INTEGER);
                $publicExponent->SetIntBuffer($PublicExponent);
-               $keySequenceItems = array($modulus, $publicExponent);
+               $keySequenceItems = [$modulus, $publicExponent];
                $keySequence = new ASNValue(ASNValue::TAG_SEQUENCE);
                $keySequence->SetSequence($keySequenceItems);
                //Encode bit string
@@ -221,11 +221,11 @@ class Crypto
         */
        public static function newKeypair($bits)
        {
-               $openssl_options = array(
+               $openssl_options = [
                        'digest_alg'       => 'sha1',
                        'private_key_bits' => $bits,
                        'encrypt_key'      => false
-               );
+               ];
 
                $conf = Config::get('system', 'openssl_conf_file');
                if ($conf) {
@@ -239,7 +239,7 @@ class Crypto
                }
 
                // Get private key
-               $response = array('prvkey' => '', 'pubkey' => '');
+               $response = ['prvkey' => '', 'pubkey' => ''];
 
                openssl_pkey_export($result, $response['prvkey']);
 
index 7d4205ac3346ec779a34b90024d9b94a4220dc08..ba65296f507a2f3faaacf00ee6484cc94233c458 100644 (file)
@@ -72,12 +72,12 @@ class Emailer
                        "--" . $mimeBoundary . "--\n";                                  // message ending
 
                // send the message
-               $hookdata = array(
+               $hookdata = [
                        'to' => $params['toEmail'],
                        'subject' => $messageSubject,
                        'body' => $multipartMessageBody,
                        'headers' => $messageHeader
-               );
+               ];
                //echo "<pre>"; var_dump($hookdata); killme();
                call_hooks("emailer_send", $hookdata);
                $res = mail(
index 5ae24534ac3e87f96fb2923529bfc08fa4b5dde1..847059d6d7e9c2882ab8b3381025d76f502323bc 100644 (file)
@@ -140,7 +140,7 @@ class ExAuth
                $this->setHost($aCommand[2]);
 
                // Now we check if the given user is valid
-               $sUser = str_replace(array('%20', '(a)'), array(' ', '@'), $aCommand[1]);
+               $sUser = str_replace(['%20', '(a)'], [' ', '@'], $aCommand[1]);
 
                // Does the hostname match? So we try directly
                if ($a->get_hostname() == $aCommand[2]) {
@@ -220,7 +220,7 @@ class ExAuth
                $this->setHost($aCommand[2]);
 
                // We now check if the password match
-               $sUser = str_replace(array('%20', '(a)'), array(' ', '@'), $aCommand[1]);
+               $sUser = str_replace(['%20', '(a)'], [' ', '@'], $aCommand[1]);
 
                // Does the hostname match? So we try directly
                if ($a->get_hostname() == $aCommand[2]) {
index 66a568811d62c80ee093ff6e3a889915dd95f015..eba264ad932d6ba6357c5fd566cafbc8c7ff8a30 100644 (file)
@@ -21,7 +21,7 @@ require_once 'include/dba.php';
  */
 class Lock
 {
-       private static $semaphore = array();
+       private static $semaphore = [];
 
        /**
         * @brief Check for memcache and open a connection if configured
@@ -140,11 +140,11 @@ class Lock
                                        }
                                }
                                if (!$lock['locked']) {
-                                       dba::update('locks', array('locked' => true, 'pid' => getmypid()), array('name' => $fn_name));
+                                       dba::update('locks', ['locked' => true, 'pid' => getmypid()], ['name' => $fn_name]);
                                        $got_lock = true;
                                }
                        } elseif (!DBM::is_result($lock)) {
-                               dba::insert('locks', array('name' => $fn_name, 'locked' => true, 'pid' => getmypid()));
+                               dba::insert('locks', ['name' => $fn_name, 'locked' => true, 'pid' => getmypid()]);
                                $got_lock = true;
                        }
 
@@ -189,7 +189,7 @@ class Lock
                        return;
                }
 
-               dba::update('locks', array('locked' => false, 'pid' => 0), array('name' => $fn_name, 'pid' => getmypid()));
+               dba::update('locks', ['locked' => false, 'pid' => 0], ['name' => $fn_name, 'pid' => getmypid()]);
                return;
        }
 
@@ -205,7 +205,7 @@ class Lock
                        return;
                }
 
-               dba::update('locks', array('locked' => false, 'pid' => 0), array('pid' => getmypid()));
+               dba::update('locks', ['locked' => false, 'pid' => 0], ['pid' => getmypid()]);
                return;
        }
 }
index 6ca0b1b4c0db234283b68b166e2ed13c0b3c7516..9aabb9db9847bb16406adb1fd72cdf72c3c3e378 100644 (file)
@@ -10,14 +10,14 @@ namespace Friendica\Util;
 class Map {
        public static function byCoordinates($coord) {
                $coord = trim($coord);
-               $coord = str_replace(array(',','/','  '),array(' ',' ',' '),$coord);
-               $arr = array('lat' => trim(substr($coord,0,strpos($coord,' '))), 'lon' => trim(substr($coord,strpos($coord,' ')+1)), 'html' => '');
+               $coord = str_replace([',','/','  '],[' ',' ',' '],$coord);
+               $arr = ['lat' => trim(substr($coord,0,strpos($coord,' '))), 'lon' => trim(substr($coord,strpos($coord,' ')+1)), 'html' => ''];
                call_hooks('generate_map',$arr);
                return ($arr['html']) ? $arr['html'] : $coord;
        }
 
        public static function byLocation($location) {
-               $arr = array('location' => $location, 'html' => '');
+               $arr = ['location' => $location, 'html' => ''];
                call_hooks('generate_named_map',$arr);
                return ($arr['html']) ? $arr['html'] : $location;
        }
index 7154e0f4af94bd0354f0c8bac4e405eba1e512e3..bca51270266e55067cf59bb9e1d92e53c873a1f9 100644 (file)
@@ -69,10 +69,10 @@ class ParseUrl
 
                dba::insert(
                        'parsed_url',
-                       array(
+                       [
                                'url' => normalise_link($url), 'guessing' => !$no_guessing,
                                'oembed' => $do_oembed, 'content' => serialize($data),
-                               'created' => datetime_convert()),
+                               'created' => datetime_convert()],
                        true
                );
 
@@ -122,7 +122,7 @@ class ParseUrl
        {
                $a = get_app();
 
-               $siteinfo = array();
+               $siteinfo = [];
 
                // Check if the URL does contain a scheme
                $scheme = parse_url($url, PHP_URL_SCHEME);
@@ -165,7 +165,7 @@ class ParseUrl
                if ($do_oembed) {
                        $oembed_data = OEmbed::fetchURL($url);
 
-                       if (!in_array($oembed_data->type, array("error", "rich", ""))) {
+                       if (!in_array($oembed_data->type, ["error", "rich", ""])) {
                                $siteinfo["type"] = $oembed_data->type;
                        }
 
@@ -219,7 +219,7 @@ class ParseUrl
 
                $list = $xpath->query("//meta[@content]");
                foreach ($list as $node) {
-                       $attr = array();
+                       $attr = [];
                        if ($node->attributes->length) {
                                foreach ($node->attributes as $attribute) {
                                        $attr[$attribute->name] = $attribute->value;
@@ -250,7 +250,7 @@ class ParseUrl
                //$list = $xpath->query("head/meta[@name]");
                $list = $xpath->query("//meta[@name]");
                foreach ($list as $node) {
-                       $attr = array();
+                       $attr = [];
                        if ($node->attributes->length) {
                                foreach ($node->attributes as $attribute) {
                                        $attr[$attribute->name] = $attribute->value;
@@ -307,7 +307,7 @@ class ParseUrl
                }
 
                if (isset($keywords)) {
-                       $siteinfo["keywords"] = array();
+                       $siteinfo["keywords"] = [];
                        foreach ($keywords as $keyword) {
                                if (!in_array(trim($keyword), $siteinfo["keywords"])) {
                                        $siteinfo["keywords"][] = trim($keyword);
@@ -318,7 +318,7 @@ class ParseUrl
                //$list = $xpath->query("head/meta[@property]");
                $list = $xpath->query("//meta[@property]");
                foreach ($list as $node) {
-                       $attr = array();
+                       $attr = [];
                        if ($node->attributes->length) {
                                foreach ($node->attributes as $attribute) {
                                        $attr[$attribute->name] = $attribute->value;
@@ -345,7 +345,7 @@ class ParseUrl
                if ((@$siteinfo["image"] == "") && !$no_guessing) {
                        $list = $xpath->query("//img[@src]");
                        foreach ($list as $node) {
-                               $attr = array();
+                               $attr = [];
                                if ($node->attributes->length) {
                                        foreach ($node->attributes as $attribute) {
                                                $attr[$attribute->name] = $attribute->value;
@@ -364,9 +364,9 @@ class ParseUrl
                                                $photodata[0] = round($photodata[0] * (300 / $photodata[1]));
                                                $photodata[1] = 300;
                                        }
-                                       $siteinfo["images"][] = array("src" => $src,
+                                       $siteinfo["images"][] = ["src" => $src,
                                                                        "width" => $photodata[0],
-                                                                       "height" => $photodata[1]);
+                                                                       "height" => $photodata[1]];
                                }
                        }
                } elseif ($siteinfo["image"] != "") {
@@ -377,9 +377,9 @@ class ParseUrl
                        $photodata = Image::getInfoFromURL($src);
 
                        if (($photodata) && ($photodata[0] > 10) && ($photodata[1] > 10)) {
-                               $siteinfo["images"][] = array("src" => $src,
+                               $siteinfo["images"][] = ["src" => $src,
                                                                "width" => $photodata[0],
-                                                               "height" => $photodata[1]);
+                                                               "height" => $photodata[1]];
                        }
                }
 
@@ -413,7 +413,7 @@ class ParseUrl
                        }
 
                        if ($text != "") {
-                               $text = trim(str_replace(array("\n", "\r"), array(" ", " "), $text));
+                               $text = trim(str_replace(["\n", "\r"], [" ", " "], $text));
 
                                while (strpos($text, "  ")) {
                                        $text = trim(str_replace("  ", " ", $text));
@@ -441,7 +441,7 @@ class ParseUrl
                $arr_tags = str_getcsv($string);
                if (count($arr_tags)) {
                        // add the # sign to every tag
-                       array_walk($arr_tags, array("self", "arrAddHashes"));
+                       array_walk($arr_tags, ["self", "arrAddHashes"]);
 
                        return $arr_tags;
                }
index 70af4cad53d42a963b33a8f1636a4a28ee528c1c..c866475c1b40d69e1c057de9e739e6c1e9c3e17f 100644 (file)
@@ -23,7 +23,7 @@ class XML
         *
         * @return string The created XML
         */
-       public static function fromArray($array, &$xml, $remove_header = false, $namespaces = array(), $root = true)
+       public static function fromArray($array, &$xml, $remove_header = false, $namespaces = [], $root = true)
        {
                if ($root) {
                        foreach ($array as $key => $value) {
@@ -140,7 +140,7 @@ class XML
         *
         * @return object XML element object
         */
-       public static function createElement($doc, $element, $value = "", $attributes = array())
+       public static function createElement($doc, $element, $value = "", $attributes = [])
        {
                $element = $doc->createElement($element, xmlify($value));
 
@@ -162,7 +162,7 @@ class XML
         * @param array  $attributes array containing the attributes
         * @return void
         */
-       public static function addElement($doc, $parent, $element, $value = "", $attributes = array())
+       public static function addElement($doc, $parent, $element, $value = "", $attributes = [])
        {
                $element = self::createElement($doc, $element, $value, $attributes);
                $parent->appendChild($element);
@@ -194,7 +194,7 @@ class XML
                }
 
                if (is_array($xml_element)) {
-                       $result_array = array();
+                       $result_array = [];
                        if (count($xml_element) <= 0) {
                                return (trim(strval($xml_element_copy)));
                        }
@@ -207,9 +207,9 @@ class XML
 
                        if ($recursion_depth == 0) {
                                $temp_array = $result_array;
-                               $result_array = array(
+                               $result_array = [
                                        strtolower($xml_element_copy->getName()) => $temp_array,
-                               );
+                               ];
                        }
 
                        return ($result_array);
@@ -242,12 +242,12 @@ class XML
        public static function toArray($contents, $namespaces = true, $get_attributes = 1, $priority = 'attribute')
        {
                if (!$contents) {
-                       return array();
+                       return [];
                }
 
                if (!function_exists('xml_parser_create')) {
                        logger('Xml::toArray: parser function missing');
-                       return array();
+                       return [];
                }
 
 
@@ -262,7 +262,7 @@ class XML
 
                if (! $parser) {
                        logger('Xml::toArray: xml_parser_create: no resource');
-                       return array();
+                       return [];
                }
 
                xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8");
@@ -282,15 +282,15 @@ class XML
                }
 
                //Initializations
-               $xml_array = array();
-               $parents = array();
-               $opened_tags = array();
-               $arr = array();
+               $xml_array = [];
+               $parents = [];
+               $opened_tags = [];
+               $arr = [];
 
                $current = &$xml_array; // Reference
 
                // Go through the tags.
-               $repeated_tag_index = array(); // Multiple tags with same name will be turned into an array
+               $repeated_tag_index = []; // Multiple tags with same name will be turned into an array
                foreach ($xml_values as $data) {
                        $tag        = $data['tag'];
                        $type       = $data['type'];
@@ -298,8 +298,8 @@ class XML
                        $attributes = isset($data['attributes']) ? $data['attributes'] : null;
                        $value      = isset($data['value']) ? $data['value'] : null;
 
-                       $result = array();
-                       $attributes_data = array();
+                       $result = [];
+                       $attributes_data = [];
 
                        if (isset($value)) {
                                if ($priority == 'tag') {
@@ -344,7 +344,7 @@ class XML
                                                $current[$tag][$repeated_tag_index[$tag.'_'.$level]] = $result;
                                                $repeated_tag_index[$tag.'_'.$level]++;
                                        } else { // This section will make the value an array if multiple tags with the same name appear together
-                                               $current[$tag] = array($current[$tag], $result); // This will combine the existing item and the new item together to make an array
+                                               $current[$tag] = [$current[$tag], $result]; // This will combine the existing item and the new item together to make an array
                                                $repeated_tag_index[$tag.'_'.$level] = 2;
 
                                                if (isset($current[$tag.'_attr'])) { // The attribute of the last(0th) tag must be moved as well
@@ -374,7 +374,7 @@ class XML
                                                }
                                                $repeated_tag_index[$tag.'_'.$level]++;
                                        } else { // If it is not an array...
-                                               $current[$tag] = array($current[$tag], $result); //...Make it an array using using the existing value and the new value
+                                               $current[$tag] = [$current[$tag], $result]; //...Make it an array using using the existing value and the new value
                                                $repeated_tag_index[$tag.'_'.$level] = 1;
                                                if ($priority == 'tag' and $get_attributes) {
                                                        if (isset($current[$tag.'_attr'])) { // The attribute of the last(0th) tag must be moved as well
index 6afa61601623c81ae07feb43b2dad782e86e532b..e9019216f5b5a798e42197154ca259bb559063dc 100644 (file)
@@ -88,7 +88,7 @@ Class Cron {
                        Worker::add(PRIORITY_LOW, "CronJobs", "update_photo_albums");
 
                        // Delete all done workerqueue entries
-                       dba::delete('workerqueue', array('`done` AND `executed` < UTC_TIMESTAMP() - INTERVAL 12 HOUR'));
+                       dba::delete('workerqueue', ['`done` AND `executed` < UTC_TIMESTAMP() - INTERVAL 12 HOUR']);
 
                        // check upstream version?
                        Worker::add(PRIORITY_LOW, 'CheckVersion');
@@ -181,11 +181,11 @@ Class Cron {
                        }
 
                        // Friendica and OStatus are checked once a day
-                       if (in_array($contact['network'], array(NETWORK_DFRN, NETWORK_OSTATUS))) {
+                       if (in_array($contact['network'], [NETWORK_DFRN, NETWORK_OSTATUS])) {
                                $contact['priority'] = 2;
                        }
 
-                       if ($contact['subhub'] && in_array($contact['network'], array(NETWORK_DFRN, NETWORK_OSTATUS))) {
+                       if ($contact['subhub'] && in_array($contact['network'], [NETWORK_DFRN, NETWORK_OSTATUS])) {
                                /*
                                 * We should be getting everything via a hub. But just to be sure, let's check once a day.
                                 * (You can make this more or less frequent if desired by setting 'pushpoll_frequency' appropriately)
@@ -262,7 +262,7 @@ Class Cron {
 
                        logger("Polling " . $contact["network"] . " " . $contact["id"] . " " . $contact['priority'] . " " . $contact["nick"] . " " . $contact["name"]);
 
-                       Worker::add(array('priority' => $priority, 'dont_fork' => true), 'OnePoll', (int)$contact['id']);
+                       Worker::add(['priority' => $priority, 'dont_fork' => true], 'OnePoll', (int)$contact['id']);
                }
        }
 }
index e83347055b78f260fe39e9ef5ec940d8f5e87204..9e130d9ef0933d66245b62405f96508e1a863ffb 100644 (file)
@@ -119,7 +119,7 @@ class CronJobs
                $r = q("SELECT * FROM `user` WHERE `account_removed` AND `account_expires_on` < UTC_TIMESTAMP() - INTERVAL 3 DAY");
                if (DBM::is_result($r)) {
                        foreach ($r as $user) {
-                               dba::delete('user', array('uid' => $user['uid']));
+                               dba::delete('user', ['uid' => $user['uid']]);
                        }
                }
        }
@@ -164,15 +164,15 @@ class CronJobs
                        if (!$cachetime) {
                                $cachetime = PROXY_DEFAULT_TIME;
                        }
-                       $condition = array('`uid` = 0 AND `resource-id` LIKE "pic:%" AND `created` < NOW() - INTERVAL ? SECOND', $cachetime);
+                       $condition = ['`uid` = 0 AND `resource-id` LIKE "pic:%" AND `created` < NOW() - INTERVAL ? SECOND', $cachetime];
                        dba::delete('photo', $condition);
                }
 
                // Delete the cached OEmbed entries that are older than three month
-               dba::delete('oembed', array("`created` < NOW() - INTERVAL 3 MONTH"));
+               dba::delete('oembed', ["`created` < NOW() - INTERVAL 3 MONTH"]);
 
                // Delete the cached "parse_url" entries that are older than three month
-               dba::delete('parsed_url', array("`created` < NOW() - INTERVAL 3 MONTH"));
+               dba::delete('parsed_url', ["`created` < NOW() - INTERVAL 3 MONTH"]);
 
                // Maximum table size in megabyte
                $max_tablesize = intval(Config::get('system', 'optimize_max_tablesize')) * 1000000;
index 8d1228f018b2dbcc699260203fa3321c2e0bf4f6..ffb24af09e9dc6bf60d5e8479124dfdba82d41ad 100644 (file)
@@ -83,7 +83,7 @@ class DBClean {
                                logger("found global item orphans: ".$count);
                                while ($orphan = dba::fetch($r)) {
                                        $last_id = $orphan["id"];
-                                       dba::delete('item', array('id' => $orphan["id"]));
+                                       dba::delete('item', ['id' => $orphan["id"]]);
                                }
                                Worker::add(PRIORITY_MEDIUM, 'DBClean', 1, $last_id);
                        } else {
@@ -105,7 +105,7 @@ class DBClean {
                                logger("found item orphans without parents: ".$count);
                                while ($orphan = dba::fetch($r)) {
                                        $last_id = $orphan["id"];
-                                       dba::delete('item', array('id' => $orphan["id"]));
+                                       dba::delete('item', ['id' => $orphan["id"]]);
                                }
                                Worker::add(PRIORITY_MEDIUM, 'DBClean', 2, $last_id);
                        } else {
@@ -131,7 +131,7 @@ class DBClean {
                                logger("found thread orphans: ".$count);
                                while ($orphan = dba::fetch($r)) {
                                        $last_id = $orphan["iid"];
-                                       dba::delete('thread', array('iid' => $orphan["iid"]));
+                                       dba::delete('thread', ['iid' => $orphan["iid"]]);
                                }
                                Worker::add(PRIORITY_MEDIUM, 'DBClean', 3, $last_id);
                        } else {
@@ -157,7 +157,7 @@ class DBClean {
                                logger("found notify orphans: ".$count);
                                while ($orphan = dba::fetch($r)) {
                                        $last_id = $orphan["id"];
-                                       dba::delete('notify', array('iid' => $orphan["iid"]));
+                                       dba::delete('notify', ['iid' => $orphan["iid"]]);
                                }
                                Worker::add(PRIORITY_MEDIUM, 'DBClean', 4, $last_id);
                        } else {
@@ -183,7 +183,7 @@ class DBClean {
                                logger("found notify-threads orphans: ".$count);
                                while ($orphan = dba::fetch($r)) {
                                        $last_id = $orphan["id"];
-                                       dba::delete('notify-threads', array('id' => $orphan["id"]));
+                                       dba::delete('notify-threads', ['id' => $orphan["id"]]);
                                }
                                Worker::add(PRIORITY_MEDIUM, 'DBClean', 5, $last_id);
                        } else {
@@ -209,7 +209,7 @@ class DBClean {
                                logger("found sign orphans: ".$count);
                                while ($orphan = dba::fetch($r)) {
                                        $last_id = $orphan["id"];
-                                       dba::delete('sign', array('iid' => $orphan["iid"]));
+                                       dba::delete('sign', ['iid' => $orphan["iid"]]);
                                }
                                Worker::add(PRIORITY_MEDIUM, 'DBClean', 6, $last_id);
                        } else {
@@ -235,7 +235,7 @@ class DBClean {
                                logger("found term orphans: ".$count);
                                while ($orphan = dba::fetch($r)) {
                                        $last_id = $orphan["tid"];
-                                       dba::delete('term', array('oid' => $orphan["oid"]));
+                                       dba::delete('term', ['oid' => $orphan["oid"]]);
                                }
                                Worker::add(PRIORITY_MEDIUM, 'DBClean', 7, $last_id);
                        } else {
@@ -274,7 +274,7 @@ class DBClean {
                                logger("found expired threads: ".$count);
                                while ($thread = dba::fetch($r)) {
                                        $last_id = $thread["iid"];
-                                       dba::delete('thread', array('iid' => $thread["iid"]));
+                                       dba::delete('thread', ['iid' => $thread["iid"]]);
                                }
                                Worker::add(PRIORITY_MEDIUM, 'DBClean', 8, $last_id);
                        } else {
@@ -302,7 +302,7 @@ class DBClean {
                                logger("found global item entries from expired threads: ".$count);
                                while ($orphan = dba::fetch($r)) {
                                        $last_id = $orphan["id"];
-                                       dba::delete('item', array('id' => $orphan["id"]));
+                                       dba::delete('item', ['id' => $orphan["id"]]);
                                }
                                Worker::add(PRIORITY_MEDIUM, 'DBClean', 9, $last_id);
                        } else {
@@ -324,7 +324,7 @@ class DBClean {
                                logger("found old conversations: ".$count);
                                while ($orphan = dba::fetch($r)) {
                                        $last_id = $orphan["received"];
-                                       dba::delete('conversation', array('item-uri' => $orphan["item-uri"]));
+                                       dba::delete('conversation', ['item-uri' => $orphan["item-uri"]]);
                                }
                                Worker::add(PRIORITY_MEDIUM, 'DBClean', 10, $last_id);
                        } else {
index fc7f884f6ab6fa9b8bd36cb942704864511b4773..eafd0242ba5c57adf486b3b3d5e4f31fb07ea765 100644 (file)
@@ -35,8 +35,8 @@ class Delivery {
                $fsuggest = false;
                $relocate = false;
                $top_level = false;
-               $recipients = array();
-               $url_recipients = array();
+               $recipients = [];
+               $url_recipients = [];
                $followup = false;
 
                $normal_mode = true;
@@ -108,7 +108,7 @@ class Delivery {
                        }
 
                        $icontacts = null;
-                       $contacts_arr = array();
+                       $contacts_arr = [];
                        foreach ($items as $item) {
                                if (!in_array($item['contact-id'],$contacts_arr)) {
                                        $contacts_arr[] = intval($item['contact-id']);
@@ -238,7 +238,7 @@ class Delivery {
                                } elseif ($relocate) {
                                        $atom = DFRN::relocate($owner, $uid);
                                } elseif ($followup) {
-                                       $msgitems = array();
+                                       $msgitems = [];
                                        foreach ($items as $item) {  // there is only one item
                                                if (!$item['parent']) {
                                                        return;
@@ -250,7 +250,7 @@ class Delivery {
                                        }
                                        $atom = DFRN::entries($msgitems,$owner);
                                } else {
-                                       $msgitems = array();
+                                       $msgitems = [];
                                        foreach ($items as $item) {
                                                if (!$item['parent']) {
                                                        return;
index 8dafbfaaa5efd0ff10738d4c16176dd4c563b9ff..b29978cea731e666751485aa3239a6ba0a15cd21 100644 (file)
@@ -25,7 +25,7 @@ class Directory {
 
                $dir .= "/submit";
 
-               $arr = array('url' => $url);
+               $arr = ['url' => $url];
 
                call_hooks('globaldir_update', $arr);
 
index b7b7f0a31c79bb192a8a36f6069a16cee17ae86d..c00db89ff518f33b37559ac2d514c4a703a5e3b5 100644 (file)
@@ -164,13 +164,13 @@ class DiscoverPoCo {
                                continue;
                         }
 
-                       if (in_array($urlparts["host"], array("www.facebook.com", "facebook.com", "twitter.com",
-                                                               "identi.ca", "alpha.app.net"))) {
-                               $networks = array("www.facebook.com" => NETWORK_FACEBOOK,
+                       if (in_array($urlparts["host"], ["www.facebook.com", "facebook.com", "twitter.com",
+                                                               "identi.ca", "alpha.app.net"])) {
+                               $networks = ["www.facebook.com" => NETWORK_FACEBOOK,
                                                "facebook.com" => NETWORK_FACEBOOK,
                                                "twitter.com" => NETWORK_TWITTER,
                                                "identi.ca" => NETWORK_PUMPIO,
-                                               "alpha.app.net" => NETWORK_APPNET);
+                                               "alpha.app.net" => NETWORK_APPNET];
 
                                q("UPDATE `gcontact` SET `network` = '%s' WHERE `nurl` = '%s'",
                                        dbesc($networks[$urlparts["host"]]), dbesc(normalise_link($user["url"])));
index 9b2308da374155a02d46fcee8ac1a49138615c9b..039ae44db20c9afc335a4c74f8cc2cda5181c741 100644 (file)
@@ -27,7 +27,7 @@ class Expire {
                        // physically remove anything that has been deleted for more than two months
                        $r = dba::p("SELECT `id` FROM `item` WHERE `deleted` AND `changed` < UTC_TIMESTAMP() - INTERVAL 60 DAY");
                        while ($row = dba::fetch($r)) {
-                               dba::delete('item', array('id' => $row['id']));
+                               dba::delete('item', ['id' => $row['id']]);
                        }
                        dba::close($r);
 
@@ -58,13 +58,13 @@ class Expire {
 
                logger('expire: start');
 
-               Worker::add(array('priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true),
+               Worker::add(['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true],
                                'Expire', 'delete');
 
                $r = dba::p("SELECT `uid`, `username` FROM `user` WHERE `expire` != 0");
                while ($row = dba::fetch($r)) {
                        logger('Calling expiry for user '.$row['uid'].' ('.$row['username'].')', LOGGER_DEBUG);
-                       Worker::add(array('priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true),
+                       Worker::add(['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true],
                                        'Expire', (int)$row['uid']);
                }
                dba::close($r);
@@ -74,7 +74,7 @@ class Expire {
                if (is_array($a->hooks) && array_key_exists('expire', $a->hooks)) {
                        foreach ($a->hooks['expire'] as $hook) {
                                logger("Calling expire hook for '" . $hook[1] . "'", LOGGER_DEBUG);
-                               Worker::add(array('priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true),
+                               Worker::add(['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true],
                                                'Expire', 'hook', $hook[1]);
                        }
                }
index 0d8c3765a8dea74d42e03dbc7a3bb4a1e55047af..5222fb61ccfdba1d7ac8eae3fe2c8fa000341f91 100644 (file)
@@ -34,7 +34,7 @@ class GProbe {
 
                        $result = Cache::get("gprobe:".$urlparts["host"]);
                        if (!is_null($result)) {
-                               if (in_array($result["network"], array(NETWORK_FEED, NETWORK_PHANTOM))) {
+                               if (in_array($result["network"], [NETWORK_FEED, NETWORK_PHANTOM])) {
                                        logger("DDoS attempt detected for ".$urlparts["host"]." by ".$_SERVER["REMOTE_ADDR"].". server data: ".print_r($_SERVER, true), LOGGER_DEBUG);
                                        return;
                                }
@@ -46,7 +46,7 @@ class GProbe {
                                Cache::set("gprobe:".$urlparts["host"], $arr);
                        }
 
-                       if (!in_array($arr["network"], array(NETWORK_FEED, NETWORK_PHANTOM))) {
+                       if (!in_array($arr["network"], [NETWORK_FEED, NETWORK_PHANTOM])) {
                                GContact::update($arr);
                        }
 
index 307178bfbd830c80cb741fe562558bcef792f6e8..7c1749f5fd566f91785b17bf2479e8b16dc36986 100644 (file)
@@ -66,8 +66,8 @@ class Notifier {
                $fsuggest = false;
                $relocate = false;
                $top_level = false;
-               $recipients = array();
-               $url_recipients = array();
+               $recipients = [];
+               $url_recipients = [];
 
                $normal_mode = true;
 
@@ -284,8 +284,8 @@ class Notifier {
                                $followup = true;
                                $public_message = false; // not public
                                $conversant_str = dbesc($parent['contact-id']);
-                               $recipients = array($parent['contact-id']);
-                               $recipients_followup  = array($parent['contact-id']);
+                               $recipients = [$parent['contact-id']];
+                               $recipients_followup  = [$parent['contact-id']];
 
                                logger('notifier: followup '.$target_item["guid"].' to '.$conversant_str, LOGGER_DEBUG);
 
@@ -349,7 +349,7 @@ class Notifier {
                                        Worker::add($a->queue['priority'], 'Notifier', 'uplink', $item_id);
                                }
 
-                               $conversants = array();
+                               $conversants = [];
 
                                foreach ($items as $item) {
                                        $recipients[] = $item['contact-id'];
@@ -484,7 +484,7 @@ class Notifier {
                                }
                                logger("Deliver ".$target_item["guid"]." to ".$contact['url']." via network ".$contact['network'], LOGGER_DEBUG);
 
-                               Worker::add(array('priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true),
+                               Worker::add(['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true],
                                                'Delivery', $cmd, $item_id, (int)$contact['id']);
                        }
                }
@@ -507,8 +507,8 @@ class Notifier {
 
                if ($public_message) {
 
-                       $r0 = array();
-                       $r1 = array();
+                       $r0 = [];
+                       $r1 = [];
 
                        if ($diaspora_delivery) {
                                if (!$followup) {
@@ -554,7 +554,7 @@ class Notifier {
 
                                        if (!$mail && !$fsuggest && !$followup) {
                                                logger('notifier: delivery agent: '.$rr['name'].' '.$rr['id'].' '.$rr['network'].' '.$target_item["guid"]);
-                                               Worker::add(array('priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true),
+                                               Worker::add(['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true],
                                                                'Delivery', $cmd, $item_id, (int)$rr['id']);
                                        }
                                }
@@ -574,7 +574,7 @@ class Notifier {
                        logger('Activating internal PuSH for item '.$item_id, LOGGER_DEBUG);
 
                        // Handling the pubsubhubbub requests
-                       Worker::add(array('priority' => PRIORITY_HIGH, 'created' => $a->queue['created'], 'dont_fork' => true),
+                       Worker::add(['priority' => PRIORITY_HIGH, 'created' => $a->queue['created'], 'dont_fork' => true],
                                        'PubSubPublish');
                }
 
index 093d78baae66f573a96c13ce277ada30fa5ed4c8..9a4ce757a854a9220c51f8e33063de4658680650 100644 (file)
@@ -75,11 +75,11 @@ Class OnePoll
                                        $last_updated = $contact['last-item'];
                                }
 
-                               $fields = array('last-item' => $last_updated, 'last-update' => $updated, 'success_update' => $updated);
+                               $fields = ['last-item' => $last_updated, 'last-update' => $updated, 'success_update' => $updated];
                                self::updateContact($contact, $fields);
                                Contact::unmarkForArchival($contact);
                        } else {
-                               self::updateContact($contact, array('last-update' => $updated, 'failure_update' => $updated));
+                               self::updateContact($contact, ['last-update' => $updated, 'failure_update' => $updated]);
                                Contact::markForArchival($contact);
                                logger('Contact '.$contact['id'].' is marked for archival', LOGGER_DEBUG);
                        }
@@ -168,8 +168,8 @@ Class OnePoll
                        // But this may be our first communication, so set the writable flag if it isn't set already.
 
                        if (!intval($contact['writable'])) {
-                               $fields = array('writable' => true);
-                               dba::update('contact', $fields, array('id' => $contact['id']));
+                               $fields = ['writable' => true];
+                               dba::update('contact', $fields, ['id' => $contact['id']]);
                        }
 
                        $url = $contact['poll'] . '?dfrn_id=' . $idtosend
@@ -203,7 +203,7 @@ Class OnePoll
                                Contact::markForArchival($contact);
 
                                // set the last-update so we don't keep polling
-                               $fields = array('last-update' => datetime_convert(), 'failure_update' => datetime_convert());
+                               $fields = ['last-update' => datetime_convert(), 'failure_update' => datetime_convert()];
                                self::updateContact($contact, $fields);
                                return;
                        }
@@ -213,7 +213,7 @@ Class OnePoll
 
                                Contact::markForArchival($contact);
 
-                               $fields = array('last-update' => datetime_convert(), 'failure_update' => datetime_convert());
+                               $fields = ['last-update' => datetime_convert(), 'failure_update' => datetime_convert()];
                                self::updateContact($contact, $fields);
                                return;
                        }
@@ -226,7 +226,7 @@ Class OnePoll
 
                                // we may not be friends anymore. Will keep trying for one month.
                                // set the last-update so we don't keep polling
-                               $fields = array('last-update' => datetime_convert(), 'failure_update' => datetime_convert());
+                               $fields = ['last-update' => datetime_convert(), 'failure_update' => datetime_convert()];
                                self::updateContact($contact, $fields);
 
                                Contact::markForArchival($contact);
@@ -242,11 +242,11 @@ Class OnePoll
                        }
 
                        if (((float)$res->dfrn_version > 2.21) && ($contact['poco'] == '')) {
-                               $fields = array('poco' => str_replace('/profile/', '/poco/', $contact['url']));
-                               dba::update('contact', $fields, array('id' => $contact['id']));
+                               $fields = ['poco' => str_replace('/profile/', '/poco/', $contact['url'])];
+                               dba::update('contact', $fields, ['id' => $contact['id']]);
                        }
 
-                       $postvars = array();
+                       $postvars = [];
 
                        $sent_dfrn_id = hex2bin((string) $res->dfrn_id);
                        $challenge    = hex2bin((string) $res->challenge);
@@ -299,8 +299,8 @@ Class OnePoll
                        }
 
                        if ($stat_writeable != $contact['writable']) {
-                               $fields = array('writable' => $stat_writeable);
-                               dba::update('contact', $fields, array('id' => $contact['id']));
+                               $fields = ['writable' => $stat_writeable];
+                               dba::update('contact', $fields, ['id' => $contact['id']]);
                        }
 
                        // Are we allowed to import from this person?
@@ -312,7 +312,7 @@ Class OnePoll
                        }
 
                        $cookiejar = tempnam(get_temppath(), 'cookiejar-onepoll-');
-                       $ret = z_fetch_url($contact['poll'], false, $redirects, array('cookiejar' => $cookiejar));
+                       $ret = z_fetch_url($contact['poll'], false, $redirects, ['cookiejar' => $cookiejar]);
                        unlink($cookiejar);
 
                        if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
@@ -351,8 +351,8 @@ Class OnePoll
                                unset($password);
                                logger("Mail: Connect to " . $mailconf['user']);
                                if ($mbox) {
-                                       $fields = array('last_check' => datetime_convert());
-                                       dba::update('mailacct', $fields, array('id' => $mailconf['id']));
+                                       $fields = ['last_check' => datetime_convert()];
+                                       dba::update('mailacct', $fields, ['id' => $mailconf['id']]);
                                        logger("Mail: Connected to " . $mailconf['user']);
                                } else {
                                        logger("Mail: Connection error ".$mailconf['user']." ".print_r(imap_errors(), true));
@@ -374,7 +374,7 @@ Class OnePoll
                                                foreach ($msgs as $msg_uid => $meta) {
                                                        logger("Mail: Parsing mail ".$msg_uid, LOGGER_DATA);
 
-                                                       $datarray = array();
+                                                       $datarray = [];
                                                        $datarray['verb'] = ACTIVITY_POST;
                                                        $datarray['object-type'] = ACTIVITY_OBJ_NOTE;
                                                        // $meta = Email::messageMeta($mbox, $msg_uid);
@@ -391,8 +391,8 @@ Class OnePoll
                                                                // Only delete when mails aren't automatically moved or deleted
                                                                if (($mailconf['action'] != 1) && ($mailconf['action'] != 3))
                                                                        if ($meta->deleted && ! $item['deleted']) {
-                                                                               $fields = array('deleted' => true, 'changed' => datetime_convert());
-                                                                               dba::update('item', $fields, array('id' => $item['id']));
+                                                                               $fields = ['deleted' => true, 'changed' => datetime_convert()];
+                                                                               dba::update('item', $fields, ['id' => $item['id']]);
                                                                        }
 
                                                                switch ($mailconf['action']) {
@@ -430,7 +430,7 @@ Class OnePoll
                                                                $refs_arr = explode(' ', $raw_refs);
                                                                if (count($refs_arr)) {
                                                                        for ($x = 0; $x < count($refs_arr); $x ++) {
-                                                                               $refs_arr[$x] = "'" . Email::msgid2iri(str_replace(array('<', '>', ' '),array('', '', ''),dbesc($refs_arr[$x]))) . "'";
+                                                                               $refs_arr[$x] = "'" . Email::msgid2iri(str_replace(['<', '>', ' '],['', '', ''],dbesc($refs_arr[$x]))) . "'";
                                                                        }
                                                                }
                                                                $qstr = implode(',', $refs_arr);
@@ -532,10 +532,10 @@ Class OnePoll
 
                                                        $stored_item = item_store($datarray);
 
-                                                       $condition = array('parent-uri' => $datarray['parent-uri'], 'uid' => $importer_uid);
-                                                       dba::update('item', array('last-child' => false), $condition);
+                                                       $condition = ['parent-uri' => $datarray['parent-uri'], 'uid' => $importer_uid];
+                                                       dba::update('item', ['last-child' => false], $condition);
 
-                                                       dba::update('item', array('last-child' => true), array('id' => $stored_item));
+                                                       dba::update('item', ['last-child' => true], ['id' => $stored_item]);
 
                                                        switch ($mailconf['action']) {
                                                                case 0:
@@ -573,7 +573,7 @@ Class OnePoll
                        if (!strstr($xml, '<')) {
                                logger('post_handshake: response from ' . $url . ' did not contain XML.');
 
-                               $fields = array('last-update' => datetime_convert(), 'failure_update' => datetime_convert());
+                               $fields = ['last-update' => datetime_convert(), 'failure_update' => datetime_convert()];
                                self::updateContact($contact, $fields);
                                Contact::markForArchival($contact);
                                return;
@@ -619,25 +619,25 @@ Class OnePoll
 
                        $updated = datetime_convert();
 
-                       self::updateContact($contact, array('last-update' => $updated, 'success_update' => $updated));
-                       dba::update('gcontact', array('last_contact' => $updated), array('nurl' => $contact['nurl']));
+                       self::updateContact($contact, ['last-update' => $updated, 'success_update' => $updated]);
+                       dba::update('gcontact', ['last_contact' => $updated], ['nurl' => $contact['nurl']]);
                        Contact::unmarkForArchival($contact);
-               } elseif (in_array($contact["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, NETWORK_FEED))) {
+               } elseif (in_array($contact["network"], [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, NETWORK_FEED])) {
                        $updated = datetime_convert();
 
-                       self::updateContact($contact, array('last-update' => $updated, 'failure_update' => $updated));
-                       dba::update('gcontact', array('last_failure' => $updated), array('nurl' => $contact['nurl']));
+                       self::updateContact($contact, ['last-update' => $updated, 'failure_update' => $updated]);
+                       dba::update('gcontact', ['last_failure' => $updated], ['nurl' => $contact['nurl']]);
                        Contact::markForArchival($contact);
                } else {
                        $updated = datetime_convert();
-                       dba::update('contact', array('last-update' => $updated), array('id' => $contact['id']));
+                       dba::update('contact', ['last-update' => $updated], ['id' => $contact['id']]);
                }
 
                return;
        }
 
        private static function RemoveReply($subject) {
-               while (in_array(strtolower(substr($subject, 0, 3)), array("re:", "aw:"))) {
+               while (in_array(strtolower(substr($subject, 0, 3)), ["re:", "aw:"])) {
                        $subject = trim(substr($subject, 4));
                }
 
@@ -651,7 +651,7 @@ Class OnePoll
         * @param array $fields The fields that are updated
         */
        private static function updateContact($contact, $fields) {
-               dba::update('contact', $fields, array('id' => $contact['id']));
-               dba::update('contact', $fields, array('uid' => 0, 'nurl' => $contact['nurl']));
+               dba::update('contact', $fields, ['id' => $contact['id']]);
+               dba::update('contact', $fields, ['uid' => 0, 'nurl' => $contact['nurl']]);
        }
 }
index 3af206e80d86ae2335013759d85a740877cccc22..2656cef24b7af5b07adfcd97a5873537b445e6c5 100644 (file)
@@ -26,7 +26,7 @@ class PubSubPublish {
 
                        foreach ($r as $rr) {
                                logger("Publish feed to ".$rr["callback_url"], LOGGER_DEBUG);
-                               Worker::add(array('priority' => PRIORITY_HIGH, 'created' => $a->queue['created'], 'dont_fork' => true),
+                               Worker::add(['priority' => PRIORITY_HIGH, 'created' => $a->queue['created'], 'dont_fork' => true],
                                                'PubSubPublish', (int)$rr["id"]);
                        }
                }
@@ -60,11 +60,11 @@ class PubSubPublish {
 
                $hmac_sig = hash_hmac("sha1", $params, $rr['secret']);
 
-               $headers = array("Content-type: application/atom+xml",
+               $headers = ["Content-type: application/atom+xml",
                                sprintf("Link: <%s>;rel=hub,<%s>;rel=self",
                                        System::baseUrl().'/pubsubhubbub/'.$rr['nickname'],
                                        $rr['topic']),
-                               "X-Hub-Signature: sha1=".$hmac_sig);
+                               "X-Hub-Signature: sha1=".$hmac_sig];
 
                logger('POST '.print_r($headers, true)."\n".$params, LOGGER_DEBUG);
 
index d9ffb69d07c58d20d527fa1184f1f66c658b091f..1c83e77d7714603a05e453456f9bcd16472a62f7 100644 (file)
@@ -33,7 +33,7 @@ class Queue
                        logger('queue: start');
 
                        // Handling the pubsubhubbub requests
-                       Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), 'PubSubPublish');
+                       Worker::add(['priority' => PRIORITY_HIGH, 'dont_fork' => true], 'PubSubPublish');
 
                        $r = q(
                                "SELECT `queue`.*, `contact`.`name`, `contact`.`uid` FROM `queue`
@@ -60,7 +60,7 @@ class Queue
                        if (DBM::is_result($r)) {
                                foreach ($r as $q_item) {
                                        logger('Call queue for id ' . $q_item['id']);
-                                       Worker::add(array('priority' => PRIORITY_LOW, 'dont_fork' => true), "Queue", (int) $q_item['id']);
+                                       Worker::add(['priority' => PRIORITY_LOW, 'dont_fork' => true], "Queue", (int) $q_item['id']);
                                }
                        }
                        return;
@@ -158,7 +158,7 @@ class Queue
                                break;
 
                        default:
-                               $params = array('owner' => $owner, 'contact' => $contact, 'queue' => $q_item, 'result' => false);
+                               $params = ['owner' => $owner, 'contact' => $contact, 'queue' => $q_item, 'result' => false];
                                call_hooks('queue_deliver', $params);
 
                                if ($params['result']) {
index 4098d66bc59648c227fc170b187356c76209b5d7..9a7a257770ba8982b42d6df1fca13341e08babd6 100644 (file)
@@ -14,12 +14,12 @@ class RemoveContact {
        public static function execute($id) {
 
                // Only delete if the contact doesn't exist (anymore)
-               $r = dba::exists('contact', array('id' => $id));
+               $r = dba::exists('contact', ['id' => $id]);
                if ($r) {
                        return;
                }
 
                // Now we delete all the depending table entries
-               dba::delete('contact', array('id' => $id));
+               dba::delete('contact', ['id' => $id]);
        }
 }
index 395e415bf7409a6fe0be01d830740cbb5767769e..a506f0e087f55be156b583ae33bbbb9ec2cf062a 100644 (file)
@@ -26,13 +26,13 @@ class UpdateGContact {
                        return;
                }
 
-               if (!in_array($r[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) {
+               if (!in_array($r[0]["network"], [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS])) {
                        return;
                }
 
                $data = Probe::uri($r[0]["url"]);
 
-               if (!in_array($data["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) {
+               if (!in_array($data["network"], [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS])) {
                        if ($r[0]["server_url"] != "")
                                PortableContact::checkServer($r[0]["server_url"], $r[0]["network"]);
 
index 352092ec2264e40f5026c582a0c07805c15ebb1e..bf6eee9d7822e246943af2f5c2f4a5237672a5bf 100644 (file)
@@ -88,7 +88,7 @@ function update_1191() {
        if (plugin_enabled('forumlist')) {
                $plugin = 'forumlist';
                $plugins = Config::get('system','addon');
-               $plugins_arr = array();
+               $plugins_arr = [];
 
                if ($plugins) {
                        $plugins_arr = explode(",",str_replace(" ", "",$plugins));
index af4c76444efb0f044b021360108f7667f4426bde..a67be69ceb82ee1cde408dcb16304b5af88bfba7 100644 (file)
@@ -1,4 +1,4 @@
-<?php 
+<?php
 /**
  * When I installed docblox, I had the experience that it does not generate any output at all.
  * This script may be used to find that kind of problems with the documentation build process.
  * If that list can't be build, it cuts it in two parts and tries both parts independently. If only one of them breaks,
  * it takes that one and tries the same independently. If both break, it assumes this is the smallest set. This assumption
  * is not necessarily true. Maybe the smallest set consists of two files and both of them were in different parts when
- * the list was divided, but by now it is my best guess. To make this assumption better, the list is shuffled after every step. 
+ * the list was divided, but by now it is my best guess. To make this assumption better, the list is shuffled after every step.
  *
  * After that, the script tries to remove a file from the list. It tests if the list breaks and if so, it
- * assumes that the file it removed belongs to the set of errorneous files. 
- * This is done for all files, so, in the end removing one file leads to a working doc build. 
+ * assumes that the file it removed belongs to the set of errorneous files.
+ * This is done for all files, so, in the end removing one file leads to a working doc build.
  *
  * @package util
  * @author Alexander Kampmann
 
 /**
  * This function generates a comma seperated list of file names.
- * 
+ *
  * @package util
- * 
+ *
  * @param array $fileset Set of file names
- * 
+ *
  * @return string comma-seperated list of the file names
  */
 function namesList($fileset) {
@@ -42,9 +42,9 @@ function namesList($fileset) {
 /**
  * This functions runs phpdoc on the provided list of files
  * @package util
- * 
+ *
  * @param array $fileset Set of filenames
- * 
+ *
  * @return bool true, if that set can be built
  */
 function runs($fileset) {
@@ -65,12 +65,12 @@ function runs($fileset) {
  * it was meant to be recursive, but php's maximum stack size is to small. So it just simulates recursion.
  *
  * In that version, it does not necessarily generate the smallest set, because it may not alter the elements order enough.
- * 
+ *
  * @package util
- * 
+ *
  * @param array $fileset set of filenames
  * @param int $ps number of files in subsets
- * 
+ *
  * @return array a part of $fileset, that crashes
  */
 function reduce($fileset, $ps) {
@@ -80,18 +80,18 @@ function reduce($fileset, $ps) {
        $parts=array_filter($parts, "runs");
        //melt remaining parts together
        if(is_array($parts)) {
-               return array_reduce($parts, "array_merge", array());
+               return array_reduce($parts, "array_merge", []);
        }
-       return array();
+       return [];
 };
 
 //return from util folder to frindica base dir
 $dir='..';
 
 //stack for dirs to search
-$dirstack=array();
+$dirstack=[];
 //list of source files
-$filelist=array();
+$filelist=[];
 
 //loop over all files in $dir
 while($dh=opendir($dir)) {
@@ -131,7 +131,7 @@ do {
 } while(count($res)<$i);
 
 //check one file after another
-$needed=array();
+$needed=[];
 
 while(count($res)!=0) {
        $file=array_pop($res);
index 90127f3c1b2e4811108ed85c62a53027eb638e8c..b3aa12ebf0e0a54301ea2551466fef2534e3fdd0 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
-       $arr = array();
+       $arr = [];
 
-       $files = array('index.php','boot.php');
+       $files = ['index.php','boot.php'];
        $files = array_merge($files,glob('mod/*'),glob('include/*'),glob('addon/*/*'));
 
 
@@ -14,7 +14,7 @@
 
                preg_match_all($pat,$str,$matches);
                preg_match_all($patt, $str, $matchestt);
-               
+
 
                if(count($matches)){
                        foreach($matches[1] as $match) {
@@ -51,7 +51,7 @@ function string_plural_select($n){
                        $s .= ");\n";
                } else {
                        if(substr($a,0,1) == '$')
-                               continue;                       
+                               continue;
                        $s .= '$a->strings[' . $a . '] = '. $a . ';' . "\n";
                }
        }
@@ -59,5 +59,5 @@ function string_plural_select($n){
        $zones = timezone_identifiers_list();
        foreach($zones as $zone)
                $s .= '$a->strings[\'' . $zone . '\'] = \'' . $zone . '\';' . "\n";
-       
+
        echo $s;
\ No newline at end of file
index ce0b45fb7710e67e5af39da4c7e597f01589542d..3a2f0d15f54192fa74b92f8d6ea0caa0be3c0f99 100644 (file)
@@ -58,7 +58,7 @@ if ((isset($title)) && (isset($text)) && (isset($url))) {
 }
 
 if (isset($_POST['submit'])) {
-       
+
        if (($_POST["friendica_acct_name"] != '') && ($_POST["friendica_password"] != '')) {
                $acctname = $_POST["friendica_acct_name"];
                $tmp_account_array = explode("@", $acctname);
@@ -70,32 +70,32 @@ if (isset($_POST['submit'])) {
                $content = $_POST["content"];
 
                $url = "http://" . $hostname . '/api/statuses/update';
-               $data = array('status' => $content);
-               
+               $data = ['status' => $content];
+
                // echo "posting to: $url<br/>";
 
                $c = curl_init();
-               curl_setopt($c, CURLOPT_URL, $url); 
+               curl_setopt($c, CURLOPT_URL, $url);
                curl_setopt($c, CURLOPT_USERPWD, "$username:$password");
-               curl_setopt($c, CURLOPT_POSTFIELDS, $data); 
-               curl_setopt($c, CURLOPT_RETURNTRANSFER, true); 
+               curl_setopt($c, CURLOPT_POSTFIELDS, $data);
+               curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
                curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
-               $c_result = curl_exec($c); 
-               if(curl_errno($c)){ 
+               $c_result = curl_exec($c);
+               if(curl_errno($c)){
                        $error = curl_error($c);
                        showForm($error, $content);
                }
-               
+
                curl_close($c);
                if (!isset($error)) {
                        echo '<script language="javascript" type="text/javascript">window.close();</script>';
                }
-               
+
        } else {
                $error = "Missing account name and/or password...try again please";
                showForm($error, $content);
        }
-       
+
 } else {
        showForm(null, $content);
 }
@@ -103,7 +103,7 @@ if (isset($_POST['submit'])) {
 function showForm($error, $content) {
        $username_cookie = $_COOKIE['username'];
        $password_cookie = $_COOKIE['password'];
-       
+
        echo <<<EOF
        <div class='wrap1'>
                <h2><img class='logo' src='friendica-32.png' align='middle';/>
@@ -121,7 +121,7 @@ function showForm($error, $content) {
                <p></p>
        </div>
 EOF;
-       
+
 }
 ?>
 
index 369c2c4602c708422d70cc197a1dea67801d2c1d..2eb76a47f4032d2006e52ee92eed7f826b31eab6 100755 (executable)
@@ -51,7 +51,7 @@ unset($db_host, $db_user, $db_pass, $db_data);
  * 3. set the flag hidden=1 for the contact entry with the found ID
  **/
 $net = Probe::uri($argv[1]);
-if (in_array($net['network'], array(NETWORK_PHANTOM, NETWORK_MAIL))) {
+if (in_array($net['network'], [NETWORK_PHANTOM, NETWORK_MAIL])) {
        echo "This account seems not to exist.";
        echo "\r\n";
        exit(1);
@@ -59,7 +59,7 @@ if (in_array($net['network'], array(NETWORK_PHANTOM, NETWORK_MAIL))) {
 $nurl = normalise_link($net['url']);
 $contact = dba::selectFirst("contact", ["id"], ["nurl" => $nurl, "uid" => 0]);
 if (DBM::is_result($contact)) {
-       dba::update("contact", array("hidden" => true), array("id" => $contact["id"]));
+       dba::update("contact", ["hidden" => true], ["id" => $contact["id"]]);
        echo "NOTICE: The account should be silenced from the global community page\r\n";
 } else {
        echo "NOTICE: Could not find any entry for this URL (".$nurl.")\r\n";
index 35bdc94317ed8f00e782f667e01cbb0b2d0b89ae..cc3b00e7184a64127fbb92f53f96655fc3ed0be8 100644 (file)
@@ -13,7 +13,7 @@ DEFINE("NORM_REGEXP", "|[\\\]|");
 
 if(! class_exists('App')) {
        class TmpA {
-               public $strings = Array();
+               public $strings = [];
        }
        $a = new TmpA();
 }
@@ -91,10 +91,10 @@ $out .= "\n";
 print "\nLoading base message.po...";
 
 // load base messages.po and extract msgids
-$base_msgids = array();
-$norm_base_msgids = array();
+$base_msgids = [];
+$norm_base_msgids = [];
 $base_f = file("util/messages.po") || die("No base messages.po\n");
-$_f = 0; $_mid = ""; $_mids = array();
+$_f = 0; $_mid = ""; $_mids = [];
 foreach( $base_f as $l) {
        $l = trim($l);
        //~ print $l."\n";
@@ -108,7 +108,7 @@ foreach( $base_f as $l) {
 
                $_f = 0;
                $_mid = "";
-               $_mids = array();
+               $_mids = [];
 
        }
 
@@ -130,7 +130,7 @@ foreach( $base_f as $l) {
        if (startsWith($l, 'msgid ')) {
                $_f = 1;
                $_mid = str_replace('msgid ', '' , $l);
-                       $_mids = array($_mid);
+                       $_mids = [$_mid];
                //~ print "\t mid: $_mid \n";
        }
        //~ print "\t\t\t\t$_f\n\n";
index 75442406a1a54d80c14734258f18f4dd8f64540e..e1d3f50366e40805cb37c45e35b49c81cf96b02b 100644 (file)
@@ -44,7 +44,7 @@ function po2php_run(&$argv, &$argc) {
                        $l = "";
                }
                if (substr($l, 0, 15) == '"Plural-Forms: ') {
-                       $match = array();
+                       $match = [];
                        preg_match("|nplurals=([0-9]*); *plural=(.*)[;\\\\]|", $l, $match);
                        $cond = str_replace('n', '$n', $match[2]);
                        // define plural select function if not already defined
@@ -82,9 +82,9 @@ function po2php_run(&$argv, &$argc) {
 
                        if (!$arr) {
                                $arr=True;
-                               $out .= "array(\n";
+                               $out .= "[\n";
                        }
-                       $match = array();
+                       $match = [];
                        preg_match("|\[([0-9]*)\] (.*)|", $l, $match);
                        $out .= "\t"
                                . preg_replace_callback($escape_s_exp, 'escape_s', $match[1])
@@ -110,7 +110,7 @@ function po2php_run(&$argv, &$argc) {
                                $out .= '"' . $v . '"';
                        }
                        if ($k != "") {
-                               $out .= ($arr) ? ");\n" : ";\n";
+                               $out .= ($arr) ? "];\n" : ";\n";
                        }
                        $arr = false;
                        $k = str_replace("msgid ", "", $l);
@@ -138,7 +138,7 @@ function po2php_run(&$argv, &$argc) {
                $out .= '"' . $v . '"';
        }
        if ($k != "") {
-               $out .= ($arr ? ");\n" : ";\n");
+               $out .= ($arr ? "];\n" : ";\n");
        }
 
        $out = str_replace(DQ_ESCAPE, '\"', $out);
index cb745a5ccf4ac6c82f612385134048ba554971ec..2b6e39cdc13f2ec6f4d54080e404e797456c5af8 100644 (file)
@@ -1,10 +1,10 @@
 <?php
 
 ;
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Could not access contact record."] = "";
 $a->strings["Could not locate selected profile."] = "";
 $a->strings["Contact updated."] = "";
@@ -29,10 +29,10 @@ $a->strings["(Update was successful)"] = "";
 $a->strings["(Update was not successful)"] = "";
 $a->strings["Suggest friends"] = "";
 $a->strings["Network type: %s"] = "";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["View all contacts"] = "";
 $a->strings["Unblock"] = "";
 $a->strings["Block"] = "";
@@ -347,10 +347,10 @@ $a->strings["You and %s"] = "";
 $a->strings["%s and You"] = "";
 $a->strings["Delete conversation"] = "";
 $a->strings["D, d M Y - g:i A"] = "";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Message not available."] = "";
 $a->strings["Delete message"] = "";
 $a->strings["No secure communications available. You <strong>may</strong> be able to respond from the sender's profile page."] = "";
@@ -546,14 +546,14 @@ $a->strings["Attempt to execute this update step automatically"] = "";
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "";
 $a->strings["Registration details for %s"] = "";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "",
        1 => "",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["User '%s' deleted"] = "";
 $a->strings["User '%s' unblocked"] = "";
 $a->strings["User '%s' blocked"] = "";
@@ -616,10 +616,10 @@ $a->strings["Shared Links"] = "";
 $a->strings["Interesting Links"] = "";
 $a->strings["Starred"] = "";
 $a->strings["Favourite Posts"] = "";
-$a->strings["Warning: This group contains %s member from an insecure network."] = array(
+$a->strings["Warning: This group contains %s member from an insecure network."] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Private messages to this group are at risk of public disclosure."] = "";
 $a->strings["No such group"] = "";
 $a->strings["Group is empty"] = "";
@@ -653,14 +653,14 @@ $a->strings["Select"] = "";
 $a->strings["View %s's profile @ %s"] = "";
 $a->strings["%s from %s"] = "";
 $a->strings["View in context"] = "";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => "",
        1 => "",
-);
-$a->strings["comment"] = array(
+];
+$a->strings["comment"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["show more"] = "";
 $a->strings["Private Message"] = "";
 $a->strings["I like this (toggle)"] = "";
@@ -935,10 +935,10 @@ $a->strings["This introduction has already been accepted."] = "";
 $a->strings["Profile location is not valid or does not contain profile information."] = "";
 $a->strings["Warning: profile location has no identifiable owner name."] = "";
 $a->strings["Warning: profile location has no profile photo."] = "";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Introduction complete."] = "";
 $a->strings["Unrecoverable protocol error."] = "";
 $a->strings["Profile unavailable."] = "";
@@ -1154,10 +1154,10 @@ $a->strings["%s : Not a valid email address."] = "";
 $a->strings["Please join us on Friendica"] = "";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "";
 $a->strings["%s : Message delivery failed."] = "";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["You have no more invitations available"] = "";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "";
@@ -1277,10 +1277,10 @@ $a->strings["The error message was:"] = "";
 $a->strings["Add New Contact"] = "";
 $a->strings["Enter address or web location"] = "";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Find People"] = "";
 $a->strings["Enter name or interest"] = "";
 $a->strings["Connect/Follow"] = "";
@@ -1426,10 +1426,10 @@ $a->strings["first"] = "";
 $a->strings["last"] = "";
 $a->strings["next"] = "";
 $a->strings["No contacts"] = "";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["poke"] = "";
 $a->strings["ping"] = "";
 $a->strings["pinged"] = "";
@@ -1729,10 +1729,10 @@ $a->strings["Error! Cannot check nickname"] = "";
 $a->strings["User '%s' already exists on this server!"] = "";
 $a->strings["User creation error"] = "";
 $a->strings["User profile creation error"] = "";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "";
 $a->strings["toggle mobile"] = "";
 $a->strings["Theme settings"] = "";
index beafd2c698a94a95b29510aec5aebba13d91b792..8d3bf4d5cd7fb608a09ec3fa1e7c3d8e1667e326 100644 (file)
@@ -9,10 +9,10 @@ $a->strings["Add New Contact"] = "Добавяне на нов контакт";
 $a->strings["Enter address or web location"] = "Въведете местоположение на адрес или уеб";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "Пример: bob@example.com, http://example.com/barbara";
 $a->strings["Connect"] = "Свързване! ";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Find People"] = "Намерете хора,";
 $a->strings["Enter name or interest"] = "Въведете името или интерес";
 $a->strings["Connect/Follow"] = "Свържете се / последваща";
@@ -27,10 +27,10 @@ $a->strings["All Networks"] = "Всички мрежи";
 $a->strings["Saved Folders"] = "Записани папки";
 $a->strings["Everything"] = "Всичко";
 $a->strings["Categories"] = "Категории";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["show more"] = "покажи още";
 $a->strings["Forums"] = "";
 $a->strings["External link to forum"] = "";
@@ -47,10 +47,10 @@ $a->strings["Hermaphrodite"] = "Хермафродит";
 $a->strings["Neuter"] = "Среден род";
 $a->strings["Non-specific"] = "Неспецифичен";
 $a->strings["Other"] = "Друг";
-$a->strings["Undecided"] = array(
+$a->strings["Undecided"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Males"] = "Мъжките";
 $a->strings["Females"] = "Женските";
 $a->strings["Gay"] = "Хомосексуалист";
@@ -169,10 +169,10 @@ $a->strings["Error! Cannot check nickname"] = "";
 $a->strings["User '%s' already exists on this server!"] = "";
 $a->strings["User creation error"] = "Грешка при създаване на потребителя";
 $a->strings["User profile creation error"] = "Грешка при създаване профила на потребителя";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "";
 $a->strings["Miscellaneous"] = "Разни";
 $a->strings["Birthday:"] = "Дата на раждане:";
@@ -432,10 +432,10 @@ $a->strings["post/item"] = "длъжност / позиция";
 $a->strings["%1\$s marked %2\$s's %3\$s as favorite"] = "%1\$s маркираната %2\$s - %3\$s като предпочитано";
 $a->strings["Likes"] = "Харесвания";
 $a->strings["Dislikes"] = "Нехаресвания";
-$a->strings["Attending"] = array(
+$a->strings["Attending"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Not attending"] = "";
 $a->strings["Might attend"] = "";
 $a->strings["Select"] = "избор";
@@ -502,18 +502,18 @@ $a->strings["Private post"] = "";
 $a->strings["Message"] = "Съобщение";
 $a->strings["Browser"] = "";
 $a->strings["View all"] = "";
-$a->strings["Like"] = array(
+$a->strings["Like"] = [
        0 => "",
        1 => "",
-);
-$a->strings["Dislike"] = array(
+];
+$a->strings["Dislike"] = [
        0 => "",
        1 => "",
-);
-$a->strings["Not Attending"] = array(
+];
+$a->strings["Not Attending"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["%s\\'s birthday"] = "";
 $a->strings["General Features"] = "";
 $a->strings["Multiple Profiles"] = "";
@@ -651,10 +651,10 @@ $a->strings["next"] = "следващ";
 $a->strings["Loading more entries..."] = "";
 $a->strings["The end"] = "";
 $a->strings["No contacts"] = "Няма контакти";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["View Contacts"] = "Вижте Контакти";
 $a->strings["Save"] = "Запази";
 $a->strings["poke"] = "";
@@ -695,10 +695,10 @@ $a->strings["Click to open/close"] = "Кликнете за отваряне / 
 $a->strings["View on separate page"] = "";
 $a->strings["view on separate page"] = "";
 $a->strings["activity"] = "дейност";
-$a->strings["comment"] = array(
+$a->strings["comment"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["post"] = "след";
 $a->strings["Item filed"] = "Т. подава";
 $a->strings["Passwords do not match. Password unchanged."] = "Паролите не съвпадат. Парола непроменен.";
@@ -794,10 +794,10 @@ $a->strings["%s : Not a valid email address."] = "%s не е валиден им
 $a->strings["Please join us on Friendica"] = "Моля, присъединете се към нас на Friendica";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "";
 $a->strings["%s : Message delivery failed."] = "%s : Съобщение доставка не успя.";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["You have no more invitations available"] = "Имате няма повече покани";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "Посетете %s за списък на публичните сайтове, които можете да се присъедините. Friendica членове на други сайтове могат да се свързват един с друг, както и с членовете на много други социални мрежи.";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "За да приемете тази покана, моля, посетете и се регистрира в %s или друга публична уебсайт Friendica.";
@@ -949,10 +949,10 @@ $a->strings["Unknown sender - %s"] = "Непознат подател %s";
 $a->strings["You and %s"] = "Вие и %s";
 $a->strings["%s and You"] = "%s";
 $a->strings["D, d M Y - g:i A"] = "D, D MY - Г: А";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Manage Identities and/or Pages"] = "Управление на идентичността и / или страници";
 $a->strings["Toggle between different identities or community/group pages which share your account details or which you have been granted \"manage\" permissions"] = "Превключвате между различните идентичности или общността / групата страници, които споделят данните на акаунта ви, или които сте получили \"управление\" разрешения";
 $a->strings["Select an identity to manage: "] = "Изберете идентичност, за да управлява: ";
@@ -981,10 +981,10 @@ $a->strings["New photo from this URL"] = "Нова снимка от този а
 $a->strings["No such group"] = "Няма такава група";
 $a->strings["Group: %s"] = "";
 $a->strings["This entry was edited"] = "Записът е редактиран";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Private Message"] = "Лично съобщение";
 $a->strings["I like this (toggle)"] = "Харесва ми това (смяна)";
 $a->strings["like"] = "харесвам";
@@ -1687,14 +1687,14 @@ $a->strings["Mark success (if update was manually applied)"] = "Марк усп
 $a->strings["Attempt to execute this update step automatically"] = "Опита да изпълни тази стъпка се обновяват автоматично";
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "",
        1 => "",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["User '%s' deleted"] = "Потребителят \" %s \"Изтрити";
 $a->strings["User '%s' unblocked"] = "Потребителят \" %s \"отблокирани";
 $a->strings["User '%s' blocked"] = "Потребителят \" %s \"блокиран";
@@ -1748,10 +1748,10 @@ $a->strings["PHP logging"] = "";
 $a->strings["To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."] = "";
 $a->strings["Lock feature %s"] = "";
 $a->strings["Manage Additional Features"] = "";
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Could not access contact record."] = "Не може да бъде достъп до запис за контакт.";
 $a->strings["Could not locate selected profile."] = "Не може да намери избрания профил.";
 $a->strings["Contact updated."] = "Свържете се актуализират.";
@@ -1848,10 +1848,10 @@ $a->strings["This introduction has already been accepted."] = "Това въве
 $a->strings["Profile location is not valid or does not contain profile information."] = "Профил местоположение не е валиден или не съдържа информация на профила.";
 $a->strings["Warning: profile location has no identifiable owner name."] = "Внимание: профила място има няма установен име на собственика.";
 $a->strings["Warning: profile location has no profile photo."] = "Внимание: профила местоположение не е снимката на профила.";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Introduction complete."] = "Въведение завърши.";
 $a->strings["Unrecoverable protocol error."] = "Невъзстановима протокол грешка.";
 $a->strings["Profile unavailable."] = "Профил недостъпни.";
@@ -1971,10 +1971,10 @@ $a->strings["This message was sent to you by %s, a member of the Friendica socia
 $a->strings["You may visit them online at %s"] = "Можете да ги посетите онлайн на адрес %s";
 $a->strings["Please contact the sender by replying to this post if you do not wish to receive these messages."] = "Моля, свържете се с подателя, като отговори на този пост, ако не желаете да получавате тези съобщения.";
 $a->strings["%s posted an update."] = "%s е публикувал актуализация.";
-$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = array(
+$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Messages in this group won't be send to these receivers."] = "";
 $a->strings["Private messages to this person are at risk of public disclosure."] = "Лични съобщения до това лице, са изложени на риск от публичното оповестяване.";
 $a->strings["Invalid contact."] = "Невалиден свържете.";
index 58b5e2fb49a2a6227114597a916a90e2338a2651..5e891565c622db2339765a71f49a19f7faf8a7e5 100644 (file)
@@ -9,10 +9,10 @@ $a->strings["Add New Contact"] = "Afegir Nou Contacte";
 $a->strings["Enter address or web location"] = "Introdueixi adreça o ubicació web";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "Exemple: bob@example.com, http://example.com/barbara";
 $a->strings["Connect"] = "Connexió";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "%d invitació disponible",
        1 => "%d invitacions disponibles",
-);
+];
 $a->strings["Find People"] = "Trobar Gent";
 $a->strings["Enter name or interest"] = "Introdueixi nom o aficions";
 $a->strings["Connect/Follow"] = "Connectar/Seguir";
@@ -27,10 +27,10 @@ $a->strings["All Networks"] = "totes les Xarxes";
 $a->strings["Saved Folders"] = "Carpetes Guardades";
 $a->strings["Everything"] = "Tot";
 $a->strings["Categories"] = "Categories";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "%d contacte en comú",
        1 => "%d contactes en comú",
-);
+];
 $a->strings["show more"] = "Mostrar més";
 $a->strings["Forums"] = "";
 $a->strings["External link to forum"] = "";
@@ -47,10 +47,10 @@ $a->strings["Hermaphrodite"] = "Hermafrodita";
 $a->strings["Neuter"] = "Neutre";
 $a->strings["Non-specific"] = "No específicat";
 $a->strings["Other"] = "Altres";
-$a->strings["Undecided"] = array(
+$a->strings["Undecided"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Males"] = "Home";
 $a->strings["Females"] = "Dona";
 $a->strings["Gay"] = "Gay";
@@ -169,10 +169,10 @@ $a->strings["Error! Cannot check nickname"] = "Error! No puc comprobar l'Àlies"
 $a->strings["User '%s' already exists on this server!"] = "El usuari %s' ja existeix en aquest servidor!";
 $a->strings["User creation error"] = "Error en la creació de l'usuari";
 $a->strings["User profile creation error"] = "Error en la creació del perfil d'usuari";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "%d contacte no importat",
        1 => "%d contactes no importats",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "Fet. Ja pots identificar-te amb el teu nom d'usuari i contrasenya";
 $a->strings["Miscellaneous"] = "Miscel·lania";
 $a->strings["Birthday:"] = "Aniversari:";
@@ -432,10 +432,10 @@ $a->strings["post/item"] = "anunci/element";
 $a->strings["%1\$s marked %2\$s's %3\$s as favorite"] = "%1\$s marcat %2\$s's %3\$s com favorit";
 $a->strings["Likes"] = "Agrada";
 $a->strings["Dislikes"] = "No agrada";
-$a->strings["Attending"] = array(
+$a->strings["Attending"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Not attending"] = "";
 $a->strings["Might attend"] = "";
 $a->strings["Select"] = "Selecionar";
@@ -502,18 +502,18 @@ $a->strings["Private post"] = "Enviament Privat";
 $a->strings["Message"] = "Missatge";
 $a->strings["Browser"] = "";
 $a->strings["View all"] = "";
-$a->strings["Like"] = array(
+$a->strings["Like"] = [
        0 => "",
        1 => "",
-);
-$a->strings["Dislike"] = array(
+];
+$a->strings["Dislike"] = [
        0 => "",
        1 => "",
-);
-$a->strings["Not Attending"] = array(
+];
+$a->strings["Not Attending"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["%s\\'s birthday"] = "";
 $a->strings["General Features"] = "Característiques Generals";
 $a->strings["Multiple Profiles"] = "Perfils Múltiples";
@@ -651,10 +651,10 @@ $a->strings["next"] = "següent";
 $a->strings["Loading more entries..."] = "";
 $a->strings["The end"] = "";
 $a->strings["No contacts"] = "Sense contactes";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "%d Contacte",
        1 => "%d Contactes",
-);
+];
 $a->strings["View Contacts"] = "Veure Contactes";
 $a->strings["Save"] = "Guardar";
 $a->strings["poke"] = "atia";
@@ -695,10 +695,10 @@ $a->strings["Click to open/close"] = "Clicar per a obrir/tancar";
 $a->strings["View on separate page"] = "";
 $a->strings["view on separate page"] = "";
 $a->strings["activity"] = "activitat";
-$a->strings["comment"] = array(
+$a->strings["comment"] = [
        0 => "",
        1 => "comentari",
-);
+];
 $a->strings["post"] = "missatge";
 $a->strings["Item filed"] = "Element arxivat";
 $a->strings["Passwords do not match. Password unchanged."] = "Les contrasenyes no coincideixen. Contrasenya no canviada.";
@@ -794,10 +794,10 @@ $a->strings["%s : Not a valid email address."] = "%s : No es una adreça de corr
 $a->strings["Please join us on Friendica"] = "Per favor, uneixi's a nosaltres en Friendica";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "Limit d'invitacions excedit. Per favor, Contacti amb l'administrador del lloc.";
 $a->strings["%s : Message delivery failed."] = "%s : Ha fallat l'entrega del missatge.";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "%d missatge enviat",
        1 => "%d missatges enviats.",
-);
+];
 $a->strings["You have no more invitations available"] = "No te més invitacions disponibles";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "Visita %s per a una llista de llocs públics on unir-te. Els membres de Friendica d'altres llocs poden connectar-se de forma total, així com amb membres de moltes altres xarxes socials.";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "Per acceptar aquesta invitació, per favor visita i registra't a %s o en qualsevol altre pàgina web pública Friendica.";
@@ -949,10 +949,10 @@ $a->strings["Unknown sender - %s"] = "remitent desconegut - %s";
 $a->strings["You and %s"] = "Tu i %s";
 $a->strings["%s and You"] = "%s i Tu";
 $a->strings["D, d M Y - g:i A"] = "D, d M Y - g:i A";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => "%d missatge",
        1 => "%d missatges",
-);
+];
 $a->strings["Manage Identities and/or Pages"] = "Administrar Identitats i/o  Pàgines";
 $a->strings["Toggle between different identities or community/group pages which share your account details or which you have been granted \"manage\" permissions"] = "Alternar entre les diferents identitats o les pàgines de comunitats/grups que comparteixen les dades del seu compte o que se li ha concedit els permisos de \"administrar\"";
 $a->strings["Select an identity to manage: "] = "Seleccionar identitat a administrar:";
@@ -981,10 +981,10 @@ $a->strings["New photo from this URL"] = "Nova foto d'aquesta URL";
 $a->strings["No such group"] = "Cap grup com";
 $a->strings["Group: %s"] = "";
 $a->strings["This entry was edited"] = "L'entrada fou editada";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => "%d comentari",
        1 => "%d comentaris",
-);
+];
 $a->strings["Private Message"] = "Missatge Privat";
 $a->strings["I like this (toggle)"] = "M'agrada això (canviar)";
 $a->strings["like"] = "Agrada";
@@ -1687,14 +1687,14 @@ $a->strings["Mark success (if update was manually applied)"] = "Marcat am èxit
 $a->strings["Attempt to execute this update step automatically"] = "Intentant executar aquest pas d'actualització automàticament";
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "%s usuari bloquejar/desbloquejar",
        1 => "%s usuaris bloquejar/desbloquejar",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => "%s usuari esborrat",
        1 => "%s usuaris esborrats",
-);
+];
 $a->strings["User '%s' deleted"] = "Usuari %s' esborrat";
 $a->strings["User '%s' unblocked"] = "Usuari %s' desbloquejat";
 $a->strings["User '%s' blocked"] = "L'usuari '%s' és bloquejat";
@@ -1748,10 +1748,10 @@ $a->strings["PHP logging"] = "";
 $a->strings["To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."] = "";
 $a->strings["Lock feature %s"] = "";
 $a->strings["Manage Additional Features"] = "";
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Could not access contact record."] = "No puc accedir al registre del contacte.";
 $a->strings["Could not locate selected profile."] = "No puc localitzar el perfil seleccionat.";
 $a->strings["Contact updated."] = "Contacte actualitzat.";
@@ -1848,10 +1848,10 @@ $a->strings["This introduction has already been accepted."] = "Aquesta presentac
 $a->strings["Profile location is not valid or does not contain profile information."] = "El perfil de situació no és vàlid o no contè informació de perfil";
 $a->strings["Warning: profile location has no identifiable owner name."] = "Atenció: El perfil de situació no te nom de propietari identificable.";
 $a->strings["Warning: profile location has no profile photo."] = "Atenció: El perfil de situació no te foto de perfil";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "%d el paràmetre requerit no es va trobar al lloc indicat",
        1 => "%d els paràmetres requerits no es van trobar allloc indicat",
-);
+];
 $a->strings["Introduction complete."] = "Completada la presentació.";
 $a->strings["Unrecoverable protocol error."] = "Error de protocol irrecuperable.";
 $a->strings["Profile unavailable."] = "Perfil no disponible";
@@ -1971,10 +1971,10 @@ $a->strings["This message was sent to you by %s, a member of the Friendica socia
 $a->strings["You may visit them online at %s"] = "El pot visitar en línia a %s";
 $a->strings["Please contact the sender by replying to this post if you do not wish to receive these messages."] = "Si us plau, poseu-vos en contacte amb el remitent responent a aquest missatge si no voleu rebre aquests missatges.";
 $a->strings["%s posted an update."] = "%s ha publicat una actualització.";
-$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = array(
+$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Messages in this group won't be send to these receivers."] = "";
 $a->strings["Private messages to this person are at risk of public disclosure."] = "Els missatges privats a aquesta persona es troben en risc de divulgació pública.";
 $a->strings["Invalid contact."] = "Contacte no vàlid.";
index 21651ac968c113c7dda1d8908a4b383c19c9e36b..8237019ee9655054d3473762f5bb00d86d5fe0ff 100644 (file)
@@ -9,11 +9,11 @@ $a->strings["Add New Contact"] = "Přidat nový kontakt";
 $a->strings["Enter address or web location"] = "Zadejte adresu nebo umístění webu";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "Příklad: jan@příklad.cz, http://příklad.cz/jana";
 $a->strings["Connect"] = "Spojit";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "Pozvánka %d k dispozici",
        1 => "Pozvánky %d k dispozici",
        2 => "Pozvánky %d k dispozici",
-);
+];
 $a->strings["Find People"] = "Nalézt lidi";
 $a->strings["Enter name or interest"] = "Zadejte jméno nebo zájmy";
 $a->strings["Connect/Follow"] = "Připojit / Následovat";
@@ -28,11 +28,11 @@ $a->strings["All Networks"] = "Všechny sítě";
 $a->strings["Saved Folders"] = "Uložené složky";
 $a->strings["Everything"] = "Všechno";
 $a->strings["Categories"] = "Kategorie";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "%d sdílený kontakt",
        1 => "%d sdílených kontaktů",
        2 => "%d sdílených kontaktů",
-);
+];
 $a->strings["show more"] = "zobrazit více";
 $a->strings["Forums"] = "Fóra";
 $a->strings["External link to forum"] = "";
@@ -49,11 +49,11 @@ $a->strings["Hermaphrodite"] = "Hermafrodit";
 $a->strings["Neuter"] = "Neutrál";
 $a->strings["Non-specific"] = "Nespecifikováno";
 $a->strings["Other"] = "Jiné";
-$a->strings["Undecided"] = array(
+$a->strings["Undecided"] = [
        0 => "",
        1 => "",
        2 => "",
-);
+];
 $a->strings["Males"] = "Muži";
 $a->strings["Females"] = "Ženy";
 $a->strings["Gay"] = "Gay";
@@ -172,11 +172,11 @@ $a->strings["Error! Cannot check nickname"] = "Chyba! Nelze ověřit přezdívku
 $a->strings["User '%s' already exists on this server!"] = "Uživatel '%s' již na tomto serveru existuje!";
 $a->strings["User creation error"] = "Chyba vytváření uživatele";
 $a->strings["User profile creation error"] = "Chyba vytváření uživatelského účtu";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "%d kontakt nenaimporován",
        1 => "%d kontaktů nenaimporováno",
        2 => "%d kontakty nenaimporovány",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "Hotovo. Nyní  se můžete přihlásit se svými uživatelským účtem a heslem";
 $a->strings["Miscellaneous"] = "Různé";
 $a->strings["Birthday:"] = "Narozeniny:";
@@ -436,11 +436,11 @@ $a->strings["post/item"] = "příspěvek/položka";
 $a->strings["%1\$s marked %2\$s's %3\$s as favorite"] = "uživatel %1\$s označil %2\$s's %3\$s jako oblíbeného";
 $a->strings["Likes"] = "Libí se mi";
 $a->strings["Dislikes"] = "Nelibí se mi";
-$a->strings["Attending"] = array(
+$a->strings["Attending"] = [
        0 => "",
        1 => "",
        2 => "",
-);
+];
 $a->strings["Not attending"] = "";
 $a->strings["Might attend"] = "";
 $a->strings["Select"] = "Vybrat";
@@ -507,21 +507,21 @@ $a->strings["Private post"] = "Soukromý příspěvek";
 $a->strings["Message"] = "Zpráva";
 $a->strings["Browser"] = "";
 $a->strings["View all"] = "";
-$a->strings["Like"] = array(
+$a->strings["Like"] = [
        0 => "",
        1 => "",
        2 => "",
-);
-$a->strings["Dislike"] = array(
+];
+$a->strings["Dislike"] = [
        0 => "",
        1 => "",
        2 => "",
-);
-$a->strings["Not Attending"] = array(
+];
+$a->strings["Not Attending"] = [
        0 => "",
        1 => "",
        2 => "",
-);
+];
 $a->strings["%s\\'s birthday"] = "";
 $a->strings["General Features"] = "Obecné funkčnosti";
 $a->strings["Multiple Profiles"] = "Vícenásobné profily";
@@ -659,11 +659,11 @@ $a->strings["next"] = "další";
 $a->strings["Loading more entries..."] = "Načítání více záznamů...";
 $a->strings["The end"] = "Konec";
 $a->strings["No contacts"] = "Žádné kontakty";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "%d kontakt",
        1 => "%d kontaktů",
        2 => "%d kontaktů",
-);
+];
 $a->strings["View Contacts"] = "Zobrazit kontakty";
 $a->strings["Save"] = "Uložit";
 $a->strings["poke"] = "šťouchnout";
@@ -704,11 +704,11 @@ $a->strings["Click to open/close"] = "Klikněte pro otevření/zavření";
 $a->strings["View on separate page"] = "Zobrazit na separátní stránce";
 $a->strings["view on separate page"] = "Zobrazit na separátní stránce";
 $a->strings["activity"] = "aktivita";
-$a->strings["comment"] = array(
+$a->strings["comment"] = [
        0 => "",
        1 => "",
        2 => "komentář",
-);
+];
 $a->strings["post"] = "příspěvek";
 $a->strings["Item filed"] = "Položka vyplněna";
 $a->strings["Passwords do not match. Password unchanged."] = "Hesla se neshodují. Heslo nebylo změněno.";
@@ -804,11 +804,11 @@ $a->strings["%s : Not a valid email address."] = "%s : není platná e-mailová
 $a->strings["Please join us on Friendica"] = "Prosím přidejte se k nám na Friendice";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "Limit pozvánek byl překročen. Prosím kontaktujte vašeho administrátora webu.";
 $a->strings["%s : Message delivery failed."] = "%s : Doručení zprávy se nezdařilo.";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "%d zpráva odeslána.",
        1 => "%d zprávy odeslány.",
        2 => "%d zprávy odeslány.",
-);
+];
 $a->strings["You have no more invitations available"] = "Nemáte k dispozici žádné další pozvánky";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "Navštivte %s pro seznam veřejných serverů, na kterých se můžete přidat. Členové Friendica se mohou navzájem propojovat, stejně tak jako se mohou přiopojit se členy mnoha dalších sociálních sítí.";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "K akceptaci této pozvánky prosím navštivte a registrujte se na %s nebo na kterékoliv jiném veřejném Friendica serveru.";
@@ -960,11 +960,11 @@ $a->strings["Unknown sender - %s"] = "Neznámý odesilatel - %s";
 $a->strings["You and %s"] = "Vy a %s";
 $a->strings["%s and You"] = "%s a Vy";
 $a->strings["D, d M Y - g:i A"] = "D M R - g:i A";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => "%d zpráva",
        1 => "%d zprávy",
        2 => "%d zpráv",
-);
+];
 $a->strings["Manage Identities and/or Pages"] = "Správa identit a / nebo stránek";
 $a->strings["Toggle between different identities or community/group pages which share your account details or which you have been granted \"manage\" permissions"] = "Přepnutí mezi různými identitami nebo komunitními/skupinovými stránkami, které sdílí Vaše detaily účtu, nebo kterým jste přidělili oprávnění nastavovat přístupová práva.";
 $a->strings["Select an identity to manage: "] = "Vyberte identitu pro správu: ";
@@ -993,11 +993,11 @@ $a->strings["New photo from this URL"] = "Nové foto z této URL adresy";
 $a->strings["No such group"] = "Žádná taková skupina";
 $a->strings["Group: %s"] = "Skupina: %s";
 $a->strings["This entry was edited"] = "Tento záznam byl editován";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => "%d komentář",
        1 => "%d komentářů",
        2 => "%d komentářů",
-);
+];
 $a->strings["Private Message"] = "Soukromá zpráva";
 $a->strings["I like this (toggle)"] = "Líbí se mi to (přepínač)";
 $a->strings["like"] = "má rád";
@@ -1700,16 +1700,16 @@ $a->strings["Mark success (if update was manually applied)"] = "Označit za úsp
 $a->strings["Attempt to execute this update step automatically"] = "Pokusit se provést tuto aktualizaci automaticky.";
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "\n\t\t\tDrahý %1\$s,\n\t\t\t\tadministrátor webu %2\$s pro Vás vytvořil uživatelský účet.";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "\n\t\t\tVaše přihlašovací údaje jsou následující:\n\n\t\t\tAdresa webu: \t%1\$s\n\t\t\tpřihlašovací jméno:\t\t%2\$s\n\t\t\theslo:\t\t%3\$s\n\n\t\t\tHeslo si můžete změnit na stránce \"Nastavení\" vašeho účtu poté, co se přihlásíte.\n\n\t\t\tProsím věnujte pár chvil revizi dalšího nastavení vašeho účtu na dané stránce.\n\n\t\t\tTaké su můžete přidat nějaké základní informace do svého výchozího profilu (na stránce \"Profily\"), takže ostatní lidé vás snáze najdou. \n\n\t\t\tDoporučujeme Vám uvést celé jméno a i foto. Přidáním nějakých \"klíčových slov\" (velmi užitečné pro hledání nových přátel) a možná také zemi, ve které žijete, pokud nechcete být více konkrétní.\n\n\t\t\tPlně resepktujeme vaše právo na soukromí a nic z výše uvedeného není povinné. Pokud jste zde nový a neznáte zde nikoho, uvedením daných informací můžete získat nové přátele.\n\n\t\t\tDíky a vítejte na %4\$s.";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "%s uživatel blokován/odblokován",
        1 => "%s uživatelů blokováno/odblokováno",
        2 => "%s uživatelů blokováno/odblokováno",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => "%s uživatel smazán",
        1 => "%s uživatelů smazáno",
        2 => "%s uživatelů smazáno",
-);
+];
 $a->strings["User '%s' deleted"] = "Uživatel '%s' smazán";
 $a->strings["User '%s' unblocked"] = "Uživatel '%s' odblokován";
 $a->strings["User '%s' blocked"] = "Uživatel '%s' blokován";
@@ -1763,11 +1763,11 @@ $a->strings["PHP logging"] = "";
 $a->strings["To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."] = "";
 $a->strings["Lock feature %s"] = "";
 $a->strings["Manage Additional Features"] = "";
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "",
        1 => "",
        2 => "",
-);
+];
 $a->strings["Could not access contact record."] = "Nelze získat přístup k záznamu kontaktu.";
 $a->strings["Could not locate selected profile."] = "Nelze nalézt vybraný profil.";
 $a->strings["Contact updated."] = "Kontakt aktualizován.";
@@ -1864,11 +1864,11 @@ $a->strings["This introduction has already been accepted."] = "Toto pozvání ji
 $a->strings["Profile location is not valid or does not contain profile information."] = "Adresa profilu není platná nebo neobsahuje profilové informace";
 $a->strings["Warning: profile location has no identifiable owner name."] = "Varování: umístění profilu nemá žádné identifikovatelné jméno vlastníka";
 $a->strings["Warning: profile location has no profile photo."] = "Varování: umístění profilu nemá žádnou profilovou fotografii.";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "%d požadovaný parametr nebyl nalezen na daném místě",
        1 => "%d požadované parametry nebyly nalezeny na daném místě",
        2 => "%d požadované parametry nebyly nalezeny na daném místě",
-);
+];
 $a->strings["Introduction complete."] = "Představení dokončeno.";
 $a->strings["Unrecoverable protocol error."] = "Neopravitelná chyba protokolu";
 $a->strings["Profile unavailable."] = "Profil není k dispozici.";
@@ -1988,11 +1988,11 @@ $a->strings["This message was sent to you by %s, a member of the Friendica socia
 $a->strings["You may visit them online at %s"] = "Můžete je navštívit online na adrese %s";
 $a->strings["Please contact the sender by replying to this post if you do not wish to receive these messages."] = "Pokud nechcete dostávat tyto zprávy, kontaktujte prosím odesilatele odpovědí na tento záznam.";
 $a->strings["%s posted an update."] = "%s poslal aktualizaci.";
-$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = array(
+$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = [
        0 => "",
        1 => "",
        2 => "",
-);
+];
 $a->strings["Messages in this group won't be send to these receivers."] = "";
 $a->strings["Private messages to this person are at risk of public disclosure."] = "Soukromé zprávy této osobě jsou vystaveny riziku prozrazení.";
 $a->strings["Invalid contact."] = "Neplatný kontakt.";
index af477770a52ff7158bbd028510f082fd4f71990b..9530a9888a881e2dc861902a024111f45f0d0e8a 100644 (file)
@@ -18,10 +18,10 @@ $a->strings["Hermaphrodite"] = "Hermaphrodit";
 $a->strings["Neuter"] = "Neuter";
 $a->strings["Non-specific"] = "Nicht spezifiziert";
 $a->strings["Other"] = "Andere";
-$a->strings["Undecided"] = array(
+$a->strings["Undecided"] = [
        0 => "Unentschieden",
        1 => "Unentschieden",
-);
+];
 $a->strings["Males"] = "Männer";
 $a->strings["Females"] = "Frauen";
 $a->strings["Gay"] = "Schwul";
@@ -128,10 +128,10 @@ $a->strings["Add New Contact"] = "Neuen Kontakt hinzufügen";
 $a->strings["Enter address or web location"] = "Adresse oder Web-Link eingeben";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "Beispiel: bob@example.com, http://example.com/barbara";
 $a->strings["Connect"] = "Verbinden";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "%d Einladung verfügbar",
        1 => "%d Einladungen verfügbar",
-);
+];
 $a->strings["Find People"] = "Leute finden";
 $a->strings["Enter name or interest"] = "Name oder Interessen eingeben";
 $a->strings["Connect/Follow"] = "Verbinden/Folgen";
@@ -147,10 +147,10 @@ $a->strings["All Networks"] = "Alle Netzwerke";
 $a->strings["Saved Folders"] = "Gespeicherte Ordner";
 $a->strings["Everything"] = "Alles";
 $a->strings["Categories"] = "Kategorien";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "%d gemeinsamer Kontakt",
        1 => "%d gemeinsame Kontakte",
-);
+];
 $a->strings["show more"] = "mehr anzeigen";
 $a->strings["event"] = "Event";
 $a->strings["status"] = "Status";
@@ -168,10 +168,10 @@ $a->strings["post/item"] = "Nachricht/Beitrag";
 $a->strings["%1\$s marked %2\$s's %3\$s as favorite"] = "%1\$s hat %2\$s\\s %3\$s als Favorit markiert";
 $a->strings["Likes"] = "Likes";
 $a->strings["Dislikes"] = "Dislikes";
-$a->strings["Attending"] = array(
+$a->strings["Attending"] = [
        0 => "Teilnehmend",
        1 => "Teilnehmend",
-);
+];
 $a->strings["Not attending"] = "Nicht teilnehmend";
 $a->strings["Might attend"] = "Eventuell teilnehmend";
 $a->strings["Select"] = "Auswählen";
@@ -245,18 +245,18 @@ $a->strings["Private post"] = "Privater Beitrag";
 $a->strings["Message"] = "Nachricht";
 $a->strings["Browser"] = "Browser";
 $a->strings["View all"] = "Zeige alle";
-$a->strings["Like"] = array(
+$a->strings["Like"] = [
        0 => "mag ich",
        1 => "Mag ich",
-);
-$a->strings["Dislike"] = array(
+];
+$a->strings["Dislike"] = [
        0 => "mag ich nicht",
        1 => "Mag ich nicht",
-);
-$a->strings["Not Attending"] = array(
+];
+$a->strings["Not Attending"] = [
        0 => "Nicht teilnehmend ",
        1 => "Nicht teilnehmend",
-);
+];
 $a->strings["Miscellaneous"] = "Verschiedenes";
 $a->strings["Birthday:"] = "Geburtstag:";
 $a->strings["Age: "] = "Alter: ";
@@ -623,10 +623,10 @@ $a->strings["last"] = "letzte";
 $a->strings["Loading more entries..."] = "lade weitere Einträge...";
 $a->strings["The end"] = "Das Ende";
 $a->strings["No contacts"] = "Keine Kontakte";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "%d Kontakt",
        1 => "%d Kontakte",
-);
+];
 $a->strings["View Contacts"] = "Kontakte anzeigen";
 $a->strings["Save"] = "Speichern";
 $a->strings["poke"] = "anstupsen";
@@ -669,10 +669,10 @@ $a->strings["Click to open/close"] = "Zum öffnen/schließen klicken";
 $a->strings["View on separate page"] = "Auf separater Seite ansehen";
 $a->strings["view on separate page"] = "auf separater Seite ansehen";
 $a->strings["activity"] = "Aktivität";
-$a->strings["comment"] = array(
+$a->strings["comment"] = [
        0 => "Kommentar",
        1 => "Kommentare",
-);
+];
 $a->strings["post"] = "Beitrag";
 $a->strings["Item filed"] = "Beitrag abgelegt";
 $a->strings["Error decoding account file"] = "Fehler beim Verarbeiten der Account Datei";
@@ -681,10 +681,10 @@ $a->strings["Error! Cannot check nickname"] = "Fehler! Konnte den Nickname nicht
 $a->strings["User '%s' already exists on this server!"] = "Nutzer '%s' existiert bereits auf diesem Server!";
 $a->strings["User creation error"] = "Fehler beim Anlegen des Nutzeraccounts aufgetreten";
 $a->strings["User profile creation error"] = "Fehler beim Anlegen des Nutzerkontos";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "%d Kontakt nicht importiert",
        1 => "%d Kontakte nicht importiert",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "Erledigt. Du kannst Dich jetzt mit Deinem Nutzernamen und Passwort anmelden";
 $a->strings["Passwords do not match. Password unchanged."] = "Die Passwörter stimmen nicht überein. Das Passwort bleibt unverändert.";
 $a->strings["An invitation is required."] = "Du benötigst eine Einladung.";
@@ -994,14 +994,14 @@ $a->strings["Mark success (if update was manually applied)"] = "Als erfolgreich
 $a->strings["Attempt to execute this update step automatically"] = "Versuchen, diesen Schritt automatisch auszuführen";
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "\nHallo %1\$s,\n\nauf %2\$s wurde ein Account für Dich angelegt.";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "\nNachfolgend die Anmelde-Details:\n\tAdresse der Seite:\t%1\$s\n\tBenutzername:\t%2\$s\n\tPasswort:\t%3\$s\n\nDu kannst Dein Passwort unter \"Einstellungen\" ändern, sobald Du Dich\nangemeldet hast.\n\nBitte nimm Dir ein paar Minuten um die anderen Einstellungen auf dieser\nSeite zu kontrollieren.\n\nEventuell magst Du ja auch einige Informationen über Dich in Deinem\nProfil veröffentlichen, damit andere Leute Dich einfacher finden können.\nBearbeite hierfür einfach Dein Standard-Profil (über die Profil-Seite).\n\nWir empfehlen Dir, Deinen kompletten Namen anzugeben und ein zu Dir\npassendes Profilbild zu wählen, damit Dich alte Bekannte wieder finden.\nAußerdem ist es nützlich, wenn Du auf Deinem Profil Schlüsselwörter\nangibst. Das erleichtert es, Leute zu finden, die Deine Interessen teilen.\n\nWir respektieren Deine Privatsphäre - keine dieser Angaben ist nötig.\nWenn Du neu im Netzwerk bist und noch niemanden kennst, dann können sie\nallerdings dabei helfen, neue und interessante Kontakte zu knüpfen.\n\nNun viel Spaß, gute Begegnungen und willkommen auf %4\$s.";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "%s Benutzer geblockt/freigegeben",
        1 => "%s Benutzer geblockt/freigegeben",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => "%s Nutzer gelöscht",
        1 => "%s Nutzer gelöscht",
-);
+];
 $a->strings["User '%s' deleted"] = "Nutzer '%s' gelöscht";
 $a->strings["User '%s' unblocked"] = "Nutzer '%s' entsperrt";
 $a->strings["User '%s' blocked"] = "Nutzer '%s' gesperrt";
@@ -1085,10 +1085,10 @@ $a->strings["Common Friends"] = "Gemeinsame Kontakte";
 $a->strings["Not available."] = "Nicht verfügbar.";
 $a->strings["No results."] = "Keine Ergebnisse.";
 $a->strings["This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users."] = "Diese Gemeinschaftsseite zeigt alle öffentlichen Beiträge, die auf diesem Knoten eingegangen sind. Der Inhalt entspricht nicht zwingend der Meinung der Nutzer dieses Servers.";
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "%d Kontakt bearbeitet.",
        1 => "%d Kontakte bearbeitet.",
-);
+];
 $a->strings["Could not access contact record."] = "Konnte nicht auf die Kontaktdaten zugreifen.";
 $a->strings["Could not locate selected profile."] = "Konnte das ausgewählte Profil nicht finden.";
 $a->strings["Contact updated."] = "Kontakt aktualisiert.";
@@ -1229,10 +1229,10 @@ $a->strings["This introduction has already been accepted."] = "Diese Kontaktanfr
 $a->strings["Profile location is not valid or does not contain profile information."] = "Profiladresse ist ungültig oder stellt keine Profildaten zur Verfügung.";
 $a->strings["Warning: profile location has no identifiable owner name."] = "Warnung: Es konnte kein Name des Besitzers von der angegebenen Profiladresse gefunden werden.";
 $a->strings["Warning: profile location has no profile photo."] = "Warnung: Es gibt kein Profilbild bei der angegebenen Profiladresse.";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "%d benötigter Parameter wurde an der angegebenen Stelle nicht gefunden",
        1 => "%d benötigte Parameter wurden an der angegebenen Stelle nicht gefunden",
-);
+];
 $a->strings["Introduction complete."] = "Kontaktanfrage abgeschlossen.";
 $a->strings["Unrecoverable protocol error."] = "Nicht behebbarer Protokollfehler.";
 $a->strings["Profile unavailable."] = "Profil nicht verfügbar.";
@@ -1406,10 +1406,10 @@ $a->strings["%s : Not a valid email address."] = "%s: Keine gültige Email Adres
 $a->strings["Please join us on Friendica"] = "Ich lade Dich zu unserem sozialen Netzwerk Friendica ein";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "Limit für Einladungen erreicht. Bitte kontaktiere des Administrator der Seite.";
 $a->strings["%s : Message delivery failed."] = "%s: Zustellung der Nachricht fehlgeschlagen.";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "%d Nachricht gesendet.",
        1 => "%d Nachrichten gesendet.",
-);
+];
 $a->strings["You have no more invitations available"] = "Du hast keine weiteren Einladungen";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "Besuche %s für eine Liste der öffentlichen Server, denen Du beitreten kannst. Friendica Mitglieder unterschiedlicher Server können sich sowohl alle miteinander verbinden, als auch mit Mitgliedern anderer Sozialer Netzwerke.";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "Um diese Kontaktanfrage zu akzeptieren, besuche und registriere Dich bitte bei %s oder einer anderen öffentlichen Friendica Website.";
@@ -1479,17 +1479,17 @@ $a->strings["Unknown sender - %s"] = "'Unbekannter Absender - %s";
 $a->strings["You and %s"] = "Du und %s";
 $a->strings["%s and You"] = "%s und Du";
 $a->strings["D, d M Y - g:i A"] = "D, d. M Y - g:i A";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => "%d Nachricht",
        1 => "%d Nachrichten",
-);
+];
 $a->strings["Mood"] = "Stimmung";
 $a->strings["Set your current mood and tell your friends"] = "Wähle Deine aktuelle Stimmung und erzähle sie Deinen Kontakten";
 $a->strings["Remove term"] = "Begriff entfernen";
-$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = array(
+$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = [
        0 => "Warnung: Diese Gruppe beinhaltet %s Person aus einem Netzwerk das keine nicht öffentlichen Beiträge empfangen kann.",
        1 => "Warnung: Diese Gruppe beinhaltet %s Personen aus Netzwerken die keine nicht-öffentlichen Beiträge empfangen können.",
-);
+];
 $a->strings["Messages in this group won't be send to these receivers."] = "Beiträge in dieser Gruppe werden deshalb nicht an diese Personen zugestellt werden.";
 $a->strings["No such group"] = "Es gibt keine solche Gruppe";
 $a->strings["Group: %s"] = "Gruppe: %s";
@@ -2066,10 +2066,10 @@ $a->strings["to"] = "zu";
 $a->strings["via"] = "via";
 $a->strings["Wall-to-Wall"] = "Wall-to-Wall";
 $a->strings["via Wall-To-Wall:"] = "via Wall-To-Wall:";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => "%d Kommentar",
        1 => "%d Kommentare",
-);
+];
 $a->strings["Bold"] = "Fett";
 $a->strings["Italic"] = "Kursiv";
 $a->strings["Underline"] = "Unterstrichen";
index 06be43238e436fafb479326e38436b5999f86c8e..855143c38d4200d30f469bb17dfc65047d22c7f4 100644 (file)
@@ -18,10 +18,10 @@ $a->strings["Hermaphrodite"] = "Hermaphrodite";
 $a->strings["Neuter"] = "Neuter";
 $a->strings["Non-specific"] = "Non-specific";
 $a->strings["Other"] = "Other";
-$a->strings["Undecided"] = array(
+$a->strings["Undecided"] = [
        0 => "Undecided",
        1 => "Undecided",
-);
+];
 $a->strings["Males"] = "Males";
 $a->strings["Females"] = "Females";
 $a->strings["Gay"] = "Gay";
@@ -128,10 +128,10 @@ $a->strings["Add New Contact"] = "Add new contact";
 $a->strings["Enter address or web location"] = "Enter address or web location";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "Example: jo@example.com, http://example.com/jo";
 $a->strings["Connect"] = "Connect";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "%d invitation available",
        1 => "%d invitations available",
-);
+];
 $a->strings["Find People"] = "Find people";
 $a->strings["Enter name or interest"] = "Enter name or interest";
 $a->strings["Connect/Follow"] = "Connect/Follow";
@@ -147,10 +147,10 @@ $a->strings["All Networks"] = "All networks";
 $a->strings["Saved Folders"] = "Saved Folders";
 $a->strings["Everything"] = "Everything";
 $a->strings["Categories"] = "Categories";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "%d contact in common",
        1 => "%d contacts in common",
-);
+];
 $a->strings["show more"] = "Show more...";
 $a->strings["event"] = "event";
 $a->strings["status"] = "status";
@@ -168,10 +168,10 @@ $a->strings["post/item"] = "Post/Item";
 $a->strings["%1\$s marked %2\$s's %3\$s as favorite"] = "%1\$s marked %2\$s's %3\$s as favourite";
 $a->strings["Likes"] = "Likes";
 $a->strings["Dislikes"] = "Dislikes";
-$a->strings["Attending"] = array(
+$a->strings["Attending"] = [
        0 => "Attending",
        1 => "Attending",
-);
+];
 $a->strings["Not attending"] = "Not attending";
 $a->strings["Might attend"] = "Might attend";
 $a->strings["Select"] = "Select";
@@ -245,18 +245,18 @@ $a->strings["Private post"] = "Private post";
 $a->strings["Message"] = "Message";
 $a->strings["Browser"] = "Browser";
 $a->strings["View all"] = "View all";
-$a->strings["Like"] = array(
+$a->strings["Like"] = [
        0 => "Like",
        1 => "Likes",
-);
-$a->strings["Dislike"] = array(
+];
+$a->strings["Dislike"] = [
        0 => "Dislike",
        1 => "Dislikes",
-);
-$a->strings["Not Attending"] = array(
+];
+$a->strings["Not Attending"] = [
        0 => "Not attending",
        1 => "Not attending",
-);
+];
 $a->strings["Miscellaneous"] = "Miscellaneous";
 $a->strings["Birthday:"] = "Birthday:";
 $a->strings["Age: "] = "Age: ";
@@ -623,10 +623,10 @@ $a->strings["last"] = "last";
 $a->strings["Loading more entries..."] = "Loading more entries...";
 $a->strings["The end"] = "The end";
 $a->strings["No contacts"] = "No contacts";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "%d contact",
        1 => "%d contacts",
-);
+];
 $a->strings["View Contacts"] = "View contacts";
 $a->strings["Save"] = "Save";
 $a->strings["poke"] = "poke";
@@ -669,10 +669,10 @@ $a->strings["Click to open/close"] = "Click to open/close";
 $a->strings["View on separate page"] = "View on separate page";
 $a->strings["view on separate page"] = "view on separate page";
 $a->strings["activity"] = "activity";
-$a->strings["comment"] = array(
+$a->strings["comment"] = [
        0 => "comment",
        1 => "comments",
-);
+];
 $a->strings["post"] = "post";
 $a->strings["Item filed"] = "Item filed";
 $a->strings["Error decoding account file"] = "Error decoding account file";
@@ -681,10 +681,10 @@ $a->strings["Error! Cannot check nickname"] = "Error! Cannot check nickname.";
 $a->strings["User '%s' already exists on this server!"] = "User '%s' already exists on this server!";
 $a->strings["User creation error"] = "User creation error";
 $a->strings["User profile creation error"] = "User profile creation error";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "%d contact not imported",
        1 => "%d contacts not imported",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "Done. You can now login with your username and password";
 $a->strings["Passwords do not match. Password unchanged."] = "Passwords do not match. Password unchanged.";
 $a->strings["An invitation is required."] = "An invitation is required.";
@@ -994,14 +994,14 @@ $a->strings["Mark success (if update was manually applied)"] = "Mark success (if
 $a->strings["Attempt to execute this update step automatically"] = "Attempt to execute this update step automatically";
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "\n\t\t\tDear %1\$s,\n\t\t\t\tThe administrator of %2\$s has set up an account for you.";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, this may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s.";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "%s user blocked/unblocked",
        1 => "%s users blocked/unblocked",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => "%s user deleted",
        1 => "%s users deleted",
-);
+];
 $a->strings["User '%s' deleted"] = "User '%s' deleted";
 $a->strings["User '%s' unblocked"] = "User '%s' unblocked";
 $a->strings["User '%s' blocked"] = "User '%s' blocked";
@@ -1085,10 +1085,10 @@ $a->strings["Common Friends"] = "Common friends";
 $a->strings["Not available."] = "Not available.";
 $a->strings["No results."] = "No results.";
 $a->strings["This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users."] = "This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users.";
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "%d contact edited.",
        1 => "%d contacts edited.",
-);
+];
 $a->strings["Could not access contact record."] = "Could not access contact record.";
 $a->strings["Could not locate selected profile."] = "Could not locate selected profile.";
 $a->strings["Contact updated."] = "Contact updated.";
@@ -1229,10 +1229,10 @@ $a->strings["This introduction has already been accepted."] = "This introduction
 $a->strings["Profile location is not valid or does not contain profile information."] = "Profile location is not valid or does not contain profile information.";
 $a->strings["Warning: profile location has no identifiable owner name."] = "Warning: profile location has no identifiable owner name.";
 $a->strings["Warning: profile location has no profile photo."] = "Warning: profile location has no profile photo.";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "%d required parameter was not found at the given location",
        1 => "%d required parameters were not found at the given location",
-);
+];
 $a->strings["Introduction complete."] = "Introduction complete.";
 $a->strings["Unrecoverable protocol error."] = "Unrecoverable protocol error.";
 $a->strings["Profile unavailable."] = "Profile unavailable.";
@@ -1406,10 +1406,10 @@ $a->strings["%s : Not a valid email address."] = "%s : Not a valid email address
 $a->strings["Please join us on Friendica"] = "Please join us on Friendica.";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "Invitation limit is exceeded. Please contact your site administrator.";
 $a->strings["%s : Message delivery failed."] = "%s : Message delivery failed";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "%d message sent.",
        1 => "%d messages sent.",
-);
+];
 $a->strings["You have no more invitations available"] = "You have no more invitations available.";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks.";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "To accept this invitation, please sign up at %s or any other public Friendica website.";
@@ -1479,17 +1479,17 @@ $a->strings["Unknown sender - %s"] = "Unknown sender - %s";
 $a->strings["You and %s"] = "Me and %s";
 $a->strings["%s and You"] = "%s and me";
 $a->strings["D, d M Y - g:i A"] = "D, d M Y - g:i A";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => "%d message",
        1 => "%d messages",
-);
+];
 $a->strings["Mood"] = "Mood";
 $a->strings["Set your current mood and tell your friends"] = "Set your current mood and tell your friends";
 $a->strings["Remove term"] = "Remove term";
-$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = array(
+$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = [
        0 => "Warning: This group contains %s member from a network that doesn't allow non public messages.",
        1 => "Warning: This group contains %s members from a network that doesn't allow non public messages.",
-);
+];
 $a->strings["Messages in this group won't be send to these receivers."] = "Messages in this group won't be send to these receivers.";
 $a->strings["No such group"] = "No such group";
 $a->strings["Group: %s"] = "Group: %s";
@@ -2066,10 +2066,10 @@ $a->strings["to"] = "to";
 $a->strings["via"] = "via";
 $a->strings["Wall-to-Wall"] = "Wall-to-wall";
 $a->strings["via Wall-To-Wall:"] = "via wall-to-wall:";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => "%d comment",
        1 => "%d comments -",
-);
+];
 $a->strings["Bold"] = "Bold";
 $a->strings["Italic"] = "Italic";
 $a->strings["Underline"] = "Underline";
index 3e700130c7d7591248cb221427b4fb066f9e1b68..825848f60246dcd358051b51485cd5c0dd197f81 100644 (file)
@@ -18,10 +18,10 @@ $a->strings["Hermaphrodite"] = "Hermaphrodite";
 $a->strings["Neuter"] = "Neuter";
 $a->strings["Non-specific"] = "Non-specific";
 $a->strings["Other"] = "Other";
-$a->strings["Undecided"] = array(
+$a->strings["Undecided"] = [
        0 => "Undecided",
        1 => "Undecided",
-);
+];
 $a->strings["Males"] = "Males";
 $a->strings["Females"] = "Females";
 $a->strings["Gay"] = "Gay";
@@ -128,10 +128,10 @@ $a->strings["Add New Contact"] = "Add new contact";
 $a->strings["Enter address or web location"] = "Enter address or web location";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "Example: jo@example.com, http://example.com/jo";
 $a->strings["Connect"] = "Connect";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "%d invitation available",
        1 => "%d invitations available",
-);
+];
 $a->strings["Find People"] = "Find people";
 $a->strings["Enter name or interest"] = "Enter name or interest";
 $a->strings["Connect/Follow"] = "Connect/Follow";
@@ -147,10 +147,10 @@ $a->strings["All Networks"] = "All networks";
 $a->strings["Saved Folders"] = "Saved Folders";
 $a->strings["Everything"] = "Everything";
 $a->strings["Categories"] = "Categories";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "%d contact in common",
        1 => "%d contacts in common",
-);
+];
 $a->strings["show more"] = "Show more...";
 $a->strings["event"] = "event";
 $a->strings["status"] = "status";
@@ -168,10 +168,10 @@ $a->strings["post/item"] = "Post/Item";
 $a->strings["%1\$s marked %2\$s's %3\$s as favorite"] = "%1\$s marked %2\$s's %3\$s as favorite";
 $a->strings["Likes"] = "Likes";
 $a->strings["Dislikes"] = "Dislikes";
-$a->strings["Attending"] = array(
+$a->strings["Attending"] = [
        0 => "Attending",
        1 => "Attending",
-);
+];
 $a->strings["Not attending"] = "Not attending";
 $a->strings["Might attend"] = "Might attend";
 $a->strings["Select"] = "Select";
@@ -245,18 +245,18 @@ $a->strings["Private post"] = "Private post";
 $a->strings["Message"] = "Message";
 $a->strings["Browser"] = "Browser";
 $a->strings["View all"] = "View all";
-$a->strings["Like"] = array(
+$a->strings["Like"] = [
        0 => "Like",
        1 => "Likes",
-);
-$a->strings["Dislike"] = array(
+];
+$a->strings["Dislike"] = [
        0 => "Dislike",
        1 => "Dislikes",
-);
-$a->strings["Not Attending"] = array(
+];
+$a->strings["Not Attending"] = [
        0 => "Not attending",
        1 => "Not attending",
-);
+];
 $a->strings["Miscellaneous"] = "Miscellaneous";
 $a->strings["Birthday:"] = "Birthday:";
 $a->strings["Age: "] = "Age: ";
@@ -623,10 +623,10 @@ $a->strings["last"] = "last";
 $a->strings["Loading more entries..."] = "Loading more entries...";
 $a->strings["The end"] = "The end";
 $a->strings["No contacts"] = "No contacts";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "%d contact",
        1 => "%d contacts",
-);
+];
 $a->strings["View Contacts"] = "View contacts";
 $a->strings["Save"] = "Save";
 $a->strings["poke"] = "poke";
@@ -669,10 +669,10 @@ $a->strings["Click to open/close"] = "Click to open/close";
 $a->strings["View on separate page"] = "View on separate page";
 $a->strings["view on separate page"] = "view on separate page";
 $a->strings["activity"] = "activity";
-$a->strings["comment"] = array(
+$a->strings["comment"] = [
        0 => "comment",
        1 => "comments",
-);
+];
 $a->strings["post"] = "post";
 $a->strings["Item filed"] = "Item filed";
 $a->strings["Error decoding account file"] = "Error decoding account file";
@@ -681,10 +681,10 @@ $a->strings["Error! Cannot check nickname"] = "Error! Cannot check nickname.";
 $a->strings["User '%s' already exists on this server!"] = "User '%s' already exists on this server!";
 $a->strings["User creation error"] = "User creation error";
 $a->strings["User profile creation error"] = "User profile creation error";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "%d contact not imported",
        1 => "%d contacts not imported",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "Done. You can now login with your username and password";
 $a->strings["Passwords do not match. Password unchanged."] = "Passwords do not match. Password unchanged.";
 $a->strings["An invitation is required."] = "An invitation is required.";
@@ -994,14 +994,14 @@ $a->strings["Mark success (if update was manually applied)"] = "Mark success (if
 $a->strings["Attempt to execute this update step automatically"] = "Attempt to execute this update step automatically";
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "\n\t\t\tDear %1\$s,\n\t\t\t\tThe administrator of %2\$s has set up an account for you.";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, this may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s.";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "%s user blocked/unblocked",
        1 => "%s users blocked/unblocked",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => "%s user deleted",
        1 => "%s users deleted",
-);
+];
 $a->strings["User '%s' deleted"] = "User '%s' deleted";
 $a->strings["User '%s' unblocked"] = "User '%s' unblocked";
 $a->strings["User '%s' blocked"] = "User '%s' blocked";
@@ -1085,10 +1085,10 @@ $a->strings["Common Friends"] = "Common friends";
 $a->strings["Not available."] = "Not available.";
 $a->strings["No results."] = "No results.";
 $a->strings["This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users."] = "This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users.";
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "%d contact edited.",
        1 => "%d contacts edited.",
-);
+];
 $a->strings["Could not access contact record."] = "Could not access contact record.";
 $a->strings["Could not locate selected profile."] = "Could not locate selected profile.";
 $a->strings["Contact updated."] = "Contact updated.";
@@ -1229,10 +1229,10 @@ $a->strings["This introduction has already been accepted."] = "This introduction
 $a->strings["Profile location is not valid or does not contain profile information."] = "Profile location is not valid or does not contain profile information.";
 $a->strings["Warning: profile location has no identifiable owner name."] = "Warning: profile location has no identifiable owner name.";
 $a->strings["Warning: profile location has no profile photo."] = "Warning: profile location has no profile photo.";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "%d required parameter was not found at the given location",
        1 => "%d required parameters were not found at the given location",
-);
+];
 $a->strings["Introduction complete."] = "Introduction complete.";
 $a->strings["Unrecoverable protocol error."] = "Unrecoverable protocol error.";
 $a->strings["Profile unavailable."] = "Profile unavailable.";
@@ -1406,10 +1406,10 @@ $a->strings["%s : Not a valid email address."] = "%s : Not a valid email address
 $a->strings["Please join us on Friendica"] = "Please join us on Friendica.";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "Invitation limit is exceeded. Please contact your site administrator.";
 $a->strings["%s : Message delivery failed."] = "%s : Message delivery failed";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "%d message sent.",
        1 => "%d messages sent.",
-);
+];
 $a->strings["You have no more invitations available"] = "You have no more invitations available.";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks.";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "To accept this invitation, please sign up at %s or any other public Friendica website.";
@@ -1479,17 +1479,17 @@ $a->strings["Unknown sender - %s"] = "Unknown sender - %s";
 $a->strings["You and %s"] = "Me and %s";
 $a->strings["%s and You"] = "%s and me";
 $a->strings["D, d M Y - g:i A"] = "D, d M Y - g:i A";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => "%d message",
        1 => "%d messages",
-);
+];
 $a->strings["Mood"] = "Mood";
 $a->strings["Set your current mood and tell your friends"] = "Set your current mood and tell your friends";
 $a->strings["Remove term"] = "Remove term";
-$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = array(
+$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = [
        0 => "Warning: This group contains %s member from a network that doesn't allow non public messages.",
        1 => "Warning: This group contains %s members from a network that doesn't allow non public messages.",
-);
+];
 $a->strings["Messages in this group won't be send to these receivers."] = "Messages in this group won't be send to these receivers.";
 $a->strings["No such group"] = "No such group";
 $a->strings["Group: %s"] = "Group: %s";
@@ -2066,10 +2066,10 @@ $a->strings["to"] = "to";
 $a->strings["via"] = "via";
 $a->strings["Wall-to-Wall"] = "Wall-to-wall";
 $a->strings["via Wall-To-Wall:"] = "via wall-to-wall:";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => "%d comment",
        1 => "%d comments -",
-);
+];
 $a->strings["Bold"] = "Bold";
 $a->strings["Italic"] = "Italic";
 $a->strings["Underline"] = "Underline";
index afe143461aa119fd4a5ac125c959f8c863080b15..c7dbcb4fffdbadee80953a4910e0a11c1f96b8e9 100644 (file)
@@ -9,10 +9,10 @@ $a->strings["Add New Contact"] = "Aldonu Novan Kontakton";
 $a->strings["Enter address or web location"] = "Entajpu adreson aŭ retlokon";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "Ekzemple: bob@example.com, http://example.com/barbara";
 $a->strings["Connect"] = "Konekti";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "Disponeblas %d invito",
        1 => "Disponeblas %d invitoj",
-);
+];
 $a->strings["Find People"] = "Trovi Homojn";
 $a->strings["Enter name or interest"] = "Entajpu nomon aŭ intereson";
 $a->strings["Connect/Follow"] = "Konekti/Aboni";
@@ -27,10 +27,10 @@ $a->strings["All Networks"] = "Ĉiuj Retoj";
 $a->strings["Saved Folders"] = "Konservitaj Dosierujoj";
 $a->strings["Everything"] = "Ĉio";
 $a->strings["Categories"] = "Kategorioj";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "%d komuna kontakto",
        1 => "%d komunaj kontaktoj",
-);
+];
 $a->strings["show more"] = "montri pli";
 $a->strings["Forums"] = "";
 $a->strings["External link to forum"] = "";
@@ -47,10 +47,10 @@ $a->strings["Hermaphrodite"] = "Hermafrodita";
 $a->strings["Neuter"] = "Neŭtra";
 $a->strings["Non-specific"] = "Nespecifa";
 $a->strings["Other"] = "Alia";
-$a->strings["Undecided"] = array(
+$a->strings["Undecided"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Males"] = "Viroj";
 $a->strings["Females"] = "Inoj";
 $a->strings["Gay"] = "Geja";
@@ -169,10 +169,10 @@ $a->strings["Error! Cannot check nickname"] = "";
 $a->strings["User '%s' already exists on this server!"] = "";
 $a->strings["User creation error"] = "";
 $a->strings["User profile creation error"] = "";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "";
 $a->strings["Miscellaneous"] = "Diversaj";
 $a->strings["Birthday:"] = "Naskiĝtago:";
@@ -432,10 +432,10 @@ $a->strings["post/item"] = "afiŝo/elemento";
 $a->strings["%1\$s marked %2\$s's %3\$s as favorite"] = "%1\$s markis la %3\$s de %2\$s kiel preferita.";
 $a->strings["Likes"] = "Ŝatoj";
 $a->strings["Dislikes"] = "Malŝatoj";
-$a->strings["Attending"] = array(
+$a->strings["Attending"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Not attending"] = "";
 $a->strings["Might attend"] = "";
 $a->strings["Select"] = "Elekti";
@@ -502,18 +502,18 @@ $a->strings["Private post"] = "";
 $a->strings["Message"] = "Mesaĝo";
 $a->strings["Browser"] = "";
 $a->strings["View all"] = "";
-$a->strings["Like"] = array(
+$a->strings["Like"] = [
        0 => "",
        1 => "",
-);
-$a->strings["Dislike"] = array(
+];
+$a->strings["Dislike"] = [
        0 => "",
        1 => "",
-);
-$a->strings["Not Attending"] = array(
+];
+$a->strings["Not Attending"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["%s\\'s birthday"] = "";
 $a->strings["General Features"] = "";
 $a->strings["Multiple Profiles"] = "";
@@ -651,10 +651,10 @@ $a->strings["next"] = "sekvanta";
 $a->strings["Loading more entries..."] = "";
 $a->strings["The end"] = "";
 $a->strings["No contacts"] = "Neniu kontaktoj";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "%d Kontakto",
        1 => "%d Kontaktoj",
-);
+];
 $a->strings["View Contacts"] = "Vidi Kontaktojn";
 $a->strings["Save"] = "Konservi";
 $a->strings["poke"] = "";
@@ -695,10 +695,10 @@ $a->strings["Click to open/close"] = "Klaku por malfermi/fermi";
 $a->strings["View on separate page"] = "";
 $a->strings["view on separate page"] = "";
 $a->strings["activity"] = "aktiveco";
-$a->strings["comment"] = array(
+$a->strings["comment"] = [
        0 => "",
        1 => "komento",
-);
+];
 $a->strings["post"] = "afiŝo";
 $a->strings["Item filed"] = "Enarkivigis elementon ";
 $a->strings["Passwords do not match. Password unchanged."] = "La pasvortoj ne estas egala. Pasvorto ne ŝanĝita.";
@@ -794,10 +794,10 @@ $a->strings["%s : Not a valid email address."] = "%s: Ne estas valida retpoŝtad
 $a->strings["Please join us on Friendica"] = "Bonvolu aliĝi kun ni ĉe Friendica";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "";
 $a->strings["%s : Message delivery failed."] = "%s: La livero de la mesaĝo malsukcesis.";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "Sendis %d mesaĝon.",
        1 => "Sendis %d mesaĝojn.",
-);
+];
 $a->strings["You have no more invitations available"] = "Vi ne plu disponeblas invitaĵojn";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "Vizitu %s por listo de publikaj retejoj kie vi povas aliĝi. Anoj de Friendica ĉe aliaj retejoj povas konekti unu kun la alian, kaj ankaŭ kun membroj de multaj aliaj retejoj.";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "Por akcepti ĉi tiu invito, bonvolu viziti kaj registriĝi ĉe %s au alia publika Friendica retejo.";
@@ -949,10 +949,10 @@ $a->strings["Unknown sender - %s"] = "Nekonata sendanto - %s";
 $a->strings["You and %s"] = "Vi kaj %s";
 $a->strings["%s and You"] = "%s kaj vi";
 $a->strings["D, d M Y - g:i A"] = "D, d M Y - g:i A";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => "%d mesaĝo",
        1 => "%d mesaĝoj",
-);
+];
 $a->strings["Manage Identities and/or Pages"] = "Administri identecojn kaj/aŭ paĝojn.";
 $a->strings["Toggle between different identities or community/group pages which share your account details or which you have been granted \"manage\" permissions"] = "Ŝalti inter aliaj identecojn aj komunumaj/grupaj paĝoj kiuj kunhavas viajn kontajn detalojn au por kiuj vi havas \"administranto\" permesojn.";
 $a->strings["Select an identity to manage: "] = "Elektu identencon por administrado:";
@@ -981,10 +981,10 @@ $a->strings["New photo from this URL"] = "Nova bildo el tiu adreso";
 $a->strings["No such group"] = "Grupo ne estas trovita";
 $a->strings["Group: %s"] = "";
 $a->strings["This entry was edited"] = "";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => "%d komento",
        1 => "%d komentoj",
-);
+];
 $a->strings["Private Message"] = "Privata mesaĝo";
 $a->strings["I like this (toggle)"] = "Mi ŝatas tion (ŝalti)";
 $a->strings["like"] = "ŝati";
@@ -1687,14 +1687,14 @@ $a->strings["Mark success (if update was manually applied)"] = "Marki sukcesa (s
 $a->strings["Attempt to execute this update step automatically"] = "Provi automate plenumi ĉi tian paŝon de la ĝisdatigo.";
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "Blokis/malblokis %s uzanton",
        1 => "Blokis/malblokis %s uzantojn",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => "%s uzanto forviŝita",
        1 => "%s uzanto forviŝitaj",
-);
+];
 $a->strings["User '%s' deleted"] = "Uzanto '%s' forviŝita";
 $a->strings["User '%s' unblocked"] = "Uzanto '%s' malblokita";
 $a->strings["User '%s' blocked"] = "Uzanto '%s' blokita";
@@ -1748,10 +1748,10 @@ $a->strings["PHP logging"] = "";
 $a->strings["To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."] = "";
 $a->strings["Lock feature %s"] = "";
 $a->strings["Manage Additional Features"] = "";
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Could not access contact record."] = "Ne eblis atingi kontaktrikordo.";
 $a->strings["Could not locate selected profile."] = "Ne trovis elektitan profilon.";
 $a->strings["Contact updated."] = "Kontakto estas ĝisdatigita.";
@@ -1848,10 +1848,10 @@ $a->strings["This introduction has already been accepted."] = "Tia prezento jam
 $a->strings["Profile location is not valid or does not contain profile information."] = "La adreso de la profilo ne validas aŭ ne enhavas profilinformojn.";
 $a->strings["Warning: profile location has no identifiable owner name."] = "Averto: La adreso de la profilo ne enhavas identeblan personan nomon.";
 $a->strings["Warning: profile location has no profile photo."] = "Averto: La adreso de la profilo ne enhavas bildon.";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "%d bezonataj parametroj ne trovita ĉe la donata adreso.",
        1 => "%d bezonataj parametroj ne trovita ĉe la donata adreso.",
-);
+];
 $a->strings["Introduction complete."] = "Prezento sukcesis.";
 $a->strings["Unrecoverable protocol error."] = "Neĝustigebla eraro en protokolo.";
 $a->strings["Profile unavailable."] = "Profilo ne estas disponebla.";
@@ -1971,10 +1971,10 @@ $a->strings["This message was sent to you by %s, a member of the Friendica socia
 $a->strings["You may visit them online at %s"] = "Vi povas viziti ilin rete ĉe %s";
 $a->strings["Please contact the sender by replying to this post if you do not wish to receive these messages."] = "Bonvolu rispondi al ĉi mesaĝo kaj kontaktu la sendinto se vi ne volas ricevi tiujn mesaĝojn.";
 $a->strings["%s posted an update."] = "%s publikigis afiŝon.";
-$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = array(
+$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Messages in this group won't be send to these receivers."] = "";
 $a->strings["Private messages to this person are at risk of public disclosure."] = "La privateco de privataj mesaĝoj al ĉi tiu persono ne ĉiam estas garantita.";
 $a->strings["Invalid contact."] = "Nevalida kontakto.";
index 8cab4ab1e55bce4e8b304933c2751726579bd94d..f12d61b7a8de324df1ce7d2635cf9b8922849907 100644 (file)
@@ -90,10 +90,10 @@ $a->strings["Hermaphrodite"] = "Hermafrodita";
 $a->strings["Neuter"] = "Neutro";
 $a->strings["Non-specific"] = "Sin especificar";
 $a->strings["Other"] = "Otro";
-$a->strings["Undecided"] = array(
+$a->strings["Undecided"] = [
        0 => "Indeciso",
        1 => "Indeciso",
-);
+];
 $a->strings["Males"] = "Hombres";
 $a->strings["Females"] = "Mujeres";
 $a->strings["Gay"] = "Gay";
@@ -180,10 +180,10 @@ $a->strings["Add New Contact"] = "Añadir nuevo contacto";
 $a->strings["Enter address or web location"] = "Escribe la dirección o página web";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "Ejemplo: miguel@ejemplo.com, http://ejemplo.com/miguel";
 $a->strings["Connect"] = "Conectar";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "%d invitación disponible",
        1 => "%d invitaviones disponibles",
-);
+];
 $a->strings["Find People"] = "Buscar personas";
 $a->strings["Enter name or interest"] = "Introduzce nombre o intereses";
 $a->strings["Connect/Follow"] = "Conectar/Seguir";
@@ -198,10 +198,10 @@ $a->strings["Networks"] = "Redes";
 $a->strings["All Networks"] = "Todas las redes";
 $a->strings["Everything"] = "Todo";
 $a->strings["Categories"] = "Categorías";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "%d contacto en común",
        1 => "%d contactos en común",
-);
+];
 $a->strings["Friendica Notification"] = "Notificación de Friendica";
 $a->strings["Thank You,"] = "Gracias,";
 $a->strings["%s Administrator"] = "%s Administrador";
@@ -411,10 +411,10 @@ $a->strings["post/item"] = "publicación/tema";
 $a->strings["%1\$s marked %2\$s's %3\$s as favorite"] = "%1\$s ha marcado %3\$s de %2\$s como Favorito";
 $a->strings["Likes"] = "Me gusta";
 $a->strings["Dislikes"] = "No me gusta";
-$a->strings["Attending"] = array(
+$a->strings["Attending"] = [
        0 => "Atendiendo",
        1 => "Atendiendo",
-);
+];
 $a->strings["Not attending"] = "No atendiendo";
 $a->strings["Might attend"] = "Puede que atienda";
 $a->strings["Select"] = "Seleccionar";
@@ -481,18 +481,18 @@ $a->strings["Private post"] = "Publicación privada";
 $a->strings["Message"] = "Mensaje";
 $a->strings["Browser"] = "Navegador";
 $a->strings["View all"] = "Ver todos los contactos";
-$a->strings["Like"] = array(
+$a->strings["Like"] = [
        0 => "Me gusta",
        1 => "Me gusta",
-);
-$a->strings["Dislike"] = array(
+];
+$a->strings["Dislike"] = [
        0 => "No me gusta",
        1 => "No me gusta",
-);
-$a->strings["Not Attending"] = array(
+];
+$a->strings["Not Attending"] = [
        0 => "No atendiendo",
        1 => "No atendiendo",
-);
+];
 $a->strings["Cannot locate DNS info for database server '%s'"] = "No se puede encontrar información DNS para la base de datos del servidor '%s'";
 $a->strings["There are no tables on MyISAM."] = "No hay tablas en MyISAM";
 $a->strings["\n\t\t\tThe friendica developers released update %s recently,\n\t\t\tbut when I tried to install it, something went terribly wrong.\n\t\t\tThis needs to be fixed soon and I can't do it alone. Please contact a\n\t\t\tfriendica developer if you can not help me on your own. My database might be invalid."] = "\n\t\t\tLos desarolladores de friendica publicaron una actualización  %s recientemente\n\t\t\tpero cuando intento de instalarla,algo salio terriblemente mal.\n\t\t\tEsto necesita ser arreglado pronto y no puedo hacerlo solo. Por favor contacta\n\t\t\tlos desarolladores de friendica si no me podes ayudar por ti solo. Mi base de datos puede estar invalido.";
@@ -647,10 +647,10 @@ $a->strings["last"] = "última";
 $a->strings["Loading more entries..."] = "Cargar mas entradas ..";
 $a->strings["The end"] = "El fin";
 $a->strings["No contacts"] = "Sin contactos";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "%d Contacto",
        1 => "%d Contactos",
-);
+];
 $a->strings["View Contacts"] = "Ver contactos";
 $a->strings["Save"] = "Guardar";
 $a->strings["poke"] = "tocar";
@@ -693,10 +693,10 @@ $a->strings["Click to open/close"] = "Pulsa para abrir/cerrar";
 $a->strings["View on separate page"] = "Ver en pagina aparte";
 $a->strings["view on separate page"] = "ver en pagina aparte";
 $a->strings["activity"] = "Actividad";
-$a->strings["comment"] = array(
+$a->strings["comment"] = [
        0 => "",
        1 => "Comentario",
-);
+];
 $a->strings["post"] = "Publicación";
 $a->strings["Item filed"] = "Elemento archivado";
 $a->strings["Error decoding account file"] = "Error decodificando el archivo de cuenta";
@@ -705,10 +705,10 @@ $a->strings["Error! Cannot check nickname"] = "Error! No puedo consultar el apod
 $a->strings["User '%s' already exists on this server!"] = "La cuenta '%s' ya existe en este servidor!";
 $a->strings["User creation error"] = "Error al crear la cuenta";
 $a->strings["User profile creation error"] = "Error de creación del perfil de la cuenta";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "%d contactos no encontrado",
        1 => "%d contactos no importado",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "Hecho. Ahora podes ingresar con tu nombre de cuenta y la contraseña.";
 $a->strings["Passwords do not match. Password unchanged."] = "Las contraseñas no coinciden. La contraseña no ha sido modificada.";
 $a->strings["An invitation is required."] = "Se necesita invitación.";
@@ -857,10 +857,10 @@ $a->strings["This introduction has already been accepted."] = "Esta presentació
 $a->strings["Profile location is not valid or does not contain profile information."] = "La dirección del perfil no es válida o no contiene información del perfil.";
 $a->strings["Warning: profile location has no identifiable owner name."] = "Aviso: La dirección del perfil no tiene un nombre de propietario identificable.";
 $a->strings["Warning: profile location has no profile photo."] = "Aviso: la dirección del perfil no tiene foto de perfil.";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "no se encontró %d parámetro requerido en el lugar determinado",
        1 => "no se encontraron %d parámetros requeridos en el lugar determinado",
-);
+];
 $a->strings["Introduction complete."] = "Presentación completa.";
 $a->strings["Unrecoverable protocol error."] = "Error de protocolo irrecuperable.";
 $a->strings["Profile unavailable."] = "Perfil no disponible.";
@@ -927,10 +927,10 @@ $a->strings["%s : Not a valid email address."] = "%s : No es una dirección de c
 $a->strings["Please join us on Friendica"] = "Únete a nosotros en Friendica";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "Límite de invitaciones sobrepasado. Contacta con el administrador del sitio.";
 $a->strings["%s : Message delivery failed."] = "%s : Ha fallado la entrega del mensaje.";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "%d mensaje enviado.",
        1 => "%d mensajes enviados.",
-);
+];
 $a->strings["You have no more invitations available"] = "No tienes más invitaciones disponibles";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "Visita %s para ver una lista de servidores públicos donde puedes darte de alta. Los miembros de otros servidores de Friendica pueden conectarse entre ellos, así como con miembros de otras redes sociales diferentes.";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "Para aceptar la invitación visita y regístrate en %s o en cualquier otro servidor público de Friendica.";
@@ -998,10 +998,10 @@ $a->strings["Unknown sender - %s"] = "Remitente desconocido - %s";
 $a->strings["You and %s"] = "Tú y %s";
 $a->strings["%s and You"] = "%s y Tú";
 $a->strings["D, d M Y - g:i A"] = "D, d M Y - g:i A";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => "%d mensaje",
        1 => "%d mensajes",
-);
+];
 $a->strings["Invalid request identifier."] = "Solicitud de identificación no válida.";
 $a->strings["Discard"] = "Descartar";
 $a->strings["Ignore"] = "Ignorar";
@@ -1423,14 +1423,14 @@ $a->strings["Mark success (if update was manually applied)"] = "Marcar como corr
 $a->strings["Attempt to execute this update step automatically"] = "Intentando ejecutar este paso automáticamente";
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "\n\t\t\tEstimado %1\$s,\n\t\t\t\tel administrador de %2\$s ha creado una cuenta para usted.";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "\n\t\t\tLos detalles de acceso son las siguientes:\n\n\t\t\tDirección del sitio:\t%1\$s\n\t\t\tNombre de la cuenta:\t\t%2\$s\n\t\t\tContraseña:\t\t%3\$s\n\n\t\t\tPodrá cambiar la contraseña desde la pagina de configuración de su cuenta después de acceder a la misma\n\t\t\ten.\n\n\t\t\tPor favor tome unos minutos para revisar las opciones demás de la cuenta en dicha pagina de configuración.\n\n\t\t\tTambién podrá agregar informaciones adicionales a su pagina de perfil predeterminado. \n\t\t\t(en la pagina \"Perfiles\") para que otras personas pueden encontrarlo fácilmente.\n\n\t\t\tRecomendamos que elija un nombre apropiado, agregando una imagen de perfil,\n\t\t\tagregando algunas palabras claves de la cuenta (muy útil para hacer nuevos amigos) - y \n\t\t\tquizás el país en donde vive; si no quiere ser mas especifico\n\t\t\tque eso.\n\n\t\t\tRespetamos absolutamente su derecho a la privacidad y ninguno de estos detalles es necesario.\n\t\t\tSi eres nuevo aquí y no conoces a nadie, estos detalles pueden ayudarte\n\t\t\tpara hacer nuevas e interesantes amistades.\n\n\t\t\tGracias y bienvenido a  %4\$s.";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "%s usuario bloqueado/desbloqueado",
        1 => "%s usuarios bloqueados/desbloqueados",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => "%s usuario eliminado",
        1 => "%s usuarios eliminados",
-);
+];
 $a->strings["User '%s' deleted"] = "Usuario '%s' eliminado";
 $a->strings["User '%s' unblocked"] = "Usuario '%s' desbloqueado";
 $a->strings["User '%s' blocked"] = "Usuario '%s' bloqueado'";
@@ -1487,10 +1487,10 @@ $a->strings["Off"] = "Apagado";
 $a->strings["On"] = "Encendido";
 $a->strings["Lock feature %s"] = "Trancar opción %s ";
 $a->strings["Manage Additional Features"] = "Administrar opciones adicionales";
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "%d contacto editado.",
        1 => "%d contacts edited.",
-);
+];
 $a->strings["Could not access contact record."] = "No se pudo acceder a los datos del contacto.";
 $a->strings["Could not locate selected profile."] = "No se pudo encontrar el perfil seleccionado.";
 $a->strings["Contact updated."] = "Contacto actualizado.";
@@ -1615,10 +1615,10 @@ $a->strings["Please contact the sender by replying to this post if you do not wi
 $a->strings["%s posted an update."] = "%s ha publicado una actualización.";
 $a->strings["Mood"] = "Ánimo";
 $a->strings["Set your current mood and tell your friends"] = "Coloca tu ánimo actual y cuéntaselo a tus amigos";
-$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = array(
+$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = [
        0 => "Aviso: Este grupo contiene %s miembro de una red que no permite mensajes públicos.",
        1 => "Aviso: Este grupo contiene %s miembros de una red que no permite mensajes públicos.",
-);
+];
 $a->strings["Messages in this group won't be send to these receivers."] = "Los mensajes de este grupo no se enviarán a estos receptores.";
 $a->strings["No such group"] = "Ningún grupo";
 $a->strings["Group: %s"] = "Grupo: %s";
@@ -2021,10 +2021,10 @@ $a->strings["to"] = "a";
 $a->strings["via"] = "vía";
 $a->strings["Wall-to-Wall"] = "Muro-A-Muro";
 $a->strings["via Wall-To-Wall:"] = "via Muro-A-Muro:";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => "%d comentario",
        1 => "%d comentarios",
-);
+];
 $a->strings["Bold"] = "Negrita";
 $a->strings["Italic"] = "Cursiva";
 $a->strings["Underline"] = "Subrayado";
index 78c2095e939169ac5025afe10c5af7e37b9ff653..34c805e990350f537f795250a4cea77e20a6d8ea 100644 (file)
@@ -18,10 +18,10 @@ $a->strings["Hermaphrodite"] = "Hermaphrodite";
 $a->strings["Neuter"] = "Neutre";
 $a->strings["Non-specific"] = "Non-spécifique";
 $a->strings["Other"] = "Autre";
-$a->strings["Undecided"] = array(
+$a->strings["Undecided"] = [
        0 => "Indécis",
        1 => "Indécis",
-);
+];
 $a->strings["Males"] = "Hommes";
 $a->strings["Females"] = "Femmes";
 $a->strings["Gay"] = "Gay";
@@ -128,10 +128,10 @@ $a->strings["Add New Contact"] = "Ajouter un nouveau contact";
 $a->strings["Enter address or web location"] = "Entrez son adresse ou sa localisation web";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "Exemple : bob@example.com, http://example.com/barbara";
 $a->strings["Connect"] = "Se connecter";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "%d invitation disponible",
        1 => "%d invitations disponibles",
-);
+];
 $a->strings["Find People"] = "Trouver des personnes";
 $a->strings["Enter name or interest"] = "Entrez un nom ou un centre d'intérêt";
 $a->strings["Connect/Follow"] = "Se connecter/Suivre";
@@ -147,10 +147,10 @@ $a->strings["All Networks"] = "Tous réseaux";
 $a->strings["Saved Folders"] = "Dossiers sauvegardés";
 $a->strings["Everything"] = "Tout";
 $a->strings["Categories"] = "Catégories";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "%d contact en commun",
        1 => "%d contacts en commun",
-);
+];
 $a->strings["show more"] = "montrer plus";
 $a->strings["event"] = "événement";
 $a->strings["status"] = "le statut";
@@ -168,10 +168,10 @@ $a->strings["post/item"] = "publication/élément";
 $a->strings["%1\$s marked %2\$s's %3\$s as favorite"] = "%1\$s a marqué le %3\$s de %2\$s comme favori";
 $a->strings["Likes"] = "Derniers \"J'aime\"";
 $a->strings["Dislikes"] = "Derniers \"Je n'aime pas\"";
-$a->strings["Attending"] = array(
+$a->strings["Attending"] = [
        0 => "Participe",
        1 => "Participent",
-);
+];
 $a->strings["Not attending"] = "Ne participe pas";
 $a->strings["Might attend"] = "Participera peut-être";
 $a->strings["Select"] = "Sélectionner";
@@ -245,18 +245,18 @@ $a->strings["Private post"] = "Message privé";
 $a->strings["Message"] = "Message";
 $a->strings["Browser"] = "Navigateur";
 $a->strings["View all"] = "Voir tout";
-$a->strings["Like"] = array(
+$a->strings["Like"] = [
        0 => "Like",
        1 => "Likes",
-);
-$a->strings["Dislike"] = array(
+];
+$a->strings["Dislike"] = [
        0 => "Dislike",
        1 => "Dislikes",
-);
-$a->strings["Not Attending"] = array(
+];
+$a->strings["Not Attending"] = [
        0 => "Ne participe pas",
        1 => "Ne participent pas",
-);
+];
 $a->strings["Miscellaneous"] = "Divers";
 $a->strings["Birthday:"] = "Anniversaire :";
 $a->strings["Age: "] = "Age : ";
@@ -623,10 +623,10 @@ $a->strings["last"] = "dernier";
 $a->strings["Loading more entries..."] = "Chargement de résultats supplémentaires...";
 $a->strings["The end"] = "Fin";
 $a->strings["No contacts"] = "Aucun contact";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "%d contact",
        1 => "%d contacts",
-);
+];
 $a->strings["View Contacts"] = "Voir les contacts";
 $a->strings["Save"] = "Sauver";
 $a->strings["poke"] = "titiller";
@@ -669,10 +669,10 @@ $a->strings["Click to open/close"] = "Cliquer pour ouvrir/fermer";
 $a->strings["View on separate page"] = "Voir dans une nouvelle page";
 $a->strings["view on separate page"] = "voir dans une nouvelle page";
 $a->strings["activity"] = "activité";
-$a->strings["comment"] = array(
+$a->strings["comment"] = [
        0 => "",
        1 => "commentaire",
-);
+];
 $a->strings["post"] = "publication";
 $a->strings["Item filed"] = "Élément classé";
 $a->strings["Error decoding account file"] = "Une erreur a été détecté en décodant un fichier utilisateur";
@@ -681,10 +681,10 @@ $a->strings["Error! Cannot check nickname"] = "Erreur! Pseudo invalide";
 $a->strings["User '%s' already exists on this server!"] = "L'utilisateur '%s' existe déjà sur ce serveur!";
 $a->strings["User creation error"] = "Erreur de création d'utilisateur";
 $a->strings["User profile creation error"] = "Erreur de création du profil utilisateur";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "%d contacts non importés",
        1 => "%d contacts non importés",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "Action réalisée. Vous pouvez désormais vous connecter avec votre nom d'utilisateur et votre mot de passe";
 $a->strings["Passwords do not match. Password unchanged."] = "Les mots de passe ne correspondent pas. Aucun changement appliqué.";
 $a->strings["An invitation is required."] = "Une invitation est requise.";
@@ -994,14 +994,14 @@ $a->strings["Mark success (if update was manually applied)"] = "Marquer comme 'r
 $a->strings["Attempt to execute this update step automatically"] = "Tenter d'éxecuter cette étape automatiquement";
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "\n\t\t\tChère/Cher %1\$s,\n\t\t\t\tL’administrateur de %2\$s vous a ouvert un compte.";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "\n\t\t\tVoici vos informations de connexion :\n\n\t\t\tAdresse :\t%1\$s\n\t\t\tIdentifiant :\t\t%2\$s\n\t\t\tMot de passe :\t\t%3\$s\n\n\t\t\tVous pourrez changer votre mot de passe dans les paramètres de votre compte une fois connecté.\n\n\t\t\tProfitez-en pour prendre le temps de passer en revue les autres paramètres de votre compte.\n\n\t\t\tVous pourrez aussi ajouter quelques informations élémentaires à votre profil par défaut (sur la page « Profils ») pour permettre à d’autres personnes de vous trouver facilement.\n\n\t\t\tNous recommandons de préciser votre nom complet, d’ajouter une photo et quelques mots-clefs (c’est très utile pour découvrir de nouveaux amis), et peut-être aussi d’indiquer au moins le pays dans lequel vous vivez, à défaut d’être plus précis.\n\n\t\t\tNous respectons pleinement votre droit à une vie privée, et vous n’avez aucune obligation de donner toutes ces informations. Mais si vous êtes nouveau et ne connaissez encore personne ici, cela peut vous aider à vous faire de nouveaux amis intéressants.\n\n\t\t\tMerci et bienvenu sur %4\$s.";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "%s utilisateur a (dé)bloqué",
        1 => "%s utilisateurs ont (dé)bloqué",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => "%s utilisateur supprimé",
        1 => "%s utilisateurs supprimés",
-);
+];
 $a->strings["User '%s' deleted"] = "Utilisateur '%s' supprimé";
 $a->strings["User '%s' unblocked"] = "Utilisateur '%s' débloqué";
 $a->strings["User '%s' blocked"] = "Utilisateur '%s' bloqué";
@@ -1085,10 +1085,10 @@ $a->strings["Common Friends"] = "Amis communs";
 $a->strings["Not available."] = "Indisponible.";
 $a->strings["No results."] = "Aucun résultat.";
 $a->strings["This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users."] = "";
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "%d contact mis à jour.",
        1 => "%d contacts mis à jour.",
-);
+];
 $a->strings["Could not access contact record."] = "Impossible d'accéder à l'enregistrement du contact.";
 $a->strings["Could not locate selected profile."] = "Impossible de localiser le profil séléctionné.";
 $a->strings["Contact updated."] = "Contact mis à jour.";
@@ -1229,10 +1229,10 @@ $a->strings["This introduction has already been accepted."] = "Cette introductio
 $a->strings["Profile location is not valid or does not contain profile information."] = "L'emplacement du profil est invalide ou ne contient pas de profil valide.";
 $a->strings["Warning: profile location has no identifiable owner name."] = "Attention: l'emplacement du profil n'a pas de nom identifiable.";
 $a->strings["Warning: profile location has no profile photo."] = "Attention: l'emplacement du profil n'a pas de photo de profil.";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "%d paramètre requis n'a pas été trouvé à l'endroit indiqué",
        1 => "%d paramètres requis n'ont pas été trouvés à l'endroit indiqué",
-);
+];
 $a->strings["Introduction complete."] = "Phase d'introduction achevée.";
 $a->strings["Unrecoverable protocol error."] = "Erreur de protocole non-récupérable.";
 $a->strings["Profile unavailable."] = "Profil indisponible.";
@@ -1406,10 +1406,10 @@ $a->strings["%s : Not a valid email address."] = "%s : Adresse de courriel inval
 $a->strings["Please join us on Friendica"] = "Rejoignez-nous sur Friendica";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "Limite d'invitation exédée. Veuillez contacter l'administrateur de votre site.";
 $a->strings["%s : Message delivery failed."] = "%s : L'envoi du message a échoué.";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "%d message envoyé.",
        1 => "%d messages envoyés.",
-);
+];
 $a->strings["You have no more invitations available"] = "Vous n'avez plus d'invitations disponibles";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "Visitez %s pour une liste des sites publics que vous pouvez rejoindre. Les membres de Friendica appartenant à d'autres sites peuvent s'interconnecter, ainsi qu'avec les membres de plusieurs autres réseaux sociaux.";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "Pour accepter cette invitation, merci d'aller vous inscrire sur %s, ou n'importe quel autre site Friendica public.";
@@ -1479,17 +1479,17 @@ $a->strings["Unknown sender - %s"] = "Émetteur inconnu - %s";
 $a->strings["You and %s"] = "Vous et %s";
 $a->strings["%s and You"] = "%s et vous";
 $a->strings["D, d M Y - g:i A"] = "D, d M Y - g:i A";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => "%d message",
        1 => "%d messages",
-);
+];
 $a->strings["Mood"] = "Humeur";
 $a->strings["Set your current mood and tell your friends"] = "Spécifiez votre humeur du moment, et informez vos amis";
 $a->strings["Remove term"] = "Retirer le terme";
-$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = array(
+$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Messages in this group won't be send to these receivers."] = "Les messages dans ce groupe ne seront pas envoyés à ces destinataires.";
 $a->strings["No such group"] = "Groupe inexistant";
 $a->strings["Group: %s"] = "Group : %s";
@@ -2066,10 +2066,10 @@ $a->strings["to"] = "à";
 $a->strings["via"] = "via";
 $a->strings["Wall-to-Wall"] = "Inter-mur";
 $a->strings["via Wall-To-Wall:"] = "en Inter-mur :";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => "%d commentaire",
        1 => "%d commentaires",
-);
+];
 $a->strings["Bold"] = "Gras";
 $a->strings["Italic"] = "Italique";
 $a->strings["Underline"] = "Souligné";
index b1f1e319266e305a8287ec7a86688f110d8045fa..aa87041da891e316dca5bbd62db5969d347865ac 100644 (file)
@@ -9,10 +9,10 @@ $a->strings["Add New Contact"] = "Bæta við tengilið";
 $a->strings["Enter address or web location"] = "Settu inn slóð";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "Dæmi: gudmundur@simnet.is, http://simnet.is/gudmundur";
 $a->strings["Connect"] = "Tengjast";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "%d boðskort í boði",
        1 => "%d boðskort í boði",
-);
+];
 $a->strings["Find People"] = "Finna fólk";
 $a->strings["Enter name or interest"] = "Settu inn nafn eða áhugamál";
 $a->strings["Connect/Follow"] = "Tengjast/fylgja";
@@ -27,10 +27,10 @@ $a->strings["All Networks"] = "Öll net";
 $a->strings["Saved Folders"] = "Vistaðar möppur";
 $a->strings["Everything"] = "Allt";
 $a->strings["Categories"] = "Flokkar";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "%d tengiliður sameiginlegur",
        1 => "%d tengiliðir sameiginlegir",
-);
+];
 $a->strings["show more"] = "birta meira";
 $a->strings["Forums"] = "Spjallsvæði";
 $a->strings["External link to forum"] = "Ytri tengill á spjallsvæði";
@@ -47,10 +47,10 @@ $a->strings["Hermaphrodite"] = "Tvíkynja";
 $a->strings["Neuter"] = "Hvorukyn";
 $a->strings["Non-specific"] = "Ekki ákveðið";
 $a->strings["Other"] = "Annað";
-$a->strings["Undecided"] = array(
+$a->strings["Undecided"] = [
        0 => "Óviss",
        1 => "Óvissir",
-);
+];
 $a->strings["Males"] = "Karlar";
 $a->strings["Females"] = "Konur";
 $a->strings["Gay"] = "Hommi";
@@ -169,10 +169,10 @@ $a->strings["Error! Cannot check nickname"] = "";
 $a->strings["User '%s' already exists on this server!"] = "";
 $a->strings["User creation error"] = "";
 $a->strings["User profile creation error"] = "";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "";
 $a->strings["Miscellaneous"] = "Ýmislegt";
 $a->strings["Birthday:"] = "Afmælisdagur:";
@@ -432,10 +432,10 @@ $a->strings["post/item"] = "";
 $a->strings["%1\$s marked %2\$s's %3\$s as favorite"] = "";
 $a->strings["Likes"] = "Líkar";
 $a->strings["Dislikes"] = "Mislíkar";
-$a->strings["Attending"] = array(
+$a->strings["Attending"] = [
        0 => "Mætir",
        1 => "Mæta",
-);
+];
 $a->strings["Not attending"] = "Mætir ekki";
 $a->strings["Might attend"] = "Gæti mætt";
 $a->strings["Select"] = "Velja";
@@ -502,18 +502,18 @@ $a->strings["Private post"] = "Einkafærsla";
 $a->strings["Message"] = "Skilaboð";
 $a->strings["Browser"] = "Vafri";
 $a->strings["View all"] = "Skoða allt";
-$a->strings["Like"] = array(
+$a->strings["Like"] = [
        0 => "Líkar",
        1 => "Líkar",
-);
-$a->strings["Dislike"] = array(
+];
+$a->strings["Dislike"] = [
        0 => "Mislíkar",
        1 => "Mislíkar",
-);
-$a->strings["Not Attending"] = array(
+];
+$a->strings["Not Attending"] = [
        0 => "Mæti ekki",
        1 => "Mæta ekki",
-);
+];
 $a->strings["%s\\'s birthday"] = "Afmælisdagur %s";
 $a->strings["General Features"] = "Almennir eiginleikar";
 $a->strings["Multiple Profiles"] = "";
@@ -651,10 +651,10 @@ $a->strings["next"] = "næsta";
 $a->strings["Loading more entries..."] = "Hleð inn fleiri færslum...";
 $a->strings["The end"] = "Endir";
 $a->strings["No contacts"] = "Engir tengiliðir";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "%d tengiliður",
        1 => "%d tengiliðir",
-);
+];
 $a->strings["View Contacts"] = "Skoða tengiliði";
 $a->strings["Save"] = "Vista";
 $a->strings["poke"] = "pota";
@@ -695,10 +695,10 @@ $a->strings["Click to open/close"] = "";
 $a->strings["View on separate page"] = "";
 $a->strings["view on separate page"] = "";
 $a->strings["activity"] = "virkni";
-$a->strings["comment"] = array(
+$a->strings["comment"] = [
        0 => "athugasemd",
        1 => "athugasemdir",
-);
+];
 $a->strings["post"] = "";
 $a->strings["Item filed"] = "";
 $a->strings["Passwords do not match. Password unchanged."] = "Aðgangsorð ber ekki saman.  Aðgangsorð óbreytt.";
@@ -794,10 +794,10 @@ $a->strings["%s : Not a valid email address."] = "%s : Ekki gilt póstfang";
 $a->strings["Please join us on Friendica"] = "";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "";
 $a->strings["%s : Message delivery failed."] = "%s : Skilaboð komust ekki til skila.";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "%d skilaboð send.",
        1 => "%d skilaboð send",
-);
+];
 $a->strings["You have no more invitations available"] = "Þú hefur ekki fleiri boðskort.";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "";
@@ -949,10 +949,10 @@ $a->strings["Unknown sender - %s"] = "";
 $a->strings["You and %s"] = "";
 $a->strings["%s and You"] = "";
 $a->strings["D, d M Y - g:i A"] = "";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Manage Identities and/or Pages"] = "Sýsla með notendur og/eða síður";
 $a->strings["Toggle between different identities or community/group pages which share your account details or which you have been granted \"manage\" permissions"] = "Skipta á milli auðkenna eða hópa- / stjörnunotanda sem deila þínum aðgangs upplýsingum eða þér verið úthlutað \"umsýslu\" réttindum.";
 $a->strings["Select an identity to manage: "] = "Veldu notanda til að sýsla með:";
@@ -981,10 +981,10 @@ $a->strings["New photo from this URL"] = "Ný mynd frá slóð";
 $a->strings["No such group"] = "Hópur ekki til";
 $a->strings["Group: %s"] = "";
 $a->strings["This entry was edited"] = "";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => "%d ummæli",
        1 => "%d ummæli",
-);
+];
 $a->strings["Private Message"] = "Einkaskilaboð";
 $a->strings["I like this (toggle)"] = "Mér líkar þetta (kveikja/slökkva)";
 $a->strings["like"] = "líkar";
@@ -1687,14 +1687,14 @@ $a->strings["Mark success (if update was manually applied)"] = "Merkja sem tóks
 $a->strings["Attempt to execute this update step automatically"] = "Framkvæma þessa uppfærslu sjálfkrafa";
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "",
        1 => "",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => "%s notenda eytt",
        1 => "%s notendum eytt",
-);
+];
 $a->strings["User '%s' deleted"] = "Notanda '%s' eytt";
 $a->strings["User '%s' unblocked"] = "Notanda '%s' gefið frelsi";
 $a->strings["User '%s' blocked"] = "Notanda '%s' settur í bann";
@@ -1748,10 +1748,10 @@ $a->strings["PHP logging"] = "";
 $a->strings["To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."] = "";
 $a->strings["Lock feature %s"] = "";
 $a->strings["Manage Additional Features"] = "";
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Could not access contact record."] = "Tókst ekki að ná í uppl. um tengilið";
 $a->strings["Could not locate selected profile."] = "Tókst ekki að staðsetja valinn forsíðu";
 $a->strings["Contact updated."] = "Tengiliður uppfærður";
@@ -1848,10 +1848,10 @@ $a->strings["This introduction has already been accepted."] = "Þessi kynning he
 $a->strings["Profile location is not valid or does not contain profile information."] = "Forsíðu slóð er ekki í lagi eða inniheldur ekki forsíðu upplýsingum.";
 $a->strings["Warning: profile location has no identifiable owner name."] = "Aðvörun: forsíðu staðsetning hefur ekki aðgreinanlegt eigendanafn.";
 $a->strings["Warning: profile location has no profile photo."] = "Aðvörun: forsíðu slóð hefur ekki forsíðu mynd.";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "%d skilyrt breyta fannst ekki á uppgefinni staðsetningu",
        1 => "%d skilyrtar breytur fundust ekki á uppgefninni staðsetningu",
-);
+];
 $a->strings["Introduction complete."] = "Kynning tilbúinn.";
 $a->strings["Unrecoverable protocol error."] = "Alvarleg samskipta villa.";
 $a->strings["Profile unavailable."] = "Ekki hægt að sækja forsíðu";
@@ -1971,10 +1971,10 @@ $a->strings["This message was sent to you by %s, a member of the Friendica socia
 $a->strings["You may visit them online at %s"] = "Þú getur heimsótt þau á netinu á %s";
 $a->strings["Please contact the sender by replying to this post if you do not wish to receive these messages."] = "Hafðu samband við sendanda með því að svara á þessari færslu ef þú villt ekki fá þessi skilaboð.";
 $a->strings["%s posted an update."] = "%s hefur sent uppfærslu.";
-$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = array(
+$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Messages in this group won't be send to these receivers."] = "";
 $a->strings["Private messages to this person are at risk of public disclosure."] = "Einka skilaboð send á þennan notanda eiga á hættu að verða opinber.";
 $a->strings["Invalid contact."] = "Ógildur tengiliður.";
index 71b7841553e0a06c950c01d44888f441c70b0c48..28ad45d73195ad44b873d6136bcf557129277f8c 100644 (file)
@@ -90,10 +90,10 @@ $a->strings["Hermaphrodite"] = "Ermafrodito";
 $a->strings["Neuter"] = "Neutro";
 $a->strings["Non-specific"] = "Non specificato";
 $a->strings["Other"] = "Altro";
-$a->strings["Undecided"] = array(
+$a->strings["Undecided"] = [
        0 => "Indeciso",
        1 => "Indecisi",
-);
+];
 $a->strings["Males"] = "Maschi";
 $a->strings["Females"] = "Femmine";
 $a->strings["Gay"] = "Gay";
@@ -180,10 +180,10 @@ $a->strings["Add New Contact"] = "Aggiungi nuovo contatto";
 $a->strings["Enter address or web location"] = "Inserisci posizione o indirizzo web";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "Esempio: bob@example.com, http://example.com/barbara";
 $a->strings["Connect"] = "Connetti";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "%d invito disponibile",
        1 => "%d inviti disponibili",
-);
+];
 $a->strings["Find People"] = "Trova persone";
 $a->strings["Enter name or interest"] = "Inserisci un nome o un interesse";
 $a->strings["Connect/Follow"] = "Connetti/segui";
@@ -198,10 +198,10 @@ $a->strings["Networks"] = "Reti";
 $a->strings["All Networks"] = "Tutte le Reti";
 $a->strings["Everything"] = "Tutto";
 $a->strings["Categories"] = "Categorie";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "%d contatto in comune",
        1 => "%d contatti in comune",
-);
+];
 $a->strings["Friendica Notification"] = "Notifica Friendica";
 $a->strings["Thank You,"] = "Grazie,";
 $a->strings["%s Administrator"] = "Amministratore %s";
@@ -411,10 +411,10 @@ $a->strings["post/item"] = "post/elemento";
 $a->strings["%1\$s marked %2\$s's %3\$s as favorite"] = "%1\$s ha segnato il/la %3\$s di %2\$s come preferito";
 $a->strings["Likes"] = "Mi piace";
 $a->strings["Dislikes"] = "Non mi piace";
-$a->strings["Attending"] = array(
+$a->strings["Attending"] = [
        0 => "Partecipa",
        1 => "Partecipano",
-);
+];
 $a->strings["Not attending"] = "Non partecipa";
 $a->strings["Might attend"] = "Forse partecipa";
 $a->strings["Select"] = "Seleziona";
@@ -481,18 +481,18 @@ $a->strings["Private post"] = "Post privato";
 $a->strings["Message"] = "Messaggio";
 $a->strings["Browser"] = "Browser";
 $a->strings["View all"] = "Mostra tutto";
-$a->strings["Like"] = array(
+$a->strings["Like"] = [
        0 => "Mi piace",
        1 => "Mi piace",
-);
-$a->strings["Dislike"] = array(
+];
+$a->strings["Dislike"] = [
        0 => "Non mi piace",
        1 => "Non mi piace",
-);
-$a->strings["Not Attending"] = array(
+];
+$a->strings["Not Attending"] = [
        0 => "Non partecipa",
        1 => "Non partecipano",
-);
+];
 $a->strings["Cannot locate DNS info for database server '%s'"] = "Non trovo le informazioni DNS per il database server '%s'";
 $a->strings["There are no tables on MyISAM."] = "Non ci sono tabelle MyISAM";
 $a->strings["\n\t\t\tThe friendica developers released update %s recently,\n\t\t\tbut when I tried to install it, something went terribly wrong.\n\t\t\tThis needs to be fixed soon and I can't do it alone. Please contact a\n\t\t\tfriendica developer if you can not help me on your own. My database might be invalid."] = "\nGli sviluppatori di Friendica hanno rilasciato l'aggiornamento %s\nrecentemente, ma quando ho provato a installarlo, qualcosa è \nandato terribilmente storto.\nBisogna sistemare le cose e non posso farlo da solo.\nContatta uno sviluppatore se non puoi aiutarmi da solo. Il mio database potrebbe essere invalido.";
@@ -647,10 +647,10 @@ $a->strings["last"] = "ultimo";
 $a->strings["Loading more entries..."] = "Carico più elementi...";
 $a->strings["The end"] = "Fine";
 $a->strings["No contacts"] = "Nessun contatto";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "%d contatto",
        1 => "%d contatti",
-);
+];
 $a->strings["View Contacts"] = "Visualizza i contatti";
 $a->strings["Save"] = "Salva";
 $a->strings["poke"] = "stuzzica";
@@ -693,10 +693,10 @@ $a->strings["Click to open/close"] = "Clicca per aprire/chiudere";
 $a->strings["View on separate page"] = "Vedi in una pagina separata";
 $a->strings["view on separate page"] = "vedi in una pagina separata";
 $a->strings["activity"] = "attività";
-$a->strings["comment"] = array(
+$a->strings["comment"] = [
        0 => "commento ",
        1 => "commenti",
-);
+];
 $a->strings["post"] = "messaggio";
 $a->strings["Item filed"] = "Messaggio salvato";
 $a->strings["Error decoding account file"] = "Errore decodificando il file account";
@@ -705,10 +705,10 @@ $a->strings["Error! Cannot check nickname"] = "Errore! Non posso controllare il
 $a->strings["User '%s' already exists on this server!"] = "L'utente '%s' esiste già su questo server!";
 $a->strings["User creation error"] = "Errore creando l'utente";
 $a->strings["User profile creation error"] = "Errore creando il profilo dell'utente";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "%d contatto non importato",
        1 => "%d contatti non importati",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "Fatto. Ora puoi entrare con il tuo nome utente e la tua password";
 $a->strings["Passwords do not match. Password unchanged."] = "Le password non corrispondono. Password non cambiata.";
 $a->strings["An invitation is required."] = "E' richiesto un invito.";
@@ -857,10 +857,10 @@ $a->strings["This introduction has already been accepted."] = "Questa presentazi
 $a->strings["Profile location is not valid or does not contain profile information."] = "L'indirizzo del profilo non è valido o non contiene un profilo.";
 $a->strings["Warning: profile location has no identifiable owner name."] = "Attenzione: l'indirizzo del profilo non riporta il nome del proprietario.";
 $a->strings["Warning: profile location has no profile photo."] = "Attenzione: l'indirizzo del profilo non ha una foto.";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "%d parametro richiesto non è stato trovato all'indirizzo dato",
        1 => "%d parametri richiesti non sono stati trovati all'indirizzo dato",
-);
+];
 $a->strings["Introduction complete."] = "Presentazione completa.";
 $a->strings["Unrecoverable protocol error."] = "Errore di comunicazione.";
 $a->strings["Profile unavailable."] = "Profilo non disponibile.";
@@ -927,10 +927,10 @@ $a->strings["%s : Not a valid email address."] = "%s: non è un indirizzo email
 $a->strings["Please join us on Friendica"] = "Unisciti a noi su Friendica";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "Limite degli inviti superato. Contatta l'amministratore del tuo sito.";
 $a->strings["%s : Message delivery failed."] = "%s: la consegna del messaggio fallita.";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "%d messaggio inviato.",
        1 => "%d messaggi inviati.",
-);
+];
 $a->strings["You have no more invitations available"] = "Non hai altri inviti disponibili";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "Visita %s per una lista di siti pubblici a cui puoi iscriverti. I membri Friendica su altri siti possono collegarsi uno con l'altro, come con membri di molti altri social network.";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "Per accettare questo invito, visita e registrati su %s o su un'altro sito web Friendica aperto al pubblico.";
@@ -998,10 +998,10 @@ $a->strings["Unknown sender - %s"] = "Mittente sconosciuto - %s";
 $a->strings["You and %s"] = "Tu e %s";
 $a->strings["%s and You"] = "%s e Tu";
 $a->strings["D, d M Y - g:i A"] = "D d M Y - G:i";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => "%d messaggio",
        1 => "%d messaggi",
-);
+];
 $a->strings["Invalid request identifier."] = "L'identificativo della richiesta non è valido.";
 $a->strings["Discard"] = "Scarta";
 $a->strings["Ignore"] = "Ignora";
@@ -1423,14 +1423,14 @@ $a->strings["Mark success (if update was manually applied)"] = "Segna completato
 $a->strings["Attempt to execute this update step automatically"] = "Cerco di eseguire questo aggiornamento in automatico";
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "\nGentile %1\$s,\n    l'amministratore di %2\$s ha impostato un account per te.";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "\nI dettagli del tuo utente sono:\n    Indirizzo del sito: %1\$s\n    Nome utente: %2\$s\n    Password: %3\$s\n\nPuoi cambiare la tua password dalla pagina delle impostazioni del tuo account dopo esserti autenticato.\n\nPer favore, prenditi qualche momento per esaminare tutte le impostazioni presenti.\n\nPotresti voler aggiungere qualche informazione di base al tuo profilo predefinito (nella pagina \"Profili\"), così che le altre persone possano trovarti più facilmente.\n\nTi raccomandiamo di inserire il tuo nome completo, aggiungere una foto, aggiungere qualche parola chiave del profilo (molto utili per trovare nuovi contatti), e magari in quale nazione vivi, se non vuoi essere più specifico di così.\n\nNoi rispettiamo appieno la tua privacy, e nessuna di queste informazioni è necessaria o obbligatoria.\nSe sei nuovo e non conosci nessuno qui, possono aiutarti a trovare qualche nuovo e interessante contatto.\n\nGrazie e benvenuto su %4\$s";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "%s utente bloccato/sbloccato",
        1 => "%s utenti bloccati/sbloccati",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => "%s utente cancellato",
        1 => "%s utenti cancellati",
-);
+];
 $a->strings["User '%s' deleted"] = "Utente '%s' cancellato";
 $a->strings["User '%s' unblocked"] = "Utente '%s' sbloccato";
 $a->strings["User '%s' blocked"] = "Utente '%s' bloccato";
@@ -1487,10 +1487,10 @@ $a->strings["Off"] = "Spento";
 $a->strings["On"] = "Acceso";
 $a->strings["Lock feature %s"] = "Blocca funzionalità %s";
 $a->strings["Manage Additional Features"] = "Gestisci Funzionalità Aggiuntive";
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "%d contatto modificato.",
        1 => "%d contatti modificati",
-);
+];
 $a->strings["Could not access contact record."] = "Non è possibile accedere al contatto.";
 $a->strings["Could not locate selected profile."] = "Non riesco a trovare il profilo selezionato.";
 $a->strings["Contact updated."] = "Contatto aggiornato.";
@@ -1615,10 +1615,10 @@ $a->strings["Please contact the sender by replying to this post if you do not wi
 $a->strings["%s posted an update."] = "%s ha inviato un aggiornamento.";
 $a->strings["Mood"] = "Umore";
 $a->strings["Set your current mood and tell your friends"] = "Condividi il tuo umore con i tuoi amici";
-$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = array(
+$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = [
        0 => "Attenzione: Questo gruppo contiene %s membro da una rete che non permette la ricezione di messaggi non pubblici.",
        1 => "Attenzione: Questo gruppo contiene %s membri da reti che non permettono la ricezione di messaggi non pubblici.",
-);
+];
 $a->strings["Messages in this group won't be send to these receivers."] = "I messaggi in questo gruppo non saranno inviati ai quei contatti.";
 $a->strings["No such group"] = "Nessun gruppo";
 $a->strings["Group: %s"] = "Gruppo: %s";
@@ -2021,10 +2021,10 @@ $a->strings["to"] = "a";
 $a->strings["via"] = "via";
 $a->strings["Wall-to-Wall"] = "Da bacheca a bacheca";
 $a->strings["via Wall-To-Wall:"] = "da bacheca a bacheca";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => "%d commento",
        1 => "%d commenti",
-);
+];
 $a->strings["Bold"] = "Grassetto";
 $a->strings["Italic"] = "Corsivo";
 $a->strings["Underline"] = "Sottolineato";
index 13482e51517f6e1fa0f8fcaa0c11fe4f149598ad..18351bada33e62da0a4c9cf5fa7bced35b5c6d38 100644 (file)
@@ -5,10 +5,10 @@ function string_plural_select_nb_no($n){
        return ($n != 1);;
 }}
 ;
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "%d kontakt redigert.",
        1 => "%d kontakter redigert",
-);
+];
 $a->strings["Could not access contact record."] = "Fikk ikke tilgang til kontaktposten.";
 $a->strings["Could not locate selected profile."] = "Kunne ikke lokalisere valgt profil.";
 $a->strings["Contact updated."] = "Kontakt oppdatert.";
@@ -33,10 +33,10 @@ $a->strings["(Update was successful)"] = "(Oppdatering vellykket)";
 $a->strings["(Update was not successful)"] = "(Oppdatering mislykket)";
 $a->strings["Suggest friends"] = "Foreslå venner";
 $a->strings["Network type: %s"] = "Nettverkstype: %s";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "%d felles kontakt",
        1 => "%d felles kontakter",
-);
+];
 $a->strings["View all contacts"] = "Vis alle kontakter";
 $a->strings["Unblock"] = "Ikke blokker";
 $a->strings["Block"] = "Blokker";
@@ -351,10 +351,10 @@ $a->strings["You and %s"] = "Du og %s";
 $a->strings["%s and You"] = "%s og du";
 $a->strings["Delete conversation"] = "Slett samtale";
 $a->strings["D, d M Y - g:i A"] = "D, d M Y - g:i A";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => "%d melding",
        1 => "%d meldinger",
-);
+];
 $a->strings["Message not available."] = "Melding utilgjengelig.";
 $a->strings["Delete message"] = "Slett melding";
 $a->strings["No secure communications available. You <strong>may</strong> be able to respond from the sender's profile page."] = "Ingen sikker kommunikasjon tilgjengelig. Du <strong>kan kanskje</strong> svare fra senderens profilside.";
@@ -567,14 +567,14 @@ $a->strings["Attempt to execute this update step automatically"] = "Forsøk å u
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "";
 $a->strings["Registration details for %s"] = "Registeringsdetaljer for %s";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "%s bruker blokkert/ikke blokkert",
        1 => "%s brukere blokkert/ikke blokkert",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => "%s bruker slettet",
        1 => "%s brukere slettet",
-);
+];
 $a->strings["User '%s' deleted"] = "Brukeren '%s' er slettet";
 $a->strings["User '%s' unblocked"] = "Brukeren '%s' er ikke blokkert";
 $a->strings["User '%s' blocked"] = "Brukeren '%s' er blokkert";
@@ -637,10 +637,10 @@ $a->strings["Shared Links"] = "Delte lenker";
 $a->strings["Interesting Links"] = "Interessante lenker";
 $a->strings["Starred"] = "Med stjerne";
 $a->strings["Favourite Posts"] = "Favorittinnlegg";
-$a->strings["Warning: This group contains %s member from an insecure network."] = array(
+$a->strings["Warning: This group contains %s member from an insecure network."] = [
        0 => "Advarsel: denne gruppen inneholder %s medlem fra et usikkert nettverk.",
        1 => "Advarsel: denne gruppe inneholder %s medlemmer fra et usikkert nettverk.",
-);
+];
 $a->strings["Private messages to this group are at risk of public disclosure."] = "Private meldinger til denne gruppen risikerer å bli offentliggjort.";
 $a->strings["No such group"] = "Gruppen finnes ikke";
 $a->strings["Group is empty"] = "Gruppen er tom";
@@ -674,14 +674,14 @@ $a->strings["Select"] = "Velg";
 $a->strings["View %s's profile @ %s"] = "Besøk %ss profil [%s]";
 $a->strings["%s from %s"] = "%s fra %s";
 $a->strings["View in context"] = "Vis i sammenheng";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => "%d kommentar",
        1 => "%d kommentarer",
-);
-$a->strings["comment"] = array(
+];
+$a->strings["comment"] = [
        0 => "kommentar",
        1 => "kommentarer",
-);
+];
 $a->strings["show more"] = "vis mer";
 $a->strings["Private Message"] = "Privat melding";
 $a->strings["I like this (toggle)"] = "Jeg liker dette (skru på/av)";
@@ -956,10 +956,10 @@ $a->strings["This introduction has already been accepted."] = "Denne introduksjo
 $a->strings["Profile location is not valid or does not contain profile information."] = "Profilstedet er ikke gyldig og inneholder ikke profilinformasjon.";
 $a->strings["Warning: profile location has no identifiable owner name."] = "Advarsel: profilstedet har ikke identifiserbart eiernavn.";
 $a->strings["Warning: profile location has no profile photo."] = "Advarsel: profilstedet har ikke noe profilbilde.";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "one: %d nødvendig parameter ble ikke funnet på angitt sted",
        1 => "other: %d nødvendige parametre ble ikke funnet på angitt sted",
-);
+];
 $a->strings["Introduction complete."] = "Introduksjon ferdig.";
 $a->strings["Unrecoverable protocol error."] = "Uopprettelig protokollfeil.";
 $a->strings["Profile unavailable."] = "Profil utilgjengelig.";
@@ -1175,10 +1175,10 @@ $a->strings["%s : Not a valid email address."] = "%s: Ugyldig e-postadresse.";
 $a->strings["Please join us on Friendica"] = "Vær med oss på Friendica";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "Invitasjonsgrense overskredet. Vennligst kontakt administrator på ditt nettsted.";
 $a->strings["%s : Message delivery failed."] = "%s: Mislyktes med å levere meldingen.";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "one: %d melding sendt.",
        1 => "other: %d meldinger sendt.",
-);
+];
 $a->strings["You have no more invitations available"] = "Du har ingen flere tilgjengelige invitasjoner";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "Besøk %s for en liste med offentlige nettsteder du kan bli med i. Friendica-medlemmer ved andre nettsteder kan alle opprette forbindelse til hverandre, og i tillegg til medlemmer av mange andre sosiale nettverk.";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "For å akseptere denne invitasjonen, vær så snill å besøk og registrer deg hos %s eller et hvilket som helst annet offentlig Friendica-nettsted.";
@@ -1297,10 +1297,10 @@ $a->strings["The error message was:"] = "Feilmeldingen var:";
 $a->strings["Add New Contact"] = "Legg til ny kontakt";
 $a->strings["Enter address or web location"] = "Skriv adresse eller web-plassering";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "Eksempel: ole@eksempel.no, http://eksempel.no/kari";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "%d invitasjon tilgjengelig",
        1 => "%d invitasjoner tilgjengelig",
-);
+];
 $a->strings["Find People"] = "Finn personer";
 $a->strings["Enter name or interest"] = "Skriv navn eller interesse";
 $a->strings["Connect/Follow"] = "Koble/Følg";
@@ -1446,10 +1446,10 @@ $a->strings["first"] = "første";
 $a->strings["last"] = "siste";
 $a->strings["next"] = "neste";
 $a->strings["No contacts"] = "Ingen kontakter";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "%d kontakt",
        1 => "%d kontakter",
-);
+];
 $a->strings["poke"] = "dytt";
 $a->strings["ping"] = "ping";
 $a->strings["pinged"] = "pinget";
@@ -1750,10 +1750,10 @@ $a->strings["Error! Cannot check nickname"] = "Feil! Kan ikke sjekke kallenavn";
 $a->strings["User '%s' already exists on this server!"] = "Brukeren '%s' finnes allerede på denne tjeneren!";
 $a->strings["User creation error"] = "Feil ved oppretting av bruker";
 $a->strings["User profile creation error"] = "Feil ved opprettelsen av brukerprofil";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "%d kontakt ikke importert",
        1 => "%d kontakter ikke importert",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "Ferdig. Du kan nå logge inn med ditt brukernavn og passord";
 $a->strings["toggle mobile"] = "Velg mobilvisning";
 $a->strings["Theme settings"] = "Temainnstillinger";
index 6151bd7abf2dea4f98564dd9b1ef3c210e78a18b..dd8a4c9cac97d99842f2ba6038b516c36b0335a9 100644 (file)
@@ -9,10 +9,10 @@ $a->strings["Add New Contact"] = "Nieuw Contact toevoegen";
 $a->strings["Enter address or web location"] = "Voeg een webadres of -locatie in:";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "Voorbeeld: jan@voorbeeld.be, http://voorbeeld.nl/barbara";
 $a->strings["Connect"] = "Verbinden";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "%d uitnodiging beschikbaar",
        1 => "%d uitnodigingen beschikbaar",
-);
+];
 $a->strings["Find People"] = "Zoek mensen";
 $a->strings["Enter name or interest"] = "Vul naam of interesse in";
 $a->strings["Connect/Follow"] = "Verbind/Volg";
@@ -27,10 +27,10 @@ $a->strings["All Networks"] = "Alle netwerken";
 $a->strings["Saved Folders"] = "Bewaarde Mappen";
 $a->strings["Everything"] = "Alles";
 $a->strings["Categories"] = "Categorieën";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "%d gedeeld contact",
        1 => "%d gedeelde contacten",
-);
+];
 $a->strings["show more"] = "toon meer";
 $a->strings["Forums"] = "";
 $a->strings["External link to forum"] = "";
@@ -47,10 +47,10 @@ $a->strings["Hermaphrodite"] = "Hermafrodiet";
 $a->strings["Neuter"] = "Genderneutraal";
 $a->strings["Non-specific"] = "Niet-specifiek";
 $a->strings["Other"] = "Anders";
-$a->strings["Undecided"] = array(
+$a->strings["Undecided"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Males"] = "Mannen";
 $a->strings["Females"] = "Vrouwen";
 $a->strings["Gay"] = "Homo";
@@ -169,10 +169,10 @@ $a->strings["Error! Cannot check nickname"] = "";
 $a->strings["User '%s' already exists on this server!"] = "Gebruiker '%s' bestaat al op deze server!";
 $a->strings["User creation error"] = "Fout bij het aanmaken van de gebruiker";
 $a->strings["User profile creation error"] = "Fout bij het aanmaken van het gebruikersprofiel";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "%d contact werd niet geïmporteerd",
        1 => "%d contacten werden niet geïmporteerd",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "Gebeurd. Je kunt nu inloggen met je gebruikersnaam en wachtwoord";
 $a->strings["Miscellaneous"] = "Diversen";
 $a->strings["Birthday:"] = "Verjaardag:";
@@ -432,10 +432,10 @@ $a->strings["post/item"] = "bericht/item";
 $a->strings["%1\$s marked %2\$s's %3\$s as favorite"] = "%1\$s markeerde %2\$s's %3\$s als favoriet";
 $a->strings["Likes"] = "Houdt van";
 $a->strings["Dislikes"] = "Houdt niet van";
-$a->strings["Attending"] = array(
+$a->strings["Attending"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Not attending"] = "";
 $a->strings["Might attend"] = "";
 $a->strings["Select"] = "Kies";
@@ -502,18 +502,18 @@ $a->strings["Private post"] = "Privé verzending";
 $a->strings["Message"] = "Bericht";
 $a->strings["Browser"] = "";
 $a->strings["View all"] = "";
-$a->strings["Like"] = array(
+$a->strings["Like"] = [
        0 => "",
        1 => "",
-);
-$a->strings["Dislike"] = array(
+];
+$a->strings["Dislike"] = [
        0 => "",
        1 => "",
-);
-$a->strings["Not Attending"] = array(
+];
+$a->strings["Not Attending"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["%s\\'s birthday"] = "";
 $a->strings["General Features"] = "Algemene functies";
 $a->strings["Multiple Profiles"] = "Meerdere profielen";
@@ -651,10 +651,10 @@ $a->strings["next"] = "volgende";
 $a->strings["Loading more entries..."] = "";
 $a->strings["The end"] = "";
 $a->strings["No contacts"] = "Geen contacten";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "%d contact",
        1 => "%d contacten",
-);
+];
 $a->strings["View Contacts"] = "Bekijk contacten";
 $a->strings["Save"] = "Bewaren";
 $a->strings["poke"] = "aanstoten";
@@ -695,10 +695,10 @@ $a->strings["Click to open/close"] = "klik om te openen/sluiten";
 $a->strings["View on separate page"] = "";
 $a->strings["view on separate page"] = "";
 $a->strings["activity"] = "activiteit";
-$a->strings["comment"] = array(
+$a->strings["comment"] = [
        0 => "reactie",
        1 => "reacties",
-);
+];
 $a->strings["post"] = "bericht";
 $a->strings["Item filed"] = "Item bewaard";
 $a->strings["Passwords do not match. Password unchanged."] = "Wachtwoorden komen niet overeen. Wachtwoord niet gewijzigd.";
@@ -794,10 +794,10 @@ $a->strings["%s : Not a valid email address."] = "%s: Geen geldig e-mailadres.";
 $a->strings["Please join us on Friendica"] = "Kom bij ons op Friendica";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "Uitnodigingslimiet overschreden. Neem contact op met de beheerder van je website.";
 $a->strings["%s : Message delivery failed."] = "%s : Aflevering van bericht mislukt.";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "%d bericht verzonden.",
        1 => "%d berichten verzonden.",
-);
+];
 $a->strings["You have no more invitations available"] = "Je kunt geen uitnodigingen meer sturen";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "Bezoek %s voor een lijst van openbare sites waar je je kunt aansluiten. Friendica leden op andere sites kunnen allemaal met elkaar verbonden worden, en ook met leden van verschillende andere sociale netwerken.";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "Om deze uitnodiging te accepteren kan je je op %s registreren of op een andere vrij toegankelijke Friendica-website.";
@@ -949,10 +949,10 @@ $a->strings["Unknown sender - %s"] = "Onbekende afzender - %s";
 $a->strings["You and %s"] = "Jij en %s";
 $a->strings["%s and You"] = "%s en jij";
 $a->strings["D, d M Y - g:i A"] = "D, d M Y - g:i A";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => "%d bericht",
        1 => "%d berichten",
-);
+];
 $a->strings["Manage Identities and/or Pages"] = "Beheer Identiteiten en/of Pagina's";
 $a->strings["Toggle between different identities or community/group pages which share your account details or which you have been granted \"manage\" permissions"] = "Wissel tussen verschillende identiteiten of forum/groeppagina's die jouw accountdetails delen of waar je \"beheerdersrechten\" hebt gekregen.";
 $a->strings["Select an identity to manage: "] = "Selecteer een identiteit om te beheren:";
@@ -981,10 +981,10 @@ $a->strings["New photo from this URL"] = "Nieuwe foto van deze URL";
 $a->strings["No such group"] = "Zo'n groep bestaat niet";
 $a->strings["Group: %s"] = "";
 $a->strings["This entry was edited"] = "";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => "%d reactie",
        1 => "%d reacties",
-);
+];
 $a->strings["Private Message"] = "Privébericht";
 $a->strings["I like this (toggle)"] = "Vind ik leuk";
 $a->strings["like"] = "leuk";
@@ -1687,14 +1687,14 @@ $a->strings["Mark success (if update was manually applied)"] = "Markeren als suc
 $a->strings["Attempt to execute this update step automatically"] = "Probeer deze stap automatisch uit te voeren";
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "%s gebruiker geblokkeerd/niet geblokkeerd",
        1 => "%s gebruikers geblokkeerd/niet geblokkeerd",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => "%s gebruiker verwijderd",
        1 => "%s gebruikers verwijderd",
-);
+];
 $a->strings["User '%s' deleted"] = "Gebruiker '%s' verwijderd";
 $a->strings["User '%s' unblocked"] = "Gebruiker '%s' niet meer geblokkeerd";
 $a->strings["User '%s' blocked"] = "Gebruiker '%s' geblokkeerd";
@@ -1748,10 +1748,10 @@ $a->strings["PHP logging"] = "";
 $a->strings["To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."] = "";
 $a->strings["Lock feature %s"] = "";
 $a->strings["Manage Additional Features"] = "";
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Could not access contact record."] = "Kon geen toegang krijgen tot de contactgegevens";
 $a->strings["Could not locate selected profile."] = "Kon het geselecteerde profiel niet vinden.";
 $a->strings["Contact updated."] = "Contact bijgewerkt.";
@@ -1848,10 +1848,10 @@ $a->strings["This introduction has already been accepted."] = "Verzoek is al goe
 $a->strings["Profile location is not valid or does not contain profile information."] = "Profiel is ongeldig of bevat geen informatie";
 $a->strings["Warning: profile location has no identifiable owner name."] = "Waarschuwing: de profiellocatie heeft geen identificeerbare eigenaar.";
 $a->strings["Warning: profile location has no profile photo."] = "Waarschuwing: Profieladres heeft geen profielfoto.";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "De %d vereiste parameter is niet op het gegeven adres gevonden",
        1 => "De %d vereiste parameters zijn niet op het gegeven adres gevonden",
-);
+];
 $a->strings["Introduction complete."] = "Verzoek voltooid.";
 $a->strings["Unrecoverable protocol error."] = "Onherstelbare protocolfout. ";
 $a->strings["Profile unavailable."] = "Profiel onbeschikbaar";
@@ -1971,10 +1971,10 @@ $a->strings["This message was sent to you by %s, a member of the Friendica socia
 $a->strings["You may visit them online at %s"] = "Je kunt ze online bezoeken op %s";
 $a->strings["Please contact the sender by replying to this post if you do not wish to receive these messages."] = "Contacteer de afzender door op dit bericht te antwoorden als je deze berichten niet wilt ontvangen.";
 $a->strings["%s posted an update."] = "%s heeft een wijziging geplaatst.";
-$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = array(
+$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Messages in this group won't be send to these receivers."] = "";
 $a->strings["Private messages to this person are at risk of public disclosure."] = "Privéberichten naar deze persoon kunnen openbaar gemaakt worden.";
 $a->strings["Invalid contact."] = "Ongeldig contact.";
index ff8d8f0152d250842a60900a05432ca1554e0eab..0f8cde6968dc7f3b54f453657039412e5a3679e0 100644 (file)
@@ -9,11 +9,11 @@ $a->strings["Add New Contact"] = "Dodaj nowy kontakt";
 $a->strings["Enter address or web location"] = "Wpisz adres lub lokalizację sieciową";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "Przykład: bob@przykład.com, http://przykład.com/barbara";
 $a->strings["Connect"] = "Połącz";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "%d zaproszenie dostępne",
        1 => "%d zaproszeń dostępnych",
        2 => "%d zaproszenia dostępne",
-);
+];
 $a->strings["Find People"] = "Znajdź ludzi";
 $a->strings["Enter name or interest"] = "Wpisz nazwę lub zainteresowanie";
 $a->strings["Connect/Follow"] = "Połącz/Obserwuj";
@@ -28,11 +28,11 @@ $a->strings["All Networks"] = "Wszystkie Sieci";
 $a->strings["Saved Folders"] = "Zapisane foldery";
 $a->strings["Everything"] = "Wszystko";
 $a->strings["Categories"] = "Kategorie";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "",
        1 => "",
        2 => "",
-);
+];
 $a->strings["show more"] = "Pokaż więcej";
 $a->strings["Forums"] = "";
 $a->strings["External link to forum"] = "";
@@ -49,11 +49,11 @@ $a->strings["Hermaphrodite"] = "Hermafrodyta";
 $a->strings["Neuter"] = "Bezpłciowy";
 $a->strings["Non-specific"] = "Niespecyficzne";
 $a->strings["Other"] = "Inne";
-$a->strings["Undecided"] = array(
+$a->strings["Undecided"] = [
        0 => "",
        1 => "",
        2 => "",
-);
+];
 $a->strings["Males"] = "Mężczyźni";
 $a->strings["Females"] = "Kobiety";
 $a->strings["Gay"] = "Gej";
@@ -172,11 +172,11 @@ $a->strings["Error! Cannot check nickname"] = "";
 $a->strings["User '%s' already exists on this server!"] = "Użytkownik '%s' już istnieje na tym serwerze!";
 $a->strings["User creation error"] = "";
 $a->strings["User profile creation error"] = "";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "Nie zaimportowano %d kontaktu.",
        1 => "Nie zaimportowano %d kontaktów.",
        2 => "Nie zaimportowano %d kontaktów.",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "Wykonano. Teraz możesz się zalogować z użyciem loginu i hasła.";
 $a->strings["Miscellaneous"] = "Różny";
 $a->strings["Birthday:"] = "Urodziny:";
@@ -436,11 +436,11 @@ $a->strings["post/item"] = "";
 $a->strings["%1\$s marked %2\$s's %3\$s as favorite"] = "";
 $a->strings["Likes"] = "Polubień";
 $a->strings["Dislikes"] = "Nie lubień";
-$a->strings["Attending"] = array(
+$a->strings["Attending"] = [
        0 => "",
        1 => "",
        2 => "",
-);
+];
 $a->strings["Not attending"] = "";
 $a->strings["Might attend"] = "";
 $a->strings["Select"] = "Wybierz";
@@ -507,21 +507,21 @@ $a->strings["Private post"] = "Prywatne posty";
 $a->strings["Message"] = "Wiadomość";
 $a->strings["Browser"] = "";
 $a->strings["View all"] = "";
-$a->strings["Like"] = array(
+$a->strings["Like"] = [
        0 => "",
        1 => "",
        2 => "",
-);
-$a->strings["Dislike"] = array(
+];
+$a->strings["Dislike"] = [
        0 => "",
        1 => "",
        2 => "",
-);
-$a->strings["Not Attending"] = array(
+];
+$a->strings["Not Attending"] = [
        0 => "",
        1 => "",
        2 => "",
-);
+];
 $a->strings["%s\\'s birthday"] = "";
 $a->strings["General Features"] = "";
 $a->strings["Multiple Profiles"] = "";
@@ -659,11 +659,11 @@ $a->strings["next"] = "następny";
 $a->strings["Loading more entries..."] = "";
 $a->strings["The end"] = "";
 $a->strings["No contacts"] = "Brak kontaktów";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "%d kontakt",
        1 => "%d kontaktów",
        2 => "%d kontakty",
-);
+];
 $a->strings["View Contacts"] = "widok kontaktów";
 $a->strings["Save"] = "Zapisz";
 $a->strings["poke"] = "zaczep";
@@ -704,11 +704,11 @@ $a->strings["Click to open/close"] = "Kliknij aby otworzyć/zamknąć";
 $a->strings["View on separate page"] = "";
 $a->strings["view on separate page"] = "";
 $a->strings["activity"] = "aktywność";
-$a->strings["comment"] = array(
+$a->strings["comment"] = [
        0 => "",
        1 => "",
        2 => "komentarz",
-);
+];
 $a->strings["post"] = "post";
 $a->strings["Item filed"] = "";
 $a->strings["Passwords do not match. Password unchanged."] = "Hasło nie pasuje. Hasło nie zmienione.";
@@ -804,11 +804,11 @@ $a->strings["%s : Not a valid email address."] = "%s : Niepoprawny adres email."
 $a->strings["Please join us on Friendica"] = "Dołącz do nas na Friendica";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "";
 $a->strings["%s : Message delivery failed."] = "%s : Dostarczenie wiadomości nieudane.";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "%d wiadomość wysłana.",
        1 => "%d wiadomości wysłane.",
        2 => "%d wysłano .",
-);
+];
 $a->strings["You have no more invitations available"] = "Nie masz więcej zaproszeń";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "";
@@ -960,11 +960,11 @@ $a->strings["Unknown sender - %s"] = "Nieznany wysyłający - %s";
 $a->strings["You and %s"] = "Ty i %s";
 $a->strings["%s and You"] = "%s i ty";
 $a->strings["D, d M Y - g:i A"] = "D, d M R - g:m AM/PM";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => " %d wiadomość",
        1 => " %d wiadomości",
        2 => " %d wiadomości",
-);
+];
 $a->strings["Manage Identities and/or Pages"] = "Zarządzaj Tożsamościami i/lub Stronami.";
 $a->strings["Toggle between different identities or community/group pages which share your account details or which you have been granted \"manage\" permissions"] = "";
 $a->strings["Select an identity to manage: "] = "Wybierz tożsamość do zarządzania:";
@@ -993,11 +993,11 @@ $a->strings["New photo from this URL"] = "Nowe zdjęcie z tej ścieżki";
 $a->strings["No such group"] = "Nie ma takiej grupy";
 $a->strings["Group: %s"] = "";
 $a->strings["This entry was edited"] = "Ten wpis został zedytowany";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => " %d komentarz",
        1 => " %d komentarzy",
        2 => " %d komentarzy",
-);
+];
 $a->strings["Private Message"] = "Wiadomość prywatna";
 $a->strings["I like this (toggle)"] = "Lubię to (zmień)";
 $a->strings["like"] = "polub";
@@ -1700,16 +1700,16 @@ $a->strings["Mark success (if update was manually applied)"] = "";
 $a->strings["Attempt to execute this update step automatically"] = "";
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "",
        1 => "",
        2 => "",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => " %s użytkownik usunięty",
        1 => " %s użytkownicy usunięci",
        2 => " %s usuniętych użytkowników ",
-);
+];
 $a->strings["User '%s' deleted"] = "Użytkownik '%s' usunięty";
 $a->strings["User '%s' unblocked"] = "Użytkownik '%s' odblokowany";
 $a->strings["User '%s' blocked"] = "Użytkownik '%s' zablokowany";
@@ -1763,11 +1763,11 @@ $a->strings["PHP logging"] = "";
 $a->strings["To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."] = "";
 $a->strings["Lock feature %s"] = "";
 $a->strings["Manage Additional Features"] = "";
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "",
        1 => "",
        2 => "",
-);
+];
 $a->strings["Could not access contact record."] = "Nie można uzyskać dostępu do rejestru kontaktów.";
 $a->strings["Could not locate selected profile."] = "Nie można znaleźć wybranego profilu.";
 $a->strings["Contact updated."] = "Kontakt zaktualizowany";
@@ -1864,11 +1864,11 @@ $a->strings["This introduction has already been accepted."] = "To wprowadzenie z
 $a->strings["Profile location is not valid or does not contain profile information."] = "Położenie profilu jest niepoprawne lub nie zawiera żadnych informacji.";
 $a->strings["Warning: profile location has no identifiable owner name."] = "Ostrzeżenie: położenie profilu ma taką samą nazwę jak użytkownik.";
 $a->strings["Warning: profile location has no profile photo."] = "Ostrzeżenie: położenie profilu nie zawiera zdjęcia.";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "%d wymagany parametr nie został znaleziony w podanej lokacji",
        1 => "%d wymagane parametry nie zostały znalezione w podanej lokacji",
        2 => "%d wymagany parametr nie został znaleziony w podanej lokacji",
-);
+];
 $a->strings["Introduction complete."] = "wprowadzanie zakończone.";
 $a->strings["Unrecoverable protocol error."] = "Nieodwracalny błąd protokołu.";
 $a->strings["Profile unavailable."] = "Profil niedostępny.";
@@ -1988,11 +1988,11 @@ $a->strings["This message was sent to you by %s, a member of the Friendica socia
 $a->strings["You may visit them online at %s"] = "Możesz ich odwiedzić online u %s";
 $a->strings["Please contact the sender by replying to this post if you do not wish to receive these messages."] = "Skontaktuj się z nadawcą odpowiadając na ten post jeśli nie chcesz otrzymywać tych wiadomości.";
 $a->strings["%s posted an update."] = "%s zaktualizował wpis.";
-$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = array(
+$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = [
        0 => "",
        1 => "",
        2 => "",
-);
+];
 $a->strings["Messages in this group won't be send to these receivers."] = "";
 $a->strings["Private messages to this person are at risk of public disclosure."] = "Prywatne wiadomości do tej osoby mogą zostać publicznie ujawnione ";
 $a->strings["Invalid contact."] = "Zły kontakt";
index b2f9aa4e8ceaba7d462260f03148de40b135b8f4..1c3d47bc0364c07d681fe8b04f8353017354912f 100644 (file)
@@ -90,10 +90,10 @@ $a->strings["Hermaphrodite"] = "Hermafrodita";
 $a->strings["Neuter"] = "Neutro";
 $a->strings["Non-specific"] = "Não específico";
 $a->strings["Other"] = "Outro";
-$a->strings["Undecided"] = array(
+$a->strings["Undecided"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Males"] = "Homens";
 $a->strings["Females"] = "Mulheres";
 $a->strings["Gay"] = "Gays";
@@ -226,10 +226,10 @@ $a->strings["Add New Contact"] = "Adicionar Contato Novo";
 $a->strings["Enter address or web location"] = "Forneça endereço ou localização web";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "Por exemplo: joao@exemplo.com, http://exemplo.com/maria";
 $a->strings["Connect"] = "Conectar";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "%d convite disponível",
        1 => "%d convites disponíveis",
-);
+];
 $a->strings["Find People"] = "Pesquisar por pessoas";
 $a->strings["Enter name or interest"] = "Fornecer nome ou interesse";
 $a->strings["Connect/Follow"] = "Conectar-se/acompanhar";
@@ -244,10 +244,10 @@ $a->strings["Networks"] = "Redes";
 $a->strings["All Networks"] = "Todas as redes";
 $a->strings["Everything"] = "Tudo";
 $a->strings["Categories"] = "Categorias";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "%d contato em comum",
        1 => "%d contatos em comum",
-);
+];
 $a->strings["event"] = "evento";
 $a->strings["status"] = "status";
 $a->strings["photo"] = "foto";
@@ -264,10 +264,10 @@ $a->strings["post/item"] = "postagem/item";
 $a->strings["%1\$s marked %2\$s's %3\$s as favorite"] = "%1\$s marcou %3\$s de %2\$s como favorito";
 $a->strings["Likes"] = "Gosta de";
 $a->strings["Dislikes"] = "Não gosta de";
-$a->strings["Attending"] = array(
+$a->strings["Attending"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Not attending"] = "";
 $a->strings["Might attend"] = "";
 $a->strings["Select"] = "Selecionar";
@@ -341,18 +341,18 @@ $a->strings["Private post"] = "Publicação privada";
 $a->strings["Message"] = "Mensagem";
 $a->strings["Browser"] = "Navegador";
 $a->strings["View all"] = "";
-$a->strings["Like"] = array(
+$a->strings["Like"] = [
        0 => "Curtida",
        1 => "Curtidas",
-);
-$a->strings["Dislike"] = array(
+];
+$a->strings["Dislike"] = [
        0 => "Não curtiu",
        1 => "Não curtiram",
-);
-$a->strings["Not Attending"] = array(
+];
+$a->strings["Not Attending"] = [
        0 => "Não vai",
        1 => "Não vão",
-);
+];
 $a->strings["There are no tables on MyISAM."] = "";
 $a->strings["\n\t\t\tThe friendica developers released update %s recently,\n\t\t\tbut when I tried to install it, something went terribly wrong.\n\t\t\tThis needs to be fixed soon and I can't do it alone. Please contact a\n\t\t\tfriendica developer if you can not help me on your own. My database might be invalid."] = "\n\t\t\tOs desenvolvedores de Friendica lançaram recentemente uma atualização %s,\n\t\t\tmas quando tentei instalá-la, algo deu terrivelmente errado.\n\t\t\tIsso precisa ser corrigido em breve e eu não posso fazer isso sozinho. Por favor, contate um\n\t\t\tdesenvolvedor da Friendica se você não pode me ajudar sozinho. Meu banco de dados pode ser inválido.";
 $a->strings["The error message is\n[pre]%s[/pre]"] = "A mensagem de erro é\n[pre]%s[/pre]";
@@ -607,10 +607,10 @@ $a->strings["last"] = "último";
 $a->strings["Loading more entries..."] = "Baixando mais entradas...";
 $a->strings["The end"] = "Fim";
 $a->strings["No contacts"] = "Nenhum contato";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "%d contato",
        1 => "%d contatos",
-);
+];
 $a->strings["View Contacts"] = "Ver contatos";
 $a->strings["Save"] = "Salvar";
 $a->strings["poke"] = "cutucar";
@@ -651,10 +651,10 @@ $a->strings["Click to open/close"] = "Clique para abrir/fechar";
 $a->strings["View on separate page"] = "Ver em uma página separada";
 $a->strings["view on separate page"] = "ver em uma página separada";
 $a->strings["activity"] = "atividade";
-$a->strings["comment"] = array(
+$a->strings["comment"] = [
        0 => "comentário",
        1 => "comentários",
-);
+];
 $a->strings["post"] = "publicação";
 $a->strings["Item filed"] = "O item foi arquivado";
 $a->strings["Error decoding account file"] = "Erro ao decodificar arquivo de conta";
@@ -663,10 +663,10 @@ $a->strings["Error! Cannot check nickname"] = "Erro! Não consigo conferir o ape
 $a->strings["User '%s' already exists on this server!"] = "User '%s' já existe nesse servidor!";
 $a->strings["User creation error"] = "Erro na criação do usuário";
 $a->strings["User profile creation error"] = "Erro na criação do perfil do Usuário";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "%d contato não foi importado",
        1 => "%d contatos não foram importados",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "Feito. Você agora pode entrar com seu nome de usuário e senha.";
 $a->strings["Passwords do not match. Password unchanged."] = "As senhas não correspondem. A senha não foi modificada.";
 $a->strings["An invitation is required."] = "É necessário um convite.";
@@ -855,10 +855,10 @@ $a->strings["No such group"] = "Este grupo não existe";
 $a->strings["Group is empty"] = "O grupo está vazio";
 $a->strings["Group: %s"] = "Grupo: %s";
 $a->strings["This entry was edited"] = "Essa entrada foi editada";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => "%d comentário",
        1 => "%d comentários",
-);
+];
 $a->strings["Private Message"] = "Mensagem privada";
 $a->strings["I like this (toggle)"] = "Eu gostei disso (alternar)";
 $a->strings["like"] = "gostei";
@@ -916,10 +916,10 @@ $a->strings["This introduction has already been accepted."] = "Esta apresentaç
 $a->strings["Profile location is not valid or does not contain profile information."] = "A localização do perfil não é válida ou não contém uma informação de perfil.";
 $a->strings["Warning: profile location has no identifiable owner name."] = "Aviso: a localização do perfil não possui nenhum nome identificável do seu dono.";
 $a->strings["Warning: profile location has no profile photo."] = "Aviso: a localização do perfil não possui nenhuma foto do perfil.";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "O parâmetro requerido %d não foi encontrado na localização fornecida",
        1 => "Os parâmetros requeridos %d não foram encontrados na localização fornecida",
-);
+];
 $a->strings["Introduction complete."] = "A apresentação foi finalizada.";
 $a->strings["Unrecoverable protocol error."] = "Ocorreu um erro irrecuperável de protocolo.";
 $a->strings["Profile unavailable."] = "O perfil não está disponível.";
@@ -1091,10 +1091,10 @@ $a->strings["%s : Not a valid email address."] = "%s : Não é um endereço de e
 $a->strings["Please join us on Friendica"] = "Por favor, junte-se à nós na Friendica";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "Limite de convites ultrapassado. Favor contactar o administrador do sítio.";
 $a->strings["%s : Message delivery failed."] = "%s : Não foi possível enviar a mensagem.";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "%d mensagem enviada.",
        1 => "%d mensagens enviadas.",
-);
+];
 $a->strings["You have no more invitations available"] = "Você não possui mais convites disponíveis";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "Visite %s para obter uma lista de sites públicos onde você pode se cadastrar. Membros da friendica podem se conectar, mesmo que estejam em sites separados. Além disso você também pode se conectar com membros de várias outras redes sociais.";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "Para aceitar esse convite, por favor cadastre-se em %s ou qualquer outro site friendica público.";
@@ -1168,17 +1168,17 @@ $a->strings["Unknown sender - %s"] = "Remetente desconhecido - %s";
 $a->strings["You and %s"] = "Você e %s";
 $a->strings["%s and You"] = "%s e você";
 $a->strings["D, d M Y - g:i A"] = "D, d M Y - g:i A";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => "%d mensagem",
        1 => "%d mensagens",
-);
+];
 $a->strings["Mood"] = "Humor";
 $a->strings["Set your current mood and tell your friends"] = "Defina o seu humor e conte aos seus amigos";
 $a->strings["Remove term"] = "Remover o termo";
-$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = array(
+$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Messages in this group won't be send to these receivers."] = "";
 $a->strings["Private messages to this person are at risk of public disclosure."] = "Mensagens privadas para esta pessoa correm o risco de sofrerem divulgação pública.";
 $a->strings["Invalid contact."] = "Contato inválido.";
@@ -1874,14 +1874,14 @@ $a->strings["Mark success (if update was manually applied)"] = "Marcar como bem
 $a->strings["Attempt to execute this update step automatically"] = "Tentar executar esse passo da atualização automaticamente";
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "\n\t\t\tCaro %1\$s,\n\t\t\t\to administrador de %2\$s criou uma conta para você.";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "\n\t\t\tOs dados de login são os seguintes:\n\n\t\t\tLocal do Site:\t%1\$s\n\t\t\tNome de Login:\t\t%2\$s\n\t\t\tSenha:\t\t%3\$s\n\n\t\t\tVocê pode alterar sua senha na página de \"Configurações\" da sua conta após fazer o login.\n\n\t\t\tPor favor, dedique alguns minutos na página para rever as outras configurações da sua conta.\n\n\t\t\tTalvez você também queira incluir algumas informações básicas adicionais ao seu perfil padrão\n\t\t\t(na página de \"Perfis\") para que outras pessoas possam encontrá-lo com facilidade.\n\n\t\t\tRecomendamos que inclua seu nome completo, adicione uma foto do perfil,\n\t\t\tadicionar algumas \"palavras-chave\" (muito útil para fazer novas amizades) - e\n\t\t\ttalvez em que pais você mora; se você não quiser ser mais específico\n\t\t\tdo que isso.\n\n\t\t\tNós respeitamos plenamente seu direito à privacidade, e nenhum desses itens são necessários.\n\t\t\tSe você é novo por aqui e não conheço ninguém, eles podem ajuda-lo\n\t\t\ta fazer novas e interessantes amizades.\n\n\t\t\tObrigado e bem-vindo a %4\$s.";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "%s usuário bloqueado/desbloqueado",
        1 => "%s usuários bloqueados/desbloqueados",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => "%s usuário excluído",
        1 => "%s usuários excluídos",
-);
+];
 $a->strings["User '%s' deleted"] = "O usuário '%s' foi excluído";
 $a->strings["User '%s' unblocked"] = "O usuário '%s' foi desbloqueado";
 $a->strings["User '%s' blocked"] = "O usuário '%s' foi bloqueado";
@@ -1935,10 +1935,10 @@ $a->strings["PHP logging"] = "";
 $a->strings["To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."] = "";
 $a->strings["Lock feature %s"] = "Bloquear funcionalidade %s";
 $a->strings["Manage Additional Features"] = "Gerenciar funcionalidades adicionais";
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Could not access contact record."] = "Não foi possível acessar o registro do contato.";
 $a->strings["Could not locate selected profile."] = "Não foi possível localizar o perfil selecionado.";
 $a->strings["Contact updated."] = "O contato foi atualizado.";
index 7535687168c8f874f4afcfd80a304fd6f75e056a..fcbbfa5d12ee7de644423134ee5d088dde537785 100644 (file)
@@ -5,11 +5,11 @@ function string_plural_select_ro($n){
        return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));;
 }}
 ;
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "%d contact editat.",
        1 => "%d contacte editate.",
        2 => "%d de contacte editate.",
-);
+];
 $a->strings["Could not access contact record."] = "Nu se poate accesa registrul contactului.";
 $a->strings["Could not locate selected profile."] = "Nu se poate localiza profilul selectat.";
 $a->strings["Contact updated."] = "Contact actualizat.";
@@ -34,11 +34,11 @@ $a->strings["(Update was successful)"] = "(Actualizare a reuşit)";
 $a->strings["(Update was not successful)"] = "(Actualizare nu a reuşit)";
 $a->strings["Suggest friends"] = "Sugeraţi prieteni";
 $a->strings["Network type: %s"] = "Tipul rețelei: %s";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "%d contact în comun",
        1 => "%d contacte în comun",
        2 => "%d de contacte în comun",
-);
+];
 $a->strings["View all contacts"] = "Vezi toate contactele";
 $a->strings["Unblock"] = "Deblochează";
 $a->strings["Block"] = "Blochează";
@@ -353,11 +353,11 @@ $a->strings["You and %s"] = "Tu şi  %s";
 $a->strings["%s and You"] = "%s şi dvs";
 $a->strings["Delete conversation"] = "Ștergeți conversaţia";
 $a->strings["D, d M Y - g:i A"] = "D, d M Y - g:i A";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => "%d mesaj",
        1 => "%d mesaje",
        2 => "%d mesaje",
-);
+];
 $a->strings["Message not available."] = "Mesaj nedisponibil";
 $a->strings["Delete message"] = "Şterge mesaj";
 $a->strings["No secure communications available. You <strong>may</strong> be able to respond from the sender's profile page."] = "Nici-o comunicaţie securizată disponibilă. <strong>Veți putea</strong> răspunde din pagina de profil a expeditorului.";
@@ -570,16 +570,16 @@ $a->strings["Attempt to execute this update step automatically"] = "Se încearc
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "";
 $a->strings["Registration details for %s"] = "Detaliile de înregistrare pentru %s";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "%s utilizator blocat/deblocat",
        1 => "%s utilizatori blocați/deblocați",
        2 => "%s de utilizatori blocați/deblocați",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => "%s utilizator şters",
        1 => "%s utilizatori şterşi",
        2 => "%s utilizatori şterşi",
-);
+];
 $a->strings["User '%s' deleted"] = "Utilizator %s şters";
 $a->strings["User '%s' unblocked"] = "Utilizator %s deblocat";
 $a->strings["User '%s' blocked"] = "Utilizator %s blocat";
@@ -642,11 +642,11 @@ $a->strings["Shared Links"] = "Linkuri partajate";
 $a->strings["Interesting Links"] = "Legături Interesante";
 $a->strings["Starred"] = "Cu steluță";
 $a->strings["Favourite Posts"] = "Postări Favorite";
-$a->strings["Warning: This group contains %s member from an insecure network."] = array(
+$a->strings["Warning: This group contains %s member from an insecure network."] = [
        0 => "Atenție: Acest grup conţine %s membru dintr-o reţea nesigură.",
        1 => "Atenție: Acest grup conţine %s membrii dintr-o reţea nesigură.",
        2 => "Atenție: Acest grup conţine %s de membrii dintr-o reţea nesigură.",
-);
+];
 $a->strings["Private messages to this group are at risk of public disclosure."] = "Mesajele private către acest grup sunt supuse riscului de divulgare publică.";
 $a->strings["No such group"] = "Membrii";
 $a->strings["Group is empty"] = "Grupul este gol";
@@ -680,16 +680,16 @@ $a->strings["Select"] = "Select";
 $a->strings["View %s's profile @ %s"] = "Vizualizaţi profilul %s @ %s";
 $a->strings["%s from %s"] = "%s de la %s";
 $a->strings["View in context"] = "Vizualizare în context";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => "%d comentariu",
        1 => "%d comentarii",
        2 => "%d comentarii",
-);
-$a->strings["comment"] = array(
+];
+$a->strings["comment"] = [
        0 => "comentariu",
        1 => "comentarii",
        2 => "comentarii",
-);
+];
 $a->strings["show more"] = "mai mult";
 $a->strings["Private Message"] = " Mesaj Privat";
 $a->strings["I like this (toggle)"] = "I like asta (toggle)";
@@ -964,11 +964,11 @@ $a->strings["This introduction has already been accepted."] = "Această introduc
 $a->strings["Profile location is not valid or does not contain profile information."] = "Locaţia profilului nu este validă sau nu conţine informaţii de profil.";
 $a->strings["Warning: profile location has no identifiable owner name."] = "Atenţie: locaţia profilului nu are un nume de deţinător identificabil.";
 $a->strings["Warning: profile location has no profile photo."] = "Atenţie: locaţia profilului nu are fotografie de profil.";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "%d parametru necesar nu a fost găsit în locaţia specificată",
        1 => "%d parametrii necesari nu au fost găsiţi în locaţia specificată",
        2 => "%d de parametrii necesari nu au fost găsiţi în locaţia specificată",
-);
+];
 $a->strings["Introduction complete."] = "Prezentare completă.";
 $a->strings["Unrecoverable protocol error."] = "Eroare de protocol nerecuperabilă.";
 $a->strings["Profile unavailable."] = "Profil nedisponibil.";
@@ -1184,11 +1184,11 @@ $a->strings["%s : Not a valid email address."] = "%s : Nu este o adresă vaildă
 $a->strings["Please join us on Friendica"] = "Vă rugăm să veniți alături de noi pe Friendica";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "Limita invitațiilor a fost depăşită. Vă rugăm să vă contactați administratorul de sistem.";
 $a->strings["%s : Message delivery failed."] = "%s : Livrarea mesajului a eşuat.";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "%d mesaj trimis.",
        1 => "%d mesaje trimise.",
        2 => "%d de mesaje trimise.",
-);
+];
 $a->strings["You have no more invitations available"] = "Nu mai aveți invitaţii disponibile";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "Vizitaţi %s pentru o lista de site-uri publice la care puteţi alătura. Membrii Friendica de pe alte site-uri se pot conecta cu toții între ei, precum şi cu membri ai multor alte reţele sociale.";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "Pentru a accepta această invitaţie, vă rugăm să vizitaţi şi să vă înregistraţi pe %s sau orice alt site public Friendica.";
@@ -1307,11 +1307,11 @@ $a->strings["The error message was:"] = "Mesajul de eroare a fost:";
 $a->strings["Add New Contact"] = "Add Contact Nou";
 $a->strings["Enter address or web location"] = "Introduceţi adresa sau locaţia web";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "Exemplu: bob@example.com, http://example.com/barbara";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "%d invitație disponibilă",
        1 => "%d invitații disponibile",
        2 => "%d de invitații disponibile",
-);
+];
 $a->strings["Find People"] = "Căutați Persoane";
 $a->strings["Enter name or interest"] = "Introduceţi numele sau interesul";
 $a->strings["Connect/Follow"] = "Conectare/Urmărire";
@@ -1457,11 +1457,11 @@ $a->strings["first"] = "prima";
 $a->strings["last"] = "ultima";
 $a->strings["next"] = "următor";
 $a->strings["No contacts"] = "Nici-un contact";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "%d Contact",
        1 => "%d Contacte",
        2 => "%d de Contacte",
-);
+];
 $a->strings["poke"] = "abordare";
 $a->strings["ping"] = "ping";
 $a->strings["pinged"] = "i s-a trimis ping";
@@ -1762,11 +1762,11 @@ $a->strings["Error! Cannot check nickname"] = "Eroare! Nu pot verifica pseudonim
 $a->strings["User '%s' already exists on this server!"] = "Utilizatorul '%s' există deja pe acest server!";
 $a->strings["User creation error"] = "Eroare la crearea utilizatorului";
 $a->strings["User profile creation error"] = "Eroare la crearea profilului utilizatorului";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "%d contact neimportat",
        1 => "%d contacte neimportate",
        2 => "%d de contacte neimportate",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "Realizat. Vă puteţi conecta acum cu parola şi numele dumneavoastră de utilizator";
 $a->strings["toggle mobile"] = "comutare mobil";
 $a->strings["Theme settings"] = "Configurări Temă";
index de415430d790220b2c88fd8d290335b34b2ba792..9a495167316f7972630abaa5aa9f364826271aee 100644 (file)
@@ -117,12 +117,12 @@ $a->strings["Hermaphrodite"] = "Гермафродит";
 $a->strings["Neuter"] = "Средний род";
 $a->strings["Non-specific"] = "Не определен";
 $a->strings["Other"] = "Другой";
-$a->strings["Undecided"] = array(
+$a->strings["Undecided"] = [
        0 => "",
        1 => "",
        2 => "",
        3 => "",
-);
+];
 $a->strings["Males"] = "Мужчины";
 $a->strings["Females"] = "Женщины";
 $a->strings["Gay"] = "Гей";
@@ -177,12 +177,12 @@ $a->strings["Error! Cannot check nickname"] = "Ошибка! Невозможн
 $a->strings["User '%s' already exists on this server!"] = "Пользователь '%s' уже существует на этом сервере!";
 $a->strings["User creation error"] = "Ошибка создания пользователя";
 $a->strings["User profile creation error"] = "Ошибка создания профиля пользователя";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "%d контакт не импортирован",
        1 => "%d контакты не импортированы",
        2 => "%d контакты не импортированы",
        3 => "%d контакты не импортированы",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "Завершено. Теперь вы можете войти с вашим логином и паролем";
 $a->strings["View Profile"] = "Просмотреть профиль";
 $a->strings["Connect/Follow"] = "Подключиться/Следовать";
@@ -256,12 +256,12 @@ $a->strings["Add New Contact"] = "Добавить контакт";
 $a->strings["Enter address or web location"] = "Введите адрес или веб-местонахождение";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "Пример: bob@example.com, http://example.com/barbara";
 $a->strings["Connect"] = "Подключить";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "%d приглашение доступно",
        1 => "%d приглашений доступно",
        2 => "%d приглашений доступно",
        3 => "%d приглашений доступно",
-);
+];
 $a->strings["Find People"] = "Поиск людей";
 $a->strings["Enter name or interest"] = "Введите имя или интерес";
 $a->strings["Examples: Robert Morgenstein, Fishing"] = "Примеры: Роберт Morgenstein, Рыбалка";
@@ -275,12 +275,12 @@ $a->strings["All Networks"] = "Все сети";
 $a->strings["Saved Folders"] = "Сохранённые папки";
 $a->strings["Everything"] = "Всё";
 $a->strings["Categories"] = "Категории";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "%d Контакт",
        1 => "%d Контактов",
        2 => "%d Контактов",
        3 => "%d Контактов",
-);
+];
 $a->strings["%1\$s attends %2\$s's %3\$s"] = "%1\$s уделил внимание %2\$s's %3\$s";
 $a->strings["%1\$s doesn't attend %2\$s's %3\$s"] = "";
 $a->strings["%1\$s attends maybe %2\$s's %3\$s"] = "";
@@ -292,12 +292,12 @@ $a->strings["post/item"] = "пост/элемент";
 $a->strings["%1\$s marked %2\$s's %3\$s as favorite"] = "%1\$s пометил %2\$s %3\$s как Фаворит";
 $a->strings["Likes"] = "Лайки";
 $a->strings["Dislikes"] = "Не нравится";
-$a->strings["Attending"] = array(
+$a->strings["Attending"] = [
        0 => "",
        1 => "",
        2 => "",
        3 => "",
-);
+];
 $a->strings["Not attending"] = "";
 $a->strings["Might attend"] = "";
 $a->strings["Select"] = "Выберите";
@@ -364,24 +364,24 @@ $a->strings["Private post"] = "Личное сообщение";
 $a->strings["Message"] = "Сообщение";
 $a->strings["Browser"] = "Браузер";
 $a->strings["View all"] = "Посмотреть все";
-$a->strings["Like"] = array(
+$a->strings["Like"] = [
        0 => "Нравится",
        1 => "Нравится",
        2 => "Нравится",
        3 => "Нравится",
-);
-$a->strings["Dislike"] = array(
+];
+$a->strings["Dislike"] = [
        0 => "Не нравится",
        1 => "Не нравится",
        2 => "Не нравится",
        3 => "Не нравится",
-);
-$a->strings["Not Attending"] = array(
+];
+$a->strings["Not Attending"] = [
        0 => "",
        1 => "",
        2 => "",
        3 => "",
-);
+];
 $a->strings["Miscellaneous"] = "Разное";
 $a->strings["Birthday:"] = "День рождения:";
 $a->strings["Age: "] = "Возраст: ";
@@ -694,12 +694,12 @@ $a->strings["last"] = "последний";
 $a->strings["Loading more entries..."] = "Загружаю больше сообщений...";
 $a->strings["The end"] = "Конец";
 $a->strings["No contacts"] = "Нет контактов";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "%d контакт",
        1 => "%d контактов",
        2 => "%d контактов",
        3 => "%d контактов",
-);
+];
 $a->strings["View Contacts"] = "Просмотр контактов";
 $a->strings["Save"] = "Сохранить";
 $a->strings["poke"] = "poke";
@@ -740,12 +740,12 @@ $a->strings["Click to open/close"] = "Нажмите, чтобы открыть
 $a->strings["View on separate page"] = "";
 $a->strings["view on separate page"] = "";
 $a->strings["activity"] = "активность";
-$a->strings["comment"] = array(
+$a->strings["comment"] = [
        0 => "",
        1 => "",
        2 => "комментарий",
        3 => "комментарий",
-);
+];
 $a->strings["post"] = "сообщение";
 $a->strings["Item filed"] = "";
 $a->strings["No friends to display."] = "Нет друзей.";
@@ -762,12 +762,12 @@ $a->strings["Item was not found."] = "Пункт не был найден.";
 $a->strings["The post was created"] = "Пост был создан";
 $a->strings["No contacts in common."] = "Нет общих контактов.";
 $a->strings["Common Friends"] = "Общие друзья";
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "",
        1 => "",
        2 => "",
        3 => "",
-);
+];
 $a->strings["Could not access contact record."] = "Не удалось получить доступ к записи контакта.";
 $a->strings["Could not locate selected profile."] = "Не удалось найти выбранный профиль.";
 $a->strings["Contact updated."] = "Контакт обновлен.";
@@ -860,12 +860,12 @@ $a->strings["No such group"] = "Нет такой группы";
 $a->strings["Group is empty"] = "Группа пуста";
 $a->strings["Group: %s"] = "Группа: %s";
 $a->strings["This entry was edited"] = "Эта запись была отредактирована";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => "%d комментарий",
        1 => "%d комментариев",
        2 => "%d комментариев",
        3 => "%d комментариев",
-);
+];
 $a->strings["Private Message"] = "Личное сообщение";
 $a->strings["I like this (toggle)"] = "Нравится";
 $a->strings["like"] = "нравится";
@@ -958,12 +958,12 @@ $a->strings["%s : Not a valid email address."] = "%s: Неверный адре
 $a->strings["Please join us on Friendica"] = "Пожалуйста, присоединяйтесь к нам на Friendica";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "Лимит приглашений превышен. Пожалуйста, свяжитесь с администратором сайта.";
 $a->strings["%s : Message delivery failed."] = "%s: Доставка сообщения не удалась.";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "%d сообщение отправлено.",
        1 => "%d сообщений отправлено.",
        2 => "%d сообщений отправлено.",
        3 => "%d сообщений отправлено.",
-);
+];
 $a->strings["You have no more invitations available"] = "У вас нет больше приглашений";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "Посетите %s со списком общедоступных сайтов, к которым вы можете присоединиться. Все участники Friendica на других сайтах могут соединиться друг с другом, а также с участниками многих других социальных сетей.";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "Для одобрения этого приглашения, пожалуйста, посетите и зарегистрируйтесь на %s ,или любом другом публичном сервере Friendica";
@@ -1168,12 +1168,12 @@ $a->strings["This introduction has already been accepted."] = "Этот запр
 $a->strings["Profile location is not valid or does not contain profile information."] = "Местоположение профиля является недопустимым или не содержит информацию о профиле.";
 $a->strings["Warning: profile location has no identifiable owner name."] = "Внимание: местоположение профиля не имеет идентифицируемого имени владельца.";
 $a->strings["Warning: profile location has no profile photo."] = "Внимание: местоположение профиля не имеет еще фотографии профиля.";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "%d требуемый параметр не был найден в заданном месте",
        1 => "%d требуемых параметров не были найдены в заданном месте",
        2 => "%d требуемых параметров не были найдены в заданном месте",
        3 => "%d требуемых параметров не были найдены в заданном месте",
-);
+];
 $a->strings["Introduction complete."] = "Запрос создан.";
 $a->strings["Unrecoverable protocol error."] = "Неисправимая ошибка протокола.";
 $a->strings["Profile unavailable."] = "Профиль недоступен.";
@@ -1268,19 +1268,19 @@ $a->strings["Unknown sender - %s"] = "Неизвестный отправите
 $a->strings["You and %s"] = "Вы и %s";
 $a->strings["%s and You"] = "%s и Вы";
 $a->strings["D, d M Y - g:i A"] = "D, d M Y - g:i A";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => "%d сообщение",
        1 => "%d сообщений",
        2 => "%d сообщений",
        3 => "%d сообщений",
-);
+];
 $a->strings["Remove term"] = "Удалить элемент";
-$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = array(
+$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = [
        0 => "Внимание: в группе %s пользователь из сети, которая не поддерживает непубличные сообщения.",
        1 => "Внимание: в группе %s пользователя из сети, которая не поддерживает непубличные сообщения.",
        2 => "Внимание: в группе %s пользователей из сети, которая не поддерживает непубличные сообщения.",
        3 => "Внимание: в группе %s пользователей из сети, которая не поддерживает непубличные сообщения.",
-);
+];
 $a->strings["Messages in this group won't be send to these receivers."] = "Сообщения в этой группе не будут отправлены следующим получателям.";
 $a->strings["Private messages to this person are at risk of public disclosure."] = "Личные сообщения этому человеку находятся под угрозой обнародования.";
 $a->strings["Invalid contact."] = "Недопустимый контакт.";
@@ -1976,18 +1976,18 @@ $a->strings["Mark success (if update was manually applied)"] = "Отмечено
 $a->strings["Attempt to execute this update step automatically"] = "Попытаться выполнить этот шаг обновления автоматически";
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "%s пользователь заблокирован/разблокирован",
        1 => "%s пользователей заблокировано/разблокировано",
        2 => "%s пользователей заблокировано/разблокировано",
        3 => "%s пользователей заблокировано/разблокировано",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => "%s человек удален",
        1 => "%s чел. удалено",
        2 => "%s чел. удалено",
        3 => "%s чел. удалено",
-);
+];
 $a->strings["User '%s' deleted"] = "Пользователь '%s' удален";
 $a->strings["User '%s' unblocked"] = "Пользователь '%s' разблокирован";
 $a->strings["User '%s' blocked"] = "Пользователь '%s' блокирован";
index 499ed920036ae8a5793d4ca8b035118bac673991..e25c03293aec90f3d66a496e78d22e7f01d511b7 100644 (file)
@@ -9,10 +9,10 @@ $a->strings["Add New Contact"] = "Lägg till kontakt";
 $a->strings["Enter address or web location"] = "";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "Exempel: adam@exempel.com, http://exempel.com/bertil";
 $a->strings["Connect"] = "Skicka kontaktf&ouml;rfr&aring;gan";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Find People"] = "";
 $a->strings["Enter name or interest"] = "";
 $a->strings["Connect/Follow"] = "G&ouml;r till kontakt/F&ouml;lj";
@@ -27,10 +27,10 @@ $a->strings["All Networks"] = "";
 $a->strings["Saved Folders"] = "";
 $a->strings["Everything"] = "";
 $a->strings["Categories"] = "";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["show more"] = "";
 $a->strings["Forums"] = "";
 $a->strings["External link to forum"] = "";
@@ -47,10 +47,10 @@ $a->strings["Hermaphrodite"] = "Hermafrodit";
 $a->strings["Neuter"] = "K&ouml;nsl&ouml;s";
 $a->strings["Non-specific"] = "Oklart";
 $a->strings["Other"] = "Annat";
-$a->strings["Undecided"] = array(
+$a->strings["Undecided"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Males"] = "M&auml;n";
 $a->strings["Females"] = "Kvinnor";
 $a->strings["Gay"] = "B&ouml;g";
@@ -169,10 +169,10 @@ $a->strings["Error! Cannot check nickname"] = "";
 $a->strings["User '%s' already exists on this server!"] = "";
 $a->strings["User creation error"] = "";
 $a->strings["User profile creation error"] = "";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "";
 $a->strings["Miscellaneous"] = "Blandat";
 $a->strings["Birthday:"] = "F&ouml;delsedatum:";
@@ -432,10 +432,10 @@ $a->strings["post/item"] = "";
 $a->strings["%1\$s marked %2\$s's %3\$s as favorite"] = "";
 $a->strings["Likes"] = "";
 $a->strings["Dislikes"] = "";
-$a->strings["Attending"] = array(
+$a->strings["Attending"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Not attending"] = "";
 $a->strings["Might attend"] = "";
 $a->strings["Select"] = "";
@@ -502,18 +502,18 @@ $a->strings["Private post"] = "";
 $a->strings["Message"] = "";
 $a->strings["Browser"] = "";
 $a->strings["View all"] = "";
-$a->strings["Like"] = array(
+$a->strings["Like"] = [
        0 => "",
        1 => "",
-);
-$a->strings["Dislike"] = array(
+];
+$a->strings["Dislike"] = [
        0 => "",
        1 => "",
-);
-$a->strings["Not Attending"] = array(
+];
+$a->strings["Not Attending"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["%s\\'s birthday"] = "";
 $a->strings["General Features"] = "";
 $a->strings["Multiple Profiles"] = "";
@@ -651,10 +651,10 @@ $a->strings["next"] = "n&auml;sta";
 $a->strings["Loading more entries..."] = "";
 $a->strings["The end"] = "";
 $a->strings["No contacts"] = "Inga kontakter";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "%d kontakt",
        1 => "%d kontakter",
-);
+];
 $a->strings["View Contacts"] = "Visa kontakter";
 $a->strings["Save"] = "";
 $a->strings["poke"] = "";
@@ -695,10 +695,10 @@ $a->strings["Click to open/close"] = "";
 $a->strings["View on separate page"] = "";
 $a->strings["view on separate page"] = "";
 $a->strings["activity"] = "";
-$a->strings["comment"] = array(
+$a->strings["comment"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["post"] = "";
 $a->strings["Item filed"] = "";
 $a->strings["Passwords do not match. Password unchanged."] = "L&ouml;senorden skiljer sig &aring;t. L&ouml;senordet &auml;ndras inte.";
@@ -794,10 +794,10 @@ $a->strings["%s : Not a valid email address."] = "%s : Ogiltig e-postadress.";
 $a->strings["Please join us on Friendica"] = "";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "";
 $a->strings["%s : Message delivery failed."] = "%s : Meddelandet kom inte fram.";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "%d meddelande har skickats.",
        1 => "%d meddelanden har skickats.",
-);
+];
 $a->strings["You have no more invitations available"] = "";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "";
@@ -949,10 +949,10 @@ $a->strings["Unknown sender - %s"] = "";
 $a->strings["You and %s"] = "";
 $a->strings["%s and You"] = "";
 $a->strings["D, d M Y - g:i A"] = "D, d M Y - g:i A";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Manage Identities and/or Pages"] = "Hantera identiteter eller sidor";
 $a->strings["Toggle between different identities or community/group pages which share your account details or which you have been granted \"manage\" permissions"] = "";
 $a->strings["Select an identity to manage: "] = "V&auml;lj vilken identitet du vill hantera: ";
@@ -981,10 +981,10 @@ $a->strings["New photo from this URL"] = "";
 $a->strings["No such group"] = "Gruppen finns inte";
 $a->strings["Group: %s"] = "";
 $a->strings["This entry was edited"] = "";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Private Message"] = "Personligt meddelande";
 $a->strings["I like this (toggle)"] = "Jag gillar det h&auml;r (v&auml;xla)";
 $a->strings["like"] = "";
@@ -1687,14 +1687,14 @@ $a->strings["Mark success (if update was manually applied)"] = "";
 $a->strings["Attempt to execute this update step automatically"] = "";
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "",
        1 => "",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["User '%s' deleted"] = "";
 $a->strings["User '%s' unblocked"] = "";
 $a->strings["User '%s' blocked"] = "";
@@ -1748,10 +1748,10 @@ $a->strings["PHP logging"] = "";
 $a->strings["To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."] = "";
 $a->strings["Lock feature %s"] = "";
 $a->strings["Manage Additional Features"] = "";
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Could not access contact record."] = "Hittar inte information om kontakten.";
 $a->strings["Could not locate selected profile."] = "Hittar inte vald profil.";
 $a->strings["Contact updated."] = "Kontakten har uppdaterats.";
@@ -1848,10 +1848,10 @@ $a->strings["This introduction has already been accepted."] = "Den h&auml;r f&ou
 $a->strings["Profile location is not valid or does not contain profile information."] = "Profiladressen &auml;r ogiltig eller inneh&aring;ller ingen profilinformation.";
 $a->strings["Warning: profile location has no identifiable owner name."] = "Varning! Hittar inget namn som identifierar profilen.";
 $a->strings["Warning: profile location has no profile photo."] = "Varning! Profilen inneh&aring;ller inte n&aring;gon profilbild.";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "%d required parameter was not found at the given location",
        1 => "%d required parameters were not found at the given location",
-);
+];
 $a->strings["Introduction complete."] = "Kontaktf&ouml;rfr&aring;gan/Presentationen &auml;r klar.";
 $a->strings["Unrecoverable protocol error."] = "Protokollfel.";
 $a->strings["Profile unavailable."] = "Profilen &auml;r inte tillg&auml;nglig.";
@@ -1971,10 +1971,10 @@ $a->strings["This message was sent to you by %s, a member of the Friendica socia
 $a->strings["You may visit them online at %s"] = "";
 $a->strings["Please contact the sender by replying to this post if you do not wish to receive these messages."] = "Kontakta avs&auml;ndaren genom att svara p&aring; det h&auml;r meddelandet om du inte vill ha s&aring;dana h&auml;r meddelanden.";
 $a->strings["%s posted an update."] = "%s har gjort ett inl&auml;gg.";
-$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = array(
+$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = [
        0 => "",
        1 => "",
-);
+];
 $a->strings["Messages in this group won't be send to these receivers."] = "";
 $a->strings["Private messages to this person are at risk of public disclosure."] = "";
 $a->strings["Invalid contact."] = "";
index bba477e44dc1f98cfa15a11886cf1ce3ba80477b..3e5e5049c2ea44efa8168f86c1924e990dc04aac 100644 (file)
@@ -90,9 +90,9 @@ $a->strings["Hermaphrodite"] = "两性体";
 $a->strings["Neuter"] = "中性的";
 $a->strings["Non-specific"] = "不明确的";
 $a->strings["Other"] = "别的";
-$a->strings["Undecided"] = array(
+$a->strings["Undecided"] = [
        0 => "未决定的",
-);
+];
 $a->strings["Males"] = "男人";
 $a->strings["Females"] = "女人";
 $a->strings["Gay"] = "男同性恋的";
@@ -225,9 +225,9 @@ $a->strings["Add New Contact"] = "增添新的熟人";
 $a->strings["Enter address or web location"] = "输入地址或网络位置";
 $a->strings["Example: bob@example.com, http://example.com/barbara"] = "比如:li@example.com, http://example.com/li";
 $a->strings["Connect"] = "连接";
-$a->strings["%d invitation available"] = array(
+$a->strings["%d invitation available"] = [
        0 => "%d邀请可用的",
-);
+];
 $a->strings["Find People"] = "找人物";
 $a->strings["Enter name or interest"] = "输入名字或兴趣";
 $a->strings["Connect/Follow"] = "连接/关注";
@@ -242,9 +242,9 @@ $a->strings["Networks"] = "网络";
 $a->strings["All Networks"] = "所有网络";
 $a->strings["Everything"] = "一切";
 $a->strings["Categories"] = "种类";
-$a->strings["%d contact in common"] = array(
+$a->strings["%d contact in common"] = [
        0 => "%d共同熟人",
-);
+];
 $a->strings["event"] = "项目";
 $a->strings["status"] = "现状";
 $a->strings["photo"] = "照片";
@@ -261,9 +261,9 @@ $a->strings["post/item"] = "文章/项目";
 $a->strings["%1\$s marked %2\$s's %3\$s as favorite"] = "%1\$s标注%2\$s的%3\$s为偏爱";
 $a->strings["Likes"] = "喜欢";
 $a->strings["Dislikes"] = "不喜欢";
-$a->strings["Attending"] = array(
+$a->strings["Attending"] = [
        0 => "正在参加",
-);
+];
 $a->strings["Not attending"] = "不在参加";
 $a->strings["Might attend"] = "可以参加";
 $a->strings["Select"] = "选择";
@@ -337,15 +337,15 @@ $a->strings["Private post"] = "私人文章";
 $a->strings["Message"] = "通知";
 $a->strings["Browser"] = "浏览器";
 $a->strings["View all"] = "查看全部";
-$a->strings["Like"] = array(
+$a->strings["Like"] = [
        0 => "喜欢",
-);
-$a->strings["Dislike"] = array(
+];
+$a->strings["Dislike"] = [
        0 => "不喜欢",
-);
-$a->strings["Not Attending"] = array(
+];
+$a->strings["Not Attending"] = [
        0 => "不在参加",
-);
+];
 $a->strings["There are no tables on MyISAM."] = "";
 $a->strings["\n\t\t\tThe friendica developers released update %s recently,\n\t\t\tbut when I tried to install it, something went terribly wrong.\n\t\t\tThis needs to be fixed soon and I can't do it alone. Please contact a\n\t\t\tfriendica developer if you can not help me on your own. My database might be invalid."] = "";
 $a->strings["The error message is\n[pre]%s[/pre]"] = "";
@@ -600,9 +600,9 @@ $a->strings["last"] = "最后";
 $a->strings["Loading more entries..."] = "没有项目...";
 $a->strings["The end"] = "";
 $a->strings["No contacts"] = "没有熟人";
-$a->strings["%d Contact"] = array(
+$a->strings["%d Contact"] = [
        0 => "%d熟人",
-);
+];
 $a->strings["View Contacts"] = "看熟人";
 $a->strings["Save"] = "保存";
 $a->strings["poke"] = "戳";
@@ -643,9 +643,9 @@ $a->strings["Click to open/close"] = "点击为开关";
 $a->strings["View on separate page"] = "在另一页面中查看";
 $a->strings["view on separate page"] = "在另一页面中查看";
 $a->strings["activity"] = "活动";
-$a->strings["comment"] = array(
+$a->strings["comment"] = [
        0 => "评论",
-);
+];
 $a->strings["post"] = "文章";
 $a->strings["Item filed"] = "把项目归档了";
 $a->strings["Error decoding account file"] = "解码账户文件出错误";
@@ -654,9 +654,9 @@ $a->strings["Error! Cannot check nickname"] = "错误!不能检查昵称";
 $a->strings["User '%s' already exists on this server!"] = "用户「%s」已经存在这个服务器!";
 $a->strings["User creation error"] = "用户创造错误";
 $a->strings["User profile creation error"] = "用户简介创造错误";
-$a->strings["%d contact not imported"] = array(
+$a->strings["%d contact not imported"] = [
        0 => "%d熟人没进口了",
-);
+];
 $a->strings["Done. You can now login with your username and password"] = "完了。您现在会用您用户名和密码登录";
 $a->strings["Passwords do not match. Password unchanged."] = "密码们不相配。密码没未改变的。";
 $a->strings["An invitation is required."] = "邀请必要的。";
@@ -845,9 +845,9 @@ $a->strings["No such group"] = "没有这个组";
 $a->strings["Group is empty"] = "组没有成员";
 $a->strings["Group: %s"] = "";
 $a->strings["This entry was edited"] = "这个条目被编辑了";
-$a->strings["%d comment"] = array(
+$a->strings["%d comment"] = [
        0 => "%d评论",
-);
+];
 $a->strings["Private Message"] = "私人的新闻";
 $a->strings["I like this (toggle)"] = "我喜欢这(交替)";
 $a->strings["like"] = "喜欢";
@@ -905,9 +905,9 @@ $a->strings["This introduction has already been accepted."] = "这个介绍已
 $a->strings["Profile location is not valid or does not contain profile information."] = "简介位置失效或不包含简介信息。";
 $a->strings["Warning: profile location has no identifiable owner name."] = "警告:简介位置没有可设别的主名。";
 $a->strings["Warning: profile location has no profile photo."] = "警告:简介位置没有简介图。";
-$a->strings["%d required parameter was not found at the given location"] = array(
+$a->strings["%d required parameter was not found at the given location"] = [
        0 => "%d需要的参数没找到在输入的位置。",
-);
+];
 $a->strings["Introduction complete."] = "介绍完成的。";
 $a->strings["Unrecoverable protocol error."] = "不能恢复的协议错误";
 $a->strings["Profile unavailable."] = "简介无效";
@@ -1079,9 +1079,9 @@ $a->strings["%s : Not a valid email address."] = "%s : 不是效的电子邮件
 $a->strings["Please join us on Friendica"] = "请加入我们再Friendica";
 $a->strings["Invitation limit exceeded. Please contact your site administrator."] = "邀请限超过了。请联系您的网站管理员。";
 $a->strings["%s : Message delivery failed."] = "%s : 送消息失败了。";
-$a->strings["%d message sent."] = array(
+$a->strings["%d message sent."] = [
        0 => "%d消息传送了。",
-);
+];
 $a->strings["You have no more invitations available"] = "您没有别的邀请";
 $a->strings["Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks."] = "参观%s看一单公开网站您会加入。Friendica成员在别的网站都会互相连接,再跟很多别的社会网络。";
 $a->strings["To accept this invitation, please visit and register at %s or any other public Friendica website."] = "为接受这个邀请,请再%s或什么别的Friendica网站注册。";
@@ -1155,15 +1155,15 @@ $a->strings["Unknown sender - %s"] = "生发送人-%s";
 $a->strings["You and %s"] = "您和%s";
 $a->strings["%s and You"] = "%s和您";
 $a->strings["D, d M Y - g:i A"] = "D, d M Y - g:i A";
-$a->strings["%d message"] = array(
+$a->strings["%d message"] = [
        0 => "%d通知",
-);
+];
 $a->strings["Mood"] = "心情";
 $a->strings["Set your current mood and tell your friends"] = "选择现在的心情而告诉朋友们";
 $a->strings["Remove term"] = "删除关键字";
-$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = array(
+$a->strings["Warning: This group contains %s member from a network that doesn't allow non public messages."] = [
        0 => "警告:这个组包含 %s 来自不允许非公开消息的网络的成员。",
-);
+];
 $a->strings["Messages in this group won't be send to these receivers."] = "这个组中的消息不会被发送至这些接收者。";
 $a->strings["Private messages to this person are at risk of public disclosure."] = "私人通信给这个人回被公开。";
 $a->strings["Invalid contact."] = "无效熟人。";
@@ -1859,12 +1859,12 @@ $a->strings["Mark success (if update was manually applied)"] = "标注成功(
 $a->strings["Attempt to execute this update step automatically"] = "试图自动地把这步更新实行";
 $a->strings["\n\t\t\tDear %1\$s,\n\t\t\t\tthe administrator of %2\$s has set up an account for you."] = "";
 $a->strings["\n\t\t\tThe login details are as follows:\n\n\t\t\tSite Location:\t%1\$s\n\t\t\tLogin Name:\t\t%2\$s\n\t\t\tPassword:\t\t%3\$s\n\n\t\t\tYou may change your password from your account \"Settings\" page after logging\n\t\t\tin.\n\n\t\t\tPlease take a few moments to review the other account settings on that page.\n\n\t\t\tYou may also wish to add some basic information to your default profile\n\t\t\t(on the \"Profiles\" page) so that other people can easily find you.\n\n\t\t\tWe recommend setting your full name, adding a profile photo,\n\t\t\tadding some profile \"keywords\" (very useful in making new friends) - and\n\t\t\tperhaps what country you live in; if you do not wish to be more specific\n\t\t\tthan that.\n\n\t\t\tWe fully respect your right to privacy, and none of these items are necessary.\n\t\t\tIf you are new and do not know anybody here, they may help\n\t\t\tyou to make some new and interesting friends.\n\n\t\t\tThank you and welcome to %4\$s."] = "";
-$a->strings["%s user blocked/unblocked"] = array(
+$a->strings["%s user blocked/unblocked"] = [
        0 => "%s用户拦/不拦了",
-);
-$a->strings["%s user deleted"] = array(
+];
+$a->strings["%s user deleted"] = [
        0 => "%s用户删除了",
-);
+];
 $a->strings["User '%s' deleted"] = "用户「%s」删除了";
 $a->strings["User '%s' unblocked"] = "用户「%s」无拦了";
 $a->strings["User '%s' blocked"] = "用户「%s」拦了";
@@ -1918,9 +1918,9 @@ $a->strings["PHP logging"] = "";
 $a->strings["To enable logging of PHP errors and warnings you can add the following to the .htconfig.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."] = "";
 $a->strings["Lock feature %s"] = "";
 $a->strings["Manage Additional Features"] = "";
-$a->strings["%d contact edited."] = array(
+$a->strings["%d contact edited."] = [
        0 => "",
-);
+];
 $a->strings["Could not access contact record."] = "用不了熟人记录。";
 $a->strings["Could not locate selected profile."] = "找不到选择的简介。";
 $a->strings["Contact updated."] = "熟人更新了。";
index d3837e42a424815edabe4b6642963446b8fdb12f..1b299329bf43f4dcabfa06e9329831161c61eed7 100644 (file)
@@ -45,7 +45,7 @@ function theme_admin_post(App $a) {
 
 /// @TODO $a is no longer used
 function clean_form(App $a, &$colorset, $user) {
-       $colorset = array(
+       $colorset = [
                'default'     =>t('default'),
                'greenzero'   =>t('greenzero'),
                'purplezero'  =>t('purplezero'),
@@ -53,7 +53,7 @@ function clean_form(App $a, &$colorset, $user) {
                'darkzero'    =>t('darkzero'),
                'comix'       =>t('comix'),
                'slackr'      =>t('slackr'),
-       );
+       ];
 
        if ($user) {
                $color = PConfig::get(local_user(), 'duepuntozero', 'colorset');
@@ -63,12 +63,12 @@ function clean_form(App $a, &$colorset, $user) {
 
        $t = get_markup_template("theme_settings.tpl" );
        /// @TODO No need for adding string here, $o is not defined
-       $o .= replace_macros($t, array(
+       $o .= replace_macros($t, [
                '$submit'   => t('Submit'),
                '$baseurl'  => System::baseUrl(),
                '$title'    => t("Theme settings"),
-               '$colorset' => array('duepuntozero_colorset', t('Variations'), $color, '', $colorset),
-       ));
+               '$colorset' => ['duepuntozero_colorset', t('Variations'), $color, '', $colorset],
+       ]);
 
        return $o;
 }
index 6d6b7dee60487ce26836eb60d971948657c92ee3..091ce01326ce781dabbbdd85c28b374665599c20 100644 (file)
@@ -48,7 +48,7 @@ function theme_content(App $a) {
        if (!local_user()) {
                return;
        }
-       $arr = array();
+       $arr = [];
 
        $arr["schema"]           = PConfig::get(local_user(), 'frio', 'schema');
        $arr["nav_bg"]           = PConfig::get(local_user(), 'frio', 'nav_bg');
@@ -66,7 +66,7 @@ function theme_admin(App $a) {
        if (!local_user()) {
                return;
        }
-       $arr = array();
+       $arr = [];
 
        $arr["schema"]           = Config::get('frio', 'schema');
        $arr["nav_bg"]           = Config::get('frio', 'nav_bg');
@@ -87,10 +87,10 @@ function frio_form($arr) {
        $scheme_info = get_schema_info($arr["schema"]);
        $disable = $scheme_info["overwrites"];
        if (!is_array($disable)) {
-               $disable = array();
+               $disable = [];
        }
 
-       $scheme_choices = array();
+       $scheme_choices = [];
        $scheme_choices["---"] = t("Default");
        $files = glob('view/theme/frio/schema/*.php');
        if ($files) {
@@ -106,22 +106,22 @@ function frio_form($arr) {
        $background_image_help = "<strong>" . t("Note"). ": </strong>".t("Check image permissions if all users are allowed to visit the image");
 
        $t = get_markup_template('theme_settings.tpl');
-       $ctx = array(
+       $ctx = [
                '$submit'           => t('Submit'),
                '$baseurl'          => System::baseUrl(),
                '$title'            => t("Theme settings"),
-               '$schema'           => array('frio_schema', t("Select scheme"), $arr["schema"], '', $scheme_choices),
-               '$nav_bg'           => array_key_exists("nav_bg", $disable) ? "" : array('frio_nav_bg', t('Navigation bar background color'), $arr['nav_bg']),
-               '$nav_icon_color'   => array_key_exists("nav_icon_color", $disable) ? "" : array('frio_nav_icon_color', t('Navigation bar icon color '), $arr['nav_icon_color']),
-               '$link_color'       => array_key_exists("link_color", $disable) ? "" : array('frio_link_color', t('Link color'), $arr['link_color'], '', $link_colors),
-               '$bgcolor'          => array_key_exists("bgcolor", $disable) ? "" : array('frio_background_color', t('Set the background color'), $arr['bgcolor']),
-               '$contentbg_transp' => array_key_exists("contentbg_transp", $disable) ? "" : array('frio_contentbg_transp', t("Content background transparency"), ((isset($arr["contentbg_transp"]) && $arr["contentbg_transp"] != "") ? $arr["contentbg_transp"] : 100)),
-               '$background_image' => array_key_exists("background_image", $disable ) ? "" : array('frio_background_image', t('Set the background image'), $arr['background_image'], $background_image_help),
+               '$schema'           => ['frio_schema', t("Select scheme"), $arr["schema"], '', $scheme_choices],
+               '$nav_bg'           => array_key_exists("nav_bg", $disable) ? "" : ['frio_nav_bg', t('Navigation bar background color'), $arr['nav_bg']],
+               '$nav_icon_color'   => array_key_exists("nav_icon_color", $disable) ? "" : ['frio_nav_icon_color', t('Navigation bar icon color '), $arr['nav_icon_color']],
+               '$link_color'       => array_key_exists("link_color", $disable) ? "" : ['frio_link_color', t('Link color'), $arr['link_color'], '', $link_colors],
+               '$bgcolor'          => array_key_exists("bgcolor", $disable) ? "" : ['frio_background_color', t('Set the background color'), $arr['bgcolor']],
+               '$contentbg_transp' => array_key_exists("contentbg_transp", $disable) ? "" : ['frio_contentbg_transp', t("Content background transparency"), ((isset($arr["contentbg_transp"]) && $arr["contentbg_transp"] != "") ? $arr["contentbg_transp"] : 100)],
+               '$background_image' => array_key_exists("background_image", $disable ) ? "" : ['frio_background_image', t('Set the background image'), $arr['background_image'], $background_image_help],
                '$bg_image_options' => Image::get_options($arr),
-       );
+       ];
 
-       if ( array_key_exists("login_bg_image", $arr ) &&  !array_key_exists("login_bg_image", $disable ) ) { 
-               $ctx['$login_bg_image']  = array('frio_login_bg_image', t('Login page background image'), $arr['login_bg_image'], $background_image_help);
+       if ( array_key_exists("login_bg_image", $arr ) &&  !array_key_exists("login_bg_image", $disable ) ) {
+               $ctx['$login_bg_image']  = ['frio_login_bg_image', t('Login page background image'), $arr['login_bg_image'], $background_image_help];
        }
 
        $o .= replace_macros($t, $ctx);
index 3663ac58021958a19873d3f998a48b99f4c919bb..159f258e75f20363dae07fc11bf71a23d9a3c54e 100644 (file)
@@ -12,22 +12,22 @@ class Image {
 
        /**
         * @brief Give all available options for the background image
-        * 
+        *
         * @param array $arr Array with the present user settings
-        * 
+        *
         * @return array Array with the immage options
         */
        public static function get_options($arr) {
-               $bg_image_options = array(
-                                       'repeat' => array(
-                                               'frio_bg_image_option', t("Repeat the image"),  "repeat",       t("Will repeat your image to fill the background."), ($arr["bg_image_option"] == "repeat")),
-                                       'stretch' => array(
-                                               'frio_bg_image_option', t("Stretch"),           "stretch",      t("Will stretch to width/height of the image."), ($arr["bg_image_option"] == "stretch")),
-                                       'cover' => array(
-                                               'frio_bg_image_option', t("Resize fill and-clip"), "cover",     t("Resize to fill and retain aspect ratio."),   ($arr["bg_image_option"] == "cover")),
-                                       'contain' => array(
-                                               'frio_bg_image_option', t("Resize best fit"),   "contain",      t("Resize to best fit and retain aspect ratio."), ($arr["bg_image_option"] == "contain")),
-               );
+               $bg_image_options = [
+                                       'repeat' => [
+                                               'frio_bg_image_option', t("Repeat the image"),  "repeat",       t("Will repeat your image to fill the background."), ($arr["bg_image_option"] == "repeat")],
+                                       'stretch' => [
+                                               'frio_bg_image_option', t("Stretch"),           "stretch",      t("Will stretch to width/height of the image."), ($arr["bg_image_option"] == "stretch")],
+                                       'cover' => [
+                                               'frio_bg_image_option', t("Resize fill and-clip"), "cover",     t("Resize to fill and retain aspect ratio."),   ($arr["bg_image_option"] == "cover")],
+                                       'contain' => [
+                                               'frio_bg_image_option', t("Resize best fit"),   "contain",      t("Resize to best fit and retain aspect ratio."), ($arr["bg_image_option"] == "contain")],
+               ];
 
                return $bg_image_options;
        }
index d1543036c485b063f442f6d761296cf79c597329..3f290becf49d40baa10dac112fc0ebd2e15bae35 100644 (file)
@@ -63,7 +63,7 @@ class Color {
         $G = hexdec($color[2].$color[3]);
         $B = hexdec($color[4].$color[5]);
 
-        $HSL = array();
+        $HSL = [];
 
         $var_R = ($R / 255);
         $var_G = ($G / 255);
@@ -110,13 +110,13 @@ class Color {
      * @return string HEX string
      * @throws Exception "Bad HSL Array"
      */
-    public static function hslToHex( $hsl = array() ){
+    public static function hslToHex( $hsl = [] ){
          // Make sure it's HSL
         if(empty($hsl) || !isset($hsl["H"]) || !isset($hsl["S"]) || !isset($hsl["L"]) ) {
             throw new Exception("Param was not an HSL array");
         }
 
-        list($H,$S,$L) = array( $hsl['H']/360,$hsl['S'],$hsl['L'] );
+        list($H,$S,$L) = [ $hsl['H']/360,$hsl['S'],$hsl['L'] ];
 
         if( $S == 0 ) {
             $r = $L * 255;
@@ -181,7 +181,7 @@ class Color {
      * @return string RGB string
      * @throws Exception "Bad RGB Array"
      */
-    public static function rgbToHex( $rgb = array() ){
+    public static function rgbToHex( $rgb = [] ){
          // Make sure it's RGB
         if(empty($rgb) || !isset($rgb["R"]) || !isset($rgb["G"]) || !isset($rgb["B"]) ) {
             throw new Exception("Param was not an RGB array");
@@ -253,7 +253,7 @@ class Color {
         }
 
         // Return our gradient array
-        return array( "light" => $lightColor, "dark" => $darkColor );
+        return [ "light" => $lightColor, "dark" => $darkColor ];
     }
 
 
@@ -308,7 +308,7 @@ class Color {
         // Return the new value in HEX
         return self::hslToHex($hsl);
     }
-    
+
     /**
      * Returns your color's HSL array
      */
@@ -327,7 +327,7 @@ class Color {
     public function getRgb() {
         return $this->_rgb;
     }
-    
+
     /**
      * Returns the cross browser CSS3 gradient
      * @param int $amount Optional: percentage amount to light/darken the gradient
@@ -435,7 +435,7 @@ class Color {
          $gmix = (($rgb1['G'] * $r1) + ($rgb2['G'] * $r2)) / 2;
          $bmix = (($rgb1['B'] * $r1) + ($rgb2['B'] * $r2)) / 2;
 
-         return array('R' => $rmix, 'G' => $gmix, 'B' => $bmix);
+         return ['R' => $rmix, 'G' => $gmix, 'B' => $bmix];
      }
 
     /**
index 91e0f6ff357afb686d1f315da654cda2d279e471..1f816c5b2fdad7344bbf5826c7e45e07b7abfca5 100644 (file)
@@ -63,12 +63,12 @@ function is_modal() {
  */
 function get_modalpage_list() {
        //Arry of pages wich getting bootstrap modal dialogs
-       $modalpages = array('poke/',
+       $modalpages = ['poke/',
                        'message/new',
                        'settings/oauth/add',
                        'events/new',
 //                     'fbrowser/image/'
-       );
+       ];
 
        return $modalpages;
 }
@@ -83,9 +83,9 @@ function get_modalpage_list() {
  */
 function get_standard_page_list() {
        //Arry of pages wich getting the standard page template
-       $standardpages = array(//'profile',
+       $standardpages = [//'profile',
 //                     'fbrowser/image/'
-       );
+       ];
 
        return $standardpages;
 }
index 7a00a39d800e4f5209ffff0a39c52b4b11250f81..e34ff45b2bc5eb280e1a40eb156457537505c193 100644 (file)
@@ -3,14 +3,14 @@
 
 /**
  * @brief: Get info header of the shema
- * 
+ *
  * This function parses the header of the shemename.php file for inormations like
  * Author, Description and Overwrites. Most of the code comes from the get_plugin_info()
  * function. We use this to get the variables which get overwritten through the shema.
  * All color variables which get overwritten through the theme have to be
  * listed (comma seperated) in the shema header under Overwrites:
  * This seemst not to be the best solution. We need to investigate further.
- * 
+ *
  * @param string $schema Name of the shema
  * @return array With theme information
  *    'author' => Author Name
@@ -27,13 +27,13 @@ function get_schema_info($schema){
        $themepath = "view/theme/" . $theme . "/";
        $schema = PConfig::get(local_user(),'frio', 'schema');
 
-       $info=Array(
+       $info=[
                'name' => $schema,
                'description' => "",
-               'author' => array(),
+               'author' => [],
                'version' => "",
                'overwrites' => ""
-       );
+       ];
 
        if (!is_file($themepath . "schema/" . $schema . ".php")) return $info;
 
@@ -51,9 +51,9 @@ function get_schema_info($schema){
                                if ($k=="author"){
                                        $r=preg_match("|([^<]+)<([^>]+)>|", $v, $m);
                                        if ($r) {
-                                               $info['author'][] = array('name'=>$m[1], 'link'=>$m[2]);
+                                               $info['author'][] = ['name'=>$m[1], 'link'=>$m[2]];
                                        } else {
-                                               $info['author'][] = array('name'=>$v);
+                                               $info['author'][] = ['name'=>$v];
                                        }
                                } elseif ($k == "overwrites") {
                                        $theme_settings = explode(',',str_replace(' ','', $v));
index 7bc9629d4fd12218f0417bb6d0c86cedd9ed929d..8452877b3ed4778c3caeccbb56aa52470761134a 100644 (file)
@@ -167,7 +167,7 @@ switch ($bg_image_option) {
 // Convert transparency level from percentage to opacity value.
 $contentbg_transp = $contentbg_transp / 100;
 
-$options = array (
+$options =  [
        '$nav_bg'                      => $nav_bg,
        '$nav_icon_color'              => $nav_icon_color,
        '$nav_icon_hover_color'        => $nav_icon_hover_color,
@@ -181,7 +181,7 @@ $options = array (
        '$background_image'            => $background_image,
        '$background_size_img'         => $background_size_img,
        '$login_bg_image'              => $login_bg_image,
-);
+];
 
 $css_tpl = file_get_contents('view/theme/frio/css/style.css');
 
@@ -211,7 +211,7 @@ header('Last-Modified: '.$modified);
 // Only send the CSS file if it was changed.
 if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) || isset($_SERVER['HTTP_IF_NONE_MATCH'])) {
        $cached_modified = gmdate('r', strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']));
-       $cached_etag = str_replace(array('"', "-gzip"), array('', ''),
+       $cached_etag = str_replace(['"', "-gzip"], ['', ''],
                                stripslashes($_SERVER['HTTP_IF_NONE_MATCH']));
 
        if (($cached_modified == $modified) && ($cached_etag == $etag)) {
index 18cc1aeefba7cdabe52536eb0e08de35fe9f278c..16d1b03f2e5c37391b5be290c3688d2c519c2232 100644 (file)
@@ -94,7 +94,7 @@ function frio_item_photo_links(App $a, &$body_info)
 
        while ($p !== false && ($occurence++ < 500)) {
                $link = substr($body_info['html'], $p['start'], $p['end'] - $p['start']);
-               $matches = array();
+               $matches = [];
 
                preg_match("/\/photos\/[\w]+\/image\/([\w]+)/", $link, $matches);
                if ($matches) {
@@ -244,28 +244,28 @@ function frio_remote_nav($a, &$nav)
        }
 
        if (DBM::is_result($r)) {
-               $nav['userinfo'] = array(
+               $nav['userinfo'] = [
                        'icon' => (DBM::is_result($r) ? $r[0]['photo'] : "images/person-48.jpg"),
                        'name' => $r[0]['name'],
-               );
+               ];
        }
 
        if (!local_user() && !empty($server_url)) {
-               $nav['logout'] = Array($server_url . '/logout', t('Logout'), "", t('End this session'));
+               $nav['logout'] = [$server_url . '/logout', t('Logout'), "", t('End this session')];
 
                // user menu
-               $nav['usermenu'][] = Array($server_url . '/profile/' . $a->user['nickname'], t('Status'), "", t('Your posts and conversations'));
-               $nav['usermenu'][] = Array($server_url . '/profile/' . $a->user['nickname'] . '?tab=profile', t('Profile'), "", t('Your profile page'));
-               $nav['usermenu'][] = Array($server_url . '/photos/' . $a->user['nickname'], t('Photos'), "", t('Your photos'));
-               $nav['usermenu'][] = Array($server_url . '/videos/' . $a->user['nickname'], t('Videos'), "", t('Your videos'));
-               $nav['usermenu'][] = Array($server_url . '/events/', t('Events'), "", t('Your events'));
+               $nav['usermenu'][] = [$server_url . '/profile/' . $a->user['nickname'], t('Status'), "", t('Your posts and conversations')];
+               $nav['usermenu'][] = [$server_url . '/profile/' . $a->user['nickname'] . '?tab=profile', t('Profile'), "", t('Your profile page')];
+               $nav['usermenu'][] = [$server_url . '/photos/' . $a->user['nickname'], t('Photos'), "", t('Your photos')];
+               $nav['usermenu'][] = [$server_url . '/videos/' . $a->user['nickname'], t('Videos'), "", t('Your videos')];
+               $nav['usermenu'][] = [$server_url . '/events/', t('Events'), "", t('Your events')];
 
                // navbar links
-               $nav['network'] = array($server_url . '/network', t('Network'), "", t('Conversations from your friends'));
-               $nav['events'] = Array($server_url . '/events', t('Events'), "", t('Events and Calendar'));
-               $nav['messages'] = array($server_url . '/message', t('Messages'), "", t('Private mail'));
-               $nav['settings'] = array($server_url . '/settings', t('Settings'), "", t('Account settings'));
-               $nav['contacts'] = array($server_url . '/contacts', t('Contacts'), "", t('Manage/edit friends and contacts'));
+               $nav['network'] = [$server_url . '/network', t('Network'), "", t('Conversations from your friends')];
+               $nav['events'] = [$server_url . '/events', t('Events'), "", t('Events and Calendar')];
+               $nav['messages'] = [$server_url . '/message', t('Messages'), "", t('Private mail')];
+               $nav['settings'] = [$server_url . '/settings', t('Settings'), "", t('Account settings')];
+               $nav['contacts'] = [$server_url . '/contacts', t('Contacts'), "", t('Manage/edit friends and contacts')];
                $nav['sitename'] = $a->config['sitename'];
        }
 }
@@ -320,7 +320,7 @@ function frio_acl_lookup(App $a, &$results)
                        intval($_SESSION['uid'])
                );
 
-               $contacts = array();
+               $contacts = [];
 
                if (DBM::is_result($r)) {
                        foreach ($r as $rr) {
@@ -346,14 +346,14 @@ function frio_acl_lookup(App $a, &$results)
 function frio_display_item(App $a, &$arr)
 {
        // Add subthread to the item menu
-       $subthread = array();
+       $subthread = [];
        if (local_user() == $arr['item']['uid'] && $arr['item']['parent'] == $arr['item']['id'] && !$arr['item']['self']) {
-               $subthread = array(
+               $subthread = [
                        'menu'   => 'follow_thread',
                        'title'  => t('Follow Thread'),
                        'action' => 'dosubthread(' . $arr['item']['id'] . '); return false;',
                        'href'   => '#'
-               );
+               ];
        }
        $arr['output']['subthread'] = $subthread;
 }
index f661546b39fef5c5d0e06e5f77d7404df2d150d3..22733e8d111462aa718ba431bbb00ed132fd444d 100644 (file)
@@ -55,7 +55,7 @@ function frost_item_photo_links(App $a, &$body_info)
        while($p !== false && ($occurence++ < 500)) {
                $link = substr($body_info['html'], $p['start'], $p['end'] - $p['start']);
 
-               $matches = array();
+               $matches = [];
                preg_match("/\/photos\/[\w]+\/image\/([\w]+)/", $link, $matches);
                if($matches) {
 
index 5124dbfd7fe061e6132f9852efed182ec013264a..6bd04ae7d43e95551db62469e9321f11cc7045a5 100644 (file)
@@ -55,11 +55,11 @@ function theme_admin_post(App $a) {
 
 /// @TODO $a is no longer used here
 function quattro_form(App $a, $align, $color, $tfs, $pfs) {
-       $colors = array(
+       $colors = [
                "dark"  => "Quattro",
                "lilac" => "Lilac",
                "green" => "Green",
-       );
+       ];
 
        if ($tfs === false) {
                $tfs = "20";
@@ -69,14 +69,14 @@ function quattro_form(App $a, $align, $color, $tfs, $pfs) {
        }
 
        $t = get_markup_template("theme_settings.tpl" );
-       $o .= replace_macros($t, array(
+       $o .= replace_macros($t, [
                '$submit'  => t('Submit'),
                '$baseurl' => System::baseUrl(),
                '$title'   => t("Theme settings"),
-               '$align'   => array('quattro_align', t('Alignment'), $align, '', array('left'=>t('Left'), 'center'=>t('Center'))),
-               '$color'   => array('quattro_color', t('Color scheme'), $color, '', $colors),
-               '$pfs'     => array('quattro_pfs', t('Posts font size'), $pfs),
-               '$tfs'     => array('quattro_tfs', t('Textareas font size'), $tfs),
-       ));
+               '$align'   => ['quattro_align', t('Alignment'), $align, '', ['left'=>t('Left'), 'center'=>t('Center')]],
+               '$color'   => ['quattro_color', t('Color scheme'), $color, '', $colors],
+               '$pfs'     => ['quattro_pfs', t('Posts font size'), $pfs],
+               '$tfs'     => ['quattro_tfs', t('Textareas font size'), $tfs],
+       ]);
        return $o;
 }
index 97aaa1e5a49622dcdf4c0e697ab793d8eeabd4bf..785b03b50d2d5dd52898843a25d1befe6b3d059f 100644 (file)
@@ -69,9 +69,9 @@ function theme_admin(App $a) {
                $helperlist = "https://forum.friendi.ca/profile/helpers";
 
        $t = get_markup_template("theme_admin_settings.tpl");
-       $o .= replace_macros($t, array(
-               '$helperlist' => array('vier_helperlist', t('Comma separated list of helper forums'), $helperlist, '', ''),
-               ));
+       $o .= replace_macros($t, [
+               '$helperlist' => ['vier_helperlist', t('Comma separated list of helper forums'), $helperlist, '', ''],
+               ]);
 
        $show_pages = get_vier_config('show_pages', true, true);
        $show_profiles = get_vier_config('show_profiles', true, true);
@@ -100,7 +100,7 @@ function theme_admin_post(App $a) {
 
 /// @TODO $a is no longer used
 function vier_form(App $a, $style, $show_pages, $show_profiles, $show_helpers, $show_services, $show_friends, $show_lastusers) {
-       $styles = array(
+       $styles = [
                "breathe"=>"Breathe",
                "netcolour"=>"Coloured Networks",
                "dark"=>"Dark",
@@ -108,22 +108,22 @@ function vier_form(App $a, $style, $show_pages, $show_profiles, $show_helpers, $
                "plus"=>"Plus",
                "plusminus"=>"Plus Minus",
                "shadow"=>"Shadow"
-       );
+       ];
 
-       $show_or_not = array('0'=>t("don't show"),     '1'=>t("show"),);
+       $show_or_not = ['0'=>t("don't show"),     '1'=>t("show"),];
 
        $t = get_markup_template("theme_settings.tpl");
-       $o .= replace_macros($t, array(
+       $o .= replace_macros($t, [
                '$submit' => t('Submit'),
                '$baseurl' => System::baseUrl(),
                '$title' => t("Theme settings"),
-               '$style' => array('vier_style',t ('Set style'),$style,'',$styles),
-               '$show_pages' => array('vier_show_pages', t('Community Pages'), $show_pages, '', $show_or_not),
-               '$show_profiles' => array('vier_show_profiles', t('Community Profiles'), $show_profiles, '', $show_or_not),
-               '$show_helpers' => array('vier_show_helpers', t('Help or @NewHere ?'), $show_helpers, '', $show_or_not),
-               '$show_services' => array('vier_show_services', t('Connect Services'), $show_services, '', $show_or_not),
-               '$show_friends' => array('vier_show_friends', t('Find Friends'), $show_friends, '', $show_or_not),
-               '$show_lastusers' => array('vier_show_lastusers', t('Last users'), $show_lastusers, '', $show_or_not)
-       ));
+               '$style' => ['vier_style',t ('Set style'),$style,'',$styles],
+               '$show_pages' => ['vier_show_pages', t('Community Pages'), $show_pages, '', $show_or_not],
+               '$show_profiles' => ['vier_show_profiles', t('Community Profiles'), $show_profiles, '', $show_or_not],
+               '$show_helpers' => ['vier_show_helpers', t('Help or @NewHere ?'), $show_helpers, '', $show_or_not],
+               '$show_services' => ['vier_show_services', t('Connect Services'), $show_services, '', $show_or_not],
+               '$show_friends' => ['vier_show_friends', t('Find Friends'), $show_friends, '', $show_or_not],
+               '$show_lastusers' => ['vier_show_lastusers', t('Last users'), $show_lastusers, '', $show_or_not]
+       ]);
        return $o;
 }
index 407e080550e13d31a23b0e91f031c8aa6c6a0d32..81010e38169485f0d2d352fb5c23f0dfe1d64a73 100644 (file)
@@ -56,7 +56,7 @@ header('Last-Modified: '.$modified);
 if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) || isset($_SERVER['HTTP_IF_NONE_MATCH'])) {
 
        $cached_modified = gmdate('r', strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']));
-       $cached_etag = str_replace(array('"', "-gzip"), array('', ''),
+       $cached_etag = str_replace(['"', "-gzip"], ['', ''],
                                stripslashes($_SERVER['HTTP_IF_NONE_MATCH']));
 
        if (($cached_modified == $modified) && ($cached_etag == $etag)) {
index 26066ccb048c9d8ccd06b99536682d946437d5bb..22060c6a4919efd759e4d304740c0feb42cd0319 100644 (file)
@@ -102,8 +102,8 @@ EOT;
 
        // Hide the left menu bar
        /// @TODO maybe move this static array out where it should belong?
-       if (($a->page['aside'] == "") && in_array($a->argv[0], array("community", "events", "help", "manage", "notifications",
-                       "probe", "webfinger", "login", "invite", "credits"))) {
+       if (($a->page['aside'] == "") && in_array($a->argv[0], ["community", "events", "help", "manage", "notifications",
+                       "probe", "webfinger", "login", "invite", "credits"])) {
                $a->page['htmlhead'] .= "<link rel='stylesheet' href='view/theme/vier/hide.css' />";
        }
 }
@@ -146,16 +146,16 @@ function vier_community_info() {
                if (DBM::is_result($r)) {
 
                        $aside['$comunity_profiles_title'] = t('Community Profiles');
-                       $aside['$comunity_profiles_items'] = array();
+                       $aside['$comunity_profiles_items'] = [];
 
                        foreach ($r as $rr) {
-                               $entry = replace_macros($tpl,array(
+                               $entry = replace_macros($tpl,[
                                        '$id' => $rr['id'],
                                        //'$profile_link' => Profile::zrl($rr['url']),
                                        '$profile_link' => 'follow/?url='.urlencode($rr['url']),
                                        '$photo' => proxy_url($rr['photo'], false, PROXY_SIZE_MICRO),
                                        '$alt_text' => $rr['name'],
-                               ));
+                               ]);
                                $aside['$comunity_profiles_items'][] = $entry;
                        }
                }
@@ -176,15 +176,15 @@ function vier_community_info() {
                if (DBM::is_result($r)) {
 
                        $aside['$lastusers_title'] = t('Last users');
-                       $aside['$lastusers_items'] = array();
+                       $aside['$lastusers_items'] = [];
 
                        foreach ($r as $rr) {
                                $profile_link = 'profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
-                               $entry = replace_macros($tpl,array(
+                               $entry = replace_macros($tpl,[
                                        '$id' => $rr['id'],
                                        '$profile_link' => $profile_link,
                                        '$photo' => $a->remove_baseurl($rr['thumb']),
-                                       '$alt_text' => $rr['name']));
+                                       '$alt_text' => $rr['name']]);
                                $aside['$lastusers_items'][] = $entry;
                        }
                }
@@ -192,13 +192,13 @@ function vier_community_info() {
 
        //right_aside FIND FRIENDS
        if ($show_friends && local_user()) {
-               $nv = array();
-               $nv['title'] = array("", t('Find Friends'), "", "");
-               $nv['directory'] = array('directory', t('Local Directory'), "", "");
-               $nv['global_directory'] = Array(get_server(), t('Global Directory'), "", "");
-               $nv['match'] = array('match', t('Similar Interests'), "", "");
-               $nv['suggest'] = array('suggest', t('Friend Suggestions'), "", "");
-               $nv['invite'] = array('invite', t('Invite Friends'), "", "");
+               $nv = [];
+               $nv['title'] = ["", t('Find Friends'), "", ""];
+               $nv['directory'] = ['directory', t('Local Directory'), "", ""];
+               $nv['global_directory'] = [get_server(), t('Global Directory'), "", ""];
+               $nv['match'] = ['match', t('Similar Interests'), "", ""];
+               $nv['suggest'] = ['suggest', t('Friend Suggestions'), "", ""];
+               $nv['invite'] = ['invite', t('Invite Friends'), "", ""];
 
                $nv['search'] = '<form name="simple_bar" method="get" action="dirfind">
                                                <span class="sbox_l"></span>
@@ -229,7 +229,7 @@ function vier_community_info() {
                        foreach ($contacts as $contact) {
                                $selected = (($cid == $contact['id']) ? ' forum-selected' : '');
 
-                               $entry = array(
+                               $entry = [
                                        'url'          => 'network?f=&cid=' . $contact['id'],
                                        'external_url' => 'redir/' . $contact['id'],
                                        'name'         => $contact['name'],
@@ -237,7 +237,7 @@ function vier_community_info() {
                                        'selected'     => $selected,
                                        'micro'        => System::removedBaseUrl(proxy_url($contact['micro'], false, PROXY_SIZE_MICRO)),
                                        'id'           => ++$id,
-                               );
+                               ];
                                $entries[] = $entry;
                        }
 
@@ -246,13 +246,13 @@ function vier_community_info() {
 
                        $page .= replace_macros(
                                $tpl,
-                               array(
+                               [
                                        '$title'          => t('Forums'),
                                        '$forums'         => $entries,
                                        '$link_desc'      => t('External link to forum'),
                                        '$total'          => $total,
                                        '$visible_forums' => $visible_forums,
-                                       '$showmore'       => t('show more'))
+                                       '$showmore'       => t('show more')]
                        );
 
                        $aside['$page'] = $page;
@@ -262,7 +262,7 @@ function vier_community_info() {
 
        // helpers
        if ($show_helpers) {
-               $r = array();
+               $r = [];
 
                $helperlist = Config::get("vier", "helperlist");
 
@@ -283,22 +283,22 @@ function vier_community_info() {
                foreach ($r AS $index => $helper)
                        $r[$index]["url"] = Profile::zrl($helper["url"]);
 
-               $r[] = array("url" => "help/Quick-Start-guide", "name" => t("Quick Start"));
+               $r[] = ["url" => "help/Quick-Start-guide", "name" => t("Quick Start")];
 
                $tpl = get_markup_template('ch_helpers.tpl');
 
                if ($r) {
 
-                       $helpers = array();
-                       $helpers['title'] = array("", t('Help'), "", "");
+                       $helpers = [];
+                       $helpers['title'] = ["", t('Help'), "", ""];
 
-                       $aside['$helpers_items'] = array();
+                       $aside['$helpers_items'] = [];
 
                        foreach ($r as $rr) {
-                               $entry = replace_macros($tpl,array(
+                               $entry = replace_macros($tpl,[
                                        '$url' => $rr['url'],
                                        '$title' => $rr['name'],
-                               ));
+                               ]);
                                $aside['$helpers_items'][] = $entry;
                        }
 
@@ -311,38 +311,38 @@ function vier_community_info() {
        if ($show_services) {
 
                /// @TODO This whole thing is hard-coded, better rewrite to Intercepting Filter Pattern (future-todo)
-               $r = array();
+               $r = [];
 
                if (plugin_enabled("appnet")) {
-                       $r[] = array("photo" => "images/appnet.png", "name" => "App.net");
+                       $r[] = ["photo" => "images/appnet.png", "name" => "App.net"];
                }
 
                if (plugin_enabled("buffer")) {
-                       $r[] = array("photo" => "images/buffer.png", "name" => "Buffer");
+                       $r[] = ["photo" => "images/buffer.png", "name" => "Buffer"];
                }
 
                if (plugin_enabled("blogger")) {
-                       $r[] = array("photo" => "images/blogger.png", "name" => "Blogger");
+                       $r[] = ["photo" => "images/blogger.png", "name" => "Blogger"];
                }
 
                if (plugin_enabled("dwpost")) {
-                       $r[] = array("photo" => "images/dreamwidth.png", "name" => "Dreamwidth");
+                       $r[] = ["photo" => "images/dreamwidth.png", "name" => "Dreamwidth"];
                }
 
                if (plugin_enabled("fbpost")) {
-                       $r[] = array("photo" => "images/facebook.png", "name" => "Facebook");
+                       $r[] = ["photo" => "images/facebook.png", "name" => "Facebook"];
                }
 
                if (plugin_enabled("ifttt")) {
-                       $r[] = array("photo" => "addon/ifttt/ifttt.png", "name" => "IFTTT");
+                       $r[] = ["photo" => "addon/ifttt/ifttt.png", "name" => "IFTTT"];
                }
 
                if (plugin_enabled("statusnet")) {
-                       $r[] = array("photo" => "images/gnusocial.png", "name" => "GNU Social");
+                       $r[] = ["photo" => "images/gnusocial.png", "name" => "GNU Social"];
                }
 
                if (plugin_enabled("gpluspost")) {
-                       $r[] = array("photo" => "images/googleplus.png", "name" => "Google+");
+                       $r[] = ["photo" => "images/googleplus.png", "name" => "Google+"];
                }
 
                /// @TODO old-lost code (and below)?
@@ -351,7 +351,7 @@ function vier_community_info() {
                //}
 
                if (plugin_enabled("libertree")) {
-                       $r[] = array("photo" => "images/libertree.png", "name" => "Libertree");
+                       $r[] = ["photo" => "images/libertree.png", "name" => "Libertree"];
                }
 
                //if (plugin_enabled("ljpost")) {
@@ -359,39 +359,39 @@ function vier_community_info() {
                //}
 
                if (plugin_enabled("pumpio")) {
-                       $r[] = array("photo" => "images/pumpio.png", "name" => "pump.io");
+                       $r[] = ["photo" => "images/pumpio.png", "name" => "pump.io"];
                }
 
                if (plugin_enabled("tumblr")) {
-                       $r[] = array("photo" => "images/tumblr.png", "name" => "Tumblr");
+                       $r[] = ["photo" => "images/tumblr.png", "name" => "Tumblr"];
                }
 
                if (plugin_enabled("twitter")) {
-                       $r[] = array("photo" => "images/twitter.png", "name" => "Twitter");
+                       $r[] = ["photo" => "images/twitter.png", "name" => "Twitter"];
                }
 
                if (plugin_enabled("wppost")) {
-                       $r[] = array("photo" => "images/wordpress.png", "name" => "Wordpress");
+                       $r[] = ["photo" => "images/wordpress.png", "name" => "Wordpress"];
                }
 
                if (function_exists("imap_open") && !Config::get("system","imap_disabled") && !Config::get("system","dfrn_only")) {
-                       $r[] = array("photo" => "images/mail.png", "name" => "E-Mail");
+                       $r[] = ["photo" => "images/mail.png", "name" => "E-Mail"];
                }
 
                $tpl = get_markup_template('ch_connectors.tpl');
 
                if (DBM::is_result($r)) {
 
-                       $con_services = array();
-                       $con_services['title'] = array("", t('Connect Services'), "", "");
+                       $con_services = [];
+                       $con_services['title'] = ["", t('Connect Services'), "", ""];
                        $aside['$con_services'] = $con_services;
 
                        foreach ($r as $rr) {
-                               $entry = replace_macros($tpl,array(
+                               $entry = replace_macros($tpl,[
                                        '$url' => $url,
                                        '$photo' => $rr['photo'],
                                        '$alt_text' => $rr['name'],
-                               ));
+                               ]);
                                $aside['$connector_items'][] = $entry;
                        }
                }