Replace old array syntax with new syntax
authorMatthias Schmidt <gravatronics@live.com>
Sat, 21 May 2016 17:27:54 +0000 (19:27 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 21 May 2016 17:27:54 +0000 (19:27 +0200)
15 files changed:
files/lib/system/exporter/IPB3xExporter.class.php
files/lib/system/exporter/IPB4xExporter.class.php
files/lib/system/exporter/Kunena3xExporter.class.php
files/lib/system/exporter/MyBB16xExporter.class.php
files/lib/system/exporter/NodeBB0xRedisExporter.class.php
files/lib/system/exporter/PhpBB31xExporter.class.php
files/lib/system/exporter/PhpBB3xExporter.class.php
files/lib/system/exporter/SMF2xExporter.class.php
files/lib/system/exporter/VB3or4xExporter.class.php
files/lib/system/exporter/VB5xExporter.class.php
files/lib/system/exporter/WBB2xExporter.class.php
files/lib/system/exporter/WBB3xExporter.class.php
files/lib/system/exporter/WBB4xExporter.class.php
files/lib/system/exporter/WordPress3xExporter.class.php
files/lib/system/exporter/XF12xExporter.class.php

index 608f201ab0da1942575f8dafa771394773e16bc2..e473eb22036cc4d67de679f5253d9f61a02ddf31 100644 (file)
@@ -21,18 +21,18 @@ use wcf\util\UserUtil;
  * @category   Community Framework
  */
 class IPB3xExporter extends AbstractExporter {
-       protected static $knownProfileFields = array('website', 'icq', 'gender', 'location', 'interests', 'skype');
+       protected static $knownProfileFields = ['website', 'icq', 'gender', 'location', 'interests', 'skype'];
        
        /**
         * board cache
         * @var array
         */
-       protected $boardCache = array();
+       protected $boardCache = [];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$methods
         */
-       protected $methods = array(
+       protected $methods = [
                'com.woltlab.wcf.user' => 'Users',
                'com.woltlab.wcf.user.group' => 'UserGroups',
                'com.woltlab.wcf.user.follower' => 'Followers',
@@ -52,30 +52,30 @@ class IPB3xExporter extends AbstractExporter {
                'com.woltlab.wbb.poll' => 'Polls',
                'com.woltlab.wbb.poll.option.vote' => 'PollOptionVotes',
                'com.woltlab.wbb.like' => 'Likes'
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\IExporter::getSupportedData()
         */
        public function getSupportedData() {
-               return array(
-                       'com.woltlab.wcf.user' => array(
+               return [
+                       'com.woltlab.wcf.user' => [
                                'com.woltlab.wcf.user.group',
                                'com.woltlab.wcf.user.avatar',
                                'com.woltlab.wcf.user.option',
                                'com.woltlab.wcf.user.comment',
                                'com.woltlab.wcf.user.follower'
-                       ),
-                       'com.woltlab.wbb.board' => array(
+                       ],
+                       'com.woltlab.wbb.board' => [
                                'com.woltlab.wbb.attachment',
                                'com.woltlab.wbb.poll',
                                'com.woltlab.wbb.watchedThread',
                                'com.woltlab.wbb.like'
-                       ),
-                       'com.woltlab.wcf.conversation' => array(
+                       ],
+                       'com.woltlab.wcf.conversation' => [
                                'com.woltlab.wcf.conversation.attachment'
-                       )
-               );
+                       ]
+               ];
        }
        
        /**
@@ -104,7 +104,7 @@ class IPB3xExporter extends AbstractExporter {
         * @see \wcf\system\exporter\IExporter::getQueue()
         */
        public function getQueue() {
-               $queue = array();
+               $queue = [];
                
                // user
                if (in_array('com.woltlab.wcf.user', $this->selectedData)) {
@@ -162,7 +162,7 @@ class IPB3xExporter extends AbstractExporter {
         */
        public function exportUsers($offset, $limit) {
                // cache profile fields
-               $profileFields = $knownProfileFields = array();
+               $profileFields = $knownProfileFields = [];
                $sql = "SELECT  *
                        FROM    ".$this->databasePrefix."pfields_data";
                $statement = $this->database->prepareStatement($sql);
@@ -192,9 +192,9 @@ class IPB3xExporter extends AbstractExporter {
                        WHERE           members.member_id BETWEEN ? AND ?
                        ORDER BY        members.member_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'username' => $row['name'],
                                'password' => '',
                                'email' => $row['email'],
@@ -206,21 +206,21 @@ class IPB3xExporter extends AbstractExporter {
                                'profileHits' => $row['members_profile_views'],
                                'userTitle' => ($row['title'] ?: ''),
                                'lastActivityTime' => $row['last_activity']
-                       );
+                       ];
                        
                        // get group ids
                        $groupIDs = preg_split('/,/', $row['mgroup_others'], -1, PREG_SPLIT_NO_EMPTY);
                        $groupIDs[] = $row['member_group_id'];
                        
                        // get user options
-                       $options = array(
+                       $options = [
                                //'timezone' => $row['time_offset'],
                                'homepage' => (isset($knownProfileFields['website']) && !empty($row['field_'.$knownProfileFields['website']['pf_id']])) ? $row['field_'.$knownProfileFields['website']['pf_id']] : '',
                                'icq' => (isset($knownProfileFields['icq']) && !empty($row['field_'.$knownProfileFields['icq']['pf_id']])) ? $row['field_'.$knownProfileFields['icq']['pf_id']] : '',
                                'hobbies' => (isset($knownProfileFields['interests']) && !empty($row['field_'.$knownProfileFields['interests']['pf_id']])) ? $row['field_'.$knownProfileFields['interests']['pf_id']] : '',
                                'skype' => (isset($knownProfileFields['skype']) && !empty($row['field_'.$knownProfileFields['skype']['pf_id']])) ? $row['field_'.$knownProfileFields['skype']['pf_id']] : '',
                                'location' => (isset($knownProfileFields['location']) && !empty($row['field_'.$knownProfileFields['location']['pf_id']])) ? $row['field_'.$knownProfileFields['location']['pf_id']] : ''
-                       );
+                       ];
                        
                        // get birthday
                        if ($row['bday_day'] && $row['bday_month'] && $row['bday_year']) {
@@ -234,10 +234,10 @@ class IPB3xExporter extends AbstractExporter {
                                if ($gender == 'f') $options['gender'] = UserProfile::GENDER_FEMALE;
                        }
                        
-                       $additionalData = array(
+                       $additionalData = [
                                'groupIDs' => $groupIDs,
                                'options' => $options
-                       );
+                       ];
                                
                        // handle user options
                        foreach ($profileFields as $profileField) {
@@ -251,7 +251,7 @@ class IPB3xExporter extends AbstractExporter {
                                
                        // update password hash
                        if ($newUserID) {
-                               $passwordUpdateStatement->execute(array('ipb3:'.$row['members_pass_hash'].':'.$row['members_pass_salt'], $newUserID));
+                               $passwordUpdateStatement->execute(['ipb3:'.$row['members_pass_hash'].':'.$row['members_pass_salt'], $newUserID]);
                        }
                }
        }
@@ -261,7 +261,7 @@ class IPB3xExporter extends AbstractExporter {
         */
        public function countUserOptions() {
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('pf_key NOT IN (?)', array(self::$knownProfileFields));
+               $conditionBuilder->add('pf_key NOT IN (?)', [self::$knownProfileFields]);
                
                $sql = "SELECT  COUNT(*) AS count
                        FROM    ".$this->databasePrefix."pfields_data
@@ -277,7 +277,7 @@ class IPB3xExporter extends AbstractExporter {
         */
        public function exportUserOptions($offset, $limit) {
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('pf_key NOT IN (?)', array(self::$knownProfileFields));
+               $conditionBuilder->add('pf_key NOT IN (?)', [self::$knownProfileFields]);
                
                $sql = "SELECT          *
                        FROM            ".$this->databasePrefix."pfields_data
@@ -286,11 +286,11 @@ class IPB3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['pf_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['pf_id'], [
                                'categoryName' => 'profile.personal',
                                'optionType' => 'textarea',
                                'askDuringRegistration' => $row['pf_show_on_reg'],
-                       ), array('name' => $row['pf_title']));
+                       ], ['name' => $row['pf_title']]);
                }
        }
        
@@ -310,7 +310,7 @@ class IPB3xExporter extends AbstractExporter {
                        WHERE           g_id BETWEEN ? AND ?
                        ORDER BY        g_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $groupType = UserGroup::OTHER;
                        switch ($row['g_id']) {
@@ -322,11 +322,11 @@ class IPB3xExporter extends AbstractExporter {
                                        break;
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['g_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['g_id'], [
                                'groupName' => $row['g_title'],
                                'groupType' => $groupType,
                                'userOnlineMarking' => (!empty($row['prefix']) ? ($row['prefix'].'%s'.$row['suffix']) : '%s')
-                       ));
+                       ]);
                }
        }
        
@@ -356,7 +356,7 @@ class IPB3xExporter extends AbstractExporter {
                                        OR pp_main_photo <> '')
                        ORDER BY        pp_member_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        if ($row['pp_main_photo']) {
                                $avatarName = basename($row['pp_main_photo']);
@@ -376,11 +376,11 @@ class IPB3xExporter extends AbstractExporter {
                        }
                        
                        $avatarExtension = pathinfo($avatarName, PATHINFO_EXTENSION);
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import($row['pp_member_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import($row['pp_member_id'], [
                                'avatarName' => $avatarName,
                                        'avatarExtension' => $avatarExtension,
                                'userID' => $row['pp_member_id']
-                       ), array('fileLocation' => $source));
+                       ], ['fileLocation' => $source]);
                }
        }
        
@@ -402,15 +402,15 @@ class IPB3xExporter extends AbstractExporter {
                        WHERE           status_updates.status_id BETWEEN ? AND ?
                        ORDER BY        status_updates.status_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.comment')->import($row['status_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.comment')->import($row['status_id'], [
                                'objectID' => $row['status_member_id'],
                                'userID' => $row['status_author_id'],
                                'username' => ($row['name'] ?: ''),
                                'message' => self::fixStatusUpdate($row['status_content']),
                                'time' => $row['status_date']
-                       ));
+                       ]);
                }
        }
        
@@ -432,15 +432,15 @@ class IPB3xExporter extends AbstractExporter {
                        WHERE           member_status_replies.reply_id BETWEEN ? AND ?
                        ORDER BY        member_status_replies.reply_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.comment.response')->import($row['reply_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.comment.response')->import($row['reply_id'], [
                                'commentID' => $row['reply_status_id'],
                                'time' => $row['reply_date'],
                                'userID' => $row['reply_member_id'],
                                'username' => ($row['name'] ?: ''),
                                'message' => self::fixStatusUpdate($row['reply_content']),
-                       ));
+                       ]);
                }
        }
        
@@ -460,13 +460,13 @@ class IPB3xExporter extends AbstractExporter {
                        WHERE           friends_id BETWEEN ? AND ?
                        ORDER BY        friends_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, [
                                'userID' => $row['friends_member_id'],
                                'followUserID' => $row['friends_friend_id'],
                                'time' => $row['friends_added']
-                       ));
+                       ]);
                }
        }
        
@@ -488,15 +488,15 @@ class IPB3xExporter extends AbstractExporter {
                        WHERE           message_topics.mt_id BETWEEN ? AND ?
                        ORDER BY        message_topics.mt_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($row['mt_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($row['mt_id'], [
                                'subject' => self::fixSubject($row['mt_title']),
                                'time' => $row['mt_date'],
                                'userID' => ($row['mt_starter_id'] ?: null),
                                'username' => ($row['mt_is_system'] ? 'System' : ($row['name'] ?: '')),
                                'isDraft' => $row['mt_is_draft']
-                       ));
+                       ]);
                }
        }
        
@@ -518,15 +518,15 @@ class IPB3xExporter extends AbstractExporter {
                        WHERE           message_posts.msg_id BETWEEN ? AND ?
                        ORDER BY        message_posts.msg_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['msg_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['msg_id'], [
                                'conversationID' => $row['msg_topic_id'],
                                'userID' => ($row['msg_author_id'] ?: null),
                                'username' => ($row['name'] ?: ''),
                                'message' => self::fixMessage($row['msg_post']),
                                'time' => $row['msg_date']
-                       ));
+                       ]);
                }
        }
        
@@ -548,16 +548,16 @@ class IPB3xExporter extends AbstractExporter {
                        WHERE           message_topic_user_map.map_id BETWEEN ? AND ?
                        ORDER BY        message_topic_user_map.map_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, [
                                'conversationID' => $row['map_topic_id'],
                                'participantID' => $row['map_user_id'],
                                'username' => ($row['name'] ?: ''),
                                'hideConversation' => ($row['map_left_time'] ? 1 : 0),
                                'isInvisible' => 0,
                                'lastVisitTime' => $row['map_read_time']
-                       ));
+                       ]);
                }
        }
        
@@ -610,7 +610,7 @@ class IPB3xExporter extends AbstractExporter {
                if (!isset($this->boardCache[$parentID])) return;
                
                foreach ($this->boardCache[$parentID] as $board) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['id'], [
                                'parentID' => ($board['parent_id'] != -1 ? $board['parent_id'] : null),
                                'position' => $board['position'],
                                'boardType' => ($board['redirect_on'] ? Board::TYPE_LINK : ($board['sub_can_post'] ? Board::TYPE_BOARD : Board::TYPE_CATEGORY)),
@@ -621,7 +621,7 @@ class IPB3xExporter extends AbstractExporter {
                                'clicks' => $board['redirect_hits'],
                                'posts' => $board['posts'],
                                'threads' => $board['topics']
-                       ));
+                       ]);
                                
                        $this->exportBoardsRecursively($board['id']);
                }
@@ -639,13 +639,13 @@ class IPB3xExporter extends AbstractExporter {
         */
        public function exportThreads($offset, $limit) {
                // get thread ids
-               $threadIDs = array();
+               $threadIDs = [];
                $sql = "SELECT          tid
                        FROM            ".$this->databasePrefix."topics
                        WHERE           tid BETWEEN ? AND ?
                        ORDER BY        tid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $threadIDs[] = $row['tid'];
                }
@@ -655,7 +655,7 @@ class IPB3xExporter extends AbstractExporter {
                
                // get threads
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('topics.tid IN (?)', array($threadIDs));
+               $conditionBuilder->add('topics.tid IN (?)', [$threadIDs]);
                
                $sql = "SELECT          topics.*
                        FROM            ".$this->databasePrefix."topics topics
@@ -663,7 +663,7 @@ class IPB3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'boardID' => $row['forum_id'],
                                'topic' => self::fixSubject($row['title']),
                                'time' => $row['start_date'],
@@ -678,8 +678,8 @@ class IPB3xExporter extends AbstractExporter {
                                'movedTime' => $row['moved_on'],
                                'deleteTime' => $row['tdelete_time'],
                                'lastPostTime' => $row['last_post']
-                       );
-                       $additionalData = array();
+                       ];
+                       $additionalData = [];
                        if (isset($tags[$row['tid']])) $additionalData['tags'] = $tags[$row['tid']];
                                
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.thread')->import($row['tid'], $data, $additionalData);
@@ -702,9 +702,9 @@ class IPB3xExporter extends AbstractExporter {
                        WHERE           pid BETWEEN ? AND ?
                        ORDER BY        pid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['pid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['pid'], [
                                'threadID' => $row['topic_id'],
                                'userID' => $row['author_id'],
                                'username' => ($row['author_name'] ?: ''),
@@ -717,7 +717,7 @@ class IPB3xExporter extends AbstractExporter {
                                'editReason' => $row['post_edit_reason'],
                                'ipAddress' => UserUtil::convertIPv4To6($row['ip_address']),
                                'deleteTime' => $row['pdelete_time']
-                       ));
+                       ]);
                }
        }
        
@@ -730,7 +730,7 @@ class IPB3xExporter extends AbstractExporter {
                        WHERE   like_app = ?
                                AND like_area = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('forums', 'topics'));
+               $statement->execute(['forums', 'topics']);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -745,12 +745,12 @@ class IPB3xExporter extends AbstractExporter {
                                        AND like_area = ?
                        ORDER BY        like_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array('forums', 'topics'));
+               $statement->execute(['forums', 'topics']);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import(0, [
                                'objectID' => $row['like_rel_id'],
                                'userID' => $row['like_member_id']
-                       ));
+                       ]);
                }
        }
        
@@ -772,30 +772,30 @@ class IPB3xExporter extends AbstractExporter {
                        WHERE           pid BETWEEN ? AND ?
                        ORDER BY        pid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $data = @unserialize($row['choices']);
                        if (!$data) $data = @unserialize(str_replace('\"', '"', $row['choices'])); // pre ipb3.4 fallback
                        if (!$data || !isset($data[1])) continue; 
 
                        // import poll
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['pid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['pid'], [
                                'objectID' => $row['topic_firstpost'],
                                'question' => self::fixSubject($data[1]['question']),
                                'time' => $row['start_date'],
                                'isPublic' => $row['poll_view_voters'],
                                'maxVotes' => (!empty($data[1]['multi']) ? count($data[1]['choice']) : 1),
                                'votes' => $row['votes']
-                       ));
+                       ]);
                        
                        // import poll options
                        foreach ($data[1]['choice'] as $key => $choice) {
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['pid'].'-'.$key, array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['pid'].'-'.$key, [
                                        'pollID' => $row['pid'],
                                        'optionValue' => $choice,
                                        'showOrder' => $key,
                                        'votes' => $data[1]['votes'][$key]
-                               ));
+                               ]);
                        }
                }
        }
@@ -818,18 +818,18 @@ class IPB3xExporter extends AbstractExporter {
                        WHERE           voters.vid BETWEEN ? AND ?
                        ORDER BY        voters.vid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $data = @unserialize($row['member_choices']);
                        if (!$data) $data = @unserialize(str_replace('\"', '"', $row['member_choices'])); // pre ipb3.4 fallback
                        if (!$data || !isset($data[1])) continue;
                        
                        foreach ($data[1] as $pollOptionKey) {
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, [
                                        'pollID' => $row['pid'],
                                        'optionID' => $row['pid'].'-'.$pollOptionKey,
                                        'userID' => $row['member_id']
-                               ));
+                               ]);
                        }
                }
        }
@@ -844,7 +844,7 @@ class IPB3xExporter extends AbstractExporter {
                                AND like_area = ?
                                AND like_visible = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('forums', 'topics', 1));
+               $statement->execute(['forums', 'topics', 1]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -862,15 +862,15 @@ class IPB3xExporter extends AbstractExporter {
                                        AND core_like.like_visible = ?
                        ORDER BY        core_like.like_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array('forums', 'topics', 1));
+               $statement->execute(['forums', 'topics', 1]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.like')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.like')->import(0, [
                                'objectID' => $row['topic_firstpost'],
                                'objectUserID' => ($row['starter_id'] ?: null),
                                'userID' => $row['like_member_id'],
                                'likeValue' => Like::LIKE,
                                'time' => $row['like_added']
-                       ));
+                       ]);
                }
        }
        
@@ -894,7 +894,7 @@ class IPB3xExporter extends AbstractExporter {
                        WHERE   attach_rel_module = ?
                                AND attach_rel_id > ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($type, 0));
+               $statement->execute([$type, 0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -906,11 +906,11 @@ class IPB3xExporter extends AbstractExporter {
                                        AND attach_rel_id > ?
                        ORDER BY        attach_id DESC";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array($type, 0));
+               $statement->execute([$type, 0]);
                while ($row = $statement->fetchArray()) {
                        $fileLocation = $this->fileSystemPath.'uploads/'.$row['attach_location'];
 
-                       ImportHandler::getInstance()->getImporter($objectType)->import($row['attach_id'], array(
+                       ImportHandler::getInstance()->getImporter($objectType)->import($row['attach_id'], [
                                'objectID' => $row['attach_rel_id'],
                                'userID' => ($row['attach_member_id'] ?: null),
                                'filename' => $row['attach_file'],
@@ -918,16 +918,16 @@ class IPB3xExporter extends AbstractExporter {
                                'isImage' => $row['attach_is_image'],
                                'downloads' => $row['attach_hits'],
                                'uploadTime' => $row['attach_date'],
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
        private function getTags($app, $area, array $objectIDs) {
-               $tags = array();
+               $tags = [];
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('tag_meta_app = ?', array($app));
-               $conditionBuilder->add('tag_meta_area = ?', array($area));
-               $conditionBuilder->add('tag_meta_id IN (?)', array($objectIDs));
+               $conditionBuilder->add('tag_meta_app = ?', [$app]);
+               $conditionBuilder->add('tag_meta_area = ?', [$area]);
+               $conditionBuilder->add('tag_meta_id IN (?)', [$objectIDs]);
                
                // get taggable id
                $sql = "SELECT          tag_meta_id, tag_text
@@ -936,7 +936,7 @@ class IPB3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       if (!isset($tags[$row['tag_meta_id']])) $tags[$row['tag_meta_id']] = array();
+                       if (!isset($tags[$row['tag_meta_id']])) $tags[$row['tag_meta_id']] = [];
                        $tags[$row['tag_meta_id']][] = $row['tag_text'];
                }
                
index e1c370112ba4d235e2100706af1334e9308885cc..ebffa4a23a2e8ca452b448356255380da391ebb7 100644 (file)
@@ -38,12 +38,12 @@ class IPB4xExporter extends AbstractExporter {
         * board cache
         * @var array
         */
-       protected $boardCache = array();
+       protected $boardCache = [];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$methods
         */
-       protected $methods = array(
+       protected $methods = [
                'com.woltlab.wcf.user' => 'Users',
                'com.woltlab.wcf.user.group' => 'UserGroups',
                'com.woltlab.wcf.user.follower' => 'Followers',
@@ -63,30 +63,30 @@ class IPB4xExporter extends AbstractExporter {
                'com.woltlab.wbb.poll' => 'Polls',
                'com.woltlab.wbb.poll.option.vote' => 'PollOptionVotes',
                'com.woltlab.wbb.like' => 'Likes'
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\IExporter::getSupportedData()
         */
        public function getSupportedData() {
-               return array(
-                       'com.woltlab.wcf.user' => array(
+               return [
+                       'com.woltlab.wcf.user' => [
                                'com.woltlab.wcf.user.group',
                                'com.woltlab.wcf.user.avatar',
                                'com.woltlab.wcf.user.option',
                                'com.woltlab.wcf.user.comment',
                                'com.woltlab.wcf.user.follower'
-                       ),
-                       'com.woltlab.wbb.board' => array(
+                       ],
+                       'com.woltlab.wbb.board' => [
                                'com.woltlab.wbb.attachment',
                                'com.woltlab.wbb.poll',
                                'com.woltlab.wbb.watchedThread',
                                'com.woltlab.wbb.like'
-                       ),
-                       'com.woltlab.wcf.conversation' => array(
+                       ],
+                       'com.woltlab.wcf.conversation' => [
                                'com.woltlab.wcf.conversation.attachment'
-                       )
-               );
+                       ]
+               ];
        }
        
        /**
@@ -115,7 +115,7 @@ class IPB4xExporter extends AbstractExporter {
         * @see \wcf\system\exporter\IExporter::getQueue()
         */
        public function getQueue() {
-               $queue = array();
+               $queue = [];
                
                // user
                if (in_array('com.woltlab.wcf.user', $this->selectedData)) {
@@ -173,7 +173,7 @@ class IPB4xExporter extends AbstractExporter {
         */
        public function exportUsers($offset, $limit) {
                // cache profile fields
-               $profileFields = array();
+               $profileFields = [];
                $sql = "SELECT  *
                        FROM    ".$this->databasePrefix."core_pfields_data";
                $statement = $this->database->prepareStatement($sql);
@@ -196,9 +196,9 @@ class IPB4xExporter extends AbstractExporter {
                        WHERE           members.member_id BETWEEN ? AND ?
                        ORDER BY        members.member_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'username' => $row['name'],
                                'password' => '',
                                'email' => $row['email'],
@@ -210,24 +210,24 @@ class IPB4xExporter extends AbstractExporter {
                                'profileHits' => $row['members_profile_views'],
                                'userTitle' => ($row['member_title'] ?: ''),
                                'lastActivityTime' => $row['last_activity']
-                       );
+                       ];
                        
                        // get group ids
                        $groupIDs = preg_split('/,/', $row['mgroup_others'], -1, PREG_SPLIT_NO_EMPTY);
                        $groupIDs[] = $row['member_group_id'];
                        
                        // get user options
-                       $options = array();
+                       $options = [];
                        
                        // get birthday
                        if ($row['bday_day'] && $row['bday_month'] && $row['bday_year']) {
                                $options['birthday'] = $row['bday_year'].'-'.($row['bday_month'] < 10 ? '0' : '').$row['bday_month'].'-'.($row['bday_day'] < 10 ? '0' : '').$row['bday_day'];
                        }
                        
-                       $additionalData = array(
+                       $additionalData = [
                                'groupIDs' => $groupIDs,
                                'options' => $options
-                       );
+                       ];
                                
                        // handle user options
                        foreach ($profileFields as $profileField) {
@@ -241,7 +241,7 @@ class IPB4xExporter extends AbstractExporter {
                                
                        // update password hash
                        if ($newUserID) {
-                               $passwordUpdateStatement->execute(array('cryptMD5:'.$row['members_pass_hash'].':'.$row['members_pass_salt'], $newUserID));
+                               $passwordUpdateStatement->execute(['cryptMD5:'.$row['members_pass_hash'].':'.$row['members_pass_salt'], $newUserID]);
                        }
                }
        }
@@ -268,11 +268,11 @@ class IPB4xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['pf_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['pf_id'], [
                                'categoryName' => 'profile.personal',
                                'optionType' => 'textarea',
                                'askDuringRegistration' => $row['pf_show_on_reg'],
-                       ), array('name' => $this->getLanguageVar('core_pfield', $row['pf_id']))); 
+                       ], ['name' => $this->getLanguageVar('core_pfield', $row['pf_id'])]); 
                }
        }
        
@@ -292,7 +292,7 @@ class IPB4xExporter extends AbstractExporter {
                        WHERE           g_id BETWEEN ? AND ?
                        ORDER BY        g_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $groupType = UserGroup::OTHER;
                        switch ($row['g_id']) {
@@ -304,11 +304,11 @@ class IPB4xExporter extends AbstractExporter {
                                        break;
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['g_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['g_id'], [
                                'groupName' => $this->getLanguageVar('core_group', $row['g_id']),
                                'groupType' => $groupType,
                                'userOnlineMarking' => (!empty($row['prefix']) ? ($row['prefix'].'%s'.$row['suffix']) : '%s')
-                       ));
+                       ]);
                }
        }
        
@@ -336,16 +336,16 @@ class IPB4xExporter extends AbstractExporter {
                                        AND pp_main_photo <> ''
                        ORDER BY        member_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $avatarName = basename($row['pp_main_photo']);
                        $source = $this->fileSystemPath.'uploads/'.$row['pp_main_photo'];
                        $avatarExtension = pathinfo($avatarName, PATHINFO_EXTENSION);
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import($row['member_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import($row['member_id'], [
                                'avatarName' => $avatarName,
                                'avatarExtension' => $avatarExtension,
                                'userID' => $row['member_id']
-                       ), array('fileLocation' => $source));
+                       ], ['fileLocation' => $source]);
                }
        }
        
@@ -367,15 +367,15 @@ class IPB4xExporter extends AbstractExporter {
                        WHERE           status_updates.status_id BETWEEN ? AND ?
                        ORDER BY        status_updates.status_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.comment')->import($row['status_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.comment')->import($row['status_id'], [
                                'objectID' => $row['status_member_id'],
                                'userID' => $row['status_author_id'],
                                'username' => ($row['name'] ?: ''),
                                'message' => self::fixMessage($row['status_content']),
                                'time' => $row['status_date']
-                       ));
+                       ]);
                }
        }
        
@@ -397,15 +397,15 @@ class IPB4xExporter extends AbstractExporter {
                        WHERE           member_status_replies.reply_id BETWEEN ? AND ?
                        ORDER BY        member_status_replies.reply_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.comment.response')->import($row['reply_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.comment.response')->import($row['reply_id'], [
                                'commentID' => $row['reply_status_id'],
                                'time' => $row['reply_date'],
                                'userID' => $row['reply_member_id'],
                                'username' => ($row['name'] ?: ''),
                                'message' => self::fixMessage($row['reply_content']),
-                       ));
+                       ]);
                }
        }
        
@@ -418,7 +418,7 @@ class IPB4xExporter extends AbstractExporter {
                        WHERE   follow_app = ?
                                AND follow_area = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('core', 'member'));
+               $statement->execute(['core', 'member']);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -433,13 +433,13 @@ class IPB4xExporter extends AbstractExporter {
                                        AND follow_area = ?
                        ORDER BY        follow_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset); 
-               $statement->execute(array('core', 'member'));
+               $statement->execute(['core', 'member']);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, [
                                'userID' => $row['follow_member_id'],
                                'followUserID' => $row['follow_rel_id'],
                                'time' => $row['follow_added']
-                       ));
+                       ]);
                }
        }
        
@@ -461,15 +461,15 @@ class IPB4xExporter extends AbstractExporter {
                        WHERE           message_topics.mt_id BETWEEN ? AND ?
                        ORDER BY        message_topics.mt_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($row['mt_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($row['mt_id'], [
                                'subject' => $row['mt_title'],
                                'time' => $row['mt_date'],
                                'userID' => ($row['mt_starter_id'] ?: null),
                                'username' => ($row['mt_is_system'] ? 'System' : ($row['name'] ?: '')),
                                'isDraft' => $row['mt_is_draft']
-                       ));
+                       ]);
                }
        }
        
@@ -491,15 +491,15 @@ class IPB4xExporter extends AbstractExporter {
                        WHERE           message_posts.msg_id BETWEEN ? AND ?
                        ORDER BY        message_posts.msg_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['msg_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['msg_id'], [
                                'conversationID' => $row['msg_topic_id'],
                                'userID' => ($row['msg_author_id'] ?: null),
                                'username' => ($row['name'] ?: ''),
                                'message' => self::fixMessage($row['msg_post']),
                                'time' => $row['msg_date']
-                       ));
+                       ]);
                }
        }
        
@@ -521,16 +521,16 @@ class IPB4xExporter extends AbstractExporter {
                        WHERE           message_topic_user_map.map_id BETWEEN ? AND ?
                        ORDER BY        message_topic_user_map.map_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, [
                                'conversationID' => $row['map_topic_id'],
                                'participantID' => $row['map_user_id'],
                                'username' => ($row['name'] ?: ''),
                                'hideConversation' => ($row['map_left_time'] ? 1 : 0),
                                'isInvisible' => 0,
                                'lastVisitTime' => $row['map_read_time']
-                       ));
+                       ]);
                }
        }
        
@@ -583,7 +583,7 @@ class IPB4xExporter extends AbstractExporter {
                if (!isset($this->boardCache[$parentID])) return;
                
                foreach ($this->boardCache[$parentID] as $board) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['id'], [
                                'parentID' => ($board['parent_id'] != -1 ? $board['parent_id'] : null),
                                'position' => $board['position'],
                                'boardType' => ($board['redirect_on'] ? Board::TYPE_LINK : ($board['sub_can_post'] ? Board::TYPE_BOARD : Board::TYPE_CATEGORY)),
@@ -595,7 +595,7 @@ class IPB4xExporter extends AbstractExporter {
                                'clicks' => $board['redirect_hits'],
                                'posts' => $board['posts'],
                                'threads' => $board['topics']
-                       ));
+                       ]);
                                
                        $this->exportBoardsRecursively($board['id']);
                }
@@ -613,13 +613,13 @@ class IPB4xExporter extends AbstractExporter {
         */
        public function exportThreads($offset, $limit) {
                // get thread ids
-               $threadIDs = array();
+               $threadIDs = [];
                $sql = "SELECT          tid
                        FROM            ".$this->databasePrefix."forums_topics
                        WHERE           tid BETWEEN ? AND ?
                        ORDER BY        tid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $threadIDs[] = $row['tid'];
                }
@@ -629,7 +629,7 @@ class IPB4xExporter extends AbstractExporter {
                                
                // get threads
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('topics.tid IN (?)', array($threadIDs));
+               $conditionBuilder->add('topics.tid IN (?)', [$threadIDs]);
                
                $sql = "SELECT          topics.*
                        FROM            ".$this->databasePrefix."forums_topics topics
@@ -637,7 +637,7 @@ class IPB4xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'boardID' => $row['forum_id'],
                                'topic' => $row['title'],
                                'time' => $row['start_date'],
@@ -650,8 +650,8 @@ class IPB4xExporter extends AbstractExporter {
                                'movedThreadID' => ($row['moved_to'] ? intval($row['moved_to']) : null),
                                'movedTime' => $row['moved_on'],
                                'lastPostTime' => $row['last_post']
-                       );
-                       $additionalData = array();
+                       ];
+                       $additionalData = [];
                        if (isset($tags[$row['tid']])) $additionalData['tags'] = $tags[$row['tid']];
                                
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.thread')->import($row['tid'], $data, $additionalData);
@@ -674,9 +674,9 @@ class IPB4xExporter extends AbstractExporter {
                        WHERE           pid BETWEEN ? AND ?
                        ORDER BY        pid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['pid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['pid'], [
                                'threadID' => $row['topic_id'],
                                'userID' => $row['author_id'],
                                'username' => $row['author_name'],
@@ -689,7 +689,7 @@ class IPB4xExporter extends AbstractExporter {
                                'editReason' => $row['post_edit_reason'],
                                'ipAddress' => UserUtil::convertIPv4To6($row['ip_address']),
                                'deleteTime' => $row['pdelete_time']
-                       ));
+                       ]);
                }
        }
        
@@ -702,7 +702,7 @@ class IPB4xExporter extends AbstractExporter {
                        WHERE   follow_app = ?
                                AND follow_area = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('forums', 'topic'));
+               $statement->execute(['forums', 'topic']);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -717,12 +717,12 @@ class IPB4xExporter extends AbstractExporter {
                                        AND follow_area = ?
                        ORDER BY        follow_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset); 
-               $statement->execute(array('forums', 'topic'));
+               $statement->execute(['forums', 'topic']);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import(0, [
                                'objectID' => $row['follow_rel_id'],
                                'userID' => $row['follow_member_id']
-                       ));
+                       ]);
                }
        }
        
@@ -744,7 +744,7 @@ class IPB4xExporter extends AbstractExporter {
                        WHERE           pid BETWEEN ? AND ?
                        ORDER BY        pid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        if (!$row['topic_firstpost']) continue;
                        
@@ -760,23 +760,23 @@ class IPB4xExporter extends AbstractExporter {
                        } 
 
                        // import poll
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['pid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['pid'], [
                                'objectID' => $row['topic_firstpost'],
                                'question' => $data[1]['question'],
                                'time' => $row['start_date'],
                                'isPublic' => $row['poll_view_voters'],
                                'maxVotes' => (!empty($data[1]['multi']) ? count($data[1]['choice']) : 1),
                                'votes' => $row['votes']
-                       ));
+                       ]);
                        
                        // import poll options
                        foreach ($data[1]['choice'] as $key => $choice) {
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['pid'].'-'.$key, array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['pid'].'-'.$key, [
                                        'pollID' => $row['pid'],
                                        'optionValue' => $choice,
                                        'showOrder' => $key,
                                        'votes' => $data[1]['votes'][$key]
-                               ));
+                               ]);
                        }
                }
        }
@@ -799,7 +799,7 @@ class IPB4xExporter extends AbstractExporter {
                        WHERE           voters.vid BETWEEN ? AND ?
                        ORDER BY        voters.vid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        try {
                                $data = JSON::decode($row['member_choices']);
@@ -810,14 +810,14 @@ class IPB4xExporter extends AbstractExporter {
                        }
                        if (!$data || !isset($data[1])) continue;
                        
-                       if (!is_array($data[1])) $data[1] = array($data[1]);
+                       if (!is_array($data[1])) $data[1] = [$data[1]];
                        
                        foreach ($data[1] as $pollOptionKey) {
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, [
                                        'pollID' => $row['pid'],
                                        'optionID' => $row['pid'].'-'.$pollOptionKey,
                                        'userID' => $row['member_id']
-                               ));
+                               ]);
                        }
                }
        }
@@ -831,7 +831,7 @@ class IPB4xExporter extends AbstractExporter {
                        WHERE   app = ?
                                AND type = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('forums', 'pid'));
+               $statement->execute(['forums', 'pid']);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -848,15 +848,15 @@ class IPB4xExporter extends AbstractExporter {
                                        AND core_reputation_index.type = ?
                        ORDER BY        core_reputation_index.id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array('forums', 'pid'));
+               $statement->execute(['forums', 'pid']);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.like')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.like')->import(0, [
                                'objectID' => $row['type_id'],
                                'objectUserID' => ($row['author_id'] ?: null),
                                'userID' => $row['member_id'],
                                'likeValue' => Like::LIKE,
                                'time' => $row['rep_date']
-                       ));
+                       ]);
                }
        }
        
@@ -880,7 +880,7 @@ class IPB4xExporter extends AbstractExporter {
                        WHERE   location_key = ?
                                AND id2 IS NOT NULL";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($type));
+               $statement->execute([$type]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -894,11 +894,11 @@ class IPB4xExporter extends AbstractExporter {
                                        AND core_attachments_map.id2 IS NOT NULL
                        ORDER BY        core_attachments_map.attachment_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array($type));
+               $statement->execute([$type]);
                while ($row = $statement->fetchArray()) {
                        $fileLocation = $this->fileSystemPath.'uploads/'.$row['attach_location'];
 
-                       ImportHandler::getInstance()->getImporter($objectType)->import($row['attach_id'], array(
+                       ImportHandler::getInstance()->getImporter($objectType)->import($row['attach_id'], [
                                'objectID' => $row['id2'],
                                'userID' => ($row['attach_member_id'] ?: null),
                                'filename' => $row['attach_file'],
@@ -906,16 +906,16 @@ class IPB4xExporter extends AbstractExporter {
                                'isImage' => $row['attach_is_image'],
                                'downloads' => $row['attach_hits'],
                                'uploadTime' => $row['attach_date'],
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
        private function getTags($app, $area, array $objectIDs) {
-               $tags = array();
+               $tags = [];
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('tag_meta_app = ?', array($app));
-               $conditionBuilder->add('tag_meta_area = ?', array($area));
-               $conditionBuilder->add('tag_meta_id IN (?)', array($objectIDs));
+               $conditionBuilder->add('tag_meta_app = ?', [$app]);
+               $conditionBuilder->add('tag_meta_area = ?', [$area]);
+               $conditionBuilder->add('tag_meta_id IN (?)', [$objectIDs]);
                
                // get taggable id
                $sql = "SELECT          tag_meta_id, tag_text
@@ -924,7 +924,7 @@ class IPB4xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       if (!isset($tags[$row['tag_meta_id']])) $tags[$row['tag_meta_id']] = array();
+                       if (!isset($tags[$row['tag_meta_id']])) $tags[$row['tag_meta_id']] = [];
                        $tags[$row['tag_meta_id']][] = $row['tag_text'];
                }
                
@@ -938,7 +938,7 @@ class IPB4xExporter extends AbstractExporter {
                                FROM    ".$this->databasePrefix."core_sys_lang
                                WHERE   lang_default = ?";
                        $statement = $this->database->prepareStatement($sql);
-                       $statement->execute(array(1));
+                       $statement->execute([1]);
                        $row = $statement->fetchArray();
                        if ($row !== false) {
                                $this->defaultLanguageID = $row['lang_id'];
@@ -960,7 +960,7 @@ class IPB4xExporter extends AbstractExporter {
                                        AND word_key = ?";
                        $this->languageStatement = $this->database->prepareStatement($sql, 1);
                }
-               $this->languageStatement->execute(array($this->getDefaultLanguageID(), $prefix . '_' . $id . ($suffix ? ('_' . $suffix) : '')));
+               $this->languageStatement->execute([$this->getDefaultLanguageID(), $prefix . '_' . $id . ($suffix ? ('_' . $suffix) : '')]);
                $row = $this->languageStatement->fetchArray();
                if ($row !== false) {
                        return $row['word_custom'];
index e2314e70bce1dad480478caf57b3bdf0bfb746c3..8b77172cf0d0bb886d381a0f8eb209bbdb4dc114 100644 (file)
@@ -26,12 +26,12 @@ class Kunena3xExporter extends AbstractExporter {
         * board cache
         * @var array
         */
-       protected $boardCache = array();
+       protected $boardCache = [];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$methods
         */
-       protected $methods = array(
+       protected $methods = [
                'com.woltlab.wcf.user' => 'Users',
                'com.woltlab.wcf.user.group' => 'UserGroups',
                'com.woltlab.wcf.user.rank' => 'UserRanks',
@@ -40,38 +40,38 @@ class Kunena3xExporter extends AbstractExporter {
                'com.woltlab.wbb.thread' => 'Threads',
                'com.woltlab.wbb.post' => 'Posts',
                'com.woltlab.wbb.attachment' => 'Attachments'
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$limits
         */
-       protected $limits = array(
+       protected $limits = [
                'com.woltlab.wcf.user' => 200,
                'com.woltlab.wbb.thread' => 200,
                'com.woltlab.wbb.attachment' => 100
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\IExporter::getSupportedData()
         */
        public function getSupportedData() {
-               return array(
-                       'com.woltlab.wcf.user' => array(
+               return [
+                       'com.woltlab.wcf.user' => [
                                'com.woltlab.wcf.user.group',
                                'com.woltlab.wcf.user.avatar',
                                'com.woltlab.wcf.user.rank'
-                       ),
-                       'com.woltlab.wbb.board' => array(
+                       ],
+                       'com.woltlab.wbb.board' => [
                                'com.woltlab.wbb.attachment'
-                       )
-               );
+                       ]
+               ];
        }
        
        /**
         * @see \wcf\system\exporter\IExporter::getQueue()
         */
        public function getQueue() {
-               $queue = array();
+               $queue = [];
                
                // user
                if (in_array('com.woltlab.wcf.user', $this->selectedData)) {
@@ -133,7 +133,7 @@ class Kunena3xExporter extends AbstractExporter {
                        WHERE           id BETWEEN ? AND ?
                        ORDER BY        id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        switch ($row['id']) {
                                case 1:
@@ -150,10 +150,10 @@ class Kunena3xExporter extends AbstractExporter {
                                        break;
                        }
                                
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['id'], [
                                'groupName' => $row['title'],
                                'groupType' => $groupType
-                       ));
+                       ]);
                }
        }
        
@@ -195,7 +195,7 @@ class Kunena3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'username' => $row['username'],
                                'password' => StringUtil::getRandomID(),
                                'email' => $row['email'],
@@ -203,22 +203,22 @@ class Kunena3xExporter extends AbstractExporter {
                                'registrationDate' => @strtotime($row['registerDate']),
                                'lastActivityTime' => @strtotime($row['lastvisitDate']),
                                'signature' => self::fixBBCodes($row['signature'])
-                       );
+                       ];
 
                        // get user options
-                       $options = array(
+                       $options = [
                                'location' => $row['location'],
                                'birthday' => $row['birthdate'],
                                'icq' => $row['icq'],
                                'skype' => $row['skype'],
                                'homepage' => $row['websiteurl'],
                                'gender' => $row['gender']
-                       );
+                       ];
                                
-                       $additionalData = array(
+                       $additionalData = [
                                'groupIDs' => explode(',', $row['groupIDs']),
                                'options' => $options
-                       );
+                       ];
                                
                        // import user
                        $newUserID = ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user')->import($row['userid'], $data, $additionalData);
@@ -236,7 +236,7 @@ class Kunena3xExporter extends AbstractExporter {
                                        $password = 'phpass:'.$row['password'];
                                }
                                
-                               $passwordUpdateStatement->execute(array($password, $newUserID));
+                               $passwordUpdateStatement->execute([$password, $newUserID]);
                        }
                }
        }
@@ -249,7 +249,7 @@ class Kunena3xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."kunena_ranks
                        WHERE   rank_special = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -263,16 +263,16 @@ class Kunena3xExporter extends AbstractExporter {
                        WHERE           rank_special = ?
                        ORDER BY        rank_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['rank_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['rank_id'], [
                                'groupID' => 2, // 2 = registered users
                                'requiredPoints' => $row['rank_min'] * 5,
                                'rankTitle' => $row['rank_title'],
                                'rankImage' => $row['rank_image'],
                                'repeatImage' => 0,
                                'requiredGender' => 0 // neutral
-                       ));
+                       ]);
                }
        }
        
@@ -302,11 +302,11 @@ class Kunena3xExporter extends AbstractExporter {
                while ($row = $statement->fetchArray()) {
                        $filepath = $this->fileSystemPath . 'media/kunena/avatars/' . $row['avatar'];
                        if (file_exists($filepath)) {
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import(0, array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import(0, [
                                        'avatarName' => basename($filepath),
                                        'avatarExtension' => pathinfo($filepath, PATHINFO_EXTENSION),
                                        'userID' => $row['userid']
-                               ), array('fileLocation' => $filepath));
+                               ], ['fileLocation' => $filepath]);
                        }
                }
        }
@@ -346,14 +346,14 @@ class Kunena3xExporter extends AbstractExporter {
                if (!isset($this->boardCache[$parentID])) return;
                
                foreach ($this->boardCache[$parentID] as $board) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['id'], [
                                'parentID' => ($board['parent_id'] ?: null),
                                'position' => $board['ordering'],
                                'boardType' => ($board['parent_id'] ? 0 : 1),
                                'title' => $board['name'],
                                'description' => $board['description'],
                                'isClosed' => $board['locked'] ? 1 : 0
-                       ));
+                       ]);
                        
                        $this->exportBoardsRecursively($board['id']);
                }
@@ -376,9 +376,9 @@ class Kunena3xExporter extends AbstractExporter {
                        WHERE           id BETWEEN ? AND ?
                        ORDER BY        id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'boardID' => $row['category_id'],
                                'topic' => $row['subject'],
                                'time' => $row['first_post_time'],
@@ -388,7 +388,7 @@ class Kunena3xExporter extends AbstractExporter {
                                'isSticky' => $row['ordering'] == 1 ? 1 : 0,
                                'isClosed' => $row['locked'] == 1 ? 1 : 0,
                                'movedThreadID' => ($row['moved_id'] ? $row['moved_id'] : null)
-                       );
+                       ];
                                
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.thread')->import($row['id'], $data);
                }
@@ -412,9 +412,9 @@ class Kunena3xExporter extends AbstractExporter {
                        WHERE           id BETWEEN ? AND ?
                        ORDER BY        id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['id'], [
                                'threadID' => $row['thread'],
                                'userID' => $row['userid'],
                                'username' => $row['name'],
@@ -424,7 +424,7 @@ class Kunena3xExporter extends AbstractExporter {
                                'ipAddress' => UserUtil::convertIPv4To6($row['ip']),
                                'isClosed' => ($row['locked'] ? 1 : 0),
                                'editorID' => null
-                       ));
+                       ]);
                }
        }
        
@@ -444,21 +444,21 @@ class Kunena3xExporter extends AbstractExporter {
                        WHERE           id BETWEEN ? AND ?
                        ORDER BY        id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $fileLocation = FileUtil::addTrailingSlash($this->fileSystemPath . $row['folder']) . $row['filename'];
                                
                        $isImage = 0;
                        if ($row['filetype'] == 'image/jpeg' || $row['filetype'] == 'image/png' || $row['filetype'] == 'image/gif') $isImage = 1;
                                
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.attachment')->import($row['id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.attachment')->import($row['id'], [
                                'objectID' => $row['mesid'],
                                'userID' => ($row['userid'] ?: null),
                                'filename' => $row['filename'],
                                'filesize' => $row['size'],
                                'fileType' => $row['filetype'],
                                'isImage' => $isImage
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
@@ -469,22 +469,22 @@ class Kunena3xExporter extends AbstractExporter {
                if ($quoteRegex === null) {
                        $quoteRegex = new Regex('\[quote="(.*?)" post=(\d+)\]', Regex::CASE_INSENSITIVE);
                        $quoteCallback = new Callback(function ($matches) {
-                               $username = str_replace(array("\\", "'"), array("\\\\", "\'"), $matches[1]);
+                               $username = str_replace(["\\", "'"], ["\\\\", "\'"], $matches[1]);
                                $postID = $matches[2];
                                
-                               $postLink = LinkHandler::getInstance()->getLink('Thread', array(
+                               $postLink = LinkHandler::getInstance()->getLink('Thread', [
                                        'application' => 'wbb',
                                        'postID' => $postID,
                                        'forceFrontend' => true
-                               )).'#post'.$postID;
-                               $postLink = str_replace(array("\\", "'"), array("\\\\", "\'"), $postLink);
+                                       ]).'#post'.$postID;
+                               $postLink = str_replace(["\\", "'"], ["\\\\", "\'"], $postLink);
                                
                                return "[quote='".$username."','".$postLink."']";
                        });
                }
                
                // use proper WCF 2 bbcode
-               $replacements = array(
+               $replacements = [
                        '[left]' => '[align=left]',
                        '[/left]' => '[/align]',
                        '[right]' => '[align=right]',
@@ -494,7 +494,7 @@ class Kunena3xExporter extends AbstractExporter {
                        '[/video]' => '[/media]',
                        '[attachment' => '[attach',
                        '[/attachment]' => '[/attach]'
-               );
+               ];
                $message = str_ireplace(array_keys($replacements), array_values($replacements), $message);
                
                // fix size bbcodes
index 6baa503801c6af7f925017309d11a8e67912bc48..a6e33a7ea3cb7f0caddbaa0dcbf4d3515eeb3ac4 100644 (file)
@@ -32,18 +32,18 @@ use wcf\util\UserUtil;
  * @category   Community Framework
  */
 class MyBB16xExporter extends AbstractExporter {
-       protected static $knownProfileFields = array('Bio', 'Sex', 'Location');
+       protected static $knownProfileFields = ['Bio', 'Sex', 'Location'];
        
        /**
         * board cache
         * @var array
         */
-       protected $boardCache = array();
+       protected $boardCache = [];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$methods
         */
-       protected $methods = array(
+       protected $methods = [
                'com.woltlab.wcf.user' => 'Users',
                'com.woltlab.wcf.user.group' => 'UserGroups',
                'com.woltlab.wcf.user.rank' => 'UserRanks',
@@ -67,42 +67,42 @@ class MyBB16xExporter extends AbstractExporter {
                'com.woltlab.wcf.label' => 'Labels',
                'com.woltlab.wbb.acl' => 'ACLs',
                'com.woltlab.wcf.smiley' => 'Smilies'
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$limits
         */
-       protected $limits = array(
+       protected $limits = [
                'com.woltlab.wcf.user' => 200,
                'com.woltlab.wcf.user.avatar' => 100,
                'com.woltlab.wcf.user.follower' => 100
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\IExporter::getSupportedData()
         */
        public function getSupportedData() {
-               return array(
-                       'com.woltlab.wcf.user' => array(
+               return [
+                       'com.woltlab.wcf.user' => [
                                'com.woltlab.wcf.user.group',
                                'com.woltlab.wcf.user.avatar',
                                'com.woltlab.wcf.user.option',
                                'com.woltlab.wcf.user.follower',
                                'com.woltlab.wcf.user.rank'
-                       ),
-                       'com.woltlab.wbb.board' => array(
+                       ],
+                       'com.woltlab.wbb.board' => [
                                'com.woltlab.wbb.acl',
                                'com.woltlab.wbb.attachment',
                                'com.woltlab.wbb.poll',
                                'com.woltlab.wbb.watchedThread',
                                'com.woltlab.wbb.like',
                                'com.woltlab.wcf.label'
-                       ),
-                       'com.woltlab.wcf.conversation' => array(
+                       ],
+                       'com.woltlab.wcf.conversation' => [
                                'com.woltlab.wcf.conversation.label'
-                       ),
-                       'com.woltlab.wcf.smiley' => array()
-               );
+                       ],
+                       'com.woltlab.wcf.smiley' => []
+               ];
        }
        
        /**
@@ -115,7 +115,7 @@ class MyBB16xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."datacache
                        WHERE   title = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('version'));
+               $statement->execute(['version']);
                $row = $statement->fetchArray();
                $data = unserialize($row['cache']);
                
@@ -137,7 +137,7 @@ class MyBB16xExporter extends AbstractExporter {
         * @see \wcf\system\exporter\IExporter::getQueue()
         */
        public function getQueue() {
-               $queue = array();
+               $queue = [];
                
                // user
                if (in_array('com.woltlab.wcf.user', $this->selectedData)) {
@@ -208,7 +208,7 @@ class MyBB16xExporter extends AbstractExporter {
                        WHERE           gid BETWEEN ? AND ?
                        ORDER BY        gid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        switch ($row['gid']) {
                                case 1:
@@ -222,13 +222,13 @@ class MyBB16xExporter extends AbstractExporter {
                                break;
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['gid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['gid'], [
                                'groupName' => $row['title'],
                                'groupType' => $groupType,
                                'userOnlineMarking' => str_replace('{username}', '%s', $row['namestyle']),
                                'showOnTeamPage' => $row['showforumteam'],
                                'priority' => $row['disporder'] ? pow(2, 10 - $row['disporder']) : 0
-                       ));
+                       ]);
                }
        }
        
@@ -244,7 +244,7 @@ class MyBB16xExporter extends AbstractExporter {
         */
        public function exportUsers($offset, $limit) {
                // cache profile fields
-               $profileFields = $knownProfileFields = array();
+               $profileFields = $knownProfileFields = [];
                $sql = "SELECT  *
                        FROM    ".$this->databasePrefix."profilefields";
                $statement = $this->database->prepareStatement($sql);
@@ -277,9 +277,9 @@ class MyBB16xExporter extends AbstractExporter {
                        WHERE           user_table.uid BETWEEN ? AND ?
                        ORDER BY        user_table.uid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0, $offset + 1, $offset + $limit));
+               $statement->execute([0, $offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'username' => $row['username'],
                                'password' => '',
                                'email' => $row['email'],
@@ -298,16 +298,16 @@ class MyBB16xExporter extends AbstractExporter {
                                'disableSignatureReason' => '',
                                'userTitle' => $row['usertitle'],
                                'lastActivityTime' => $row['lastactive']
-                       );
+                       ];
                        
                        $birthday = \DateTime::createFromFormat('j-n-Y', $row['birthday']);
                        // get user options
-                       $options = array(
+                       $options = [
                                'location' => (isset($knownProfileFields['Location']) && !empty($row['fid'.$knownProfileFields['Location']['fid']])) ? $row['fid'.$knownProfileFields['Location']['fid']] : '',
                                'birthday' => $birthday ? $birthday->format('Y-m-d') : '',
                                'icq' => $row['icq'],
                                'homepage' => $row['website']
-                       );
+                       ];
                        
                        // get gender
                        if (isset($knownProfileFields['Sex']) && !empty($row['fid'.$knownProfileFields['Sex']['fid']])) {
@@ -320,10 +320,10 @@ class MyBB16xExporter extends AbstractExporter {
                                }
                        }
                        
-                       $additionalData = array(
+                       $additionalData = [
                                'groupIDs' => array_unique(ArrayUtil::toIntegerArray(explode(',', $row['additionalgroups'].','.$row['usergroup']))),
                                'options' => $options
-                       );
+                       ];
                        
                        // handle user options
                        foreach ($profileFields as $profileField) {
@@ -337,7 +337,7 @@ class MyBB16xExporter extends AbstractExporter {
                        
                        // update password hash
                        if ($newUserID) {
-                               $passwordUpdateStatement->execute(array('mybb1:'.$row['password'].':'.$row['salt'], $newUserID));
+                               $passwordUpdateStatement->execute(['mybb1:'.$row['password'].':'.$row['salt'], $newUserID]);
                        }
                }
        }
@@ -347,7 +347,7 @@ class MyBB16xExporter extends AbstractExporter {
         */
        public function countUserOptions() {
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('name NOT IN (?)', array(self::$knownProfileFields));
+               $conditionBuilder->add('name NOT IN (?)', [self::$knownProfileFields]);
                
                $sql = "SELECT  COUNT(*) AS count
                        FROM    ".$this->databasePrefix."profilefields
@@ -363,7 +363,7 @@ class MyBB16xExporter extends AbstractExporter {
         */
        public function exportUserOptions($offset, $limit) {
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('name NOT IN (?)', array(self::$knownProfileFields));
+               $conditionBuilder->add('name NOT IN (?)', [self::$knownProfileFields]);
                
                $sql = "SELECT          *
                        FROM            ".$this->databasePrefix."profilefields
@@ -397,7 +397,7 @@ class MyBB16xExporter extends AbstractExporter {
                                        
                                        $selectOptions = $type[1];
                        }
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['fid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['fid'], [
                                'categoryName' => 'profile.personal',
                                'optionType' => $row['type'],
                                'editable' => ((isset($row['editable']) && $row['editable']) || (isset($row['editableby']) && $row['editableby'] == -1)) ? UserOption::EDITABILITY_ALL : UserOption::EDITABILITY_ADMINISTRATOR,
@@ -405,7 +405,7 @@ class MyBB16xExporter extends AbstractExporter {
                                'selectOptions' => $selectOptions,
                                'visible' => ((isset($row['hidden']) && $row['hidden']) || (isset($row['profile']) && !$row['profile']) || (isset($row['viewableby']) && $row['viewableby'] != -1)) ? UserOption::VISIBILITY_ADMINISTRATOR | UserOption::VISIBILITY_OWNER : UserOption::VISIBILITY_ALL,
                                'showOrder' => $row['disporder']
-                       ), array('name' => $row['name']));
+                       ], ['name' => $row['name']]);
                }
        }
        
@@ -416,7 +416,7 @@ class MyBB16xExporter extends AbstractExporter {
                $sql = "SELECT  (SELECT COUNT(*) FROM ".$this->databasePrefix."usertitles)
                                + (SELECT COUNT(*) FROM ".$this->databasePrefix."usergroups WHERE usertitle <> ? AND gid <> ?) AS count";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('', 1));
+               $statement->execute(['', 1]);
                $row = $statement->fetchArray();
                
                return $row['count'];
@@ -439,16 +439,16 @@ class MyBB16xExporter extends AbstractExporter {
                        )
                        ORDER BY        utid";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array('', 1));
+               $statement->execute(['', 1]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['utid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['utid'], [
                                'groupID' => $row['gid'],
                                'requiredPoints' => $row['posts'] * 5,
                                'rankTitle' => $row['title'],
                                'rankImage' => $row['starimage'],
                                'repeatImage' => $row['stars'],
                                'requiredGender' => 0 // neutral
-                       ));
+                       ]);
                }
        }
        
@@ -460,7 +460,7 @@ class MyBB16xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."users
                        WHERE   buddylist <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(''));
+               $statement->execute(['']);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -474,15 +474,15 @@ class MyBB16xExporter extends AbstractExporter {
                        WHERE           buddylist <> ?
                        ORDER BY        uid";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(''));
+               $statement->execute(['']);
                while ($row = $statement->fetchArray()) {
                        $buddylist = array_unique(ArrayUtil::toIntegerArray(explode(',', $row['buddylist'])));
                        
                        foreach ($buddylist as $buddy) {
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, [
                                        'userID' => $row['uid'],
                                        'followUserID' => $buddy
-                               ));
+                               ]);
                        }
                }
        }
@@ -496,7 +496,7 @@ class MyBB16xExporter extends AbstractExporter {
                        WHERE           avatar <> ?
                                AND     avatartype IN (?, ?)";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('', 'upload', 'gallery'));
+               $statement->execute(['', 'upload', 'gallery']);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -511,19 +511,19 @@ class MyBB16xExporter extends AbstractExporter {
                                        AND avatartype IN (?, ?)
                        ORDER BY        uid";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array('', 'upload', 'gallery'));
+               $statement->execute(['', 'upload', 'gallery']);
                
                while ($row = $statement->fetchArray()) {
                        $path = parse_url($row['avatar']);
                        list($width, $height) = explode('|', $row['avatardimensions']);
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import(0, [
                                'avatarName' => basename($path['path']),
                                'avatarExtension' => pathinfo($path['path'], PATHINFO_EXTENSION),
                                'width' => $width,
                                'height' => $height,
                                'userID' => $row['uid']
-                       ), array('fileLocation' => $this->fileSystemPath . $path['path']));
+                       ], ['fileLocation' => $this->fileSystemPath . $path['path']]);
                }
        }
        
@@ -550,10 +550,10 @@ class MyBB16xExporter extends AbstractExporter {
                                list($folderID, $folderName) = explode('**', $folder);
                                if ($folderID <= 4) continue; // the first 4 folders are the default folders
                                
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.label')->import($row['uid'].'-'.$folderID, array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.label')->import($row['uid'].'-'.$folderID, [
                                        'userID' => $row['uid'],
                                        'label' => $folderName
-                               ));
+                               ]);
                        }
                }
        }
@@ -589,15 +589,15 @@ class MyBB16xExporter extends AbstractExporter {
                while ($row = $statement->fetchArray()) {
                        $row['isDraft'] = $row['folder'] == 3 ? 1 : 0;
                        
-                       $conversationID = ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($row['fromid'].'-'.$row['dateline'], array(
+                       $conversationID = ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($row['fromid'].'-'.$row['dateline'], [
                                'subject' => $row['subject'],
                                'time' => $row['dateline'],
                                'userID' => $row['fromid'],
                                'username' => $row['username'] ?: '',
                                'isDraft' => $row['isDraft']
-                       ));
+                       ]);
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['pmid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['pmid'], [
                                'conversationID' => $row['fromid'].'-'.$row['dateline'],
                                'userID' => $row['fromid'],
                                'username' => $row['username'] ?: '',
@@ -605,7 +605,7 @@ class MyBB16xExporter extends AbstractExporter {
                                'time' => $row['dateline'],
                                'enableSmilies' => $row['smilieoff'] ? 0 : 1,
                                'showSignature' => $row['includesig'] ? 1 : 0
-                       ));
+                       ]);
                }
        }
        
@@ -627,17 +627,17 @@ class MyBB16xExporter extends AbstractExporter {
                        WHERE           pmid BETWEEN ? AND ?
                        ORDER BY        pmid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $recipients = unserialize($row['recipients']);
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, [
                                'conversationID' => $row['fromid'].'-'.$row['dateline'],
                                'participantID' => $row['uid'],
                                'username' => $row['username'] ?: '',
                                'hideConversation' => $row['deletetime'] ? 1 : 0,
                                'isInvisible' => (isset($recipients['bcc']) && in_array($row['uid'], $recipients['bcc'])) ? 1 : 0,
                                'lastVisitTime' => $row['readtime']
-                       ), array('labelIDs' => ($row['folder'] > 4 ? array($row['folder']) : array())));
+                       ], ['labelIDs' => ($row['folder'] > 4 ? [$row['folder']] : [])]);
                }
        }
        
@@ -676,7 +676,7 @@ class MyBB16xExporter extends AbstractExporter {
                if (!isset($this->boardCache[$parentID])) return;
                
                foreach ($this->boardCache[$parentID] as $board) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['fid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['fid'], [
                                'parentID' => ($board['pid'] ?: null),
                                'position' => $board['disporder'],
                                'boardType' => ($board['linkto'] ? Board::TYPE_LINK : ($board['type'] == 'c' ? Board::TYPE_CATEGORY : Board::TYPE_BOARD)),
@@ -689,7 +689,7 @@ class MyBB16xExporter extends AbstractExporter {
                                'isInvisible' => $board['active'] ? 0 : 1,
                                'posts' => $board['posts'],
                                'threads' => $board['threads']
-                       ));
+                       ]);
                        
                        $this->exportBoardsRecursively($board['fid']);
                }
@@ -711,9 +711,9 @@ class MyBB16xExporter extends AbstractExporter {
                        WHERE           tid BETWEEN ? AND ?
                        ORDER BY        tid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'boardID' => $row['fid'],
                                'topic' => $row['subject'],
                                'time' => $row['dateline'],
@@ -725,10 +725,10 @@ class MyBB16xExporter extends AbstractExporter {
                                'isClosed' => $row['closed'] ? 1 : 0,
                                'isDeleted' => $row['deletetime'] ? 1 : 0,
                                'deleteTime' => $row['deletetime']
-                       );
+                       ];
                        
-                       $additionalData = array();
-                       if ($row['prefix']) $additionalData['labels'] = array(ImportHandler::getInstance()->getNewID('com.woltlab.wbb.board', $row['fid']).'-'.$row['prefix']);
+                       $additionalData = [];
+                       if ($row['prefix']) $additionalData['labels'] = [ImportHandler::getInstance()->getNewID('com.woltlab.wbb.board', $row['fid']).'-'.$row['prefix']];
                        
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.thread')->import($row['tid'], $data, $additionalData);
                }
@@ -752,9 +752,9 @@ class MyBB16xExporter extends AbstractExporter {
                        WHERE           pid BETWEEN ? AND ?
                        ORDER BY        pid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['pid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['pid'], [
                                'threadID' => $row['tid'],
                                'userID' => $row['uid'],
                                'username' => $row['username'],
@@ -769,7 +769,7 @@ class MyBB16xExporter extends AbstractExporter {
                                'enableSmilies' => $row['smilieoff'] ? 0 : 1,
                                'showSignature' => $row['includesig'],
                                'ipAddress' => UserUtil::convertIPv4To6($row['ipaddress'])
-                       ));
+                       ]);
                }
        }
        
@@ -790,7 +790,7 @@ class MyBB16xExporter extends AbstractExporter {
                                FROM    ".$this->databasePrefix."settings
                                WHERE   name = ?";
                        $statement = $this->database->prepareStatement($sql);
-                       $statement->execute(array('uploadspath'));
+                       $statement->execute(['uploadspath']);
                        $row = $statement->fetchArray();
                        $uploadsPath = $row['value'];
                        if (!StringUtil::startsWith($uploadsPath, '/')) $uploadsPath = realpath($this->fileSystemPath.$uploadsPath);
@@ -800,7 +800,7 @@ class MyBB16xExporter extends AbstractExporter {
                        WHERE           aid BETWEEN ? AND ?
                        ORDER BY        aid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $fileLocation = FileUtil::addTrailingSlash($uploadsPath).$row['attachname'];
                        if (!file_exists($fileLocation)) continue;
@@ -814,7 +814,7 @@ class MyBB16xExporter extends AbstractExporter {
                                $row['isImage'] = $row['width'] = $row['height'] = 0;
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.attachment')->import($row['aid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.attachment')->import($row['aid'], [
                                'objectID' => $row['pid'],
                                'userID' => ($row['uid'] ?: null),
                                'filename' => $row['filename'],
@@ -825,7 +825,7 @@ class MyBB16xExporter extends AbstractExporter {
                                'height' => $row['height'],
                                'downloads' => $row['downloads'],
                                'uploadTime' => $row['dateuploaded']
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
@@ -845,13 +845,13 @@ class MyBB16xExporter extends AbstractExporter {
                        WHERE           sid BETWEEN ? AND ?
                        ORDER BY        sid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import($row['sid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import($row['sid'], [
                                'objectID' => $row['tid'],
                                'userID' => $row['uid'],
                                'notification' => $row['notification']
-                       ));
+                       ]);
                }
        }
        
@@ -873,9 +873,9 @@ class MyBB16xExporter extends AbstractExporter {
                        WHERE           pid BETWEEN ? AND ?
                        ORDER BY        pid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['pid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['pid'], [
                                'objectID' => $row['firstpost'],
                                'question' => $row['question'],
                                'time' => $row['dateline'],
@@ -884,7 +884,7 @@ class MyBB16xExporter extends AbstractExporter {
                                'isPublic' => $row['public'],
                                'maxVotes' => $row['multiple'] ? $row['numoptions'] : 1,
                                'votes' => $row['numvotes']
-                       ));
+                       ]);
                }
        }
        
@@ -909,12 +909,12 @@ class MyBB16xExporter extends AbstractExporter {
                        $votes = explode('||~|~||', $row['votes']);
                        $i = 1;
                        foreach ($options as $key => $option) {
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['pid'].'-'.$i, array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['pid'].'-'.$i, [
                                        'pollID' => $row['pid'],
                                        'optionValue' => $option,
                                        'showOrder' => $i,
                                        'votes' => $votes[$key]
-                               ));
+                               ]);
                                
                                $i++;
                        }
@@ -944,11 +944,11 @@ class MyBB16xExporter extends AbstractExporter {
                $statement->execute();
                
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import($row['vid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import($row['vid'], [
                                'pollID' => $row['pid'],
                                'optionID' => $row['pid'].'-'.$row['voteoption'],
                                'userID' => $row['uid']
-                       ));
+                       ]);
                }
        }
        
@@ -962,7 +962,7 @@ class MyBB16xExporter extends AbstractExporter {
                                AND     adduid <> ?
                                AND     reputation <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0, 0, 0));
+               $statement->execute([0, 0, 0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -978,15 +978,15 @@ class MyBB16xExporter extends AbstractExporter {
                                        AND reputation <> ?
                        ORDER BY        rid";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0, 0, 0));
+               $statement->execute([0, 0, 0]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.like')->import($row['rid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.like')->import($row['rid'], [
                                'objectID' => $row['pid'],
                                'objectUserID' => ($row['uid'] ?: null),
                                'userID' => $row['adduid'],
                                'likeValue' => ($row['reputation'] > 0 ? Like::LIKE : Like::DISLIKE),
                                'time' => $row['dateline']
-                       ));
+                       ]);
                }
        }
        
@@ -997,7 +997,7 @@ class MyBB16xExporter extends AbstractExporter {
                $sql = "SELECT  COUNT(*) AS count
                        FROM    ".$this->databasePrefix."threadprefixes";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1006,13 +1006,13 @@ class MyBB16xExporter extends AbstractExporter {
         * Exports labels.
         */
        public function exportLabels($offset, $limit) {
-               $prefixMap = array();
+               $prefixMap = [];
                $boardIDs = array_keys(BoardCache::getInstance()->getBoards());
                
                $sql = "SELECT  *
                        FROM    ".$this->databasePrefix."threadprefixes";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                while ($row = $statement->fetchArray()) {
                        $forums = array_unique(ArrayUtil::toIntegerArray(explode(',', $row['forums'])));
                        foreach ($forums as $key => $forum) {
@@ -1025,7 +1025,7 @@ class MyBB16xExporter extends AbstractExporter {
                        if (in_array('-1', $forums)) $forums = $boardIDs;
                        
                        foreach ($forums as $forum) {
-                               if (!isset($prefixMap[$forum])) $prefixMap[$forum] = array();
+                               if (!isset($prefixMap[$forum])) $prefixMap[$forum] = [];
                                $prefixMap[$forum][$row['pid']] = $row['prefix'];
                        }
                }
@@ -1036,16 +1036,16 @@ class MyBB16xExporter extends AbstractExporter {
                        
                        foreach ($prefixMap as $forumID => $data) {
                                // import label group
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label.group')->import($forumID, array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label.group')->import($forumID, [
                                        'groupName' => 'labelgroup'.$forumID
-                               ), array('objects' => array($objectType->objectTypeID => array($forumID))));
+                               ], ['objects' => [$objectType->objectTypeID => [$forumID]]]);
                                
                                // import labels
                                foreach ($data as $prefixID => $prefix) {
-                                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label')->import($forumID.'-'.$prefixID, array(
+                                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label')->import($forumID.'-'.$prefixID, [
                                                'groupID' => $forumID,
                                                'label' => $prefix
-                                       ));
+                                       ]);
                                }
                        }
                }
@@ -1068,7 +1068,7 @@ class MyBB16xExporter extends AbstractExporter {
         */
        public function exportACLs($offset, $limit) {
                // get ids
-               $mod = $user = $group = array();
+               $mod = $user = $group = [];
                $sql = "(
                                SELECT  mid AS id, 'mod' AS type
                                FROM    ".$this->databasePrefix."moderators
@@ -1087,9 +1087,9 @@ class MyBB16xExporter extends AbstractExporter {
                
                // mods
                if (!empty($mod)) {
-                       $modPermissionMap = array(
-                               'caneditposts' => array('canEditPost'),
-                               'candeleteposts' => array(
+                       $modPermissionMap = [
+                               'caneditposts' => ['canEditPost'],
+                               'candeleteposts' => [
                                        'canDeleteThread',
                                        'canReadDeletedThread',
                                        'canRestoreThread',
@@ -1099,16 +1099,16 @@ class MyBB16xExporter extends AbstractExporter {
                                        'canReadDeletedPost',
                                        'canRestorePost',
                                        'canDeletePostCompletely'
-                               ),
-                               'canviewips' => array(),
-                               'canopenclosethreads' => array(
+                               ],
+                               'canviewips' => [],
+                               'canopenclosethreads' => [
                                        'canCloseThread',
                                        'canReplyClosedThread',
                                        'canPinThread',
                                        
                                        'canClosePost'
-                               ),
-                               'canmanagethreads' => array(
+                               ],
+                               'canmanagethreads' => [
                                        'canEnableThread',
                                        'canMoveThread',
                                        'canMergeThread',
@@ -1116,11 +1116,11 @@ class MyBB16xExporter extends AbstractExporter {
                                        'canEnablePost',
                                        'canMovePost',
                                        'canMergePost'
-                               )
-                       );
+                               ]
+                       ];
                        
                        $conditionBuilder = new PreparedStatementConditionBuilder();
-                       $conditionBuilder->add('mid IN (?)', array($mod));
+                       $conditionBuilder->add('mid IN (?)', [$mod]);
                        
                        $sql = "SELECT  *
                                FROM    ".$this->databasePrefix."moderators
@@ -1130,13 +1130,13 @@ class MyBB16xExporter extends AbstractExporter {
                        while ($row = $statement->fetchArray()) {
                                foreach ($modPermissionMap as $mybbPermission => $permissions) {
                                        foreach ($permissions as $permission) {
-                                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array(
+                                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, [
                                                        'objectID' => $row['fid'],
                                                        ($row['isgroup'] ? 'groupID' : 'userID') => $row['id'],
                                                        'optionValue' => $row[$mybbPermission]
-                                               ), array(
+                                               ], [
                                                        'optionName' => $permission
-                                               ));
+                                               ]);
                                        }
                                }
                        }
@@ -1144,32 +1144,32 @@ class MyBB16xExporter extends AbstractExporter {
                
                // groups
                if (!empty($group)) {
-                       $groupPermissionMap = array(
-                               'canview' => array(
+                       $groupPermissionMap = [
+                               'canview' => [
                                        'canViewBoard',
                                        'canEnterBoard'
-                               ),
-                               'canviewthreads' => array('canReadThread'),
-                               'canonlyviewownthreads' => array(),
-                               'candlattachments' => array(
+                               ],
+                               'canviewthreads' => ['canReadThread'],
+                               'canonlyviewownthreads' => [],
+                               'candlattachments' => [
                                        'canDownloadAttachment',
                                        'canViewAttachmentPreview'
-                               ),
-                               'canpostthreads' => array('canStartThread'),
-                               'canpostreplys' => array('canReplyThread'),
-                               'canpostattachments' => array('canUploadAttachment'),
-                               'canratethreads' => array(),
-                               'caneditposts' => array('canEditOwnPost'),
-                               'candeleteposts' => array('canDeleteOwnPost'),
-                               'candeletethreads' => array(),
-                               'caneditattachments' => array(),
-                               'canpostpolls' => array('canStartPoll'),
-                               'canvotepolls' => array('canVotePoll'),
-                               'cansearch' => array()
-                       );
+                               ],
+                               'canpostthreads' => ['canStartThread'],
+                               'canpostreplys' => ['canReplyThread'],
+                               'canpostattachments' => ['canUploadAttachment'],
+                               'canratethreads' => [],
+                               'caneditposts' => ['canEditOwnPost'],
+                               'candeleteposts' => ['canDeleteOwnPost'],
+                               'candeletethreads' => [],
+                               'caneditattachments' => [],
+                               'canpostpolls' => ['canStartPoll'],
+                               'canvotepolls' => ['canVotePoll'],
+                               'cansearch' => []
+                       ];
                        
                        $conditionBuilder = new PreparedStatementConditionBuilder();
-                       $conditionBuilder->add('pid IN (?)', array($group));
+                       $conditionBuilder->add('pid IN (?)', [$group]);
                        
                        $sql = "SELECT  *
                                FROM    ".$this->databasePrefix."forumpermissions
@@ -1180,13 +1180,13 @@ class MyBB16xExporter extends AbstractExporter {
                        while ($row = $statement->fetchArray()) {
                                foreach ($groupPermissionMap as $mybbPermission => $permissions) {
                                        foreach ($permissions as $permission) {
-                                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array(
+                                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, [
                                                        'objectID' => $row['fid'],
                                                        'groupID' => $row['gid'],
                                                        'optionValue' => $row[$mybbPermission]
-                                               ), array(
+                                               ], [
                                                        'optionName' => $permission
-                                               ));
+                                               ]);
                                        }
                                }
                        }
@@ -1213,15 +1213,15 @@ class MyBB16xExporter extends AbstractExporter {
                        FROM            ".$this->databasePrefix."smilies
                        ORDER BY        sid";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array());
+               $statement->execute([]);
                while ($row = $statement->fetchArray()) {
                        $fileLocation = $this->fileSystemPath . $row['image'];
                                
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley')->import($row['sid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley')->import($row['sid'], [
                                'smileyTitle' => $row['name'],
                                'smileyCode' => $row['find'],
                                'showOrder' => $row['disporder']
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
@@ -1237,21 +1237,21 @@ class MyBB16xExporter extends AbstractExporter {
                        $videoRegex = new Regex('\[video=[a-z]+\]');
                        $quoteRegex = new Regex('\[quote=\'(.*?)\' pid=\'(\d+)\' dateline=\'\d+\'\]');
                        $quoteCallback = new Callback(function ($matches) {
-                               $username = str_replace(array("\\", "'"), array("\\\\", "\'"), $matches[1]);
+                               $username = str_replace(["\\", "'"], ["\\\\", "\'"], $matches[1]);
                                $postID = $matches[2];
                                
-                               $postLink = LinkHandler::getInstance()->getLink('Thread', array(
+                               $postLink = LinkHandler::getInstance()->getLink('Thread', [
                                        'application' => 'wbb',
                                        'postID' => $postID,
                                        'forceFrontend' => true
-                               )).'#post'.$postID;
-                               $postLink = str_replace(array("\\", "'"), array("\\\\", "\'"), $postLink);
+                                       ]).'#post'.$postID;
+                               $postLink = str_replace(["\\", "'"], ["\\\\", "\'"], $postLink);
                                
                                return "[quote='".$username."','".$postLink."']";
                        });
                        $imgRegex = new Regex('\[img(?:=(\d)x\d)?(?: align=(left|right))?\](?:\r\n?|\n?)(https?://(?:[^<>"\']+?))\[/img\]');
                        $imgCallback = new Callback(function ($matches) {
-                               $escapedLink = str_replace(array("\\", "'"), array("\\\\", "\'"), $matches[3]);
+                               $escapedLink = str_replace(["\\", "'"], ["\\\\", "\'"], $matches[3]);
                                if ($matches[1] && $matches[2]) {
                                        return "[img='".$escapedLink."',".$matches[2].",".$matches[1]."][/img]";
                                }
index 73edc4a0db680abc10e02aadae787f4e346c7cbd..5b6aa3d91906f20c374f4780d3ed51c21ad63c8f 100644 (file)
@@ -24,12 +24,12 @@ class NodeBB0xRedisExporter extends AbstractExporter {
         * board cache
         * @var array
         */
-       protected $boardCache = array();
+       protected $boardCache = [];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$methods
         */
-       protected $methods = array(
+       protected $methods = [
                'com.woltlab.wcf.user' => 'Users',
                'com.woltlab.wcf.user.follower' => 'Followers',
                'com.woltlab.wcf.conversation' => 'Conversations',
@@ -39,14 +39,14 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                'com.woltlab.wbb.thread' => 'Threads',
                'com.woltlab.wbb.post' => 'Posts',
                'com.woltlab.wbb.like' => 'Likes',
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$limits
         */
-       protected $limits = array(
+       protected $limits = [
                'com.woltlab.wcf.user' => 100
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\IExporter::init()
@@ -80,16 +80,16 @@ class NodeBB0xRedisExporter extends AbstractExporter {
         * @see \wcf\system\exporter\IExporter::getSupportedData()
         */
        public function getSupportedData() {
-               $supportedData = array(
-                       'com.woltlab.wcf.user' => array(
+               $supportedData = [
+                       'com.woltlab.wcf.user' => [
                                'com.woltlab.wcf.user.follower',
-                       ),
-                       'com.woltlab.wcf.conversation' => array(
-                       ),
-                       'com.woltlab.wbb.board' => array(
+                       ],
+                       'com.woltlab.wcf.conversation' => [
+                       ],
+                       'com.woltlab.wbb.board' => [
                                'com.woltlab.wbb.like',
-                       ),
-               );
+                       ],
+               ];
                
                return $supportedData;
        }
@@ -117,7 +117,7 @@ class NodeBB0xRedisExporter extends AbstractExporter {
         * @see \wcf\system\exporter\IExporter::getQueue()
         */
        public function getQueue() {
-               $queue = array();
+               $queue = [];
                
                // user
                if (in_array('com.woltlab.wcf.user', $this->selectedData)) {
@@ -168,7 +168,7 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                        $row = $this->database->hgetall('user:'.$userID);
                        if (!$row) throw new SystemException('Invalid user');
                        
-                       $data = array(
+                       $data = [
                                'username' => $row['username'],
                                'password' => '',
                                'email' => $row['email'],
@@ -177,7 +177,7 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                                'banReason' => '',
                                'lastActivityTime' => intval($row['lastonline'] / 1000),
                                'signature' => self::convertMarkdown($row['signature']),
-                       );
+                       ];
                        
                        static $gravatarRegex = null;
                        if ($gravatarRegex === null) {
@@ -194,22 +194,22 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                        
                        $birthday = \DateTime::createFromFormat('m/d/Y', StringUtil::decodeHTML($row['birthday']));
                        // get user options
-                       $options = array(
+                       $options = [
                                'birthday' => $birthday ? $birthday->format('Y-m-d') : '',
                                'homepage' => StringUtil::decodeHTML($row['website']),
                                'location' => StringUtil::decodeHTML($row['location']),
-                       );
+                       ];
                        
-                       $additionalData = array(
+                       $additionalData = [
                                'options' => $options
-                       );
+                       ];
                        
                        $newUserID = ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user')->import($row['uid'], $data, $additionalData);
                        
                        // update password hash
                        if ($newUserID) {
                                $password = PasswordUtil::getSaltedHash($row['password'], $row['password']);
-                               $passwordUpdateStatement->execute(array($password, $newUserID));
+                               $passwordUpdateStatement->execute([$password, $newUserID]);
                        }
                }
        }
@@ -228,7 +228,7 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                $boardIDs = $this->database->zrange('categories:cid', 0, -1);
                if (!$boardIDs) throw new SystemException('Could not fetch boardIDs');
                
-               $imported = array();
+               $imported = [];
                foreach ($boardIDs as $boardID) {
                        $row = $this->database->hgetall('category:'.$boardID);
                        if (!$row) throw new SystemException('Invalid board');
@@ -246,14 +246,14 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                if (!isset($this->boardCache[$parentID])) return;
                
                foreach ($this->boardCache[$parentID] as $board) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['cid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['cid'], [
                                'parentID' => ($board['parentCid'] ?: null),
                                'position' => $board['order'] ?: 0,
                                'boardType' => $board['link'] ? Board::TYPE_LINK : Board::TYPE_BOARD,
                                'title' => $board['name'],
                                'description' => $board['description'],
                                'externalURL' => $board['link']
-                       ));
+                       ]);
                        
                        $this->exportBoardsRecursively($board['cid']);
                }
@@ -277,7 +277,7 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                        $row = $this->database->hgetall('topic:'.$threadID);
                        if (!$row) throw new SystemException('Invalid thread');
                        
-                       $data = array(
+                       $data = [
                                'boardID' => $row['cid'],
                                'topic' => $row['title'],
                                'time' => intval($row['timestamp'] / 1000),
@@ -289,11 +289,11 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                                'isClosed' => $row['locked'],
                                'isDeleted' => $row['deleted'],
                                'deleteTime' => TIME_NOW,
-                       );
+                       ];
                        
-                       $additionalData = array(
-                               'tags' => $this->database->smembers('topic:'.$threadID.':tags') ?: array()
-                       );
+                       $additionalData = [
+                               'tags' => $this->database->smembers('topic:'.$threadID.':tags') ?: []
+                       ];
                        
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.thread')->import($row['tid'], $data, $additionalData);
                }
@@ -318,7 +318,7 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                        if (!$row) throw new SystemException('Invalid post');
                        
                        // TODO: ip address
-                       $data = array(
+                       $data = [
                                'threadID' => $row['tid'],
                                'userID' => $row['uid'],
                                'username' => $this->database->hget('user:'.$row['uid'], 'username'),
@@ -331,7 +331,7 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                                'editor' => $this->database->hget('user:'.$row['editor'], 'username'),
                                'lastEditTime' => intval($row['edited'] / 1000),
                                'editCount' => $row['edited'] ? 1 : 0
-                       );
+                       ];
                        
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['pid'], $data);
                }
@@ -356,13 +356,13 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                        
                        if ($likes) {
                                foreach ($likes as $postID) {
-                                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.like')->import(0, array(
+                                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.like')->import(0, [
                                                'objectID' => $postID,
                                                'objectUserID' => $this->database->hget('post:'.$postID, 'uid') ?: null,
                                                'userID' => $userID,
                                                'likeValue' => Like::LIKE,
                                                'time' => intval($this->database->zscore('uid:'.$userID.':upvote', $postID) / 1000)
-                                       ));
+                                       ]);
                                }
                        }
                        
@@ -370,13 +370,13 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                        
                        if ($dislikes) {
                                foreach ($dislikes as $postID) {
-                                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.like')->import(0, array(
+                                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.like')->import(0, [
                                                'objectID' => $postID,
                                                'objectUserID' => $this->database->hget('post:'.$postID, 'uid') ?: null,
                                                'userID' => $userID,
                                                'likeValue' => Like::DISLIKE,
                                                'time' => intval($this->database->zscore('uid:'.$userID.':downvote', $postID) / 1000)
-                                       ));
+                                       ]);
                                }
                        }
                }
@@ -401,11 +401,11 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                        
                        if ($followed) {
                                foreach ($followed as $followUserID) {
-                                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, array(
+                                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, [
                                                'userID' => $userID,
                                                'followUserID' => $followUserID,
                                                'time' => intval($this->database->zscore('following:'.$userID, $followUserID) / 1000)
-                                       ));
+                                       ]);
                                }
                        }
                }
@@ -435,33 +435,33 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                                        if (!$firstMessageID) throw new SystemException('Could not find first message of conversation');
                                        
                                        $firstMessage = $this->database->hgetall('message:'.$firstMessageID[0]);
-                                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($conversationID, array(
+                                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($conversationID, [
                                                'subject' => $this->database->hget('user:'.$userID, 'username').' - '.$this->database->hget('user:'.$chat, 'username'),
                                                'time' => intval($firstMessage['timestamp'] / 1000),
                                                'userID' => $userID,
                                                'username' => $this->database->hget('user:'.$firstMessage['fromuid'], 'username'),
                                                'isDraft' => 0
-                                       ));
+                                       ]);
                                        
                                        // participant a
-                                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, array(
+                                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, [
                                                'conversationID' => $conversationID,
                                                'participantID' => $userID,
                                                'username' => $this->database->hget('user:'.$userID, 'username'),
                                                'hideConversation' => 0,
                                                'isInvisible' => 0,
                                                'lastVisitTime' => 0
-                                       ));
+                                       ]);
                                        
                                        // participant b
-                                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, array(
+                                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, [
                                                'conversationID' => $conversationID,
                                                'participantID' => $chat,
                                                'username' => $this->database->hget('user:'.$chat, 'username'),
                                                'hideConversation' => 0,
                                                'isInvisible' => 0,
                                                'lastVisitTime' => 0
-                                       ));
+                                       ]);
                                }
                        }
                }
@@ -483,7 +483,7 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                        if (!$message) continue;
                        $conversationID = min($message['fromuid'], $message['touid']).':to:'.max($message['fromuid'], $message['touid']);
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($offset + $i, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($offset + $i, [
                                'conversationID' => $conversationID,
                                'userID' => $message['fromuid'],
                                'username' => $this->database->hget('user:'.$message['fromuid'], 'username'),
@@ -494,7 +494,7 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                                'enableHtml' => 0,
                                'enableBBCodes' => 0,
                                'showSignature' => 0
-                       ));
+                       ]);
                }
        }
        
@@ -516,7 +516,7 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                $out = $parsedown->text($message);
                $out = $codeRegex->replace($out, '[code=\1]');
 
-               $out = strtr($out, array(
+               $out = strtr($out, [
                        '<p>' => '',
                        '</p>' => '',
                        '<br />' => '',
@@ -539,7 +539,7 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                        '</blockquote>' => '[/quote]',
                        
                        '</a>' => '[/url]'
-               ));
+               ]);
                
                $out = $imgRegex->replace($out, '[img]\1[/img]');
                $out = $urlRegex->replace($out, '[url=\1]');
index fd6e05548e0b1f52cd46832235880595d78a7876..c8852fc603eb6a1624ac1fd0d75b2482e5b30007 100644 (file)
@@ -24,10 +24,10 @@ use wcf\util\UserUtil;
  * @category   Community Framework
  */
 class PhpBB31xExporter extends AbstractExporter {
-       protected static $knownProfileFields = array(
+       protected static $knownProfileFields = [
                'phpbb_location', 'phpbb_website', 'phpbb_interests', 'phpbb_occupation',
                'phpbb_icq', 'phpbb_facebook', 'phpbb_twitter', 'phpbb_googleplus', 'phpbb_skype'
-       );
+       ];
        
        const TOPIC_TYPE_GLOBAL = 3;
        const TOPIC_TYPE_ANNOUCEMENT = 2;
@@ -58,12 +58,12 @@ class PhpBB31xExporter extends AbstractExporter {
         * board cache
         * @var array
         */
-       protected $boardCache = array();
+       protected $boardCache = [];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$methods
         */
-       protected $methods = array(
+       protected $methods = [
                'com.woltlab.wcf.user' => 'Users',
                'com.woltlab.wcf.user.group' => 'UserGroups',
                'com.woltlab.wcf.user.rank' => 'UserRanks',
@@ -89,44 +89,44 @@ class PhpBB31xExporter extends AbstractExporter {
                'com.woltlab.wcf.label' => 'Labels',
                'com.woltlab.wbb.acl' => 'ACLs',
                'com.woltlab.wcf.smiley' => 'Smilies'
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$limits
         */
-       protected $limits = array(
+       protected $limits = [
                'com.woltlab.wcf.user' => 200,
                'com.woltlab.wcf.user.avatar' => 100,
                'com.woltlab.wcf.conversation.attachment' => 100,
                'com.woltlab.wbb.thread' => 200,
                'com.woltlab.wbb.attachment' => 100,
                'com.woltlab.wbb.acl' => 1
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\IExporter::getSupportedData()
         */
        public function getSupportedData() {
-               return array(
-                       'com.woltlab.wcf.user' => array(
+               return [
+                       'com.woltlab.wcf.user' => [
                                'com.woltlab.wcf.user.group',
                                'com.woltlab.wcf.user.avatar',
                                'com.woltlab.wcf.user.option',
                                'com.woltlab.wcf.user.follower',
                                'com.woltlab.wcf.user.rank'
-                       ),
-                       'com.woltlab.wbb.board' => array(
+                       ],
+                       'com.woltlab.wbb.board' => [
                                'com.woltlab.wbb.acl',
                                'com.woltlab.wbb.attachment',
                                'com.woltlab.wbb.poll',
                                'com.woltlab.wbb.watchedThread',
-                       ),
-                       'com.woltlab.wcf.conversation' => array(
+                       ],
+                       'com.woltlab.wcf.conversation' => [
                                'com.woltlab.wcf.conversation.attachment',
                                'com.woltlab.wcf.conversation.label'
-                       ),
-                       'com.woltlab.wcf.smiley' => array()
-               );
+                       ],
+                       'com.woltlab.wcf.smiley' => []
+               ];
        }
        
        /**
@@ -155,7 +155,7 @@ class PhpBB31xExporter extends AbstractExporter {
         * @see \wcf\system\exporter\IExporter::getQueue()
         */
        public function getQueue() {
-               $queue = array();
+               $queue = [];
                
                // user
                if (in_array('com.woltlab.wcf.user', $this->selectedData)) {
@@ -226,7 +226,7 @@ class PhpBB31xExporter extends AbstractExporter {
                        WHERE           group_id BETWEEN ? AND ?
                        ORDER BY        group_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        switch ($row['group_id']) {
                                case 1:
@@ -244,12 +244,12 @@ class PhpBB31xExporter extends AbstractExporter {
                                break;
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['group_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['group_id'], [
                                'groupName' => $row['group_name'],
                                'groupType' => $groupType,
                                'userOnlineMarking' => ($row['group_colour'] ? '<span style="color: #'.$row['group_colour'].'">%s</span>' : '%s'),
                                'showOnTeamPage' => $row['group_legend']
-                       ));
+                       ]);
                }
        }
        
@@ -261,7 +261,7 @@ class PhpBB31xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."users
                        WHERE   user_type <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(self::USER_TYPE_USER_IGNORE));
+               $statement->execute([self::USER_TYPE_USER_IGNORE]);
                $row = $statement->fetchArray();
                if ($row !== false) return $row['maxID'];
                return 0;
@@ -272,7 +272,7 @@ class PhpBB31xExporter extends AbstractExporter {
         */
        public function exportUsers($offset, $limit) {
                // cache profile fields
-               $profileFields = array();
+               $profileFields = [];
                $sql = "SELECT  *
                        FROM    ".$this->databasePrefix."profile_fields";
                $statement = $this->database->prepareStatement($sql);
@@ -304,9 +304,9 @@ class PhpBB31xExporter extends AbstractExporter {
                                        AND user_table.user_id BETWEEN ? AND ?
                        ORDER BY        user_table.user_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0, self::USER_TYPE_USER_IGNORE, $offset + 1, $offset + $limit));
+               $statement->execute([0, self::USER_TYPE_USER_IGNORE, $offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'username' => StringUtil::decodeHTML($row['username']),
                                'password' => '',
                                'email' => $row['user_email'],
@@ -319,19 +319,19 @@ class PhpBB31xExporter extends AbstractExporter {
                                'signatureEnableHtml' => 0,
                                'signatureEnableSmilies' => preg_match('/<!-- s.*? -->/', $row['user_sig']),
                                'lastActivityTime' => $row['user_lastvisit']
-                       );
+                       ];
                        
                        $birthday = \DateTime::createFromFormat('j-n-Y', str_replace(' ', '', $row['user_birthday']));
                        // get user options
-                       $options = array(
+                       $options = [
                                'birthday' => $birthday ? $birthday->format('Y-m-d') : ''
-                       );
+                       ];
                        
-                       $additionalData = array(
+                       $additionalData = [
                                'groupIDs' => explode(',', $row['groupIDs']),
-                               'languages' => array($row['user_lang']),
+                               'languages' => [$row['user_lang']],
                                'options' => $options
-                       );
+                       ];
                        
                        // handle user options
                        foreach ($profileFields as $profileField) {
@@ -386,7 +386,7 @@ class PhpBB31xExporter extends AbstractExporter {
                                        $password = 'phpbb3:'.$row['user_password'].':';
                                }
                                
-                               $passwordUpdateStatement->execute(array($password, $newUserID));
+                               $passwordUpdateStatement->execute([$password, $newUserID]);
                        }
                }
        }
@@ -408,7 +408,7 @@ class PhpBB31xExporter extends AbstractExporter {
         */
        public function exportUserOptions($offset, $limit) {
                $condition = new PreparedStatementConditionBuilder();
-               $condition->add('field_name NOT IN (?)', array(self::$knownProfileFields));
+               $condition->add('field_name NOT IN (?)', [self::$knownProfileFields]);
                
                $sql = "SELECT          fields.*,
                                        (
@@ -422,7 +422,7 @@ class PhpBB31xExporter extends AbstractExporter {
                        ".$condition."
                        ORDER BY        fields.field_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array_merge(array('profilefields.type.dropdown'), $condition->getParameters()));
+               $statement->execute(array_merge(['profilefields.type.dropdown'], $condition->getParameters()));
                while ($row = $statement->fetchArray()) {
                        $selectOptions = '';
                        switch ($row['field_type']) {
@@ -465,7 +465,7 @@ class PhpBB31xExporter extends AbstractExporter {
                                        $outputClass = '';
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['field_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['field_id'], [
                                'categoryName' => 'profile.personal',
                                'optionType' => $type,
                                'editable' => $row['field_show_profile'] ? UserOption::EDITABILITY_ALL : UserOption::EDITABILITY_ADMINISTRATOR,
@@ -476,7 +476,7 @@ class PhpBB31xExporter extends AbstractExporter {
                                'showOrder' => $row['field_order'],
                                'outputClass' => $outputClass,
                                'isDisabled' => $row['field_active'] ? 0 : 1
-                       ), array('name' => $row['field_name']));
+                       ], ['name' => $row['field_name']]);
                }
        }
        
@@ -488,7 +488,7 @@ class PhpBB31xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."ranks
                        WHERE   rank_special = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -502,16 +502,16 @@ class PhpBB31xExporter extends AbstractExporter {
                        WHERE           rank_special = ?
                        ORDER BY        rank_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['rank_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['rank_id'], [
                                'groupID' => 2, // 2 = registered users
                                'requiredPoints' => $row['rank_min'] * 5,
                                'rankTitle' => $row['rank_title'],
                                'rankImage' => $row['rank_image'],
                                'repeatImage' => 0,
                                'requiredGender' => 0 // neutral
-                       ));
+                       ]);
                }
        }
        
@@ -524,7 +524,7 @@ class PhpBB31xExporter extends AbstractExporter {
                        WHERE           friend = ?
                                AND     foe = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(1, 0));
+               $statement->execute([1, 0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -539,12 +539,12 @@ class PhpBB31xExporter extends AbstractExporter {
                                        AND     foe = ?
                        ORDER BY        user_id, zebra_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(1, 0));
+               $statement->execute([1, 0]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, [
                                'userID' => $row['user_id'],
                                'followUserID' => $row['zebra_id']
-                       ));
+                       ]);
                }
        }
        
@@ -556,7 +556,7 @@ class PhpBB31xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."users
                        WHERE   user_avatar_type IN (?, ?)";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(self::AVATAR_TYPE_GALLERY, self::AVATAR_TYPE_UPLOADED));
+               $statement->execute([self::AVATAR_TYPE_GALLERY, self::AVATAR_TYPE_UPLOADED]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -571,7 +571,7 @@ class PhpBB31xExporter extends AbstractExporter {
                                FROM    ".$this->databasePrefix."config
                                WHERE   config_name IN (?, ?, ?)";
                        $statement = $this->database->prepareStatement($sql);
-                       $statement->execute(array('avatar_path', 'avatar_salt', 'avatar_gallery_path'));
+                       $statement->execute(['avatar_path', 'avatar_salt', 'avatar_gallery_path']);
                        while ($row = $statement->fetchArray()) {
                                $config_name = $row['config_name'];
                                $$config_name = $row['config_value'];
@@ -583,7 +583,7 @@ class PhpBB31xExporter extends AbstractExporter {
                        WHERE           user_avatar_type IN (?, ?)
                        ORDER BY        user_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(self::AVATAR_TYPE_GALLERY, self::AVATAR_TYPE_UPLOADED));
+               $statement->execute([self::AVATAR_TYPE_GALLERY, self::AVATAR_TYPE_UPLOADED]);
                while ($row = $statement->fetchArray()) {
                        $extension = pathinfo($row['user_avatar'], PATHINFO_EXTENSION);
                        switch ($row['user_avatar_type']) {
@@ -595,11 +595,11 @@ class PhpBB31xExporter extends AbstractExporter {
                                break;
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import(0, [
                                'avatarName' => basename($row['user_avatar']),
                                'avatarExtension' => $extension,
                                'userID' => $row['user_id']
-                       ), array('fileLocation' => $location));
+                       ], ['fileLocation' => $location]);
                }
        }
        
@@ -625,10 +625,10 @@ class PhpBB31xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.label')->import($row['folder_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.label')->import($row['folder_id'], [
                                'userID' => $row['user_id'],
                                'label' => mb_substr($row['folder_name'], 0, 80)
-                       ));
+                       ]);
                }
        }
        
@@ -699,7 +699,7 @@ class PhpBB31xExporter extends AbstractExporter {
                        )
                        ORDER BY        isDraft, msg_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                while ($row = $statement->fetchArray()) {
                        if (!$row['isDraft']) {
                                $participants = explode(',', $row['participants']);
@@ -709,13 +709,13 @@ class PhpBB31xExporter extends AbstractExporter {
                                if (ImportHandler::getInstance()->getNewID('com.woltlab.wcf.conversation', $conversationID) !== null) continue;
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import(($row['isDraft'] ? 'draft-'.$row['msg_id'] : $conversationID), array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import(($row['isDraft'] ? 'draft-'.$row['msg_id'] : $conversationID), [
                                'subject' => StringUtil::decodeHTML($row['message_subject']),
                                'time' => $row['message_time'],
                                'userID' => $row['author_id'],
                                'username' => StringUtil::decodeHTML($row['username']) ?: '',
                                'isDraft' => $row['isDraft']
-                       ));
+                       ]);
                }
        }
        
@@ -777,13 +777,13 @@ class PhpBB31xExporter extends AbstractExporter {
                        )
                        ORDER BY        msg_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(1, 0));
+               $statement->execute([1, 0]);
                while ($row = $statement->fetchArray()) {
                        $participants = explode(',', $row['participants']);
                        $participants[] = $row['author_id'];
                        $conversationID = $this->getConversationID($row['root_level'] ?: $row['msg_id'], $participants);
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['msg_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['msg_id'], [
                                'conversationID' => $conversationID,
                                'userID' => $row['author_id'],
                                'username' => StringUtil::decodeHTML($row['username']) ?: '',
@@ -794,7 +794,7 @@ class PhpBB31xExporter extends AbstractExporter {
                                'enableHtml' => 0,
                                'enableBBCodes' => $row['enable_bbcode'],
                                'showSignature' => $row['enable_sig']
-                       ));
+                       ]);
                }
        }
        
@@ -834,14 +834,14 @@ class PhpBB31xExporter extends AbstractExporter {
                        $conversationID = $this->getConversationID($row['root_level'] ?: $row['msg_id'], $participants);
                        
                        $bcc = explode(':', $row['bcc_address']);
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, [
                                'conversationID' => $conversationID,
                                'participantID' => $row['user_id'],
                                'username' => StringUtil::decodeHTML($row['username']) ?: '',
                                'hideConversation' => $row['pm_deleted'],
                                'isInvisible' => in_array('u_'.$row['user_id'], $bcc) ? 1 : 0,
                                'lastVisitTime' => $row['pm_new'] ? 0 : $row['message_time']
-                       ), array('labelIDs' => ($row['folder_id'] > 0 ? array($row['folder_id']) : array())));
+                       ], ['labelIDs' => ($row['folder_id'] > 0 ? [$row['folder_id']] : [])]);
                }
        }
        
@@ -894,7 +894,7 @@ class PhpBB31xExporter extends AbstractExporter {
                if (!isset($this->boardCache[$parentID])) return;
                
                foreach ($this->boardCache[$parentID] as $board) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['forum_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['forum_id'], [
                                'parentID' => ($board['parent_id'] ?: null),
                                'position' => $board['left_id'],
                                'boardType' => ($board['forum_type'] == self::BOARD_TYPE_LINK ? Board::TYPE_LINK : ($board['forum_type'] == self::BOARD_TYPE_CATEGORY ? Board::TYPE_CATEGORY : Board::TYPE_BOARD)),
@@ -910,7 +910,7 @@ class PhpBB31xExporter extends AbstractExporter {
                                'clicks' => $board['forum_posts_approved'],
                                'posts' => $board['forum_posts_approved'],
                                'threads' => $board['forum_topics_approved']
-                       ));
+                       ]);
                        
                        $this->exportBoardsRecursively($board['forum_id']);
                }
@@ -934,9 +934,9 @@ class PhpBB31xExporter extends AbstractExporter {
                        WHERE           topic_id BETWEEN ? AND ?
                        ORDER BY        topic_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'boardID' => $row['forum_id'] ?: $boardIDs[0], // map global annoucements to a random board
                                'topic' => StringUtil::decodeHTML($row['topic_title']),
                                'time' => $row['topic_time'],
@@ -951,10 +951,10 @@ class PhpBB31xExporter extends AbstractExporter {
                                'isClosed' => $row['topic_status'] == self::TOPIC_STATUS_CLOSED ? 1 : 0,
                                'movedThreadID' => ($row['topic_status'] == self::TOPIC_STATUS_LINK && $row['topic_moved_id']) ? $row['topic_moved_id'] : null,
                                'movedTime' => 0,
-                       );
-                       $additionalData = array();
+                       ];
+                       $additionalData = [];
                        if ($row['topic_type'] == self::TOPIC_TYPE_GLOBAL) $additionalData['assignedBoards'] = $boardIDs;
-                       if ($row['topic_type'] == self::TOPIC_TYPE_ANNOUCEMENT) $additionalData['assignedBoards'] = array($row['forum_id']);
+                       if ($row['topic_type'] == self::TOPIC_TYPE_ANNOUCEMENT) $additionalData['assignedBoards'] = [$row['forum_id']];
                        
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.thread')->import($row['topic_id'], $data, $additionalData);
                }
@@ -981,9 +981,9 @@ class PhpBB31xExporter extends AbstractExporter {
                        WHERE           post_id BETWEEN ? AND ?
                        ORDER BY        post_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0, $offset + 1, $offset + $limit));
+               $statement->execute([0, $offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['post_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['post_id'], [
                                'threadID' => $row['topic_id'],
                                'userID' => $row['poster_id'],
                                'username' => ($row['post_username'] ?: (StringUtil::decodeHTML($row['username']) ?: '')),
@@ -1005,7 +1005,7 @@ class PhpBB31xExporter extends AbstractExporter {
                                'enableBBCodes' => $row['enable_bbcode'],
                                'showSignature' => $row['enable_sig'],
                                'ipAddress' => UserUtil::convertIPv4To6($row['poster_ip'])
-                       ));
+                       ]);
                }
        }
        
@@ -1047,11 +1047,11 @@ class PhpBB31xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import(0, [
                                'objectID' => $row['topic_id'],
                                'userID' => $row['user_id'],
                                'notification' => $row['notify_status']
-                       ));
+                       ]);
                }
        }
        
@@ -1063,7 +1063,7 @@ class PhpBB31xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."topics
                        WHERE   poll_start <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1078,9 +1078,9 @@ class PhpBB31xExporter extends AbstractExporter {
                        WHERE           poll_start <> ?
                        ORDER BY        topic_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['topic_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['topic_id'], [
                                'objectID' => $row['topic_first_post_id'],
                                'question' => $row['poll_title'],
                                'time' => $row['poll_start'],
@@ -1089,7 +1089,7 @@ class PhpBB31xExporter extends AbstractExporter {
                                'isPublic' => 0,
                                'maxVotes' => $row['poll_max_options'],
                                'votes' => $row['poll_votes']
-                       ));
+                       ]);
                }
        }
        
@@ -1115,12 +1115,12 @@ class PhpBB31xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['topic_id'].'-'.$row['poll_option_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['topic_id'].'-'.$row['poll_option_id'], [
                                'pollID' => $row['topic_id'],
                                'optionValue' => $row['poll_option_text'],
                                'showOrder' => $row['poll_option_id'],
                                'votes' => $row['poll_option_total']
-                       ));
+                       ]);
                }
        }
        
@@ -1132,7 +1132,7 @@ class PhpBB31xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."poll_votes
                        WHERE   vote_user_id <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1146,13 +1146,13 @@ class PhpBB31xExporter extends AbstractExporter {
                        WHERE           vote_user_id <> ?
                        ORDER BY        poll_option_id, vote_user_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, [
                                'pollID' => $row['topic_id'],
                                'optionID' => $row['topic_id'].'-'.$row['poll_option_id'],
                                'userID' => $row['vote_user_id']
-                       ));
+                       ]);
                }
        }
        
@@ -1163,7 +1163,7 @@ class PhpBB31xExporter extends AbstractExporter {
                $sql = "SELECT  (SELECT COUNT(*) FROM ".$this->databasePrefix."acl_users WHERE forum_id <> ?)
                                + (SELECT COUNT(*) FROM ".$this->databasePrefix."acl_groups WHERE forum_id <> ?) AS count";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0, 0));
+               $statement->execute([0, 0]);
                $row = $statement->fetchArray();
                return $row['count'] ? 2 : 0;
        }
@@ -1176,25 +1176,25 @@ class PhpBB31xExporter extends AbstractExporter {
                        FROM            ".$this->databasePrefix."acl_options
                        WHERE           is_local = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(1));
-               $options = array();
+               $statement->execute([1]);
+               $options = [];
                while ($row = $statement->fetchArray()) {
                        $options[$row['auth_option_id']] = $row;
                }
                
                $condition = new PreparedStatementConditionBuilder();
-               $condition->add('auth_option_id IN (?)', array(array_keys($options)));
+               $condition->add('auth_option_id IN (?)', [array_keys($options)]);
                $sql = "SELECT          *
                        FROM            ".$this->databasePrefix."acl_roles_data
                        ".$condition;
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($condition->getParameters());
-               $roles = array();
+               $roles = [];
                while ($row = $statement->fetchArray()) {
                        $roles[$row['role_id']][$row['auth_option_id']] = $row['auth_setting'];
                }
                
-               $data = array();
+               $data = [];
                if ($offset == 0) {
                        // groups
                        $sql = "SELECT          *
@@ -1202,7 +1202,7 @@ class PhpBB31xExporter extends AbstractExporter {
                                WHERE           forum_id <> ?
                                ORDER BY        auth_role_id DESC";
                        $statement = $this->database->prepareStatement($sql);
-                       $statement->execute(array(0));
+                       $statement->execute([0]);
                        $key = 'group';
                }
                else if ($offset == 1) {
@@ -1212,7 +1212,7 @@ class PhpBB31xExporter extends AbstractExporter {
                                WHERE           forum_id <> ?
                                ORDER BY        auth_role_id DESC";
                        $statement = $this->database->prepareStatement($sql);
-                       $statement->execute(array(0));
+                       $statement->execute([0]);
                        $key = 'user';
                }
                
@@ -1242,63 +1242,63 @@ class PhpBB31xExporter extends AbstractExporter {
                        }
                }
                
-               static $optionMapping = array(
-                       'f_announce' => array('canStartAnnouncement'),
-                       'f_attach' => array('canUploadAttachment'),
-                       'f_bbcode' => array(),
-                       'f_bump' => array(),
-                       'f_delete' => array('canDeleteOwnPost'),
-                       'f_download' => array('canDownloadAttachment', 'canViewAttachmentPreview'),
-                       'f_edit' => array('canEditOwnPost'),
-                       'f_email' => array(),
-                       'f_flash' => array(),
-                       'f_icons' => array(),
-                       'f_ignoreflood' => array(),
-                       'f_img' => array(),
-                       'f_list' => array('canViewBoard'),
-                       'f_noapprove' => array('canStartThreadWithoutModeration', 'canReplyThreadWithoutModeration'),
-                       'f_poll' => array('canStartPoll'),
-                       'f_post' => array('canStartThread'),
-                       'f_postcount' => array(),
-                       'f_print' => array(),
-                       'f_read' => array('canEnterBoard'),
-                       'f_reply' => array('canReplyThread'),
-                       'f_report' => array(),
-                       'f_search' => array(),
-                       'f_sigs' => array(),
-                       'f_smilies' => array(),
-                       'f_sticky' => array('canPinThread'),
-                       'f_subscribe' => array(),
-                       'f_user_lock' => array(),
-                       'f_vote' => array('canVotePoll'),
-                       'f_votechg' => array(),
-                       'm_approve' => array('canEnableThread'),
-                       'm_chgposter' => array(),
-                       'm_delete' => array(
+               static $optionMapping = [
+                       'f_announce' => ['canStartAnnouncement'],
+                       'f_attach' => ['canUploadAttachment'],
+                       'f_bbcode' => [],
+                       'f_bump' => [],
+                       'f_delete' => ['canDeleteOwnPost'],
+                       'f_download' => ['canDownloadAttachment', 'canViewAttachmentPreview'],
+                       'f_edit' => ['canEditOwnPost'],
+                       'f_email' => [],
+                       'f_flash' => [],
+                       'f_icons' => [],
+                       'f_ignoreflood' => [],
+                       'f_img' => [],
+                       'f_list' => ['canViewBoard'],
+                       'f_noapprove' => ['canStartThreadWithoutModeration', 'canReplyThreadWithoutModeration'],
+                       'f_poll' => ['canStartPoll'],
+                       'f_post' => ['canStartThread'],
+                       'f_postcount' => [],
+                       'f_print' => [],
+                       'f_read' => ['canEnterBoard'],
+                       'f_reply' => ['canReplyThread'],
+                       'f_report' => [],
+                       'f_search' => [],
+                       'f_sigs' => [],
+                       'f_smilies' => [],
+                       'f_sticky' => ['canPinThread'],
+                       'f_subscribe' => [],
+                       'f_user_lock' => [],
+                       'f_vote' => ['canVotePoll'],
+                       'f_votechg' => [],
+                       'm_approve' => ['canEnableThread'],
+                       'm_chgposter' => [],
+                       'm_delete' => [
                                'canDeleteThread', 'canReadDeletedThread', 'canRestoreThread', 'canDeleteThreadCompletely',
                                'canDeletePost', 'canReadDeletedPost', 'canRestorePost', 'canDeletePostCompletely'
-                       ),
-                       'm_edit' => array('canEditPost'),
-                       'm_info' => array(),
-                       'm_lock' => array('canCloseThread', 'canReplyClosedThread'),
-                       'm_merge' => array('canMergeThread', 'canMergePost'),
-                       'm_move' => array('canMoveThread', 'canMovePost'),
-                       'm_report' => array(),
-                       'm_split' => array()
-               );
+                       ],
+                       'm_edit' => ['canEditPost'],
+                       'm_info' => [],
+                       'm_lock' => ['canCloseThread', 'canReplyClosedThread'],
+                       'm_merge' => ['canMergeThread', 'canMergePost'],
+                       'm_move' => ['canMoveThread', 'canMovePost'],
+                       'm_report' => [],
+                       'm_split' => []
+               ];
                
                foreach ($data as $id => $forumData) {
                        foreach ($forumData as $forumID => $settingData) {
                                foreach ($settingData as $optionID => $value) {
                                        if (!isset($optionMapping[$options[$optionID]['auth_option']])) continue;
                                        foreach ($optionMapping[$options[$optionID]['auth_option']] as $optionName) {
-                                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array(
+                                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, [
                                                        'objectID' => $forumID,
                                                        $key.'ID' => $id,
                                                        'optionValue' => $value
-                                               ), array(
+                                               ], [
                                                        'optionName' => $optionName
-                                               ));
+                                               ]);
                                        }
                                }
                        }
@@ -1330,7 +1330,7 @@ class PhpBB31xExporter extends AbstractExporter {
                        GROUP BY        smiley_url
                        ORDER BY        smiley_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array());
+               $statement->execute([]);
                while ($row = $statement->fetchArray()) {
                        $fileLocation = $this->fileSystemPath.'images/smilies/'.$row['smiley_url'];
                        
@@ -1338,12 +1338,12 @@ class PhpBB31xExporter extends AbstractExporter {
                        $code = array_shift($aliases);
                        $emotion = mb_substr($row['emotion'], 0, mb_strpos($row['emotion'], "\n") ?: mb_strlen($row['emotion'])); // we had to GROUP_CONCAT it because of SQL strict mode
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley')->import($row['smiley_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley')->import($row['smiley_id'], [
                                'smileyTitle' => $emotion,
                                'smileyCode' => $code,
                                'showOrder' => $row['smiley_order'],
                                'aliases' => implode("\n", $aliases)
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
@@ -1352,7 +1352,7 @@ class PhpBB31xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."attachments
                        WHERE   in_message = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($conversation ? 1 : 0));
+               $statement->execute([$conversation ? 1 : 0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1364,7 +1364,7 @@ class PhpBB31xExporter extends AbstractExporter {
                                FROM    ".$this->databasePrefix."config
                                WHERE   config_name IN (?)";
                        $statement = $this->database->prepareStatement($sql);
-                       $statement->execute(array('upload_path'));
+                       $statement->execute(['upload_path']);
                        while ($row = $statement->fetchArray()) {
                                $$row['config_name'] = $row['config_value'];
                        }
@@ -1375,14 +1375,14 @@ class PhpBB31xExporter extends AbstractExporter {
                        WHERE           in_message = ?
                        ORDER BY        attach_id DESC";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array($conversation ? 1 : 0));
+               $statement->execute([$conversation ? 1 : 0]);
                while ($row = $statement->fetchArray()) {
                        $fileLocation = FileUtil::addTrailingSlash($this->fileSystemPath.$upload_path).$row['physical_filename'];
                        
                        $isImage = 0;
                        if ($row['mimetype'] == 'image/jpeg' || $row['mimetype'] == 'image/png' || $row['mimetype'] == 'image/gif') $isImage = 1;
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.'.($conversation ? 'wcf.conversation' : 'wbb').'.attachment')->import(0, array( // TODO: support inline attachments
+                       ImportHandler::getInstance()->getImporter('com.woltlab.'.($conversation ? 'wcf.conversation' : 'wbb').'.attachment')->import(0, [ // TODO: support inline attachments
                                'objectID' => $row['post_msg_id'],
                                'userID' => ($row['poster_id'] ?: null),
                                'filename' => $row['real_filename'],
@@ -1391,7 +1391,7 @@ class PhpBB31xExporter extends AbstractExporter {
                                'isImage' => $isImage,
                                'downloads' => $row['download_count'],
                                'uploadTime' => $row['filetime']
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
@@ -1425,13 +1425,13 @@ class PhpBB31xExporter extends AbstractExporter {
                // fix code php bbcode...
                $text = preg_replace_callback('#\[code(=php)?\](.*)\[/code\]#s', function ($matches) {
                        $content = $matches[2];
-                       $content = str_replace(array(
+                       $content = str_replace([
                                '<br />',
                                '&nbsp;&nbsp;&nbsp;&nbsp;'
-                       ), array(
+                       ], [
                                "\n",
                                "\t"
-                       ), $content);
+                       ], $content);
                        $content = preg_replace('#(?:<span class="syntax[^"]*">|</span>)#', '', $content);
                        
                        return '[code'.$matches[1].']'.$content.'[/code]';
index c2f6248ed19f40e4d40a929a66c69c4f105a2f8f..2364252387ee39b8ae7a9c6c115217a288e83882 100644 (file)
@@ -48,12 +48,12 @@ class PhpBB3xExporter extends AbstractExporter {
         * board cache
         * @var array
         */
-       protected $boardCache = array();
+       protected $boardCache = [];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$methods
         */
-       protected $methods = array(
+       protected $methods = [
                'com.woltlab.wcf.user' => 'Users',
                'com.woltlab.wcf.user.group' => 'UserGroups',
                'com.woltlab.wcf.user.rank' => 'UserRanks',
@@ -79,44 +79,44 @@ class PhpBB3xExporter extends AbstractExporter {
                'com.woltlab.wcf.label' => 'Labels',
                'com.woltlab.wbb.acl' => 'ACLs',
                'com.woltlab.wcf.smiley' => 'Smilies'
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$limits
         */
-       protected $limits = array(
+       protected $limits = [
                'com.woltlab.wcf.user' => 200,
                'com.woltlab.wcf.user.avatar' => 100,
                'com.woltlab.wcf.conversation.attachment' => 100,
                'com.woltlab.wbb.thread' => 200,
                'com.woltlab.wbb.attachment' => 100,
                'com.woltlab.wbb.acl' => 1
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\IExporter::getSupportedData()
         */
        public function getSupportedData() {
-               return array(
-                       'com.woltlab.wcf.user' => array(
+               return [
+                       'com.woltlab.wcf.user' => [
                                'com.woltlab.wcf.user.group',
                                'com.woltlab.wcf.user.avatar',
                                'com.woltlab.wcf.user.option',
                                'com.woltlab.wcf.user.follower',
                                'com.woltlab.wcf.user.rank'
-                       ),
-                       'com.woltlab.wbb.board' => array(
+                       ],
+                       'com.woltlab.wbb.board' => [
                                'com.woltlab.wbb.acl',
                                'com.woltlab.wbb.attachment',
                                'com.woltlab.wbb.poll',
                                'com.woltlab.wbb.watchedThread',
-                       ),
-                       'com.woltlab.wcf.conversation' => array(
+                       ],
+                       'com.woltlab.wcf.conversation' => [
                                'com.woltlab.wcf.conversation.attachment',
                                'com.woltlab.wcf.conversation.label'
-                       ),
-                       'com.woltlab.wcf.smiley' => array()
-               );
+                       ],
+                       'com.woltlab.wcf.smiley' => []
+               ];
        }
        
        /**
@@ -145,7 +145,7 @@ class PhpBB3xExporter extends AbstractExporter {
         * @see \wcf\system\exporter\IExporter::getQueue()
         */
        public function getQueue() {
-               $queue = array();
+               $queue = [];
                
                // user
                if (in_array('com.woltlab.wcf.user', $this->selectedData)) {
@@ -216,7 +216,7 @@ class PhpBB3xExporter extends AbstractExporter {
                        WHERE           group_id BETWEEN ? AND ?
                        ORDER BY        group_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        switch ($row['group_id']) {
                                case 1:
@@ -234,12 +234,12 @@ class PhpBB3xExporter extends AbstractExporter {
                                break;
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['group_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['group_id'], [
                                'groupName' => $row['group_name'],
                                'groupType' => $groupType,
                                'userOnlineMarking' => ($row['group_colour'] ? '<span style="color: #'.$row['group_colour'].'">%s</span>' : '%s'),
                                'showOnTeamPage' => $row['group_legend']
-                       ));
+                       ]);
                }
        }
        
@@ -251,7 +251,7 @@ class PhpBB3xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."users
                        WHERE   user_type <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(self::USER_TYPE_USER_IGNORE));
+               $statement->execute([self::USER_TYPE_USER_IGNORE]);
                $row = $statement->fetchArray();
                if ($row !== false) return $row['maxID'];
                return 0;
@@ -262,7 +262,7 @@ class PhpBB3xExporter extends AbstractExporter {
         */
        public function exportUsers($offset, $limit) {
                // cache profile fields
-               $profileFields = array();
+               $profileFields = [];
                $sql = "SELECT  *
                        FROM    ".$this->databasePrefix."profile_fields";
                $statement = $this->database->prepareStatement($sql);
@@ -294,9 +294,9 @@ class PhpBB3xExporter extends AbstractExporter {
                                        AND user_table.user_id BETWEEN ? AND ?
                        ORDER BY        user_table.user_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0, self::USER_TYPE_USER_IGNORE, $offset + 1, $offset + $limit));
+               $statement->execute([0, self::USER_TYPE_USER_IGNORE, $offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'username' => StringUtil::decodeHTML($row['username']),
                                'password' => '',
                                'email' => $row['user_email'],
@@ -309,23 +309,23 @@ class PhpBB3xExporter extends AbstractExporter {
                                'signatureEnableHtml' => 0,
                                'signatureEnableSmilies' => preg_match('/<!-- s.*? -->/', $row['user_sig']),
                                'lastActivityTime' => $row['user_lastvisit']
-                       );
+                       ];
                        
                        $birthday = \DateTime::createFromFormat('j-n-Y', str_replace(' ', '', $row['user_birthday']));
                        // get user options
-                       $options = array(
+                       $options = [
                                'location' => $row['user_from'],
                                'birthday' => $birthday ? $birthday->format('Y-m-d') : '',
                                'icq' => $row['user_icq'],
                                'homepage' => $row['user_website'],
                                'hobbies' => $row['user_interests']
-                       );
+                       ];
                        
-                       $additionalData = array(
+                       $additionalData = [
                                'groupIDs' => explode(',', $row['groupIDs']),
-                               'languages' => array($row['user_lang']),
+                               'languages' => [$row['user_lang']],
                                'options' => $options
-                       );
+                       ];
                        
                        // handle user options
                        foreach ($profileFields as $profileField) {
@@ -346,7 +346,7 @@ class PhpBB3xExporter extends AbstractExporter {
                        
                        // update password hash
                        if ($newUserID) {
-                               $passwordUpdateStatement->execute(array('phpbb3:'.$row['user_password'].':', $newUserID));
+                               $passwordUpdateStatement->execute(['phpbb3:'.$row['user_password'].':', $newUserID]);
                        }
                }
        }
@@ -378,7 +378,7 @@ class PhpBB3xExporter extends AbstractExporter {
                        FROM            ".$this->databasePrefix."profile_fields fields
                        ORDER BY        fields.field_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(5));
+               $statement->execute([5]);
                while ($row = $statement->fetchArray()) {
                        $selectOptions = '';
                        switch ($row['field_type']) {
@@ -404,7 +404,7 @@ class PhpBB3xExporter extends AbstractExporter {
                                        continue 2;
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['field_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['field_id'], [
                                'categoryName' => 'profile.personal',
                                'optionType' => $type,
                                'editable' => $row['field_show_profile'] ? UserOption::EDITABILITY_ALL : UserOption::EDITABILITY_ADMINISTRATOR,
@@ -414,7 +414,7 @@ class PhpBB3xExporter extends AbstractExporter {
                                'visible' => $row['field_no_view'] ? UserOption::VISIBILITY_ADMINISTRATOR | UserOption::VISIBILITY_OWNER : UserOption::VISIBILITY_ALL,
                                'showOrder' => $row['field_order'],
                                'outputClass' => $type == 'select' ? 'wcf\system\option\user\SelectOptionsUserOptionOutput' : ''
-                       ), array('name' => $row['field_name']));
+                       ], ['name' => $row['field_name']]);
                }
        }
        
@@ -426,7 +426,7 @@ class PhpBB3xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."ranks
                        WHERE   rank_special = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -440,16 +440,16 @@ class PhpBB3xExporter extends AbstractExporter {
                        WHERE           rank_special = ?
                        ORDER BY        rank_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['rank_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['rank_id'], [
                                'groupID' => 2, // 2 = registered users
                                'requiredPoints' => $row['rank_min'] * 5,
                                'rankTitle' => $row['rank_title'],
                                'rankImage' => $row['rank_image'],
                                'repeatImage' => 0,
                                'requiredGender' => 0 // neutral
-                       ));
+                       ]);
                }
        }
        
@@ -462,7 +462,7 @@ class PhpBB3xExporter extends AbstractExporter {
                        WHERE           friend = ?
                                AND     foe = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(1, 0));
+               $statement->execute([1, 0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -477,12 +477,12 @@ class PhpBB3xExporter extends AbstractExporter {
                                        AND     foe = ?
                        ORDER BY        user_id, zebra_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(1, 0));
+               $statement->execute([1, 0]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, [
                                'userID' => $row['user_id'],
                                'followUserID' => $row['zebra_id']
-                       ));
+                       ]);
                }
        }
        
@@ -494,7 +494,7 @@ class PhpBB3xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."users
                        WHERE   user_avatar_type IN (?, ?)";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(self::AVATAR_TYPE_GALLERY, self::AVATAR_TYPE_UPLOADED));
+               $statement->execute([self::AVATAR_TYPE_GALLERY, self::AVATAR_TYPE_UPLOADED]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -509,7 +509,7 @@ class PhpBB3xExporter extends AbstractExporter {
                                FROM    ".$this->databasePrefix."config
                                WHERE   config_name IN (?, ?, ?)";
                        $statement = $this->database->prepareStatement($sql);
-                       $statement->execute(array('avatar_path', 'avatar_salt', 'avatar_gallery_path'));
+                       $statement->execute(['avatar_path', 'avatar_salt', 'avatar_gallery_path']);
                        while ($row = $statement->fetchArray()) {
                                $config_name = $row['config_name'];
                                $$config_name = $row['config_value'];
@@ -521,7 +521,7 @@ class PhpBB3xExporter extends AbstractExporter {
                        WHERE           user_avatar_type IN (?, ?)
                        ORDER BY        user_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(self::AVATAR_TYPE_GALLERY, self::AVATAR_TYPE_UPLOADED));
+               $statement->execute([self::AVATAR_TYPE_GALLERY, self::AVATAR_TYPE_UPLOADED]);
                while ($row = $statement->fetchArray()) {
                        $extension = pathinfo($row['user_avatar'], PATHINFO_EXTENSION);
                        switch ($row['user_avatar_type']) {
@@ -533,11 +533,11 @@ class PhpBB3xExporter extends AbstractExporter {
                                break;
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import(0, [
                                'avatarName' => basename($row['user_avatar']),
                                'avatarExtension' => $extension,
                                'userID' => $row['user_id']
-                       ), array('fileLocation' => $location));
+                       ], ['fileLocation' => $location]);
                }
        }
        
@@ -563,10 +563,10 @@ class PhpBB3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.label')->import($row['folder_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.label')->import($row['folder_id'], [
                                'userID' => $row['user_id'],
                                'label' => mb_substr($row['folder_name'], 0, 80)
-                       ));
+                       ]);
                }
        }
        
@@ -637,7 +637,7 @@ class PhpBB3xExporter extends AbstractExporter {
                        )
                        ORDER BY        isDraft, msg_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                while ($row = $statement->fetchArray()) {
                        if (!$row['isDraft']) {
                                $participants = explode(',', $row['participants']);
@@ -647,13 +647,13 @@ class PhpBB3xExporter extends AbstractExporter {
                                if (ImportHandler::getInstance()->getNewID('com.woltlab.wcf.conversation', $conversationID) !== null) continue;
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import(($row['isDraft'] ? 'draft-'.$row['msg_id'] : $conversationID), array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import(($row['isDraft'] ? 'draft-'.$row['msg_id'] : $conversationID), [
                                'subject' => StringUtil::decodeHTML($row['message_subject']),
                                'time' => $row['message_time'],
                                'userID' => $row['author_id'],
                                'username' => StringUtil::decodeHTML($row['username']) ?: '',
                                'isDraft' => $row['isDraft']
-                       ));
+                       ]);
                }
        }
        
@@ -715,13 +715,13 @@ class PhpBB3xExporter extends AbstractExporter {
                        )
                        ORDER BY        msg_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(1, 0));
+               $statement->execute([1, 0]);
                while ($row = $statement->fetchArray()) {
                        $participants = explode(',', $row['participants']);
                        $participants[] = $row['author_id'];
                        $conversationID = $this->getConversationID($row['root_level'] ?: $row['msg_id'], $participants);
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['msg_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['msg_id'], [
                                'conversationID' => $conversationID,
                                'userID' => $row['author_id'],
                                'username' => StringUtil::decodeHTML($row['username']) ?: '',
@@ -732,7 +732,7 @@ class PhpBB3xExporter extends AbstractExporter {
                                'enableHtml' => 0,
                                'enableBBCodes' => $row['enable_bbcode'],
                                'showSignature' => $row['enable_sig']
-                       ));
+                       ]);
                }
        }
        
@@ -772,14 +772,14 @@ class PhpBB3xExporter extends AbstractExporter {
                        $conversationID = $this->getConversationID($row['root_level'] ?: $row['msg_id'], $participants);
                        
                        $bcc = explode(':', $row['bcc_address']);
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, [
                                'conversationID' => $conversationID,
                                'participantID' => $row['user_id'],
                                'username' => StringUtil::decodeHTML($row['username']) ?: '',
                                'hideConversation' => $row['pm_deleted'],
                                'isInvisible' => in_array('u_'.$row['user_id'], $bcc) ? 1 : 0,
                                'lastVisitTime' => $row['pm_new'] ? 0 : $row['message_time']
-                       ), array('labelIDs' => ($row['folder_id'] > 0 ? array($row['folder_id']) : array())));
+                       ], ['labelIDs' => ($row['folder_id'] > 0 ? [$row['folder_id']] : [])]);
                }
        }
        
@@ -832,7 +832,7 @@ class PhpBB3xExporter extends AbstractExporter {
                if (!isset($this->boardCache[$parentID])) return;
                
                foreach ($this->boardCache[$parentID] as $board) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['forum_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['forum_id'], [
                                'parentID' => ($board['parent_id'] ?: null),
                                'position' => $board['left_id'],
                                'boardType' => ($board['forum_type'] == self::BOARD_TYPE_LINK ? Board::TYPE_LINK : ($board['forum_type'] == self::BOARD_TYPE_CATEGORY ? Board::TYPE_CATEGORY : Board::TYPE_BOARD)),
@@ -848,7 +848,7 @@ class PhpBB3xExporter extends AbstractExporter {
                                'clicks' => $board['forum_posts'],
                                'posts' => $board['forum_posts'],
                                'threads' => $board['forum_topics']
-                       ));
+                       ]);
                        
                        $this->exportBoardsRecursively($board['forum_id']);
                }
@@ -872,9 +872,9 @@ class PhpBB3xExporter extends AbstractExporter {
                        WHERE           topic_id BETWEEN ? AND ?
                        ORDER BY        topic_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'boardID' => $row['forum_id'] ?: $boardIDs[0], // map global annoucements to a random board
                                'topic' => StringUtil::decodeHTML($row['topic_title']),
                                'time' => $row['topic_time'],
@@ -887,10 +887,10 @@ class PhpBB3xExporter extends AbstractExporter {
                                'isClosed' => $row['topic_status'] == self::TOPIC_STATUS_CLOSED ? 1 : 0,
                                'movedThreadID' => ($row['topic_status'] == self::TOPIC_STATUS_LINK && $row['topic_moved_id']) ? $row['topic_moved_id'] : null,
                                'movedTime' => 0,
-                       );
-                       $additionalData = array();
+                       ];
+                       $additionalData = [];
                        if ($row['topic_type'] == self::TOPIC_TYPE_GLOBAL) $additionalData['assignedBoards'] = $boardIDs;
-                       if ($row['topic_type'] == self::TOPIC_TYPE_ANNOUCEMENT) $additionalData['assignedBoards'] = array($row['forum_id']);
+                       if ($row['topic_type'] == self::TOPIC_TYPE_ANNOUCEMENT) $additionalData['assignedBoards'] = [$row['forum_id']];
                        
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.thread')->import($row['topic_id'], $data, $additionalData);
                }
@@ -917,9 +917,9 @@ class PhpBB3xExporter extends AbstractExporter {
                        WHERE           post_id BETWEEN ? AND ?
                        ORDER BY        post_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0, $offset + 1, $offset + $limit));
+               $statement->execute([0, $offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['post_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['post_id'], [
                                'threadID' => $row['topic_id'],
                                'userID' => $row['poster_id'],
                                'username' => ($row['post_username'] ?: (StringUtil::decodeHTML($row['username']) ?: '')),
@@ -939,7 +939,7 @@ class PhpBB3xExporter extends AbstractExporter {
                                'enableBBCodes' => $row['enable_bbcode'],
                                'showSignature' => $row['enable_sig'],
                                'ipAddress' => UserUtil::convertIPv4To6($row['poster_ip'])
-                       ));
+                       ]);
                }
        }
        
@@ -981,11 +981,11 @@ class PhpBB3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import(0, [
                                'objectID' => $row['topic_id'],
                                'userID' => $row['user_id'],
                                'notification' => $row['notify_status']
-                       ));
+                       ]);
                }
        }
        
@@ -997,7 +997,7 @@ class PhpBB3xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."topics
                        WHERE   poll_start <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1012,9 +1012,9 @@ class PhpBB3xExporter extends AbstractExporter {
                        WHERE           poll_start <> ?
                        ORDER BY        topic_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['topic_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['topic_id'], [
                                'objectID' => $row['topic_first_post_id'],
                                'question' => $row['poll_title'],
                                'time' => $row['poll_start'],
@@ -1023,7 +1023,7 @@ class PhpBB3xExporter extends AbstractExporter {
                                'isPublic' => 0,
                                'maxVotes' => $row['poll_max_options'],
                                'votes' => $row['poll_votes']
-                       ));
+                       ]);
                }
        }
        
@@ -1049,12 +1049,12 @@ class PhpBB3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['topic_id'].'-'.$row['poll_option_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['topic_id'].'-'.$row['poll_option_id'], [
                                'pollID' => $row['topic_id'],
                                'optionValue' => $row['poll_option_text'],
                                'showOrder' => $row['poll_option_id'],
                                'votes' => $row['poll_option_total']
-                       ));
+                       ]);
                }
        }
        
@@ -1066,7 +1066,7 @@ class PhpBB3xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."poll_votes
                        WHERE   vote_user_id <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1080,13 +1080,13 @@ class PhpBB3xExporter extends AbstractExporter {
                        WHERE           vote_user_id <> ?
                        ORDER BY        poll_option_id, vote_user_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, [
                                'pollID' => $row['topic_id'],
                                'optionID' => $row['topic_id'].'-'.$row['poll_option_id'],
                                'userID' => $row['vote_user_id']
-                       ));
+                       ]);
                }
        }
        
@@ -1097,7 +1097,7 @@ class PhpBB3xExporter extends AbstractExporter {
                $sql = "SELECT  (SELECT COUNT(*) FROM ".$this->databasePrefix."acl_users WHERE forum_id <> ?)
                                + (SELECT COUNT(*) FROM ".$this->databasePrefix."acl_groups WHERE forum_id <> ?) AS count";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0, 0));
+               $statement->execute([0, 0]);
                $row = $statement->fetchArray();
                return $row['count'] ? 2 : 0;
        }
@@ -1110,25 +1110,25 @@ class PhpBB3xExporter extends AbstractExporter {
                        FROM            ".$this->databasePrefix."acl_options
                        WHERE           is_local = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(1));
-               $options = array();
+               $statement->execute([1]);
+               $options = [];
                while ($row = $statement->fetchArray()) {
                        $options[$row['auth_option_id']] = $row;
                }
                
                $condition = new PreparedStatementConditionBuilder();
-               $condition->add('auth_option_id IN (?)', array(array_keys($options)));
+               $condition->add('auth_option_id IN (?)', [array_keys($options)]);
                $sql = "SELECT          *
                        FROM            ".$this->databasePrefix."acl_roles_data
                        ".$condition;
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($condition->getParameters());
-               $roles = array();
+               $roles = [];
                while ($row = $statement->fetchArray()) {
                        $roles[$row['role_id']][$row['auth_option_id']] = $row['auth_setting'];
                }
                
-               $data = array();
+               $data = [];
                if ($offset == 0) {
                        // groups
                        $sql = "SELECT          *
@@ -1136,7 +1136,7 @@ class PhpBB3xExporter extends AbstractExporter {
                                WHERE           forum_id <> ?
                                ORDER BY        auth_role_id DESC";
                        $statement = $this->database->prepareStatement($sql);
-                       $statement->execute(array(0));
+                       $statement->execute([0]);
                        $key = 'group';
                }
                else if ($offset == 1) {
@@ -1146,7 +1146,7 @@ class PhpBB3xExporter extends AbstractExporter {
                                WHERE           forum_id <> ?
                                ORDER BY        auth_role_id DESC";
                        $statement = $this->database->prepareStatement($sql);
-                       $statement->execute(array(0));
+                       $statement->execute([0]);
                        $key = 'user';
                }
                
@@ -1176,63 +1176,63 @@ class PhpBB3xExporter extends AbstractExporter {
                        }
                }
                
-               static $optionMapping = array(
-                       'f_announce' => array('canStartAnnouncement'),
-                       'f_attach' => array('canUploadAttachment'),
-                       'f_bbcode' => array(),
-                       'f_bump' => array(),
-                       'f_delete' => array('canDeleteOwnPost'),
-                       'f_download' => array('canDownloadAttachment', 'canViewAttachmentPreview'),
-                       'f_edit' => array('canEditOwnPost'),
-                       'f_email' => array(),
-                       'f_flash' => array(),
-                       'f_icons' => array(),
-                       'f_ignoreflood' => array(),
-                       'f_img' => array(),
-                       'f_list' => array('canViewBoard'),
-                       'f_noapprove' => array('canStartThreadWithoutModeration', 'canReplyThreadWithoutModeration'),
-                       'f_poll' => array('canStartPoll'),
-                       'f_post' => array('canStartThread'),
-                       'f_postcount' => array(),
-                       'f_print' => array(),
-                       'f_read' => array('canEnterBoard'),
-                       'f_reply' => array('canReplyThread'),
-                       'f_report' => array(),
-                       'f_search' => array(),
-                       'f_sigs' => array(),
-                       'f_smilies' => array(),
-                       'f_sticky' => array('canPinThread'),
-                       'f_subscribe' => array(),
-                       'f_user_lock' => array(),
-                       'f_vote' => array('canVotePoll'),
-                       'f_votechg' => array(),
-                       'm_approve' => array('canEnableThread'),
-                       'm_chgposter' => array(),
-                       'm_delete' => array(
+               static $optionMapping = [
+                       'f_announce' => ['canStartAnnouncement'],
+                       'f_attach' => ['canUploadAttachment'],
+                       'f_bbcode' => [],
+                       'f_bump' => [],
+                       'f_delete' => ['canDeleteOwnPost'],
+                       'f_download' => ['canDownloadAttachment', 'canViewAttachmentPreview'],
+                       'f_edit' => ['canEditOwnPost'],
+                       'f_email' => [],
+                       'f_flash' => [],
+                       'f_icons' => [],
+                       'f_ignoreflood' => [],
+                       'f_img' => [],
+                       'f_list' => ['canViewBoard'],
+                       'f_noapprove' => ['canStartThreadWithoutModeration', 'canReplyThreadWithoutModeration'],
+                       'f_poll' => ['canStartPoll'],
+                       'f_post' => ['canStartThread'],
+                       'f_postcount' => [],
+                       'f_print' => [],
+                       'f_read' => ['canEnterBoard'],
+                       'f_reply' => ['canReplyThread'],
+                       'f_report' => [],
+                       'f_search' => [],
+                       'f_sigs' => [],
+                       'f_smilies' => [],
+                       'f_sticky' => ['canPinThread'],
+                       'f_subscribe' => [],
+                       'f_user_lock' => [],
+                       'f_vote' => ['canVotePoll'],
+                       'f_votechg' => [],
+                       'm_approve' => ['canEnableThread'],
+                       'm_chgposter' => [],
+                       'm_delete' => [
                                'canDeleteThread', 'canReadDeletedThread', 'canRestoreThread', 'canDeleteThreadCompletely',
                                'canDeletePost', 'canReadDeletedPost', 'canRestorePost', 'canDeletePostCompletely'
-                       ),
-                       'm_edit' => array('canEditPost'),
-                       'm_info' => array(),
-                       'm_lock' => array('canCloseThread', 'canReplyClosedThread'),
-                       'm_merge' => array('canMergeThread', 'canMergePost'),
-                       'm_move' => array('canMoveThread', 'canMovePost'),
-                       'm_report' => array(),
-                       'm_split' => array()
-               );
+                       ],
+                       'm_edit' => ['canEditPost'],
+                       'm_info' => [],
+                       'm_lock' => ['canCloseThread', 'canReplyClosedThread'],
+                       'm_merge' => ['canMergeThread', 'canMergePost'],
+                       'm_move' => ['canMoveThread', 'canMovePost'],
+                       'm_report' => [],
+                       'm_split' => []
+               ];
                
                foreach ($data as $id => $forumData) {
                        foreach ($forumData as $forumID => $settingData) {
                                foreach ($settingData as $optionID => $value) {
                                        if (!isset($optionMapping[$options[$optionID]['auth_option']])) continue;
                                        foreach ($optionMapping[$options[$optionID]['auth_option']] as $optionName) {
-                                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array(
+                                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, [
                                                        'objectID' => $forumID,
                                                        $key.'ID' => $id,
                                                        'optionValue' => $value
-                                               ), array(
+                                               ], [
                                                        'optionName' => $optionName
-                                               ));
+                                               ]);
                                        }
                                }
                        }
@@ -1264,7 +1264,7 @@ class PhpBB3xExporter extends AbstractExporter {
                        GROUP BY        smiley_url
                        ORDER BY        smiley_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array());
+               $statement->execute([]);
                while ($row = $statement->fetchArray()) {
                        $fileLocation = $this->fileSystemPath.'images/smilies/'.$row['smiley_url'];
                        
@@ -1272,12 +1272,12 @@ class PhpBB3xExporter extends AbstractExporter {
                        $code = array_shift($aliases);
                        $emotion = mb_substr($row['emotion'], 0, mb_strpos($row['emotion'], "\n") ?: mb_strlen($row['emotion'])); // we had to GROUP_CONCAT it because of SQL strict mode
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley')->import($row['smiley_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley')->import($row['smiley_id'], [
                                'smileyTitle' => $emotion,
                                'smileyCode' => $code,
                                'showOrder' => $row['smiley_order'],
                                'aliases' => implode("\n", $aliases)
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
@@ -1286,7 +1286,7 @@ class PhpBB3xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."attachments
                        WHERE   in_message = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($conversation ? 1 : 0));
+               $statement->execute([$conversation ? 1 : 0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1298,7 +1298,7 @@ class PhpBB3xExporter extends AbstractExporter {
                                FROM    ".$this->databasePrefix."config
                                WHERE   config_name IN (?)";
                        $statement = $this->database->prepareStatement($sql);
-                       $statement->execute(array('upload_path'));
+                       $statement->execute(['upload_path']);
                        while ($row = $statement->fetchArray()) {
                                $$row['config_name'] = $row['config_value'];
                        }
@@ -1309,14 +1309,14 @@ class PhpBB3xExporter extends AbstractExporter {
                        WHERE           in_message = ?
                        ORDER BY        attach_id DESC";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array($conversation ? 1 : 0));
+               $statement->execute([$conversation ? 1 : 0]);
                while ($row = $statement->fetchArray()) {
                        $fileLocation = FileUtil::addTrailingSlash($this->fileSystemPath.$upload_path).$row['physical_filename'];
                        
                        $isImage = 0;
                        if ($row['mimetype'] == 'image/jpeg' || $row['mimetype'] == 'image/png' || $row['mimetype'] == 'image/gif') $isImage = 1;
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.'.($conversation ? 'wcf.conversation' : 'wbb').'.attachment')->import(0, array( // TODO: support inline attachments
+                       ImportHandler::getInstance()->getImporter('com.woltlab.'.($conversation ? 'wcf.conversation' : 'wbb').'.attachment')->import(0, [ // TODO: support inline attachments
                                'objectID' => $row['post_msg_id'],
                                'userID' => ($row['poster_id'] ?: null),
                                'filename' => $row['real_filename'],
@@ -1325,7 +1325,7 @@ class PhpBB3xExporter extends AbstractExporter {
                                'isImage' => $isImage,
                                'downloads' => $row['download_count'],
                                'uploadTime' => $row['filetime']
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
@@ -1359,13 +1359,13 @@ class PhpBB3xExporter extends AbstractExporter {
                // fix code php bbcode...
                $text = preg_replace_callback('#\[code(=php)?\](.*)\[/code\]#s', function ($matches) {
                        $content = $matches[2];
-                       $content = str_replace(array(
+                       $content = str_replace([
                                '<br />',
                                '&nbsp;&nbsp;&nbsp;&nbsp;'
-                       ), array(
+                       ], [
                                "\n",
                                "\t"
-                       ), $content);
+                       ], $content);
                        $content = preg_replace('#(?:<span class="syntax[^"]*">|</span>)#', '', $content);
                        
                        return '[code'.$matches[1].']'.$content.'[/code]';
index 40eeabfca8f5fc4314c2307f8a0d51e3f50c0493..4730a3156feb12cccb34b53323cd3a2223f76e17 100644 (file)
@@ -40,12 +40,12 @@ class SMF2xExporter extends AbstractExporter {
         * board cache
         * @var array
         */
-       protected $boardCache = array();
+       protected $boardCache = [];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$methods
         */
-       protected $methods = array(
+       protected $methods = [
                'com.woltlab.wcf.user' => 'Users',
                'com.woltlab.wcf.user.group' => 'UserGroups',
                'com.woltlab.wcf.user.rank' => 'UserRanks',
@@ -69,40 +69,40 @@ class SMF2xExporter extends AbstractExporter {
                'com.woltlab.wcf.label' => 'Labels',
                'com.woltlab.wbb.acl' => 'ACLs',
                'com.woltlab.wcf.smiley' => 'Smilies'
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$limits
         */
-       protected $limits = array(
+       protected $limits = [
                'com.woltlab.wcf.user' => 200,
                'com.woltlab.wcf.user.avatar' => 100,
                'com.woltlab.wcf.user.follower' => 100
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\IExporter::getSupportedData()
         */
        public function getSupportedData() {
-               return array(
-                       'com.woltlab.wcf.user' => array(
+               return [
+                       'com.woltlab.wcf.user' => [
                                'com.woltlab.wcf.user.group',
                                'com.woltlab.wcf.user.avatar',
                                'com.woltlab.wcf.user.option',
                                'com.woltlab.wcf.user.follower',
                                'com.woltlab.wcf.user.rank'
-                       ),
-                       'com.woltlab.wbb.board' => array(
+                       ],
+                       'com.woltlab.wbb.board' => [
                                'com.woltlab.wbb.acl',
                                'com.woltlab.wbb.attachment',
                                'com.woltlab.wbb.poll',
                                'com.woltlab.wbb.watchedThread'
-                       ),
-                       'com.woltlab.wcf.conversation' => array(
+                       ],
+                       'com.woltlab.wcf.conversation' => [
                                'com.woltlab.wcf.conversation.label'
-                       ),
-                       'com.woltlab.wcf.smiley' => array()
-               );
+                       ],
+                       'com.woltlab.wcf.smiley' => []
+               ];
        }
        
        /**
@@ -129,7 +129,7 @@ class SMF2xExporter extends AbstractExporter {
         * @see \wcf\system\exporter\IExporter::getQueue()
         */
        public function getQueue() {
-               $queue = array();
+               $queue = [];
                
                // user
                if (in_array('com.woltlab.wcf.user', $this->selectedData)) {
@@ -200,18 +200,18 @@ class SMF2xExporter extends AbstractExporter {
         */
        public function exportUserGroups($offset, $limit) {
                // import everyone, guests and users pseudogroups
-               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import(self::GROUP_EVERYONE, array(
+               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import(self::GROUP_EVERYONE, [
                        'groupName' => 'Everyone',
                        'groupType' => UserGroup::EVERYONE
-               ));
-               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import(self::GROUP_GUEST, array(
+               ]);
+               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import(self::GROUP_GUEST, [
                        'groupName' => 'Guests',
                        'groupType' => UserGroup::GUESTS
-               ));
-               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import(self::GROUP_USER_FAKE, array(
+               ]);
+               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import(self::GROUP_USER_FAKE, [
                        'groupName' => 'Users',
                        'groupType' => UserGroup::USERS
-               ));
+               ]);
                
                $sql = "SELECT          *
                        FROM            ".$this->databasePrefix."membergroups
@@ -219,11 +219,11 @@ class SMF2xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['id_group'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['id_group'], [
                                'groupName' => $row['group_name'],
                                'groupType' => UserGroup::OTHER,
                                'userOnlineMarking' => '<span style="color: '.$row['online_color'].';">%s</span>',
-                       ));
+                       ]);
                }
        }
        
@@ -239,7 +239,7 @@ class SMF2xExporter extends AbstractExporter {
         */
        public function exportUsers($offset, $limit) {
                // cache profile fields
-               $profileFields = array();
+               $profileFields = [];
                $sql = "SELECT  col_name, id_field
                        FROM    ".$this->databasePrefix."custom_fields";
                $statement = $this->database->prepareStatement($sql);
@@ -255,13 +255,13 @@ class SMF2xExporter extends AbstractExporter {
                $passwordUpdateStatement = WCF::getDB()->prepareStatement($sql);
                
                // get userIDs
-               $userIDs = array();
+               $userIDs = [];
                $sql = "SELECT          id_member
                        FROM            ".$this->databasePrefix."members
                        WHERE           id_member BETWEEN ? AND ?
                        ORDER BY        id_member";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $userIDs[] = $row['id_member'];
                }
@@ -270,25 +270,25 @@ class SMF2xExporter extends AbstractExporter {
                if (empty($userIDs)) return;
                
                // get profile field values
-               $profileFieldValues = array();
+               $profileFieldValues = [];
                if (!empty($profileFields)) {
                        $condition = new PreparedStatementConditionBuilder();
-                       $condition->add('id_member IN(?)', array($userIDs));
-                       $condition->add('variable IN(?)', array(array_keys($profileFields)));
+                       $condition->add('id_member IN(?)', [$userIDs]);
+                       $condition->add('variable IN(?)', [array_keys($profileFields)]);
                        $sql = "SELECT  *
                                FROM    ".$this->databasePrefix."themes
                                ".$condition;
                        $statement = $this->database->prepareStatement($sql);
                        $statement->execute($condition->getParameters());
                        while ($row = $statement->fetchArray()) {
-                               if (!isset($profileFieldValues[$row['id_member']])) $profileFieldValues[$row['id_member']] = array();
+                               if (!isset($profileFieldValues[$row['id_member']])) $profileFieldValues[$row['id_member']] = [];
                                $profileFieldValues[$row['id_member']][$profileFields[$row['variable']]['id_field']] = $row['value'];
                        }
                }
                
                // get users
                $condition = new PreparedStatementConditionBuilder();
-               $condition->add('member.id_member IN(?)', array($userIDs));
+               $condition->add('member.id_member IN(?)', [$userIDs]);
                $sql = "SELECT          member.*, ban_group.ban_time, ban_group.expire_time AS banExpire, ban_group.reason AS banReason,
                                        (SELECT COUNT(*) FROM ".$this->databasePrefix."moderators moderator WHERE member.id_member = moderator.id_member) AS isMod
                        FROM            ".$this->databasePrefix."members member
@@ -300,7 +300,7 @@ class SMF2xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($condition->getParameters());
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'username' => $row['member_name'],
                                'password' => '',
                                'email' => $row['email_address'],
@@ -315,21 +315,21 @@ class SMF2xExporter extends AbstractExporter {
                                'signatureEnableSmilies' => 1,
                                'userTitle' => StringUtil::decodeHTML($row['usertitle']),
                                'lastActivityTime' => $row['last_login']
-                       );
+                       ];
                        
                        // get user options
-                       $options = array(
+                       $options = [
                                'location' => $row['location'],
                                'birthday' => $row['birthdate'],
                                'icq' => $row['icq'],
                                'homepage' => $row['website_url'],
                                'aboutMe' => $row['personal_text']
-                       );
+                       ];
                        
-                       $additionalData = array(
+                       $additionalData = [
                                'groupIDs' => explode(',', $row['additional_groups'].','.$row['id_group']),
                                'options' => $options
-                       );
+                       ];
                        
                        if ($row['isMod']) {
                                $additionalData['groupIDs'][] = self::GROUP_MODERATORS;
@@ -348,7 +348,7 @@ class SMF2xExporter extends AbstractExporter {
                        
                        // update password hash
                        if ($newUserID) {
-                               $passwordUpdateStatement->execute(array('smf2:'.$row['passwd'].':'.$row['password_salt'], $newUserID));
+                               $passwordUpdateStatement->execute(['smf2:'.$row['passwd'].':'.$row['password_salt'], $newUserID]);
                        }
                }
        }
@@ -409,7 +409,7 @@ class SMF2xExporter extends AbstractExporter {
                                        $editable = UserOption::EDITABILITY_ADMINISTRATOR;
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['id_field'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['id_field'], [
                                'categoryName' => 'profile.personal',
                                'optionType' => $row['field_type'],
                                'editable' => $editable,
@@ -419,7 +419,7 @@ class SMF2xExporter extends AbstractExporter {
                                'searchable' => $row['can_search'] ? 1 : 0,
                                'outputClass' => $row['field_type'] == 'select' ? 'wcf\system\option\user\SelectOptionsUserOptionOutput' : '',
                                'defaultValue' => $row['default_value']
-                       ), array('name' => $row['field_name']));
+                       ], ['name' => $row['field_name']]);
                }
        }
        
@@ -431,7 +431,7 @@ class SMF2xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."membergroups
                        WHERE   min_posts <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(-1));
+               $statement->execute([-1]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -445,16 +445,16 @@ class SMF2xExporter extends AbstractExporter {
                        WHERE           min_posts <> ?
                        ORDER BY        id_group";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(-1));
+               $statement->execute([-1]);
                while ($row = $statement->fetchArray()) {
                        list($repeatImage, $rankImage) = explode('#', $row['stars'], 2);
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['id_group'] == self::GROUP_USER ? self::GROUP_USER_FAKE : $row['id_group'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['id_group'] == self::GROUP_USER ? self::GROUP_USER_FAKE : $row['id_group'], [
                                'groupID' => $row['id_group'] == self::GROUP_USER ? self::GROUP_USER_FAKE : $row['id_group'],
                                'requiredPoints' => $row['min_posts'] * 5,
                                'rankTitle' => $row['group_name'],
                                'rankImage' => $rankImage,
                                'repeatImage' => $repeatImage
-                       ));
+                       ]);
                }
        }
        
@@ -466,7 +466,7 @@ class SMF2xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."members
                        WHERE   buddy_list <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(''));
+               $statement->execute(['']);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -480,15 +480,15 @@ class SMF2xExporter extends AbstractExporter {
                        WHERE           buddy_list <> ?
                        ORDER BY        id_member";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(''));
+               $statement->execute(['']);
                while ($row = $statement->fetchArray()) {
                        $buddylist = array_unique(ArrayUtil::toIntegerArray(explode(',', $row['buddy_list'])));
                        
                        foreach ($buddylist as $buddy) {
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, [
                                        'userID' => $row['id_member'],
                                        'followUserID' => $buddy
-                               ));
+                               ]);
                        }
                }
        }
@@ -500,7 +500,7 @@ class SMF2xExporter extends AbstractExporter {
                $sql = "SELECT  (SELECT COUNT(*) AS count FROM ".$this->databasePrefix."attachments WHERE id_member <> ?)
                                + (SELECT COUNT(*) AS count FROM ".$this->databasePrefix."members WHERE avatar <> ?) AS count";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('', 0));
+               $statement->execute(['', 0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -521,7 +521,7 @@ class SMF2xExporter extends AbstractExporter {
                                WHERE           avatar <> ?
                        )";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array('', 0));
+               $statement->execute(['', 0]);
                
                while ($row = $statement->fetchArray()) {
                        switch ($row['type']) {
@@ -534,11 +534,11 @@ class SMF2xExporter extends AbstractExporter {
                                break;
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import(0, [
                                'avatarName' => basename($row['avatarName']),
                                'avatarExtension' => pathinfo($row['avatarName'], PATHINFO_EXTENSION),
                                'userID' => $row['id_member']
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
@@ -550,7 +550,7 @@ class SMF2xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."members
                        WHERE   message_labels <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(''));
+               $statement->execute(['']);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -564,16 +564,16 @@ class SMF2xExporter extends AbstractExporter {
                        WHERE           message_labels <> ?
                        ORDER BY        id_member";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(''));
+               $statement->execute(['']);
                while ($row = $statement->fetchArray()) {
                        $labels = ArrayUtil::trim(explode(',', $row['message_labels']), false);
                        
                        $i = 0;
                        foreach ($labels as $label) {
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.label')->import($row['id_member'].'-'.($i++), array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.label')->import($row['id_member'].'-'.($i++), [
                                        'userID' => $row['id_member'],
                                        'label' => mb_substr($label, 0, 80)
-                               ));
+                               ]);
                        }
                }
        }
@@ -616,7 +616,7 @@ class SMF2xExporter extends AbstractExporter {
                        WHERE           pm.id_pm BETWEEN ? AND ?
                        ORDER BY        pm.id_pm";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $participants = explode(',', $row['participants']);
                        $participants[] = $row['id_member_from'];
@@ -624,13 +624,13 @@ class SMF2xExporter extends AbstractExporter {
                        
                        if (ImportHandler::getInstance()->getNewID('com.woltlab.wcf.conversation', $conversationID) !== null) continue;
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($conversationID, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($conversationID, [
                                'subject' => $row['subject'],
                                'time' => $row['msgtime'],
                                'userID' => $row['id_member_from'],
                                'username' => $row['from_name'],
                                'isDraft' => 0
-                       ));
+                       ]);
                }
        }
        
@@ -655,13 +655,13 @@ class SMF2xExporter extends AbstractExporter {
                        WHERE           pm.id_pm BETWEEN ? AND ?
                        ORDER BY        pm.id_pm";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $participants = explode(',', $row['participants']);
                        $participants[] = $row['id_member_from'];
                        $conversationID = $this->getConversationID($row['id_pm_head'], $participants);
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['id_pm'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['id_pm'], [
                                'conversationID' => $conversationID,
                                'userID' => $row['id_member_from'],
                                'username' => $row['from_name'],
@@ -672,7 +672,7 @@ class SMF2xExporter extends AbstractExporter {
                                'enableHtml' => 0,
                                'enableBBCodes' => 1,
                                'showSignature' => 1
-                       ));
+                       ]);
                }
        }
        
@@ -718,14 +718,14 @@ class SMF2xExporter extends AbstractExporter {
                                return $item != '-1';
                        });
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, [
                                'conversationID' => $conversationID,
                                'participantID' => $row['id_member'],
                                'username' => $row['member_name'],
                                'hideConversation' => $row['deleted'] ? 1 : 0,
                                'isInvisible' => $row['bcc'] ? 1 : 0,
                                'lastVisitTime' => $row['is_new'] ? 0 : $row['msgtime']
-                       ), array('labelIDs' => $labels));
+                       ], ['labelIDs' => $labels]);
                }
        }
        
@@ -751,12 +751,12 @@ class SMF2xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import('cat-'.$row['id_cat'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import('cat-'.$row['id_cat'], [
                                'parentID' => null,
                                'position' => $row['cat_order'],
                                'boardType' => Board::TYPE_CATEGORY,
                                'title' => $row['name']
-                       ));
+                       ]);
                }
                
                $sql = "SELECT          *
@@ -778,7 +778,7 @@ class SMF2xExporter extends AbstractExporter {
                if (!isset($this->boardCache[$parentID])) return;
                
                foreach ($this->boardCache[$parentID] as $board) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['id_board'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['id_board'], [
                                'parentID' => ($board['id_parent'] ?: 'cat-'.$board['id_cat']),
                                'position' => $board['board_order'],
                                'boardType' => $board['redirect'] ? Board::TYPE_LINK : Board::TYPE_BOARD,
@@ -790,7 +790,7 @@ class SMF2xExporter extends AbstractExporter {
                                'clicks' => $board['num_posts'],
                                'posts' => $board['num_posts'],
                                'threads' => $board['num_topics']
-                       ));
+                       ]);
                        
                        $this->exportBoardsRecursively($board['id_board']);
                }
@@ -815,9 +815,9 @@ class SMF2xExporter extends AbstractExporter {
                        WHERE           topic.id_topic BETWEEN ? AND ?
                        ORDER BY        topic.id_topic";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.thread')->import($row['id_topic'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.thread')->import($row['id_topic'], [
                                'boardID' => $row['id_board'],
                                'topic' => StringUtil::decodeHTML($row['subject']),
                                'time' => $row['time'],
@@ -830,7 +830,7 @@ class SMF2xExporter extends AbstractExporter {
                                'isClosed' => $row['locked'] ? 1 : 0,
                                'movedThreadID' => null,
                                'movedTime' => 0
-                       ));
+                       ]);
                }
        }
        
@@ -852,9 +852,9 @@ class SMF2xExporter extends AbstractExporter {
                        WHERE           message.id_msg BETWEEN ? AND ?
                        ORDER BY        message.id_msg";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['id_msg'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['id_msg'], [
                                'threadID' => $row['id_topic'],
                                'userID' => $row['id_member'],
                                'username' => $row['poster_name'],
@@ -872,7 +872,7 @@ class SMF2xExporter extends AbstractExporter {
                                'enableBBCodes' => 1,
                                'showSignature' => 1,
                                'ipAddress' => UserUtil::convertIPv4To6($row['poster_ip'])
-                       ));
+                       ]);
                }
        }
        
@@ -885,7 +885,7 @@ class SMF2xExporter extends AbstractExporter {
                        WHERE           id_member = ?
                                AND     id_msg <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0, 0));
+               $statement->execute([0, 0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -902,7 +902,7 @@ class SMF2xExporter extends AbstractExporter {
                                AND     attachment.id_msg <> ?
                        ORDER BY        attachment.id_attach";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0, 0));
+               $statement->execute([0, 0]);
                while ($row = $statement->fetchArray()) {
                        $fileLocation = $this->readOption('attachmentUploadDir').'/'.$row['id_attach'].'_'.$row['file_hash'];
                        
@@ -915,7 +915,7 @@ class SMF2xExporter extends AbstractExporter {
                                $row['isImage'] = $row['width'] = $row['height'] = 0;
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.attachment')->import($row['id_attach'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.attachment')->import($row['id_attach'], [
                                'objectID' => $row['id_msg'],
                                'userID' => ($row['id_member'] ?: null),
                                'filename' => $row['filename'],
@@ -926,7 +926,7 @@ class SMF2xExporter extends AbstractExporter {
                                'height' => $row['height'],
                                'downloads' => $row['downloads'],
                                'uploadTime' => $row['poster_time']
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
@@ -939,7 +939,7 @@ class SMF2xExporter extends AbstractExporter {
                        WHERE           id_topic <> ?
                                AND     id_board = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0, 0));
+               $statement->execute([0, 0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -954,12 +954,12 @@ class SMF2xExporter extends AbstractExporter {
                                        AND     id_board = ?
                        ORDER BY        id_member, id_topic";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0, 0));
+               $statement->execute([0, 0]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import(0, [
                                'objectID' => $row['id_topic'],
                                'userID' => $row['id_member']
-                       ));
+                       ]);
                }
        }
        
@@ -988,7 +988,7 @@ class SMF2xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['id_poll'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['id_poll'], [
                                'objectID' => $row['id_first_msg'],
                                'question' => $row['question'],
                                'endTime' => $row['expire_time'],
@@ -996,7 +996,7 @@ class SMF2xExporter extends AbstractExporter {
                                'isPublic' => $row['hide_results'] ? 0 : 1,
                                'maxVotes' => $row['max_votes'],
                                'votes' => $row['votes']
-                       ));
+                       ]);
                }
        }
        
@@ -1022,12 +1022,12 @@ class SMF2xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['id_poll'].'-'.$row['id_choice'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['id_poll'].'-'.$row['id_choice'], [
                                'pollID' => $row['id_poll'],
                                'optionValue' => $row['label'],
                                'showOrder' => $row['id_choice'],
                                'votes' => $row['votes']
-                       ));
+                       ]);
                }
        }
        
@@ -1039,7 +1039,7 @@ class SMF2xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."log_polls
                        WHERE   id_member <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1053,13 +1053,13 @@ class SMF2xExporter extends AbstractExporter {
                        WHERE           id_member <> ?
                        ORDER BY        id_poll, id_member, id_choice";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, [
                                'pollID' => $row['id_poll'],
                                'optionID' => $row['id_poll'].'-'.$row['id_choice'],
                                'userID' => $row['id_member']
-                       ));
+                       ]);
                }
        }
        
@@ -1075,9 +1075,9 @@ class SMF2xExporter extends AbstractExporter {
         */
        public function exportACLs($offset, $limit) {
                // TODO: try to split this into several requests
-               $profileToBoard = array();
-               $boardToGroup = array();
-               $boardToMod = array();
+               $profileToBoard = [];
+               $boardToGroup = [];
+               $boardToMod = [];
                
                $sql = "SELECT          id_board, id_profile, member_groups,
                                        (SELECT GROUP_CONCAT(id_member) FROM ".$this->databasePrefix."moderators moderator WHERE moderator.id_board = board.id_board) AS moderators
@@ -1086,7 +1086,7 @@ class SMF2xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       if (!isset($profileToBoard[$row['id_profile']])) $profileToBoard[$row['id_profile']] = array();
+                       if (!isset($profileToBoard[$row['id_profile']])) $profileToBoard[$row['id_profile']] = [];
                        $profileToBoard[$row['id_profile']][] = $row['id_board'];
                        
                        $boardToGroup[$row['id_board']] = array_unique(ArrayUtil::toIntegerArray(explode(',', $row['member_groups'])));
@@ -1095,20 +1095,20 @@ class SMF2xExporter extends AbstractExporter {
                
                foreach ($boardToGroup as $boardID => $groups) {
                        // deny for everyone first
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, [
                                'objectID' => $boardID,
                                'groupID' => self::GROUP_EVERYONE,
                                'optionValue' => 0
-                       ), array(
+                       ], [
                                'optionName' => 'canViewBoard'
-                       ));
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array(
+                       ]);
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, [
                                'objectID' => $boardID,
                                'groupID' => self::GROUP_EVERYONE,
                                'optionValue' => 0
-                       ), array(
+                       ], [
                                'optionName' => 'canEnterBoard'
-                       ));
+                       ]);
                        
                        if (!in_array(self::GROUP_ADMIN, $groups)) {
                                // admins may do everything
@@ -1119,72 +1119,72 @@ class SMF2xExporter extends AbstractExporter {
                                $groupID = $groupID == self::GROUP_USER ? self::GROUP_USER_FAKE : $groupID;
                                
                                // allow specified groups
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, [
                                        'objectID' => $boardID,
                                        'groupID' => $groupID,
                                        'optionValue' => 1
-                               ), array(
+                               ], [
                                        'optionName' => 'canViewBoard'
-                               ));
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array(
+                               ]);
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, [
                                        'objectID' => $boardID,
                                        'groupID' => $groupID,
                                        'optionValue' => 1
-                               ), array(
+                               ], [
                                        'optionName' => 'canEnterBoard'
-                               ));
+                               ]);
                        }
                }
                
-               static $permissionMap = array(
-                       'approve_posts' => array(
+               static $permissionMap = [
+                       'approve_posts' => [
                                'canEnableThread',
                                'canEnablePost'
-                       ),
-                       'delete_any' => array(
+                       ],
+                       'delete_any' => [
                                'canDeletePost',
                                'canReadDeletedPost',
                                'canRestorePost',
                                'canDeletePostCompletely'
-                       ),
-                       'delete_own' => array('canDeleteOwnPost'),
-                       'lock_any' => array('canCloseThread', 'canClosePost'),
-                       'lock_own' => array(),
-                       'make_sticky' => array('canPinThread'),
-                       'mark_any_modify' => array(),
-                       'mark_modify' => array(),
-                       'merge_any' => array('canMergeThread'),
-                       'moderate_board' => array('canReplyClosedThread'),
-                       'modify_any' => array('canEditPost'),
-                       'modify_own' => array('canEditOwnPost'),
-                       'poll_add_any' => array(),
-                       'poll_add_own' => array(),
-                       'poll_edit_any' => array(),
-                       'poll_edit_own' => array(),
-                       'poll_lock_any' => array(),
-                       'poll_lock_own' => array(),
-                       'poll_post' => array('canStartPoll'),
-                       'poll_remove_any' => array(),
-                       'poll_view' => array(),
-                       'poll_vote' => array('canVotePoll'),
-                       'post_attachment' => array('canUploadAttachment'),
-                       'post_reply_any' => array('canReplyThread'),
-                       'post_reply_own' => array('canReplyOwnThread'),
-                       'post_unapproved_replies_any' => array('canReplyThreadWithoutModeration'),
-                       'post_unapproved_replies_own' => array(),
-                       'post_unapproved_topics' => array('canStartThreadWithoutModeration'),
-                       'remove_any' => array(
+                       ],
+                       'delete_own' => ['canDeleteOwnPost'],
+                       'lock_any' => ['canCloseThread', 'canClosePost'],
+                       'lock_own' => [],
+                       'make_sticky' => ['canPinThread'],
+                       'mark_any_modify' => [],
+                       'mark_modify' => [],
+                       'merge_any' => ['canMergeThread'],
+                       'moderate_board' => ['canReplyClosedThread'],
+                       'modify_any' => ['canEditPost'],
+                       'modify_own' => ['canEditOwnPost'],
+                       'poll_add_any' => [],
+                       'poll_add_own' => [],
+                       'poll_edit_any' => [],
+                       'poll_edit_own' => [],
+                       'poll_lock_any' => [],
+                       'poll_lock_own' => [],
+                       'poll_post' => ['canStartPoll'],
+                       'poll_remove_any' => [],
+                       'poll_view' => [],
+                       'poll_vote' => ['canVotePoll'],
+                       'post_attachment' => ['canUploadAttachment'],
+                       'post_reply_any' => ['canReplyThread'],
+                       'post_reply_own' => ['canReplyOwnThread'],
+                       'post_unapproved_replies_any' => ['canReplyThreadWithoutModeration'],
+                       'post_unapproved_replies_own' => [],
+                       'post_unapproved_topics' => ['canStartThreadWithoutModeration'],
+                       'remove_any' => [
                                'canDeleteThread',
                                'canReadDeletedThread',
                                'canRestoreThread',
                                'canDeleteThreadCompletely'
-                       ),
-                       'remove_own' => array(),
-                       'report_any' => array(),
-                       'send_topic' => array(),
-                       'split_any' => array(),
-                       'view_attachments' => array('canDownloadAttachment', 'canViewAttachmentPreview')
-               );
+                       ],
+                       'remove_own' => [],
+                       'report_any' => [],
+                       'send_topic' => [],
+                       'split_any' => [],
+                       'view_attachments' => ['canDownloadAttachment', 'canViewAttachmentPreview']
+               ];
                
                $sql = "SELECT          *
                        FROM            ".$this->databasePrefix."board_permissions
@@ -1202,23 +1202,23 @@ class SMF2xExporter extends AbstractExporter {
                                                
                                                if (!isset($boardToMod[$boardID])) continue;
                                                foreach ($boardToMod[$boardID] as $moderator) {
-                                                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array(
+                                                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, [
                                                                'objectID' => $boardID,
                                                                'userID' => $moderator,
                                                                'optionValue' => $row['add_deny']
-                                                       ), array(
+                                                       ], [
                                                                'optionName' => $permission
-                                                       ));
+                                                       ]);
                                                }
                                        }
                                        else {
-                                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array(
+                                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, [
                                                        'objectID' => $boardID,
                                                        'groupID' => $row['id_group'] == self::GROUP_USER ? self::GROUP_USER_FAKE : $row['id_group'],
                                                        'optionValue' => $row['add_deny']
-                                               ), array(
+                                               ], [
                                                        'optionName' => $permission
-                                               ));
+                                               ]);
                                        }
                                }
                        }
@@ -1229,13 +1229,13 @@ class SMF2xExporter extends AbstractExporter {
                foreach ($boardIDs as $boardID) {
                        foreach ($permissionMap as $permissions) {
                                foreach ($permissions as $permission) {
-                                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array(
+                                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, [
                                                'objectID' => $boardID,
                                                'groupID' => self::GROUP_ADMIN,
                                                'optionValue' => 1
-                                       ), array(
+                                       ], [
                                                'optionName' => $permission
-                                       ));
+                                       ]);
                                }
                        }
                }
@@ -1266,7 +1266,7 @@ class SMF2xExporter extends AbstractExporter {
                        GROUP BY        filename
                        ORDER BY        id_smiley";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array());
+               $statement->execute([]);
                while ($row = $statement->fetchArray()) {
                        $fileLocation = $this->readOption('smiley_dir').'/'.$this->readOption('smiley_sets_default').'/'.$row['filename'];
                        
@@ -1274,24 +1274,24 @@ class SMF2xExporter extends AbstractExporter {
                        $code = array_shift($aliases);
                        $description = mb_substr($row['description'], 0, mb_strpos($row['description'], "\n") ?: mb_strlen($row['description'])); // we had to GROUP_CONCAT it because of SQL strict mode
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley')->import($row['id_smiley'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley')->import($row['id_smiley'], [
                                'smileyTitle' => $description,
                                'smileyCode' => $code,
                                'showOrder' => $row['smiley_order'],
                                'aliases' => implode("\n", $aliases)
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
        private function readOption($optionName) {
-               static $optionCache = array();
+               static $optionCache = [];
                
                if (!isset($optionCache[$optionName])) {
                        $sql = "SELECT  value
                                FROM    ".$this->databasePrefix."settings
                                WHERE   variable = ?";
                        $statement = $this->database->prepareStatement($sql);
-                       $statement->execute(array($optionName));
+                       $statement->execute([$optionName]);
                        $row = $statement->fetchArray();
                        
                        $optionCache[$optionName] = $row['value'];
@@ -1308,15 +1308,15 @@ class SMF2xExporter extends AbstractExporter {
                if ($sizeRegex === null) {
                        $quoteRegex = new Regex('\[quote author=(.*?) link=topic=\d+\.msg(\d+)#msg\\2 date=\d+\]');
                        $quoteCallback = new Callback(function ($matches) {
-                               $username = str_replace(array("\\", "'"), array("\\\\", "\'"), $matches[1]);
+                               $username = str_replace(["\\", "'"], ["\\\\", "\'"], $matches[1]);
                                $postID = $matches[2];
                                
-                               $postLink = LinkHandler::getInstance()->getLink('Thread', array(
+                               $postLink = LinkHandler::getInstance()->getLink('Thread', [
                                        'application' => 'wbb',
                                        'postID' => $postID,
                                        'forceFrontend' => true
-                               )).'#post'.$postID;
-                               $postLink = str_replace(array("\\", "'"), array("\\\\", "\'"), $postLink);
+                                       ]).'#post'.$postID;
+                               $postLink = str_replace(["\\", "'"], ["\\\\", "\'"], $postLink);
                                
                                return "[quote='".$username."','".$postLink."']";
                        });
@@ -1325,7 +1325,7 @@ class SMF2xExporter extends AbstractExporter {
                }
                
                // use proper WCF 2 bbcode
-               $message = strtr($message, array(
+               $message = strtr($message, [
                        '<br />' => "\n",
                        '[iurl]' => '[url]',
                        '[/iurl]' => '[/url]',
@@ -1339,7 +1339,7 @@ class SMF2xExporter extends AbstractExporter {
                        '[/ftp]' => '[/url]',
                        '[php]' => '[code=php]',
                        '[/php]' => '[/code]'
-               ));
+               ]);
                
                // fix size bbcode
                $message = $sizeRegex->replace($message, '[size=\\1]');
index a0233245ef0613c868a5d54865991675106079b4..0ed5bb9fdeb3cf849a83f11abe9bb2bb59066025 100644 (file)
@@ -88,12 +88,12 @@ class VB3or4xExporter extends AbstractExporter {
         * board cache
         * @var array
         */
-       protected $boardCache = array();
+       protected $boardCache = [];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$methods
         */
-       protected $methods = array(
+       protected $methods = [
                'com.woltlab.wcf.user' => 'Users',
                'com.woltlab.wcf.user.group' => 'UserGroups',
                'com.woltlab.wcf.user.rank' => 'UserRanks',
@@ -128,53 +128,53 @@ class VB3or4xExporter extends AbstractExporter {
                'com.woltlab.calendar.category' => 'CalendarCategories',
                'com.woltlab.calendar.event' => 'CalendarEvents',
                'com.woltlab.calendar.event.date' => 'CalendarEventDates'
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$limits
         */
-       protected $limits = array(
+       protected $limits = [
                'com.woltlab.wcf.user' => 100,
                'com.woltlab.wcf.user.avatar' => 100,
                'com.woltlab.wcf.conversation.attachment' => 100,
                'com.woltlab.wbb.thread' => 200,
                'com.woltlab.wbb.attachment' => 100,
                'com.woltlab.wbb.acl' => 50
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\IExporter::getSupportedData()
         */
        public function getSupportedData() {
-               return array(
-                       'com.woltlab.wcf.user' => array(
+               return [
+                       'com.woltlab.wcf.user' => [
                                'com.woltlab.wcf.user.group',
                                'com.woltlab.wcf.user.avatar',
                                'com.woltlab.wcf.user.option',
                                'com.woltlab.wcf.user.comment',
                                'com.woltlab.wcf.user.follower',
                                'com.woltlab.wcf.user.rank'
-                       ),
-                       'com.woltlab.wbb.board' => array(
+                       ],
+                       'com.woltlab.wbb.board' => [
                                'com.woltlab.wbb.acl',
                                'com.woltlab.wbb.attachment',
                                'com.woltlab.wbb.poll',
                                'com.woltlab.wbb.watchedThread',
                                'com.woltlab.wbb.like',
                                'com.woltlab.wcf.label'
-                       ),
-                       'com.woltlab.wcf.conversation' => array(
+                       ],
+                       'com.woltlab.wcf.conversation' => [
                                'com.woltlab.wcf.conversation.label'
-                       ),
-                       'com.woltlab.gallery.image' => array(
+                       ],
+                       'com.woltlab.gallery.image' => [
                                'com.woltlab.gallery.album',
                                'com.woltlab.gallery.image.comment'
-                       ),
-                       'com.woltlab.calendar.event' => array(
+                       ],
+                       'com.woltlab.calendar.event' => [
                                'com.woltlab.calendar.category'
-                       ),
-                       'com.woltlab.wcf.smiley' => array()
-               );
+                       ],
+                       'com.woltlab.wcf.smiley' => []
+               ];
        }
        
        /**
@@ -220,7 +220,7 @@ class VB3or4xExporter extends AbstractExporter {
         * @see \wcf\system\exporter\IExporter::getQueue()
         */
        public function getQueue() {
-               $queue = array();
+               $queue = [];
                
                // user
                if (in_array('com.woltlab.wcf.user', $this->selectedData)) {
@@ -322,12 +322,12 @@ class VB3or4xExporter extends AbstractExporter {
                                break;
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['usergroupid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['usergroupid'], [
                                'groupName' => $row['title'],
                                'groupDescription' => $row['description'],
                                'groupType' => $groupType,
                                'userOnlineMarking' => $row['opentag'].'%s'.$row['closetag']
-                       ));
+                       ]);
                }
        }
        
@@ -343,7 +343,7 @@ class VB3or4xExporter extends AbstractExporter {
         */
        public function exportUsers($offset, $limit) {
                // cache user options
-               $userOptions = array();
+               $userOptions = [];
                $sql = "SELECT  profilefieldid
                        FROM    ".$this->databasePrefix."profilefield";
                $statement = $this->database->prepareStatement($sql);
@@ -372,9 +372,9 @@ class VB3or4xExporter extends AbstractExporter {
                        WHERE           user_table.userid BETWEEN ? AND ?
                        ORDER BY        user_table.userid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'username' => StringUtil::decodeHTML($row['username']),
                                'password' => '',
                                'email' => StringUtil::decodeHTML($row['email']),
@@ -387,11 +387,11 @@ class VB3or4xExporter extends AbstractExporter {
                                'signature' => $row['signature'],
                                'userTitle' => ($row['customtitle'] != 0) ? StringUtil::decodeHTML($row['usertitle']) : '',
                                'lastActivityTime' => $row['lastactivity']
-                       );
-                       $additionalData = array(
+                       ];
+                       $additionalData = [
                                'groupIDs' => explode(',', $row['membergroupids'].','.$row['usergroupid']),
-                               'options' => array()
-                       );
+                               'options' => []
+                       ];
                        
                        // handle user options
                        foreach ($userOptions as $optionID) {
@@ -405,7 +405,7 @@ class VB3or4xExporter extends AbstractExporter {
                        
                        // update password hash
                        if ($newUserID) {
-                               $passwordUpdateStatement->execute(array('vb3:'.$row['password'].':'.$row['salt'], $newUserID));
+                               $passwordUpdateStatement->execute(['vb3:'.$row['password'].':'.$row['salt'], $newUserID]);
                        }
                }
        }
@@ -427,7 +427,7 @@ class VB3or4xExporter extends AbstractExporter {
                                        AND     usertitle <> ?
                        ) AS count";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(1, 2, ''));
+               $statement->execute([1, 2, '']);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -449,13 +449,13 @@ class VB3or4xExporter extends AbstractExporter {
                        )
                        ORDER BY        usertitleid";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(1, 2, ''));
+               $statement->execute([1, 2, '']);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['usertitleid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['usertitleid'], [
                                'groupID' => $row['groupID'],
                                'requiredPoints' => $row['minposts'] * 5,
                                'rankTitle' => StringUtil::decodeHTML($row['title'])
-                       ));
+                       ]);
                }
        }
        
@@ -467,7 +467,7 @@ class VB3or4xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."usertextfield
                        WHERE   buddylist <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(''));
+               $statement->execute(['']);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -481,14 +481,14 @@ class VB3or4xExporter extends AbstractExporter {
                        WHERE           buddylist <> ?
                        ORDER BY        userid";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(''));
+               $statement->execute(['']);
                while ($row = $statement->fetchArray()) {
                        $buddies = array_unique(ArrayUtil::toIntegerArray(explode(' ', $row['buddylist'])));
                        foreach ($buddies as $buddy) {
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, [
                                        'userID' => $row['userid'],
                                        'followUserID' => $buddy
-                               ));
+                               ]);
                        }
                }
        }
@@ -509,15 +509,15 @@ class VB3or4xExporter extends AbstractExporter {
                        WHERE           vmid BETWEEN ? AND ?
                        ORDER BY        vmid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.comment')->import($row['vmid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.comment')->import($row['vmid'], [
                                'objectID' => $row['userid'],
                                'userID' => $row['postuserid'],
                                'username' => StringUtil::decodeHTML($row['postusername']),
                                'message' => StringUtil::decodeHTML($row['pagetext']),
                                'time' => $row['dateline']
-                       ));
+                       ]);
                }
        }
        
@@ -558,13 +558,13 @@ class VB3or4xExporter extends AbstractExporter {
                                        file_put_contents($file, $row['filedata']);
                                }
                                
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import($row['userid'], array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import($row['userid'], [
                                        'avatarName' => StringUtil::decodeHTML($row['filename']),
                                        'avatarExtension' => pathinfo($row['filename'], PATHINFO_EXTENSION),
                                        'width' => $row['width'],
                                        'height' => $row['height'],
                                        'userID' => $row['userid']
-                               ), array('fileLocation' => $file));
+                               ], ['fileLocation' => $file]);
                                
                                if (!$this->readOption('usefileavatar')) unlink($file);
                        }
@@ -614,7 +614,7 @@ class VB3or4xExporter extends AbstractExporter {
                        }
                        
                        // get select options
-                       $selectOptions = array();
+                       $selectOptions = [];
                        if ($row['type'] == 'radio' || $row['type'] == 'select' || $row['type'] == 'select_multiple' || $row['type'] == 'checkbox') {
                                $selectOptions = @unserialize($row['data']);
                                
@@ -681,13 +681,13 @@ class VB3or4xExporter extends AbstractExporter {
                                WHERE   languageid = ?
                                        AND varname = ?";
                        $statement2 = $this->database->prepareStatement($sql);
-                       $statement2->execute(array(0, 'field'.$row['profilefieldid'].'_title'));
+                       $statement2->execute([0, 'field'.$row['profilefieldid'].'_title']);
                        $row2 = $statement2->fetchArray();
                        if ($row2 !== false) {
                                $fieldName = $row2['text'];
                        }
                                
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['profilefieldid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['profilefieldid'], [
                                'categoryName' => 'profile.personal',
                                'optionType' => $optionType,
                                'defaultValue' => $defaultValue,
@@ -699,7 +699,7 @@ class VB3or4xExporter extends AbstractExporter {
                                'editable' => $editable,
                                'visible' => $visible,
                                'showOrder' => $row['displayorder']
-                       ), array('name' => $fieldName));
+                       ], ['name' => $fieldName]);
                }
        }
        
@@ -712,7 +712,7 @@ class VB3or4xExporter extends AbstractExporter {
                        WHERE           pmfolders IS NOT NULL
                                AND     pmfolders <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(''));
+               $statement->execute(['']);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -727,7 +727,7 @@ class VB3or4xExporter extends AbstractExporter {
                                AND     pmfolders <> ?
                        ORDER BY        userid";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(''));
+               $statement->execute(['']);
                while ($row = $statement->fetchArray()) {
                        $convert = false;
                        // vBulletin relies on undefined behaviour by default, we cannot know in which
@@ -746,10 +746,10 @@ class VB3or4xExporter extends AbstractExporter {
                                // convert back to utf-8
                                if ($convert) $val = mb_convert_encoding($val, 'UTF-8', 'ISO-8859-1');
                                
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.label')->import($row['userid'].'-'.$key, array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.label')->import($row['userid'].'-'.$key, [
                                        'userID' => $row['userid'],
                                        'label' => mb_substr($val, 0, 80)
-                               ));
+                               ]);
                        }
                }
        }
@@ -794,7 +794,7 @@ class VB3or4xExporter extends AbstractExporter {
                        WHERE           pm.pmid BETWEEN ? AND ?
                        ORDER BY        pm.pmid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $participants = explode(',', $row['participants']);
                        $participants[] = $row['fromuserid'];
@@ -802,13 +802,13 @@ class VB3or4xExporter extends AbstractExporter {
                        
                        if (ImportHandler::getInstance()->getNewID('com.woltlab.wcf.conversation', $conversationID) !== null) continue;
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($conversationID, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($conversationID, [
                                'subject' => StringUtil::decodeHTML($row['title']),
                                'time' => $row['dateline'],
                                'userID' => $row['fromuserid'],
                                'username' => StringUtil::decodeHTML($row['fromusername']),
                                'isDraft' => 0
-                       ));
+                       ]);
                }
        }
        
@@ -836,13 +836,13 @@ class VB3or4xExporter extends AbstractExporter {
                        WHERE           pmtext.pmtextid BETWEEN ? AND ?
                        ORDER BY        pmtext.pmtextid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $participants = explode(',', $row['participants']);
                        $participants[] = $row['fromuserid'];
                        $conversationID = $this->getConversationID($row['conversationID'], $participants);
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['pmtextid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['pmtextid'], [
                                'conversationID' => $conversationID,
                                'userID' => $row['fromuserid'],
                                'username' => StringUtil::decodeHTML($row['fromusername']),
@@ -852,7 +852,7 @@ class VB3or4xExporter extends AbstractExporter {
                                'enableHtml' => 0,
                                'enableBBCodes' => 1,
                                'showSignature' => $row['showsignature']
-                       ));
+                       ]);
                }
        }
        
@@ -895,16 +895,16 @@ class VB3or4xExporter extends AbstractExporter {
                        // encoding the data was saved
                        // this may cause some hidden participants to become visible
                        $recipients = @unserialize($row['touserarray']);
-                       if (!is_array($recipients)) $recipients = array();
+                       if (!is_array($recipients)) $recipients = [];
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, [
                                'conversationID' => $conversationID,
                                'participantID' => $row['userid'],
                                'username' => StringUtil::decodeHTML($row['username'] ?: ''),
                                'hideConversation' => 0, // there is no trash
                                'isInvisible' => (isset($recipients['bcc']) && isset($recipients['bcc'][$row['userid']])) ? 1 : 0,
                                'lastVisitTime' => $row['messageread'] ? $row['dateline'] : 0
-                       ), array('labelIDs' => ($row['folderid'] > 0 ? array($row['userid'].'-'.$row['folderid']) : array())));
+                       ], ['labelIDs' => ($row['folderid'] > 0 ? [$row['userid'].'-'.$row['folderid']] : [])]);
                }
        }
        
@@ -944,7 +944,7 @@ class VB3or4xExporter extends AbstractExporter {
                $getDaysPrune = function ($value) {
                        if ($value == -1) return 1000;
                        
-                       $availableDaysPrune = array(1, 3, 7, 14, 30, 60, 100, 365);
+                       $availableDaysPrune = [1, 3, 7, 14, 30, 60, 100, 365];
                        
                        foreach ($availableDaysPrune as $daysPrune) {
                                if ($value <= $daysPrune) return $daysPrune;
@@ -953,7 +953,7 @@ class VB3or4xExporter extends AbstractExporter {
                        return 1000;
                };
                foreach ($this->boardCache[$parentID] as $board) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['forumid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['forumid'], [
                                'parentID' => ($board['parentid'] != -1 ? $board['parentid'] : null),
                                'position' => $board['displayorder'],
                                'boardType' => ($board['link'] ? Board::TYPE_LINK : ($board['options'] & self::FORUMOPTIONS_CANCONTAINTHREADS ? Board::TYPE_BOARD : Board::TYPE_CATEGORY)),
@@ -972,7 +972,7 @@ class VB3or4xExporter extends AbstractExporter {
                                'clicks' => 0,
                                'posts' => $board['replycount'],
                                'threads' => $board['threadcount']
-                       ));
+                       ]);
                        
                        $this->exportBoardsRecursively($board['forumid']);
                }
@@ -1000,9 +1000,9 @@ class VB3or4xExporter extends AbstractExporter {
                        WHERE           thread.threadid BETWEEN ? AND ?
                        ORDER BY        thread.threadid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(14, $offset + 1, $offset + $limit)); // 14 = soft delete
+               $statement->execute([14, $offset + 1, $offset + $limit]); // 14 = soft delete
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'boardID' => $row['forumid'],
                                'topic' => StringUtil::decodeHTML($row['title']),
                                'time' => $row['dateline'],
@@ -1019,9 +1019,9 @@ class VB3or4xExporter extends AbstractExporter {
                                'isDone' => 0,
                                'deleteTime' => $row['deleteTime'] ?: 0,
                                'lastPostTime' => $row['lastpost']
-                       );
-                       $additionalData = array();
-                       if ($row['prefixid']) $additionalData['labels'] = array($row['prefixid']);
+                       ];
+                       $additionalData = [];
+                       if ($row['prefixid']) $additionalData['labels'] = [$row['prefixid']];
                        if ($row['taglist'] !== null) {
                                $tags = ArrayUtil::trim(explode(',', $row['taglist']));
                                $additionalData['tags'] = $tags;
@@ -1060,13 +1060,13 @@ class VB3or4xExporter extends AbstractExporter {
                        WHERE           post.postid BETWEEN ? AND ?
                        ORDER BY        post.postid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        if (isset($row['htmlState']) && $row['htmlState'] == 'on_nl2br') {
                                $row['pagetext'] = str_replace("\n", '<br />', StringUtil::unifyNewlines($row['pagetext']));
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['postid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['postid'], [
                                'threadID' => $row['threadid'],
                                'userID' => $row['userid'],
                                'username' => StringUtil::decodeHTML($row['username']),
@@ -1087,7 +1087,7 @@ class VB3or4xExporter extends AbstractExporter {
                                'enableBBCodes' => 1,
                                'showSignature' => $row['showsignature'],
                                'ipAddress' => UserUtil::convertIPv4To6($row['ipaddress'])
-                       ));
+                       ]);
                }
        }
        
@@ -1170,7 +1170,7 @@ class VB3or4xExporter extends AbstractExporter {
                                        $row['isImage'] = $row['width'] = $row['height'] = 0;
                                }
                                
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.attachment')->import($row['attachmentid'], array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.attachment')->import($row['attachmentid'], [
                                        'objectID' => $row['postid'],
                                        'userID' => ($row['userid'] ?: null),
                                        'filename' => $row['filename'],
@@ -1182,7 +1182,7 @@ class VB3or4xExporter extends AbstractExporter {
                                        'downloads' => $row['counter'],
                                        'uploadTime' => $row['dateline'],
                                        'showOrder' => (isset($row['displayOrder']) ? $row['displayOrder'] : 0)
-                               ), array('fileLocation' => $file));
+                               ], ['fileLocation' => $file]);
                                
                                if ($this->readOption('attachfile') == self::ATTACHFILE_DATABASE) unlink($file);
                        }
@@ -1210,12 +1210,12 @@ class VB3or4xExporter extends AbstractExporter {
                        WHERE           subscribethreadid BETWEEN ? AND ?
                        ORDER BY        subscribethreadid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import($row['subscribethreadid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import($row['subscribethreadid'], [
                                'objectID' => $row['threadid'],
                                'userID' => $row['userid']
-                       ));
+                       ]);
                }
        }
        
@@ -1226,7 +1226,7 @@ class VB3or4xExporter extends AbstractExporter {
                $sql = "SELECT  COUNT(*) AS count
                        FROM    ".$this->databasePrefix."poll";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array());
+               $statement->execute([]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1242,9 +1242,9 @@ class VB3or4xExporter extends AbstractExporter {
                                        AND     thread.open <> ?
                        ORDER BY        poll.pollid";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(10));
+               $statement->execute([10]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['pollid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['pollid'], [
                                'objectID' => $row['firstpostid'],
                                'question' => StringUtil::encodeHTML($row['question']),
                                'time' => $row['dateline'],
@@ -1254,7 +1254,7 @@ class VB3or4xExporter extends AbstractExporter {
                                'sortByVotes' => 0,
                                'maxVotes' => $row['multiple'] ? $row['numberoptions'] : 1,
                                'votes' => $row['voters']
-                       ));
+                       ]);
                }
        }
        
@@ -1280,12 +1280,12 @@ class VB3or4xExporter extends AbstractExporter {
                        
                        $i = 1;
                        foreach ($options as $key => $option) {
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['pollid'].'-'.$i, array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['pollid'].'-'.$i, [
                                        'pollID' => $row['pollid'],
                                        'optionValue' => $option,
                                        'showOrder' => $i,
                                        'votes' => $votes[$key]
-                               ));
+                               ]);
                                
                                $i++;
                        }
@@ -1308,13 +1308,13 @@ class VB3or4xExporter extends AbstractExporter {
                        WHERE           pollvoteid BETWEEN ? AND ?
                        ORDER BY        pollvoteid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, [
                                'pollID' => $row['pollid'],
                                'optionID' => $row['pollid'].'-'.$row['voteoption'],
                                'userID' => $row['userid']
-                       ));
+                       ]);
                }
        }
        
@@ -1334,15 +1334,15 @@ class VB3or4xExporter extends AbstractExporter {
                        WHERE           reputationid BETWEEN ? AND ?
                        ORDER BY        reputationid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.like')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.like')->import(0, [
                                'objectID' => $row['postid'],
                                'objectUserID' => ($row['userid'] ?: null),
                                'userID' => $row['whoadded'],
                                'likeValue' => ($row['reputation'] > 0 ? Like::LIKE : Like::DISLIKE),
                                'time' => $row['dateline']
-                       ));
+                       ]);
                }
        }
        
@@ -1374,9 +1374,9 @@ class VB3or4xExporter extends AbstractExporter {
                        $statement->execute();
                        
                        while ($row = $statement->fetchArray()) {
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label.group')->import($row['prefixsetid'], array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label.group')->import($row['prefixsetid'], [
                                        'groupName' => $row['prefixsetid']
-                               ), array('objects' => array($objectType->objectTypeID => $boardIDs)));
+                               ], ['objects' => [$objectType->objectTypeID => $boardIDs]]);
                        }
                }
                
@@ -1386,10 +1386,10 @@ class VB3or4xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label')->import($row['prefixid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label')->import($row['prefixid'], [
                                'groupID' => $row['prefixsetid'],
                                'label' => mb_substr($row['prefixid'], 0, 80)
-                       ));
+                       ]);
                }
        }
        
@@ -1409,7 +1409,7 @@ class VB3or4xExporter extends AbstractExporter {
         * Exports ACLs.
         */
        public function exportACLs($offset, $limit) {
-               $mapping = array(
+               $mapping = [
                        'canViewBoard' => self::FORUMPERMISSIONS_CANVIEW,
                        'canEnter' => self::FORUMPERMISSIONS_CANVIEWTHREADS,
                        'canReadThread' => self::FORUMPERMISSIONS_CANVIEWOTHERS,
@@ -1423,7 +1423,7 @@ class VB3or4xExporter extends AbstractExporter {
                        'canUploadAttachment' => self::FORUMPERMISSIONS_CANPOSTATTACHMENT,
                        'canStartPoll' => self::FORUMPERMISSIONS_CANPOSTPOLL,
                        'canVotePoll' => self::FORUMPERMISSIONS_CANVOTE
-               );
+               ];
                
                $sql = "SELECT          *
                        FROM            ".$this->databasePrefix."forumpermission
@@ -1433,13 +1433,13 @@ class VB3or4xExporter extends AbstractExporter {
                
                while ($row = $statement->fetchArray()) {
                        foreach ($mapping as $permission => $bits) {
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, [
                                        'objectID' => $row['forumid'],
                                        'groupID' => $row['usergroupid'],
                                        'optionValue' => ($row['forumpermissions'] & $bits) ? 1 : 0
-                               ), array(
+                               ], [
                                        'optionName' => $permission
-                               ));
+                               ]);
                        }
                }
        }
@@ -1464,16 +1464,16 @@ class VB3or4xExporter extends AbstractExporter {
                        FROM            ".$this->databasePrefix."smilie
                        ORDER BY        smilieid";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array());
+               $statement->execute([]);
                while ($row = $statement->fetchArray()) {
                        $fileLocation = $this->fileSystemPath . $row['smiliepath'];
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley')->import($row['smilieid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley')->import($row['smilieid'], [
                                'smileyTitle' => StringUtil::decodeHTML($row['title']),
                                'smileyCode' => $row['smilietext'],
                                'showOrder' => $row['displayorder'],
                                'categoryID' => $row['imagecategoryid']
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
@@ -1485,7 +1485,7 @@ class VB3or4xExporter extends AbstractExporter {
                        FROM            ".$this->databasePrefix."imagecategory
                        WHERE           imagetype = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(3));
+               $statement->execute([3]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1499,13 +1499,13 @@ class VB3or4xExporter extends AbstractExporter {
                        WHERE           imagetype = ?
                        ORDER BY        imagecategoryid";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(3));
+               $statement->execute([3]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley.category')->import($row['imagecategoryid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley.category')->import($row['imagecategoryid'], [
                                'title' => StringUtil::decodeHTML($row['title']),
                                'parentCategoryID' => 0,
                                'showOrder' => $row['displayorder']
-                       ));
+                       ]);
                }
        }
        
@@ -1533,13 +1533,13 @@ class VB3or4xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.gallery.album')->import($row['albumid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.gallery.album')->import($row['albumid'], [
                                'userID' => $row['userid'],
                                'username' => StringUtil::decodeHTML($row['username'] ?: ''),
                                'title' => StringUtil::decodeHTML($row['title']),
                                'description' => StringUtil::decodeHTML($row['description']),
                                'lastUpdateTime' => $row['lastpicturedate']
-                       ));
+                       ]);
                }
        }
        
@@ -1637,11 +1637,11 @@ class VB3or4xExporter extends AbstractExporter {
                                        }
                                }
                                
-                               $additionalData = array(
+                               $additionalData = [
                                        'fileLocation' => $file
-                               );
+                               ];
                                
-                               ImportHandler::getInstance()->getImporter('com.woltlab.gallery.image')->import((isset($row['pictureid']) ? $row['pictureid'] : $row['filedataid']), array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.gallery.image')->import((isset($row['pictureid']) ? $row['pictureid'] : $row['filedataid']), [
                                        'userID' => ($row['userid'] ?: null),
                                        'username' => StringUtil::decodeHTML($row['username'] ?: ''),
                                        'albumID' => ($row['albumid'] ?: null),
@@ -1654,7 +1654,7 @@ class VB3or4xExporter extends AbstractExporter {
                                        'creationTime' => $row['dateline'],
                                        'width' => $row['width'],
                                        'height' => $row['height']
-                               ), $additionalData);
+                               ], $additionalData);
                        }
                        catch (\Exception $e) {
                                if ($vB === 3 && $this->readOption('album_dataloc') == self::GALLERY_DATABASE && $file) @unlink($file);
@@ -1683,15 +1683,15 @@ class VB3or4xExporter extends AbstractExporter {
                        WHERE           comment.commentid BETWEEN ? AND ?
                        ORDER BY        comment.commentid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.gallery.image.comment')->import($row['commentid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.gallery.image.comment')->import($row['commentid'], [
                                'objectID' => (isset($row['pictureid']) ? $row['pictureid'] : $row['filedataid']),
                                'userID' => ($row['postuserid'] ?: null),
                                'username' => StringUtil::decodeHTML($row['username'] ?: ''),
                                'message' => $row['pagetext'],
                                'time' => $row['dateline']
-                       ));
+                       ]);
                }
        }
        
@@ -1717,12 +1717,12 @@ class VB3or4xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.calendar.category')->import($row['calendarid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.calendar.category')->import($row['calendarid'], [
                                'title' => StringUtil::decodeHTML($row['title']),
                                'description' => StringUtil::decodeHTML($row['description']),
                                'parentCategoryID' => 0,
                                'showOrder' => $row['displayorder']
-                       ));
+                       ]);
                }
        }
        
@@ -1744,9 +1744,9 @@ class VB3or4xExporter extends AbstractExporter {
                        WHERE           eventid BETWEEN ? AND ?
                        ORDER BY        eventid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                
-               $timezones = array();
+               $timezones = [];
                foreach (DateUtil::getAvailableTimezones() as $timezone) {
                        $dateTimeZone = new \DateTimeZone($timezone);
                        $offset = $dateTimeZone->getOffset(new \DateTime("now", $dateTimeZone));
@@ -1755,7 +1755,7 @@ class VB3or4xExporter extends AbstractExporter {
                
                while ($row = $statement->fetchArray()) {
                        
-                       $eventDateData = array(
+                       $eventDateData = [
                                'startTime' => $row['dateline_from'],
                                'endTime' => ($row['recurring'] != 0) ? $row['dateline_from'] + 1 : $row['dateline_to'], // vBulletin does not properly support endTime for recurring events
                                'isFullDay' => $row['dateline_to'] ? 0 : 1,
@@ -1766,7 +1766,7 @@ class VB3or4xExporter extends AbstractExporter {
                                'firstDayOfWeek' => 1,
                                'repeatType' => '',
                                'repeatInterval' => 1,
-                               'repeatWeeklyByDay' => array(),
+                               'repeatWeeklyByDay' => [],
                                'repeatMonthlyByMonthDay' => 1,
                                'repeatMonthlyDayOffset' => 1,
                                'repeatMonthlyByWeekDay' => 0,
@@ -1774,7 +1774,7 @@ class VB3or4xExporter extends AbstractExporter {
                                'repeatYearlyByMonth' => 1,
                                'repeatYearlyDayOffset' => 1,
                                'repeatYearlyByWeekDay' => 1
-                       );
+                       ];
                        
                        switch ($row['recurring']) {
                                case 0:
@@ -1833,7 +1833,7 @@ class VB3or4xExporter extends AbstractExporter {
                                break;
                        }
                        
-                       $data = array(
+                       $data = [
                                'userID' => ($row['userid'] ?: null),
                                'username' => $row['username'],
                                'subject' => $row['title'],
@@ -1841,24 +1841,24 @@ class VB3or4xExporter extends AbstractExporter {
                                'time' => $row['dateline'],
                                'enableSmilies' => $row['allowsmilies'],
                                'eventDate' => serialize($eventDateData)
-                       );
+                       ];
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.calendar.event')->import($row['eventid'], $data, array(
-                               'categories' => array($row['calendarid']),
+                       ImportHandler::getInstance()->getImporter('com.woltlab.calendar.event')->import($row['eventid'], $data, [
+                               'categories' => [$row['calendarid']],
                                'createEventDates' => true
-                       ));
+                       ]);
                }
        }
        
        private function readOption($optionName) {
-               static $optionCache = array();
+               static $optionCache = [];
                
                if (!isset($optionCache[$optionName])) {
                        $sql = "SELECT  value
                                FROM    ".$this->databasePrefix."setting
                                WHERE   varname = ?";
                        $statement = $this->database->prepareStatement($sql);
-                       $statement->execute(array($optionName));
+                       $statement->execute([$optionName]);
                        $row = $statement->fetchArray();
                        
                        $optionCache[$optionName] = $row['value'];
@@ -1875,15 +1875,15 @@ class VB3or4xExporter extends AbstractExporter {
                if ($quoteRegex === null) {
                        $quoteRegex = new Regex('\[quote=(.*?);(\d+)\]', Regex::CASE_INSENSITIVE);
                        $quoteCallback = new Callback(function ($matches) {
-                               $username = str_replace(array("\\", "'"), array("\\\\", "\'"), $matches[1]);
+                               $username = str_replace(["\\", "'"], ["\\\\", "\'"], $matches[1]);
                                $postID = $matches[2];
                                
-                               $postLink = LinkHandler::getInstance()->getLink('Thread', array(
+                               $postLink = LinkHandler::getInstance()->getLink('Thread', [
                                                'application' => 'wbb',
                                                'postID' => $postID,
                                                'forceFrontend' => true
-                               )).'#post'.$postID;
-                               $postLink = str_replace(array("\\", "'"), array("\\\\", "\'"), $postLink);
+                                       ]).'#post'.$postID;
+                               $postLink = str_replace(["\\", "'"], ["\\\\", "\'"], $postLink);
                                
                                return "[quote='".$username."','".$postLink."']";
                        });
@@ -1891,7 +1891,7 @@ class VB3or4xExporter extends AbstractExporter {
                }
                
                // use proper WCF 2 bbcode
-               $replacements = array(
+               $replacements = [
                        '[left]' => '[align=left]',
                        '[/left]' => '[/align]',
                        '[right]' => '[align=right]',
@@ -1904,7 +1904,7 @@ class VB3or4xExporter extends AbstractExporter {
                        '[/html]' => '[/code]',
                        '[/video]' => '[/media]',
                        '[attach=config]' => '[attach]'
-               );
+               ];
                $message = str_ireplace(array_keys($replacements), array_values($replacements), $message);
                
                // remove double quotes
index ffa87c3b168f4ddd0f1e11d597470f3b2ae9a1cf..5d2a254d4244c5e2197560bb0c921eb042fcdb8b 100644 (file)
@@ -41,12 +41,12 @@ class VB5xExporter extends AbstractExporter {
         * board cache
         * @var array
         */
-       protected $boardCache = array();
+       protected $boardCache = [];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$methods
         */
-       protected $methods = array(
+       protected $methods = [
                'com.woltlab.wcf.user' => 'Users',
                'com.woltlab.wcf.user.group' => 'UserGroups',
                'com.woltlab.wcf.user.rank' => 'UserRanks',
@@ -73,46 +73,46 @@ class VB5xExporter extends AbstractExporter {
                'com.woltlab.wbb.acl' => 'ACLs',
                'com.woltlab.wcf.smiley.category' => 'SmileyCategories',
                'com.woltlab.wcf.smiley' => 'Smilies',
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$limits
         */
-       protected $limits = array(
+       protected $limits = [
                'com.woltlab.wcf.user' => 100,
                'com.woltlab.wcf.user.avatar' => 100,
                'com.woltlab.wcf.conversation.attachment' => 100,
                'com.woltlab.wbb.thread' => 200,
                'com.woltlab.wbb.attachment' => 100,
                'com.woltlab.wbb.acl' => 50
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\IExporter::getSupportedData()
         */
        public function getSupportedData() {
-               return array(
-                       'com.woltlab.wcf.user' => array(
+               return [
+                       'com.woltlab.wcf.user' => [
                                'com.woltlab.wcf.user.group',
                                'com.woltlab.wcf.user.avatar',
                        /*      'com.woltlab.wcf.user.option',*/
                        /*      'com.woltlab.wcf.user.comment',
                                'com.woltlab.wcf.user.follower',
                                'com.woltlab.wcf.user.rank'*/
-                       ),
-                       'com.woltlab.wbb.board' => array(
+                       ],
+                       'com.woltlab.wbb.board' => [
                                /*'com.woltlab.wbb.acl',*/
                                'com.woltlab.wbb.attachment',
                                'com.woltlab.wbb.poll',
                        /*      'com.woltlab.wbb.watchedThread',
                                'com.woltlab.wbb.like',
                                'com.woltlab.wcf.label'*/
-                       ),
+                       ],
                /*      'com.woltlab.wcf.conversation' => array(
                                'com.woltlab.wcf.conversation.label'
                        ),
                        'com.woltlab.wcf.smiley' => array()*/
-               );
+               ];
        }
        
        /**
@@ -155,7 +155,7 @@ class VB5xExporter extends AbstractExporter {
         * @see \wcf\system\exporter\IExporter::getQueue()
         */
        public function getQueue() {
-               $queue = array();
+               $queue = [];
                
                // user
                if (in_array('com.woltlab.wcf.user', $this->selectedData)) {
@@ -226,7 +226,7 @@ class VB5xExporter extends AbstractExporter {
                        WHERE           usergroupid BETWEEN ? AND ?
                        ORDER BY        usergroupid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        switch ($row['systemgroupid']) {
                                case 1:
@@ -240,12 +240,12 @@ class VB5xExporter extends AbstractExporter {
                                break;
                        }
                                
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['usergroupid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['usergroupid'], [
                                'groupName' => $row['title'],
                                'groupDescription' => $row['description'],
                                'groupType' => $groupType,
                                'userOnlineMarking' => $row['opentag'].'%s'.$row['closetag']
-                       ));
+                       ]);
                }
        }
        
@@ -279,9 +279,9 @@ class VB5xExporter extends AbstractExporter {
                        WHERE           user_table.userid BETWEEN ? AND ?
                        ORDER BY        user_table.userid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'username' => $row['username'],
                                'password' => '',
                                'email' => $row['email'],
@@ -294,11 +294,11 @@ class VB5xExporter extends AbstractExporter {
                                'signature' => $row['signature'],
                                'userTitle' => ($row['customtitle'] != 0) ? $row['usertitle'] : '',
                                'lastActivityTime' => $row['lastactivity']
-                       );
-                       $additionalData = array(
+                       ];
+                       $additionalData = [
                                'groupIDs' => explode(',', $row['membergroupids'].','.$row['usergroupid']),
-                               'options' => array()
-                       );
+                               'options' => []
+                       ];
                        
                        // import user
                        $newUserID = ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user')->import($row['userid'], $data, $additionalData);
@@ -312,7 +312,7 @@ class VB5xExporter extends AbstractExporter {
                                        $password = 'vb5:'.implode(':', explode(' ', $row['token'], 2));
                                }
                                
-                               $passwordUpdateStatement->execute(array($password, $newUserID));
+                               $passwordUpdateStatement->execute([$password, $newUserID]);
                        }
                }
        }
@@ -335,7 +335,7 @@ class VB5xExporter extends AbstractExporter {
                        WHERE           customavatar.userid BETWEEN ? AND ?
                        ORDER BY        customavatar.userid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $file = null;
                        
@@ -351,13 +351,13 @@ class VB5xExporter extends AbstractExporter {
                                        file_put_contents($file, $row['filedata']);
                                }
                                
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import($row['userid'], array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import($row['userid'], [
                                        'avatarName' => $row['filename'],
                                        'avatarExtension' => pathinfo($row['filename'], PATHINFO_EXTENSION),
                                        'width' => $row['width'],
                                        'height' => $row['height'],
                                        'userID' => $row['userid']
-                               ), array('fileLocation' => $file));
+                               ], ['fileLocation' => $file]);
                                
                                if (!$this->readOption('usefileavatar')) unlink($file);
                        }
@@ -380,7 +380,7 @@ class VB5xExporter extends AbstractExporter {
                        INNER JOIN      (SELECT contenttypeid FROM ".$this->databasePrefix."contenttype WHERE class = ?) x
                        ON              x.contenttypeid = node.contenttypeid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('Channel'));
+               $statement->execute(['Channel']);
                $row = $statement->fetchArray();
                return ($row['count'] ? 1 : 0);
        }
@@ -397,7 +397,7 @@ class VB5xExporter extends AbstractExporter {
                        
                        ORDER BY        nodeid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('Channel'));
+               $statement->execute(['Channel']);
                while ($row = $statement->fetchArray()) {
                        $this->boardCache[$row['parentid']][] = $row;
                }
@@ -412,7 +412,7 @@ class VB5xExporter extends AbstractExporter {
                if (!isset($this->boardCache[$parentID])) return;
                
                foreach ($this->boardCache[$parentID] as $board) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['nodeid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['nodeid'], [
                                'parentID' => ($board['parentid'] ?: null),
                                'position' => $board['displayorder'] ?: 0,
                                'boardType' => Board::TYPE_BOARD,
@@ -421,7 +421,7 @@ class VB5xExporter extends AbstractExporter {
                                'descriptionUseHtml' => 0,
                                'enableMarkingAsDone' => 0,
                                'ignorable' => 1
-                       ));
+                       ]);
                        
                        $this->exportBoardsRecursively($board['nodeid']);
                }
@@ -453,9 +453,9 @@ class VB5xExporter extends AbstractExporter {
                        WHERE           child.nodeid BETWEEN ? AND ?
                        ORDER BY        child.nodeid ASC";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('Channel', 'Text', 'Poll', $offset + 1, $offset + $limit));
+               $statement->execute(['Channel', 'Text', 'Poll', $offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'boardID' => $row['parentid'],
                                'topic' => StringUtil::decodeHTML($row['title']),
                                'time' => $row['created'],
@@ -468,8 +468,8 @@ class VB5xExporter extends AbstractExporter {
                                'isClosed' => $row['open'] ? 0 : 1,
                                'isDeleted' => $row['deleteuserid'] !== null ? 1 : 0,
                                'deleteTime' => $row['deleteuserid'] !== null ? TIME_NOW : 0
-                       );
-                       $additionalData = array();
+                       ];
+                       $additionalData = [];
                        
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.thread')->import($row['nodeid'], $data, $additionalData);
                }
@@ -499,9 +499,9 @@ class VB5xExporter extends AbstractExporter {
                        WHERE           child.nodeid BETWEEN ? AND ?
                        ORDER BY        child.nodeid ASC";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('Text', 'Poll', $offset + 1, $offset + $limit));
+               $statement->execute(['Text', 'Poll', $offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['nodeid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['nodeid'], [
                                'threadID' => $row['isFirstPost'] ? $row['nodeid'] : $row['parentid'],
                                'userID' => $row['userid'],
                                'username' => $row['authorname'],
@@ -522,7 +522,7 @@ class VB5xExporter extends AbstractExporter {
                                'enableBBCodes' => 1,
                                'showSignature' => $row['showsignature'],
                                'ipAddress' => UserUtil::convertIPv4To6($row['ipaddress'])
-                       ));
+                       ]);
                }
        }
        
@@ -561,7 +561,7 @@ class VB5xExporter extends AbstractExporter {
                
                // Text in a Text or Poll should be a post
                // Text in a Channel should be a thread
-               $statement->execute(array('Text', 'Poll', 'Channel', 'Text', 'Attach', $offset + 1, $offset + $limit));
+               $statement->execute(['Text', 'Poll', 'Channel', 'Text', 'Attach', $offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $file = null;
                        
@@ -584,7 +584,7 @@ class VB5xExporter extends AbstractExporter {
                                        $row['isImage'] = $row['width'] = $row['height'] = 0;
                                }
                                
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.attachment')->import($row['nodeid'], array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.attachment')->import($row['nodeid'], [
                                        'objectID' => $row['parentid'],
                                        'userID' => ($row['userid'] ?: null),
                                        'filename' => $row['filename'],
@@ -596,7 +596,7 @@ class VB5xExporter extends AbstractExporter {
                                        'downloads' => $row['counter'],
                                        'uploadTime' => $row['dateline'],
                                        'showOrder' => (isset($row['displayOrder']) ? $row['displayOrder'] : 0)
-                               ), array('fileLocation' => $file));
+                               ], ['fileLocation' => $file]);
                                
                                if ($this->readOption('attachfile') == self::ATTACHFILE_DATABASE) unlink($file);
                        }
@@ -624,9 +624,9 @@ class VB5xExporter extends AbstractExporter {
                        WHERE           pollid BETWEEN ? AND ?
                        ORDER BY        pollid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['pollid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['pollid'], [
                                'objectID' => $row['nodeid'],
                                'question' => $row['question'],
                                'time' => $row['dateline'],
@@ -636,7 +636,7 @@ class VB5xExporter extends AbstractExporter {
                                'sortByVotes' => 0,
                                'maxVotes' => $row['multiple'] ? $row['numberoptions'] : 1,
                                'votes' => $row['votes']
-                       ));
+                       ]);
                }
        }
        
@@ -658,13 +658,13 @@ class VB5xExporter extends AbstractExporter {
                        WHERE           polloption.polloptionid BETWEEN ? AND ?
                        ORDER BY        polloption.polloptionid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['polloptionid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['polloptionid'], [
                                'pollID' => $row['pollid'],
                                'optionValue' => $row['title'],
                                'votes' => $row['votes']
-                       ));
+                       ]);
                }
        }
        
@@ -685,25 +685,25 @@ class VB5xExporter extends AbstractExporter {
                        WHERE           pollvoteid BETWEEN ? AND ?
                        ORDER BY        pollvoteid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, [
                                'pollID' => $row['pollid'],
                                'optionID' => $row['polloptionid'],
                                'userID' => $row['userid']
-                       ));
+                       ]);
                }
        }
        
        private function readOption($optionName) {
-               static $optionCache = array();
+               static $optionCache = [];
                
                if (!isset($optionCache[$optionName])) {
                        $sql = "SELECT  value
                                FROM    ".$this->databasePrefix."setting
                                WHERE   varname = ?";
                        $statement = $this->database->prepareStatement($sql);
-                       $statement->execute(array($optionName));
+                       $statement->execute([$optionName]);
                        $row = $statement->fetchArray();
                        
                        $optionCache[$optionName] = $row['value'];
@@ -721,15 +721,15 @@ class VB5xExporter extends AbstractExporter {
                if ($quoteRegex === null) {
                        $quoteRegex = new Regex('\[quote=(.*?);n(\d+)\]', Regex::CASE_INSENSITIVE);
                        $quoteCallback = new Callback(function ($matches) {
-                               $username = str_replace(array("\\", "'"), array("\\\\", "\'"), $matches[1]);
+                               $username = str_replace(["\\", "'"], ["\\\\", "\'"], $matches[1]);
                                $postID = $matches[2];
                                
-                               $postLink = LinkHandler::getInstance()->getLink('Thread', array(
+                               $postLink = LinkHandler::getInstance()->getLink('Thread', [
                                                'application' => 'wbb',
                                                'postID' => $postID,
                                                'forceFrontend' => true
-                               )).'#post'.$postID;
-                               $postLink = str_replace(array("\\", "'"), array("\\\\", "\'"), $postLink);
+                                       ]).'#post'.$postID;
+                               $postLink = str_replace(["\\", "'"], ["\\\\", "\'"], $postLink);
                                
                                return "[quote='".$username."','".$postLink."']";
                        });
@@ -739,7 +739,7 @@ class VB5xExporter extends AbstractExporter {
                }
                
                // use proper WCF 2 bbcode
-               $replacements = array(
+               $replacements = [
                        '[left]' => '[align=left]',
                        '[/left]' => '[/align]',
                        '[right]' => '[align=right]',
@@ -751,7 +751,7 @@ class VB5xExporter extends AbstractExporter {
                        '[html]' => '[code=html]',
                        '[/html]' => '[/code]',
                        '[/video]' => '[/media]'
-               );
+               ];
                $message = str_ireplace(array_keys($replacements), array_values($replacements), $message);
                
                // quotes
index da4b67ff576588b8f63009b22121a98f9e7256df..98653bd625253838b4bc5be71c383174f295875d 100644 (file)
@@ -26,12 +26,12 @@ class WBB2xExporter extends AbstractExporter {
         * board cache
         * @var array
         */
-       protected $boardCache = array();
+       protected $boardCache = [];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$methods
         */
-       protected $methods = array(
+       protected $methods = [
                'com.woltlab.wcf.user' => 'Users',
                'com.woltlab.wcf.user.group' => 'UserGroups',
                'com.woltlab.wcf.user.rank' => 'UserRanks',
@@ -51,9 +51,9 @@ class WBB2xExporter extends AbstractExporter {
                'com.woltlab.wcf.label' => 'Labels',
                'com.woltlab.wbb.acl' => 'ACLs',
                'com.woltlab.wcf.smiley' => 'Smilies'
-       );
+       ];
        
-       protected $permissionMap = array(
+       protected $permissionMap = [
                'can_view_board' => 'canViewBoard',
                'can_enter_board' => 'canEnterBoard',
                'can_read_thread' => 'canReadThread',
@@ -79,7 +79,7 @@ class WBB2xExporter extends AbstractExporter {
                //'can_use_post_icons' => '',
                //'can_use_post_images' => '',
                //'can_use_prefix' => ''
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\IExporter::validateDatabaseAccess()
@@ -107,33 +107,33 @@ class WBB2xExporter extends AbstractExporter {
         * @see \wcf\system\exporter\IExporter::getSupportedData()
         */
        public function getSupportedData() {
-               return array(
-                       'com.woltlab.wcf.user' => array(
+               return [
+                       'com.woltlab.wcf.user' => [
                                'com.woltlab.wcf.user.group',
                                'com.woltlab.wcf.user.avatar',
                                'com.woltlab.wcf.user.option',
                                'com.woltlab.wcf.user.rank'
-                       ),
-                       'com.woltlab.wbb.board' => array(
+                       ],
+                       'com.woltlab.wbb.board' => [
                                'com.woltlab.wbb.acl',
                                'com.woltlab.wbb.attachment',
                                'com.woltlab.wbb.poll',
                                'com.woltlab.wbb.watchedThread',
                                'com.woltlab.wcf.label'
-                       ),
-                       'com.woltlab.wcf.conversation' => array(
+                       ],
+                       'com.woltlab.wcf.conversation' => [
                                'com.woltlab.wcf.conversation.attachment',
                                'com.woltlab.wcf.conversation.label'
-                       ),
-                       'com.woltlab.wcf.smiley' => array()
-               );
+                       ],
+                       'com.woltlab.wcf.smiley' => []
+               ];
        }
        
        /**
         * @see \wcf\system\exporter\IExporter::getQueue()
         */
        public function getQueue() {
-               $queue = array();
+               $queue = [];
                
                // user
                if (in_array('com.woltlab.wcf.user', $this->selectedData)) {
@@ -222,10 +222,10 @@ class WBB2xExporter extends AbstractExporter {
                                        break;
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['groupid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['groupid'], [
                                'groupName' => $row['title'],
                                'groupType' => $groupType,
-                       ));
+                       ]);
                }
        }
        
@@ -241,7 +241,7 @@ class WBB2xExporter extends AbstractExporter {
         */
        public function exportUsers($offset, $limit) {
                // cache profile fields
-               $profileFields = array();
+               $profileFields = [];
                $sql = "SELECT  profilefieldid
                        FROM    ".$this->databasePrefix."profilefields
                        WHERE   profilefieldid > 3";
@@ -270,9 +270,9 @@ class WBB2xExporter extends AbstractExporter {
                        WHERE           user.userid BETWEEN ? AND ?
                        ORDER BY        user.userid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'username' => $row['username'],
                                'password' => '',
                                'email' => $row['email'],
@@ -286,9 +286,9 @@ class WBB2xExporter extends AbstractExporter {
                                'signatureEnableHtml' => $row['allowsightml'],
                                'signatureEnableBBCodes' => $row['allowsigbbcode'],
                                'registrationIpAddress' => (!empty($row['reg_ipaddress']) ? $row['reg_ipaddress'] : '')
-                       );
+                       ];
                        
-                       $options = array(
+                       $options = [
                                'birthday' => $row['birthday'],
                                'gender' => $row['gender'],
                                'homepage' => $row['homepage'],
@@ -296,7 +296,7 @@ class WBB2xExporter extends AbstractExporter {
                                'location' => (!empty($row['field1']) ? $row['field1'] : ''),
                                'hobbies' => (!empty($row['field2']) ? $row['field2'] : ''),
                                'occupation' => (!empty($row['field3']) ? $row['field3'] : ''),
-                       );
+                       ];
                        
                        foreach ($profileFields as $profileFieldID) {
                                if (!empty($row['field'.$profileFieldID])) {
@@ -304,17 +304,17 @@ class WBB2xExporter extends AbstractExporter {
                                }
                        }
                        
-                       $additionalData = array(
+                       $additionalData = [
                                'groupIDs' => explode(',', $row['groupIDs']),
                                'options' => $options
-                       );
+                       ];
                        
                        // import user
                        $newUserID = ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user')->import($row['userid'], $data, $additionalData);
                                
                        // update password hash
                        if ($newUserID) {
-                               $passwordUpdateStatement->execute(array('wbb2:'.(!empty($row['sha1_password']) ? $row['sha1_password'] : $row['password']), $newUserID));
+                               $passwordUpdateStatement->execute(['wbb2:'.(!empty($row['sha1_password']) ? $row['sha1_password'] : $row['password']), $newUserID]);
                        }
                }
        }
@@ -341,12 +341,12 @@ class WBB2xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['rankid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['rankid'], [
                                'groupID' => $row['groupid'],
                                'requiredPoints' => $row['needposts'] * 5,
                                'rankTitle' => $row['ranktitle'],
                                'requiredGender' => $row['gender']
-                       ));
+                       ]);
                }
        }
        
@@ -358,7 +358,7 @@ class WBB2xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."avatars
                        WHERE   userid <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -372,15 +372,15 @@ class WBB2xExporter extends AbstractExporter {
                        WHERE           userid <> ?
                        ORDER BY        avatarid";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import($row['avatarid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import($row['avatarid'], [
                                'avatarName' => $row['avatarname'],
                                'avatarExtension' => $row['avatarextension'],
                                'width' => $row['width'],
                                'height' => $row['height'],
                                'userID' => $row['userid']
-                       ), array('fileLocation' => $this->fileSystemPath . 'images/avatars/avatar-' . $row['avatarid'] . '.' . $row['avatarextension']));
+                       ], ['fileLocation' => $this->fileSystemPath . 'images/avatars/avatar-' . $row['avatarid'] . '.' . $row['avatarextension']]);
                }
        }
        
@@ -392,7 +392,7 @@ class WBB2xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."profilefields
                        WHERE   profilefieldid > ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(3));
+               $statement->execute([3]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -406,7 +406,7 @@ class WBB2xExporter extends AbstractExporter {
                        WHERE           profilefieldid > ?
                        ORDER BY        profilefieldid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(3));
+               $statement->execute([3]);
                while ($row = $statement->fetchArray()) {
                        $optionType = 'text';
                        switch ($row['fieldtype']) {
@@ -424,7 +424,7 @@ class WBB2xExporter extends AbstractExporter {
                                        break;
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['profilefieldid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['profilefieldid'], [
                                'categoryName' => 'profile.personal',
                                'optionType' => $optionType,
                                'required' => $row['required'],
@@ -432,7 +432,7 @@ class WBB2xExporter extends AbstractExporter {
                                'showOrder' => $row['fieldorder'],
                                'selectOptions' => $row['fieldoptions'],
                                'editable' => UserOption::EDITABILITY_ALL
-                       ), array('name' => $row['title']));
+                       ], ['name' => $row['title']]);
                }
        }
        
@@ -458,10 +458,10 @@ class WBB2xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.label')->import($row['folderid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.label')->import($row['folderid'], [
                                'userID' => $row['userid'],
                                'label' => mb_substr($row['title'], 0, 80)
-                       ));
+                       ]);
                }
        }
        
@@ -483,17 +483,17 @@ class WBB2xExporter extends AbstractExporter {
                        WHERE           pm.privatemessageid BETWEEN ? AND ?
                        ORDER BY        pm.privatemessageid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $conversationID = ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($row['privatemessageid'], array(
+                       $conversationID = ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($row['privatemessageid'], [
                                'subject' => $row['subject'],
                                'time' => $row['sendtime'],
                                'userID' => $row['senderid'],
                                'username' => ($row['username'] ?: '')
-                       ));
+                       ]);
                        
                        // import message
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['privatemessageid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['privatemessageid'], [
                                'conversationID' => $row['privatemessageid'],
                                'userID' => $row['senderid'],
                                'username' => ($row['username'] ?: ''),
@@ -504,7 +504,7 @@ class WBB2xExporter extends AbstractExporter {
                                'enableHtml' => $row['allowhtml'],
                                'enableBBCodes' => $row['allowbbcode'],
                                'showSignature' => $row['showsignature']
-                       ));
+                       ]);
                }
        }
        
@@ -530,14 +530,14 @@ class WBB2xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, [
                                'conversationID' => $row['privatemessageid'],
                                'participantID' => $row['recipientid'],
                                'username' => $row['recipient'],
                                'hideConversation' => $row['deletepm'],
                                'isInvisible' => $row['blindcopy'],
                                'lastVisitTime' => $row['view']
-                       ), array('labelIDs' => ($row['folderid'] ? array($row['folderid']) : array())));
+                       ], ['labelIDs' => ($row['folderid'] ? [$row['folderid']] : [])]);
                }
        }
        
@@ -590,7 +590,7 @@ class WBB2xExporter extends AbstractExporter {
                if (!isset($this->boardCache[$parentID])) return;
                
                foreach ($this->boardCache[$parentID] as $board) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['boardid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['boardid'], [
                                'parentID' => ($board['parentid'] ?: null),
                                'position' => $board['boardorder'],
                                'boardType' => (!$board['isboard'] ? 1 : (!empty($board['externalurl']) ? 2 : 0)),
@@ -600,7 +600,7 @@ class WBB2xExporter extends AbstractExporter {
                                'countUserPosts' => $board['countuserposts'],
                                'isClosed' => $board['closed'],
                                'isInvisible' => intval($board['invisible'] == 2)
-                       ));
+                       ]);
                        
                        $this->exportBoardsRecursively($board['boardid']);
                }
@@ -623,18 +623,18 @@ class WBB2xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."options
                        WHERE   varname = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('default_prefix'));
+               $statement->execute(['default_prefix']);
                $row = $statement->fetchArray();
                if ($row !== false) $globalPrefixes = $row['value'];
                
                // get boards
-               $boardPrefixes = array();
+               $boardPrefixes = [];
                
                $sql = "SELECT  boardid, prefix, prefixuse
                        FROM    ".$this->databasePrefix."boards
                        WHERE   prefixuse > ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                while ($row = $statement->fetchArray()) {
                        $prefixes = '';
                        
@@ -658,23 +658,23 @@ class WBB2xExporter extends AbstractExporter {
                }
                
                // get thread ids
-               $threadIDs = $announcementIDs = array();
+               $threadIDs = $announcementIDs = [];
                $sql = "SELECT          threadid, important
                        FROM            ".$this->databasePrefix."threads
                        WHERE           threadid BETWEEN ? AND ?
                        ORDER BY        threadid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $threadIDs[] = $row['threadid'];
                        if ($row['important'] == 2) $announcementIDs[] = $row['threadid'];
                }
                
                // get assigned boards (for announcements)
-               $assignedBoards = array();
+               $assignedBoards = [];
                if (!empty($announcementIDs)) {
                        $conditionBuilder = new PreparedStatementConditionBuilder();
-                       $conditionBuilder->add('threadid IN (?)', array($announcementIDs));
+                       $conditionBuilder->add('threadid IN (?)', [$announcementIDs]);
                                
                        $sql = "SELECT          boardid, threadid
                                FROM            ".$this->databasePrefix."announcements
@@ -682,14 +682,14 @@ class WBB2xExporter extends AbstractExporter {
                        $statement = $this->database->prepareStatement($sql);
                        $statement->execute($conditionBuilder->getParameters());
                        while ($row = $statement->fetchArray()) {
-                               if (!isset($assignedBoards[$row['threadid']])) $assignedBoards[$row['threadid']] = array();
+                               if (!isset($assignedBoards[$row['threadid']])) $assignedBoards[$row['threadid']] = [];
                                $assignedBoards[$row['threadid']][] = $row['boardid'];
                        }
                }
                
                // get threads
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('threadid IN (?)', array($threadIDs));
+               $conditionBuilder->add('threadid IN (?)', [$threadIDs]);
                
                $sql = "SELECT          *
                        FROM            ".$this->databasePrefix."threads
@@ -697,7 +697,7 @@ class WBB2xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'boardID' => $row['boardid'],
                                'topic' => $row['topic'],
                                'time' => $row['starttime'],
@@ -710,10 +710,10 @@ class WBB2xExporter extends AbstractExporter {
                                'isClosed' => intval($row['closed'] == 1),
                                'movedThreadID' => ($row['closed'] == 3 ? $row['pollid'] : null),
                                'lastPostTime' => $row['lastposttime']
-                       );
-                       $additionalData = array();
+                       ];
+                       $additionalData = [];
                        if (!empty($assignedBoards[$row['threadid']])) $additionalData['assignedBoards'] = $assignedBoards[$row['threadid']];
-                       if ($row['prefix'] && isset($boardPrefixes[$row['boardid']])) $additionalData['labels'] = array($boardPrefixes[$row['boardid']].'-'.$row['prefix']);
+                       if ($row['prefix'] && isset($boardPrefixes[$row['boardid']])) $additionalData['labels'] = [$boardPrefixes[$row['boardid']].'-'.$row['prefix']];
                                
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.thread')->import($row['threadid'], $data, $additionalData);
                }
@@ -735,9 +735,9 @@ class WBB2xExporter extends AbstractExporter {
                        WHERE           postid BETWEEN ? AND ?
                        ORDER BY        postid";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['postid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['postid'], [
                                'threadID' => $row['threadid'],
                                'userID' => $row['userid'],
                                'username' => $row['username'],
@@ -754,8 +754,8 @@ class WBB2xExporter extends AbstractExporter {
                                'enableHtml' => $row['allowhtml'],
                                'enableBBCodes' => $row['allowbbcode'],
                                'showSignature' => $row['showsignature'],
-                               'ipAddress' => UserUtil::convertIPv4To6($row['ipaddress'])                              
-                       ));
+                               'ipAddress' => UserUtil::convertIPv4To6($row['ipaddress'])
+                       ]);
                }
        }
        
@@ -795,10 +795,10 @@ class WBB2xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import(0, [
                                'objectID' => $row['threadid'],
                                'userID' => $row['userid']
-                       ));
+                       ]);
                }
        }
        
@@ -809,7 +809,7 @@ class WBB2xExporter extends AbstractExporter {
                $sql = "SELECT  COUNT(*) AS count
                        FROM    ".$this->databasePrefix."polls";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('post'));
+               $statement->execute(['post']);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -834,30 +834,30 @@ class WBB2xExporter extends AbstractExporter {
                        FROM            ".$this->databasePrefix."polls poll
                        ORDER BY        pollid";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array('post'));
+               $statement->execute(['post']);
                while ($row = $statement->fetchArray()) {
                        $postID = null;
                        $votes = 0;
                        
                        // get first post id
-                       $firstPostStatement->execute(array($row['threadid']));
+                       $firstPostStatement->execute([$row['threadid']]);
                        $row2 = $firstPostStatement->fetchArray();
                        if (empty($row2['postid'])) continue;
                        $postID = $row2['postid'];
                        
                        // get votes
-                       $votesStatement->execute(array($row['pollid']));
+                       $votesStatement->execute([$row['pollid']]);
                        $row2 = $votesStatement->fetchArray();
                        if (!empty($row2['votes'])) $votes = $row2['votes'];
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['pollid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['pollid'], [
                                'objectID' => $postID,
                                'question' => $row['question'],
                                'time' => $row['starttime'],
                                'endTime' => ($row['timeout'] ? $row['starttime'] + $row['timeout'] * 86400 : 0),
                                'maxVotes' => $row['choicecount'],
                                'votes' => $votes
-                       ));
+                       ]);
                }
        }
        
@@ -868,7 +868,7 @@ class WBB2xExporter extends AbstractExporter {
                $sql = "SELECT  COUNT(*) AS count
                        FROM    ".$this->databasePrefix."polloptions";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array());
+               $statement->execute([]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -881,13 +881,13 @@ class WBB2xExporter extends AbstractExporter {
                        FROM            ".$this->databasePrefix."polloptions
                        ORDER BY        polloptionid";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array());
+               $statement->execute([]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['polloptionid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['polloptionid'], [
                        'pollID' => $row['pollid'],
                        'optionValue' => $row['polloption'],
                        'votes' => $row['votes']
-                       ));
+                       ]);
                }
        }
        
@@ -899,7 +899,7 @@ class WBB2xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."boards
                        WHERE   prefixuse > ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                $row = $statement->fetchArray();
                return ($row['count'] ? 1 : 0);
        }
@@ -908,7 +908,7 @@ class WBB2xExporter extends AbstractExporter {
         * Exports labels.
         */
        public function exportLabels($offset, $limit) {
-               $prefixMap = array();
+               $prefixMap = [];
                
                // get global prefixes
                $globalPrefixes = '';
@@ -916,7 +916,7 @@ class WBB2xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."options
                        WHERE   varname = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('default_prefix'));
+               $statement->execute(['default_prefix']);
                $row = $statement->fetchArray();
                if ($row !== false) $globalPrefixes = $row['value'];
                
@@ -925,7 +925,7 @@ class WBB2xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."boards
                        WHERE   prefixuse > ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                while ($row = $statement->fetchArray()) {
                        $prefixes = '';
                                
@@ -945,10 +945,10 @@ class WBB2xExporter extends AbstractExporter {
                        if ($prefixes) {
                                $key = StringUtil::getHash($prefixes);
                                if (!isset($prefixMap[$key])) {
-                                       $prefixMap[$key] = array(
+                                       $prefixMap[$key] = [
                                                'prefixes' => $prefixes,
-                                               'boardIDs' => array()
-                                       );
+                                               'boardIDs' => []
+                                       ];
                                }
                                
                                $boardID = ImportHandler::getInstance()->getNewID('com.woltlab.wbb.board', $row['boardid']);
@@ -963,17 +963,17 @@ class WBB2xExporter extends AbstractExporter {
                                
                        foreach ($prefixMap as $key => $data) {
                                // import label group
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label.group')->import($key, array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label.group')->import($key, [
                                        'groupName' => 'labelgroup'.$i
-                               ), array('objects' => array($objectType->objectTypeID => $data['boardIDs'])));
+                               ], ['objects' => [$objectType->objectTypeID => $data['boardIDs']]]);
                                
                                // import labels
                                $labels = explode("\n", $data['prefixes']);
                                foreach ($labels as $label) {
-                                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label')->import($key.'-'.$label, array(
+                                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label')->import($key.'-'.$label, [
                                                'groupID' => $key,
                                                'label' => mb_substr($label, 0, 80)
-                                       ));
+                                       ]);
                                }
                                
                                $i++;
@@ -1003,17 +1003,17 @@ class WBB2xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'objectID' => $row['boardid'],
                                'groupID' => $row['groupid']
-                       );
+                       ];
                        unset($row['boardid'], $row['groupid']);
                        
                        foreach ($row as $permission => $value) {
                                if ($value == -1) continue;
                                if (!isset($this->permissionMap[$permission])) continue;
                                
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array_merge($data, array('optionValue' => $value)), array('optionName' => $this->permissionMap[$permission]));
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array_merge($data, ['optionValue' => $value]), ['optionName' => $this->permissionMap[$permission]]);
                        }
                }
        }
@@ -1048,11 +1048,11 @@ class WBB2xExporter extends AbstractExporter {
                                $row['smiliepath'] = $this->fileSystemPath.$row['smiliepath'];
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley')->import($row['smilieid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley')->import($row['smilieid'], [
                                'smileyTitle' => $row['smilietitle'],
                                'smileyCode' => $row['smiliecode'],
                                'showOrder' => $row['smilieorder']
-                       ), array('fileLocation' => $row['smiliepath']));
+                       ], ['fileLocation' => $row['smiliepath']]);
                }
        }
        
@@ -1061,7 +1061,7 @@ class WBB2xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."attachments
                        WHERE   ".$indexName." > ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1072,7 +1072,7 @@ class WBB2xExporter extends AbstractExporter {
                        WHERE           ".$indexName." > ?
                        ORDER BY        attachmentid DESC";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                while ($row = $statement->fetchArray()) {
                        $fileLocation = $this->fileSystemPath.'attachments/attachment-'.$row['attachmentid'].'.'.$row['attachmentextension'];
                        if (!@file_exists($fileLocation)) continue;
@@ -1081,7 +1081,7 @@ class WBB2xExporter extends AbstractExporter {
                        $isImage = 0;
                        if ($fileType == 'image/jpeg' || $fileType == 'image/png' || $fileType == 'image/gif') $isImage = 1;
                        
-                       ImportHandler::getInstance()->getImporter($objectType)->import($row['attachmentid'], array(
+                       ImportHandler::getInstance()->getImporter($objectType)->import($row['attachmentid'], [
                                'objectID' => $row[$indexName],
                                'userID' => ($row['userid'] ?: null),
                                'filename' => $row['attachmentname'].'.'.$row['attachmentextension'],
@@ -1091,7 +1091,7 @@ class WBB2xExporter extends AbstractExporter {
                                'downloads' => $row['counter'],
                                'uploadTime' => $row['uploadtime'],
                                'showOrder' => 0
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
index 6b756fab7c70359bead4b35348144884d6f52b6d..c5fc5c7202185a6dcd914ef8e50dfe4642ac8f9c 100644 (file)
@@ -39,12 +39,12 @@ class WBB3xExporter extends AbstractExporter {
         * board cache
         * @var array
         */
-       protected $boardCache = array();
+       protected $boardCache = [];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$methods
         */
-       protected $methods = array(
+       protected $methods = [
                'com.woltlab.wcf.user' => 'Users',
                'com.woltlab.wcf.user.group' => 'UserGroups',
                'com.woltlab.wcf.user.rank' => 'UserRanks',
@@ -90,24 +90,24 @@ class WBB3xExporter extends AbstractExporter {
                'com.woltlab.calendar.event.date' => 'CalendarEventDates',
                'com.woltlab.calendar.event.date.comment' => 'CalendarEventDateComments',
                'com.woltlab.calendar.event.date.participation' => 'CalendarEventDateParticipation'
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$limits
         */
-       protected $limits = array(
+       protected $limits = [
                'com.woltlab.wcf.user.avatar' => 100,
                'com.woltlab.wcf.conversation.attachment' => 100,
                'com.woltlab.wbb.attachment' => 100,
                'com.woltlab.wbb.acl' => 50,
                'com.woltlab.gallery.image' => 100
-       );
+       ];
        
        /**
         * valid thread sort fields
         * @var array<string>
         */
-       protected static $availableThreadSortFields = array('topic', 'username', 'time', 'views', 'replies', 'lastPostTime', 'cumulativeLikes');
+       protected static $availableThreadSortFields = ['topic', 'username', 'time', 'views', 'replies', 'lastPostTime', 'cumulativeLikes'];
        
        /**
         * @see \wcf\system\exporter\IExporter::init()
@@ -132,46 +132,46 @@ class WBB3xExporter extends AbstractExporter {
         * @see \wcf\system\exporter\IExporter::getSupportedData()
         */
        public function getSupportedData() {
-               return array(
-                       'com.woltlab.wcf.user' => array(
+               return [
+                       'com.woltlab.wcf.user' => [
                                'com.woltlab.wcf.user.group',
                                'com.woltlab.wcf.user.avatar',
                                'com.woltlab.wcf.user.option',
                                'com.woltlab.wcf.user.comment',
                                'com.woltlab.wcf.user.follower',
                                'com.woltlab.wcf.user.rank'
-                       ),
-                       'com.woltlab.wbb.board' => array(
+                       ],
+                       'com.woltlab.wbb.board' => [
                                'com.woltlab.wbb.acl',
                                'com.woltlab.wbb.attachment',
                                'com.woltlab.wbb.poll',
                                'com.woltlab.wbb.watchedThread',
                                'com.woltlab.wbb.like',
                                'com.woltlab.wcf.label'
-                       ),
-                       'com.woltlab.wcf.conversation' => array(
+                       ],
+                       'com.woltlab.wcf.conversation' => [
                                'com.woltlab.wcf.conversation.attachment',
                                'com.woltlab.wcf.conversation.label'
-                       ),
-                       'com.woltlab.blog.entry' => array(
+                       ],
+                       'com.woltlab.blog.entry' => [
                                'com.woltlab.blog.category',
                                'com.woltlab.blog.entry.attachment',
                                'com.woltlab.blog.entry.comment',
                                'com.woltlab.blog.entry.like'
-                       ),
-                       'com.woltlab.gallery.image' => array(
+                       ],
+                       'com.woltlab.gallery.image' => [
                                'com.woltlab.gallery.category',
                                'com.woltlab.gallery.album',
                                'com.woltlab.gallery.image.comment',
                                'com.woltlab.gallery.image.like'
-                       ),
-                       'com.woltlab.calendar.event' => array(
+                       ],
+                       'com.woltlab.calendar.event' => [
                                'com.woltlab.calendar.category',
                                'com.woltlab.calendar.event.attachment',
                                'com.woltlab.calendar.event.date.participation'
-                       ),
-                       'com.woltlab.wcf.smiley' => array()
-               );
+                       ],
+                       'com.woltlab.wcf.smiley' => []
+               ];
        }
        
        /**
@@ -200,7 +200,7 @@ class WBB3xExporter extends AbstractExporter {
         * @see \wcf\system\exporter\IExporter::getQueue()
         */
        public function getQueue() {
-               $queue = array();
+               $queue = [];
                
                // user
                if (in_array('com.woltlab.wcf.user', $this->selectedData)) {
@@ -319,14 +319,14 @@ class WBB3xExporter extends AbstractExporter {
                        WHERE           groupID BETWEEN ? AND ?
                        ORDER BY        groupID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['groupID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['groupID'], [
                                'groupName' => $row['groupName'],
                                'groupType' => $row['groupType'],
                                'userOnlineMarking' => (!empty($row['userOnlineMarking']) ? $row['userOnlineMarking'] : ''),
                                'showOnTeamPage' => (!empty($row['showOnTeamPage']) ? $row['showOnTeamPage'] : 0)
-                       ));
+                       ]);
                }
        }
        
@@ -342,7 +342,7 @@ class WBB3xExporter extends AbstractExporter {
         */
        public function exportUsers($offset, $limit) {
                // cache existing user options
-               $existingUserOptions = array();
+               $existingUserOptions = [];
                $sql = "SELECT  optionName, optionID
                        FROM    wcf".WCF_N."_user_option
                        WHERE   optionName NOT LIKE 'option%'";
@@ -353,7 +353,7 @@ class WBB3xExporter extends AbstractExporter {
                }
                
                // cache user options
-               $userOptions = array();
+               $userOptions = [];
                $sql = "SELECT  optionName, optionID
                        FROM    wcf".$this->dbNo."_user_option";
                $statement = $this->database->prepareStatement($sql);
@@ -375,12 +375,12 @@ class WBB3xExporter extends AbstractExporter {
                        WHERE   optionName IN ('encryption_enable_salting', 'encryption_encrypt_before_salting', 'encryption_method', 'encryption_salt_position')";
                $statement = $this->database->prepareStatement($sql);
                $statement->execute();
-               $encryptionData = array();
+               $encryptionData = [];
                while ($row = $statement->fetchArray()) {
                        $encryptionData[$row['optionName']] = $row['optionValue'];
                }
                
-               if (isset($encryptionData['encryption_method']) && in_array($encryptionData['encryption_method'], array('crc32', 'md5', 'sha1'))) {
+               if (isset($encryptionData['encryption_method']) && in_array($encryptionData['encryption_method'], ['crc32', 'md5', 'sha1'])) {
                        if ($encryptionData['encryption_enable_salting'] && $encryptionData['encryption_encrypt_before_salting'] && $encryptionData['encryption_method'] == 'sha1' && $encryptionData['encryption_salt_position'] == 'before') {
                                $encryption = 'wcf1';
                        }
@@ -412,9 +412,9 @@ class WBB3xExporter extends AbstractExporter {
                        WHERE           user_table.userID BETWEEN ? AND ?
                        ORDER BY        user_table.userID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'username' => $row['username'],
                                'password' => '',
                                'email' => $row['email'],
@@ -436,12 +436,12 @@ class WBB3xExporter extends AbstractExporter {
                                'profileHits' => $row['profileHits'],
                                'userTitle' => $row['userTitle'],
                                'lastActivityTime' => $row['lastActivityTime']
-                       );
-                       $additionalData = array(
+                       ];
+                       $additionalData = [
                                'groupIDs' => explode(',', $row['groupIDs']),
                                'languages' => explode(',', $row['languageCodes']),
-                               'options' => array()
-                       );
+                               'options' => []
+                       ];
                        
                        // handle user options
                        foreach ($userOptions as $optionID => $optionName) {
@@ -457,7 +457,7 @@ class WBB3xExporter extends AbstractExporter {
                        
                        // update password hash
                        if ($newUserID) {
-                               $passwordUpdateStatement->execute(array($encryption.':'.$row['password'].':'.$row['salt'], $newUserID));
+                               $passwordUpdateStatement->execute([$encryption.':'.$row['password'].':'.$row['salt'], $newUserID]);
                        }
                }
        }
@@ -478,16 +478,16 @@ class WBB3xExporter extends AbstractExporter {
                        WHERE           rankID BETWEEN ? AND ?
                        ORDER BY        rankID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['rankID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['rankID'], [
                                'groupID' => $row['groupID'],
                                'requiredPoints' => $row['neededPoints'],
                                'rankTitle' => $row['rankTitle'],
                                'rankImage' => $row['rankImage'],
                                'repeatImage' => $row['repeatImage'],
                                'requiredGender' => $row['gender']
-                       ));
+                       ]);
                }
        }
        
@@ -513,11 +513,11 @@ class WBB3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, [
                                'userID' => $row['userID'],
                                'followUserID' => $row['whiteUserID'],
                                'time' => (!empty($row['time']) ? $row['time'] : 0)
-                       ));
+                       ]);
                }
        }
        
@@ -537,15 +537,15 @@ class WBB3xExporter extends AbstractExporter {
                        WHERE           entryID BETWEEN ? AND ?
                        ORDER BY        entryID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.comment')->import($row['entryID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.comment')->import($row['entryID'], [
                                'objectID' => $row['ownerID'],
                                'userID' => $row['userID'],
                                'username' => $row['username'],
                                'message' => $row['message'],
                                'time' => $row['time']
-                       ));
+                       ]);
                }
        }
        
@@ -557,7 +557,7 @@ class WBB3xExporter extends AbstractExporter {
                        FROM    wcf".$this->dbNo."_user_guestbook
                        WHERE   commentTime > ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                $row = $statement->fetchArray();
                if ($row !== false) return $row['maxID'];
                return 0;
@@ -575,15 +575,15 @@ class WBB3xExporter extends AbstractExporter {
                                        AND user_guestbook.entryID BETWEEN ? AND ?
                        ORDER BY        user_guestbook.entryID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0, $offset + 1, $offset + $limit));
+               $statement->execute([0, $offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.comment.response')->import($row['entryID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.comment.response')->import($row['entryID'], [
                                'commentID' => $row['entryID'],
                                'time' => $row['commentTime'],
                                'userID' => $row['ownerID'],
                                'username' => $row['ownerName'],
                                'message' => $row['comment'],
-                       ));
+                       ]);
                }
        }
        
@@ -595,7 +595,7 @@ class WBB3xExporter extends AbstractExporter {
                        FROM    wcf".$this->dbNo."_avatar
                        WHERE   userID <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                $row = $statement->fetchArray();
                if ($row !== false) return $row['maxID'];
                return 0;
@@ -611,15 +611,15 @@ class WBB3xExporter extends AbstractExporter {
                                        AND avatarID BETWEEN ? AND ?
                        ORDER BY        avatarID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0, $offset + 1, $offset + $limit));
+               $statement->execute([0, $offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import($row['avatarID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import($row['avatarID'], [
                                'avatarName' => $row['avatarName'],
                                'avatarExtension' => $row['avatarExtension'],
                                'width' => $row['width'],
                                'height' => $row['height'],
                                'userID' => $row['userID']
-                       ), array('fileLocation' => $this->fileSystemPath . 'images/avatars/avatar-' . $row['avatarID'] . '.' . $row['avatarExtension']));
+                       ], ['fileLocation' => $this->fileSystemPath . 'images/avatars/avatar-' . $row['avatarID'] . '.' . $row['avatarExtension']]);
                }
        }
        
@@ -631,8 +631,8 @@ class WBB3xExporter extends AbstractExporter {
                $optionsNames = $this->getExistingUserOptions();
                
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('categoryName IN (SELECT categoryName FROM wcf'.$this->dbNo.'_user_option_category WHERE parentCategoryName = ?)', array('profile'));
-               if (!empty($optionsNames)) $conditionBuilder->add('optionName NOT IN (?)', array($optionsNames));
+               $conditionBuilder->add('categoryName IN (SELECT categoryName FROM wcf'.$this->dbNo.'_user_option_category WHERE parentCategoryName = ?)', ['profile']);
+               if (!empty($optionsNames)) $conditionBuilder->add('optionName NOT IN (?)', [$optionsNames]);
                
                $sql = "SELECT  COUNT(*) AS count
                        FROM    wcf".$this->dbNo."_user_option
@@ -651,8 +651,8 @@ class WBB3xExporter extends AbstractExporter {
                $optionsNames = $this->getExistingUserOptions();
                
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('categoryName IN (SELECT categoryName FROM wcf'.$this->dbNo.'_user_option_category WHERE parentCategoryName = ?)', array('profile'));
-               if (!empty($optionsNames)) $conditionBuilder->add('optionName NOT IN (?)', array($optionsNames));
+               $conditionBuilder->add('categoryName IN (SELECT categoryName FROM wcf'.$this->dbNo.'_user_option_category WHERE parentCategoryName = ?)', ['profile']);
+               if (!empty($optionsNames)) $conditionBuilder->add('optionName NOT IN (?)', [$optionsNames]);
                
                $sql = "SELECT  user_option.*, (
                                        SELECT  languageItemValue
@@ -725,7 +725,7 @@ class WBB3xExporter extends AbstractExporter {
                                        $row['optionType'] = 'textarea';
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['optionID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['optionID'], [
                                'categoryName' => $row['categoryName'],
                                'optionType' => $row['optionType'],
                                'defaultValue' => $row['defaultValue'],
@@ -738,7 +738,7 @@ class WBB3xExporter extends AbstractExporter {
                                'editable' => $editable,
                                'visible' => $visible,
                                'showOrder' => $row['showOrder']
-                       ), array('name' => ($row['name'] ?: $row['optionName'])));
+                       ], ['name' => ($row['name'] ?: $row['optionName'])]);
                }
        }
        
@@ -758,7 +758,7 @@ class WBB3xExporter extends AbstractExporter {
                        WHERE           folderID BETWEEN ? AND ?
                        ORDER BY        folderID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $cssClassName = '';
                        if (!empty($row['color'])) {
@@ -772,11 +772,11 @@ class WBB3xExporter extends AbstractExporter {
                                }
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.label')->import($row['folderID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.label')->import($row['folderID'], [
                                'userID' => $row['userID'],
                                'label' => mb_substr($row['folderName'], 0, 80),
                                'cssClassName' => $cssClassName
-                       ));
+                       ]);
                }
        }
        
@@ -818,7 +818,7 @@ class WBB3xExporter extends AbstractExporter {
                        WHERE           pm.pmID BETWEEN ? AND ?
                        ORDER BY        pm.pmID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $participants = explode(',', $row['participants']);
                        $participants[] = $row['userID'];
@@ -826,13 +826,13 @@ class WBB3xExporter extends AbstractExporter {
                        
                        if (ImportHandler::getInstance()->getNewID('com.woltlab.wcf.conversation', $conversationID) !== null) continue;
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($conversationID, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($conversationID, [
                                'subject' => $row['subject'],
                                'time' => $row['time'],
                                'userID' => $row['userID'],
                                'username' => $row['username'],
                                'isDraft' => $row['isDraft']
-                       ));
+                       ]);
                }
        }
        
@@ -857,13 +857,13 @@ class WBB3xExporter extends AbstractExporter {
                        WHERE           pm.pmID BETWEEN ? AND ?
                        ORDER BY        pm.pmID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $participants = explode(',', $row['participants']);
                        $participants[] = $row['userID'];
                        $conversationID = $this->getConversationID($row['parentPmID'] ?: $row['pmID'], $participants);
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['pmID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['pmID'], [
                                'conversationID' => $conversationID,
                                'userID' => $row['userID'],
                                'username' => $row['username'],
@@ -874,7 +874,7 @@ class WBB3xExporter extends AbstractExporter {
                                'enableHtml' => $row['enableHtml'],
                                'enableBBCodes' => $row['enableBBCodes'],
                                'showSignature' => $row['showSignature']
-                       ));
+                       ]);
                }
        }
        
@@ -917,14 +917,14 @@ class WBB3xExporter extends AbstractExporter {
                        
                        if ($row['isDraft']) continue;
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, [
                                'conversationID' => $conversationID,
                                'participantID' => $row['recipientID'],
                                'username' => $row['recipient'],
                                'hideConversation' => $row['isDeleted'],
                                'isInvisible' => $row['isBlindCopy'],
                                'lastVisitTime' => $row['isViewed']
-                       ), array('labelIDs' => ($row['folderID'] ? array($row['folderID']) : array())));
+                       ], ['labelIDs' => ($row['folderID'] ? [$row['folderID']] : [])]);
                }
        }
        
@@ -981,7 +981,7 @@ class WBB3xExporter extends AbstractExporter {
                foreach ($this->boardCache[$parentID] as $board) {
                        if (!in_array($board['sortField'], self::$availableThreadSortFields)) $board['sortField'] = 'lastPostTime';
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['boardID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['boardID'], [
                                'parentID' => ($board['parentID'] ?: null),
                                'position' => ($board['position'] ?: 0),
                                'boardType' => $board['boardType'],
@@ -1007,7 +1007,7 @@ class WBB3xExporter extends AbstractExporter {
                                'clicks' => $board['clicks'],
                                'posts' => $board['posts'],
                                'threads' => $board['threads']
-                       ));
+                       ]);
                        
                        $this->exportBoardsRecursively($board['boardID']);
                }
@@ -1030,26 +1030,26 @@ class WBB3xExporter extends AbstractExporter {
                        FROM    wcf".$this->dbNo."_option
                        WHERE   optionName = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('thread_default_prefixes'));
+               $statement->execute(['thread_default_prefixes']);
                $row = $statement->fetchArray();
                if ($row !== false) $globalPrefixes = $row['optionValue'];
                
                // get boards
-               $boardPrefixes = array();
+               $boardPrefixes = [];
                
                if (substr($this->getPackageVersion('com.woltlab.wcf'), 0, 3) == '1.1') {
                        $sql = "SELECT          boardID, prefixes, prefixMode
                                FROM            wbb".$this->dbNo."_".$this->instanceNo."_board
                                WHERE           prefixMode > ?";
                        $statement = $this->database->prepareStatement($sql);
-                       $statement->execute(array(0));
+                       $statement->execute([0]);
                }
                else {
                        $sql = "SELECT          boardID, prefixes, 2 AS prefixMode
                                FROM            wbb".$this->dbNo."_".$this->instanceNo."_board
                                WHERE           prefixes <> ?";
                        $statement = $this->database->prepareStatement($sql);
-                       $statement->execute(array(''));
+                       $statement->execute(['']);
                }
                
                while ($row = $statement->fetchArray()) {
@@ -1075,13 +1075,13 @@ class WBB3xExporter extends AbstractExporter {
                }
                
                // get thread ids
-               $threadIDs = $announcementIDs = array();
+               $threadIDs = $announcementIDs = [];
                $sql = "SELECT          threadID, isAnnouncement
                        FROM            wbb".$this->dbNo."_".$this->instanceNo."_thread
                        WHERE           threadID BETWEEN ? AND ?
                        ORDER BY        threadID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $threadIDs[] = $row['threadID'];
                        if ($row['isAnnouncement']) $announcementIDs[] = $row['threadID'];
@@ -1089,10 +1089,10 @@ class WBB3xExporter extends AbstractExporter {
                if (empty($threadIDs)) return;
                
                // get assigned boards (for announcements)
-               $assignedBoards = array();
+               $assignedBoards = [];
                if (!empty($announcementIDs)) {
                        $conditionBuilder = new PreparedStatementConditionBuilder();
-                       $conditionBuilder->add('threadID IN (?)', array($announcementIDs));
+                       $conditionBuilder->add('threadID IN (?)', [$announcementIDs]);
                        
                        $sql = "SELECT          boardID, threadID
                                FROM            wbb".$this->dbNo."_".$this->instanceNo."_thread_announcement
@@ -1100,7 +1100,7 @@ class WBB3xExporter extends AbstractExporter {
                        $statement = $this->database->prepareStatement($sql);
                        $statement->execute($conditionBuilder->getParameters());
                        while ($row = $statement->fetchArray()) {
-                               if (!isset($assignedBoards[$row['threadID']])) $assignedBoards[$row['threadID']] = array();
+                               if (!isset($assignedBoards[$row['threadID']])) $assignedBoards[$row['threadID']] = [];
                                $assignedBoards[$row['threadID']][] = $row['boardID'];
                        }
                }
@@ -1110,7 +1110,7 @@ class WBB3xExporter extends AbstractExporter {
                
                // get threads
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('threadID IN (?)', array($threadIDs));
+               $conditionBuilder->add('threadID IN (?)', [$threadIDs]);
                
                $sql = "SELECT          thread.*, language.languageCode
                        FROM            wbb".$this->dbNo."_".$this->instanceNo."_thread thread
@@ -1120,7 +1120,7 @@ class WBB3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'boardID' => $row['boardID'],
                                'topic' => $row['topic'],
                                'time' => $row['time'],
@@ -1137,11 +1137,11 @@ class WBB3xExporter extends AbstractExporter {
                                'isDone' => (!empty($row['isDone']) ? $row['isDone'] : 0),
                                'deleteTime' => $row['deleteTime'],
                                'lastPostTime' => $row['lastPostTime']
-                       );
-                       $additionalData = array();
+                       ];
+                       $additionalData = [];
                        if ($row['languageCode']) $additionalData['languageCode'] = $row['languageCode'];
                        if (!empty($assignedBoards[$row['threadID']])) $additionalData['assignedBoards'] = $assignedBoards[$row['threadID']];
-                       if ($row['prefix'] && isset($boardPrefixes[$row['boardID']])) $additionalData['labels'] = array($boardPrefixes[$row['boardID']].'-'.$row['prefix']);
+                       if ($row['prefix'] && isset($boardPrefixes[$row['boardID']])) $additionalData['labels'] = [$boardPrefixes[$row['boardID']].'-'.$row['prefix']];
                        if (isset($tags[$row['threadID']])) $additionalData['tags'] = $tags[$row['threadID']];
                        
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.thread')->import($row['threadID'], $data, $additionalData);
@@ -1164,9 +1164,9 @@ class WBB3xExporter extends AbstractExporter {
                        WHERE           postID BETWEEN ? AND ?
                        ORDER BY        postID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['postID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['postID'], [
                                'threadID' => $row['threadID'],
                                'userID' => $row['userID'],
                                'username' => $row['username'],
@@ -1188,7 +1188,7 @@ class WBB3xExporter extends AbstractExporter {
                                'showSignature' => $row['showSignature'],
                                'ipAddress' => UserUtil::convertIPv4To6($row['ipAddress']),
                                'deleteTime' => $row['deleteTime']
-                       ));
+                       ]);
                }
        }
        
@@ -1228,11 +1228,11 @@ class WBB3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import(0, [
                                'objectID' => $row['threadID'],
                                'userID' => $row['userID'],
                                'notification' => $row['enableNotification']
-                       ));
+                       ]);
                }
        }
        
@@ -1244,7 +1244,7 @@ class WBB3xExporter extends AbstractExporter {
                        FROM    wcf".$this->dbNo."_poll
                        WHERE   messageType = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('post'));
+               $statement->execute(['post']);
                $row = $statement->fetchArray();
                if ($row !== false) return $row['maxID'];
                return 0;
@@ -1260,9 +1260,9 @@ class WBB3xExporter extends AbstractExporter {
                                        AND pollID BETWEEN ? AND ?
                        ORDER BY        pollID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('post', $offset + 1, $offset + $limit));
+               $statement->execute(['post', $offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['pollID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['pollID'], [
                                'objectID' => $row['messageID'],
                                'question' => $row['question'],
                                'time' => $row['time'],
@@ -1272,7 +1272,7 @@ class WBB3xExporter extends AbstractExporter {
                                'sortByVotes' => $row['sortByResult'],
                                'maxVotes' => $row['choiceCount'],
                                'votes' => $row['votes']
-                       ));
+                       ]);
                }
        }
        
@@ -1288,7 +1288,7 @@ class WBB3xExporter extends AbstractExporter {
                                        WHERE   messageType = ? 
                                )";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('post'));
+               $statement->execute(['post']);
                $row = $statement->fetchArray();
                if ($row !== false) return $row['maxID'];
                return 0;
@@ -1308,14 +1308,14 @@ class WBB3xExporter extends AbstractExporter {
                                        AND pollOptionID BETWEEN ? AND ?
                        ORDER BY        pollOptionID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('post', $offset + 1, $offset + $limit));
+               $statement->execute(['post', $offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['pollOptionID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['pollOptionID'], [
                                'pollID' => $row['pollID'],
                                'optionValue' => $row['pollOption'],
                                'showOrder' => $row['showOrder'],
                                'votes' => $row['votes']
-                       ));
+                       ]);
                }
        }
        
@@ -1332,7 +1332,7 @@ class WBB3xExporter extends AbstractExporter {
                                )
                                AND userID <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('post', 0));
+               $statement->execute(['post', 0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1351,13 +1351,13 @@ class WBB3xExporter extends AbstractExporter {
                                        AND userID <> ?
                        ORDER BY        pollOptionID, userID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array('post', 0));
+               $statement->execute(['post', 0]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, [
                                'pollID' => $row['pollID'],
                                'optionID' => $row['pollOptionID'],
                                'userID' => $row['userID']
-                       ));
+                       ]);
                }
        }
        
@@ -1370,7 +1370,7 @@ class WBB3xExporter extends AbstractExporter {
                        WHERE   userID <> ?
                                AND rating NOT IN (?, ?)";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0, 0, 3));
+               $statement->execute([0, 0, 3]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1388,15 +1388,15 @@ class WBB3xExporter extends AbstractExporter {
                                        AND thread_rating.rating NOT IN (?, ?)
                        ORDER BY        thread_rating.threadID, thread_rating.userID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0, 0, 3));
+               $statement->execute([0, 0, 3]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.like')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.like')->import(0, [
                                'objectID' => $row['firstPostID'],
                                'objectUserID' => ($row['objectUserID'] ?: null),
                                'userID' => $row['userID'],
                                'likeValue' => ($row['rating'] > 3 ? Like::LIKE : Like::DISLIKE),
                                'time' => $row['time']
-                       ));
+                       ]);
                }
        }
        
@@ -1409,14 +1409,14 @@ class WBB3xExporter extends AbstractExporter {
                                FROM    wbb".$this->dbNo."_".$this->instanceNo."_board
                                WHERE   prefixMode > ?";
                        $statement = $this->database->prepareStatement($sql);
-                       $statement->execute(array(0));
+                       $statement->execute([0]);
                }
                else {
                        $sql = "SELECT  COUNT(*) AS count
                                FROM    wbb".$this->dbNo."_".$this->instanceNo."_board
                                WHERE   prefixes <> ?";
                        $statement = $this->database->prepareStatement($sql);
-                       $statement->execute(array(''));
+                       $statement->execute(['']);
                }
                
                $row = $statement->fetchArray();
@@ -1427,7 +1427,7 @@ class WBB3xExporter extends AbstractExporter {
         * Exports labels.
         */
        public function exportLabels($offset, $limit) {
-               $prefixMap = array();
+               $prefixMap = [];
                
                // get global prefixes
                $globalPrefixes = '';
@@ -1435,7 +1435,7 @@ class WBB3xExporter extends AbstractExporter {
                        FROM    wcf".$this->dbNo."_option
                        WHERE   optionName = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('thread_default_prefixes'));
+               $statement->execute(['thread_default_prefixes']);
                $row = $statement->fetchArray();
                if ($row !== false) $globalPrefixes = $row['optionValue'];
                
@@ -1445,14 +1445,14 @@ class WBB3xExporter extends AbstractExporter {
                                FROM            wbb".$this->dbNo."_".$this->instanceNo."_board
                                WHERE           prefixMode > ?";
                        $statement = $this->database->prepareStatement($sql);
-                       $statement->execute(array(0));
+                       $statement->execute([0]);
                }
                else {
                        $sql = "SELECT          boardID, prefixes, 2 AS prefixMode
                                FROM            wbb".$this->dbNo."_".$this->instanceNo."_board
                                WHERE           prefixes <> ?";
                        $statement = $this->database->prepareStatement($sql);
-                       $statement->execute(array(''));
+                       $statement->execute(['']);
                }
                
                while ($row = $statement->fetchArray()) {
@@ -1474,10 +1474,10 @@ class WBB3xExporter extends AbstractExporter {
                        if ($prefixes) {
                                $key = StringUtil::getHash($prefixes);
                                if (!isset($prefixMap[$key])) {
-                                       $prefixMap[$key] = array(
+                                       $prefixMap[$key] = [
                                                'prefixes' => $prefixes,
-                                               'boardIDs' => array()
-                                       );
+                                               'boardIDs' => []
+                                       ];
                                }
                                
                                $boardID = ImportHandler::getInstance()->getNewID('com.woltlab.wbb.board', $row['boardID']);
@@ -1492,17 +1492,17 @@ class WBB3xExporter extends AbstractExporter {
                        
                        foreach ($prefixMap as $key => $data) {
                                // import label group
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label.group')->import($key, array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label.group')->import($key, [
                                        'groupName' => 'labelgroup'.$i
-                               ), array('objects' => array($objectType->objectTypeID => $data['boardIDs'])));
+                               ], ['objects' => [$objectType->objectTypeID => $data['boardIDs']]]);
                                
                                // import labels
                                $labels = explode("\n", $data['prefixes']);
                                foreach ($labels as $label) {
-                                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label')->import($key.'-'.$label, array(
+                                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label')->import($key.'-'.$label, [
                                                'groupID' => $key,
                                                'label' => mb_substr($label, 0, 80)
-                                       ));
+                                       ]);
                                }
                                
                                $i++;
@@ -1528,7 +1528,7 @@ class WBB3xExporter extends AbstractExporter {
         */
        public function exportACLs($offset, $limit) {
                // get ids
-               $mod = $user = $group = array();
+               $mod = $user = $group = [];
                $sql = "(
                                SELECT  boardID, userID, groupID, 'mod' AS type
                                FROM    wbb".$this->dbNo."_".$this->instanceNo."_board_moderator
@@ -1555,7 +1555,7 @@ class WBB3xExporter extends AbstractExporter {
                if (!empty($mod)) {
                        $conditionBuilder = new PreparedStatementConditionBuilder(true, 'OR');
                        foreach ($mod as $row) {
-                               $conditionBuilder->add('(boardID = ? AND userID = ? AND groupID = ?)', array($row['boardID'], $row['userID'], $row['groupID']));
+                               $conditionBuilder->add('(boardID = ? AND userID = ? AND groupID = ?)', [$row['boardID'], $row['userID'], $row['groupID']]);
                        }
                        
                        $sql = "SELECT  *
@@ -1564,9 +1564,9 @@ class WBB3xExporter extends AbstractExporter {
                        $statement = $this->database->prepareStatement($sql);
                        $statement->execute($conditionBuilder->getParameters());
                        while ($row = $statement->fetchArray()) {
-                               $data = array(
+                               $data = [
                                        'objectID' => $row['boardID']
-                               );
+                               ];
                                if ($row['userID']) $data['userID'] = $row['userID'];
                                else if ($row['groupID']) $data['groupID'] = $row['groupID'];
                                
@@ -1575,7 +1575,7 @@ class WBB3xExporter extends AbstractExporter {
                                foreach ($row as $permission => $value) {
                                        if ($value == -1) continue;
                                        
-                                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array_merge($data, array('optionValue' => $value)), array('optionName' => $permission));
+                                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array_merge($data, ['optionValue' => $value]), ['optionName' => $permission]);
                                }
                        }
                }
@@ -1584,7 +1584,7 @@ class WBB3xExporter extends AbstractExporter {
                if (!empty($group)) {
                        $conditionBuilder = new PreparedStatementConditionBuilder(true, 'OR');
                        foreach ($group as $row) {
-                               $conditionBuilder->add('(boardID = ? AND groupID = ?)', array($row['boardID'], $row['groupID']));
+                               $conditionBuilder->add('(boardID = ? AND groupID = ?)', [$row['boardID'], $row['groupID']]);
                        }
                        
                        $sql = "SELECT  *
@@ -1593,9 +1593,9 @@ class WBB3xExporter extends AbstractExporter {
                        $statement = $this->database->prepareStatement($sql);
                        $statement->execute($conditionBuilder->getParameters());
                        while ($row = $statement->fetchArray()) {
-                               $data = array(
+                               $data = [
                                        'objectID' => $row['boardID']
-                               );
+                               ];
                                $data['groupID'] = $row['groupID'];
                                
                                unset($row['boardID'], $row['groupID']);
@@ -1603,7 +1603,7 @@ class WBB3xExporter extends AbstractExporter {
                                foreach ($row as $permission => $value) {
                                        if ($value == -1) continue;
                                        
-                                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array_merge($data, array('optionValue' => $value)), array('optionName' => $permission));
+                                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array_merge($data, ['optionValue' => $value]), ['optionName' => $permission]);
                                }
                        }
                }
@@ -1612,7 +1612,7 @@ class WBB3xExporter extends AbstractExporter {
                if (!empty($user)) {
                        $conditionBuilder = new PreparedStatementConditionBuilder(true, 'OR');
                        foreach ($user as $row) {
-                               $conditionBuilder->add('(boardID = ? AND userID = ?)', array($row['boardID'], $row['userID']));
+                               $conditionBuilder->add('(boardID = ? AND userID = ?)', [$row['boardID'], $row['userID']]);
                        }
                        
                        $sql = "SELECT  *
@@ -1621,9 +1621,9 @@ class WBB3xExporter extends AbstractExporter {
                        $statement = $this->database->prepareStatement($sql);
                        $statement->execute($conditionBuilder->getParameters());
                        while ($row = $statement->fetchArray()) {
-                               $data = array(
+                               $data = [
                                        'objectID' => $row['boardID']
-                               );
+                               ];
                                $data['userID'] = $row['userID'];
                                
                                unset($row['boardID'], $row['userID']);
@@ -1631,7 +1631,7 @@ class WBB3xExporter extends AbstractExporter {
                                foreach ($row as $permission => $value) {
                                        if ($value == -1) continue;
                                        
-                                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array_merge($data, array('optionValue' => $value)), array('optionName' => $permission));
+                                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array_merge($data, ['optionValue' => $value]), ['optionName' => $permission]);
                                }
                        }
                }
@@ -1661,12 +1661,12 @@ class WBB3xExporter extends AbstractExporter {
                while ($row = $statement->fetchArray()) {
                        $fileLocation = $this->fileSystemPath . $row['smileyPath'];
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley')->import($row['smileyID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley')->import($row['smileyID'], [
                                'smileyTitle' => $row['smileyTitle'],
                                'smileyCode' => $row['smileyCode'],
                                'showOrder' => $row['showOrder'],
                                'categoryID' => (!empty($row['smileyCategoryID']) ? $row['smileyCategoryID'] : null)
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
@@ -1692,11 +1692,11 @@ class WBB3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley.category')->import($row['smileyCategoryID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley.category')->import($row['smileyCategoryID'], [
                                'title' => $row['title'],
                                'parentCategoryID' => 0,
                                'showOrder' => $row['showOrder']
-                       ));
+                       ]);
                }
        }
        
@@ -1708,7 +1708,7 @@ class WBB3xExporter extends AbstractExporter {
                        FROM    wcf".$this->dbNo."_user_blog_category
                        WHERE   userID = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1722,13 +1722,13 @@ class WBB3xExporter extends AbstractExporter {
                        WHERE           userID = ?
                        ORDER BY        categoryID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.category')->import($row['categoryID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.category')->import($row['categoryID'], [
                                'title' => $row['title'],
                                'parentCategoryID' => 0,
                                'showOrder' => 0
-                       ));
+                       ]);
                }
        }
        
@@ -1744,13 +1744,13 @@ class WBB3xExporter extends AbstractExporter {
         */
        public function exportBlogEntries($offset, $limit) {
                // get entry ids
-               $entryIDs = array();
+               $entryIDs = [];
                $sql = "SELECT          entryID
                        FROM            wcf".$this->dbNo."_user_blog
                        WHERE           entryID BETWEEN ? AND ?
                        ORDER BY        entryID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $entryIDs[] = $row['entryID'];
                }
@@ -1760,10 +1760,10 @@ class WBB3xExporter extends AbstractExporter {
                $tags = $this->getTags('com.woltlab.wcf.user.blog.entry', $entryIDs);
                
                // get categories
-               $categories = array();
+               $categories = [];
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('entry_to_category.entryID IN (?)', array($entryIDs));
-               $conditionBuilder->add('category.userID = ?', array(0));
+               $conditionBuilder->add('entry_to_category.entryID IN (?)', [$entryIDs]);
+               $conditionBuilder->add('category.userID = ?', [0]);
                
                $sql = "SELECT          entry_to_category.* 
                        FROM            wcf".$this->dbNo."_user_blog_entry_to_category entry_to_category
@@ -1773,13 +1773,13 @@ class WBB3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       if (!isset($categories[$row['entryID']])) $categories[$row['entryID']] = array();
+                       if (!isset($categories[$row['entryID']])) $categories[$row['entryID']] = [];
                        $categories[$row['entryID']][] = $row['categoryID'];
                }
                
                // get entries
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('user_blog.entryID IN (?)', array($entryIDs));
+               $conditionBuilder->add('user_blog.entryID IN (?)', [$entryIDs]);
                
                $sql = "SELECT          user_blog.*, language.languageCode
                        FROM            wcf".$this->dbNo."_user_blog user_blog
@@ -1789,12 +1789,12 @@ class WBB3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       $additionalData = array();
+                       $additionalData = [];
                        if ($row['languageCode']) $additionalData['languageCode'] = $row['languageCode'];
                        if (isset($tags[$row['entryID']])) $additionalData['tags'] = $tags[$row['entryID']];
                        if (isset($categories[$row['entryID']])) $additionalData['categories'] = $categories[$row['entryID']];
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry')->import($row['entryID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry')->import($row['entryID'], [
                                'userID' => ($row['userID'] ?: null),
                                'username' => $row['username'],
                                'subject' => $row['subject'],
@@ -1808,7 +1808,7 @@ class WBB3xExporter extends AbstractExporter {
                                'views' => $row['views'],
                                'isPublished' => $row['isPublished'],
                                'publicationDate' => $row['publishingDate']
-                       ), $additionalData);
+                       ], $additionalData);
                }
        }
        
@@ -1842,15 +1842,15 @@ class WBB3xExporter extends AbstractExporter {
                        WHERE           commentID BETWEEN ? AND ?
                        ORDER BY        commentID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry.comment')->import($row['commentID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry.comment')->import($row['commentID'], [
                                'objectID' => $row['entryID'],
                                'userID' => $row['userID'],
                                'username' => $row['username'],
                                'message' => $row['comment'],
                                'time' => $row['time']
-                       ));
+                       ]);
                }
        }
        
@@ -1864,7 +1864,7 @@ class WBB3xExporter extends AbstractExporter {
                                AND userID <> ?
                                AND rating NOT IN (?, ?)";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('com.woltlab.wcf.user.blog.entry', 0, 0, 3));
+               $statement->execute(['com.woltlab.wcf.user.blog.entry', 0, 0, 3]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1882,14 +1882,14 @@ class WBB3xExporter extends AbstractExporter {
                                        AND rating.rating NOT IN (?, ?)
                        ORDER BY        rating.objectID, rating.userID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array('com.woltlab.wcf.user.blog.entry', 0, 0, 3));
+               $statement->execute(['com.woltlab.wcf.user.blog.entry', 0, 0, 3]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry.like')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry.like')->import(0, [
                                'objectID' => $row['objectID'],
                                'objectUserID' => ($row['objectUserID'] ?: null),
                                'userID' => $row['userID'],
                                'likeValue' => ($row['rating'] > 3 ? Like::LIKE : Like::DISLIKE)
-                       ));
+                       ]);
                }
        }
        
@@ -1915,11 +1915,11 @@ class WBB3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.gallery.category')->import($row['categoryID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.gallery.category')->import($row['categoryID'], [
                                'title' => $row['title'],
                                'parentCategoryID' => 0,
                                'showOrder' => 0
-                       ));
+                       ]);
                }
        }
        
@@ -1943,15 +1943,15 @@ class WBB3xExporter extends AbstractExporter {
                        WHERE           gallery_album.albumID BETWEEN ? AND ?
                        ORDER BY        albumID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'userID' => $row['ownerID'],
                                'username' => ($row['username'] ?: ''),
                                'title' => $row['title'],
                                'description' => $row['description'],
                                'lastUpdateTime' => $row['lastUpdateTime']
-                       );
+                       ];
                        if ($destVersion21 && $row['isPrivate']) {
                                $data['accessLevel'] = 2;
                        }
@@ -1972,13 +1972,13 @@ class WBB3xExporter extends AbstractExporter {
         */
        public function exportGalleryImages($offset, $limit) {
                // get ids
-               $imageIDs = array();
+               $imageIDs = [];
                $sql = "SELECT          photoID
                        FROM            wcf".$this->dbNo."_user_gallery
                        WHERE           photoID BETWEEN ? AND ?
                        ORDER BY        photoID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $imageIDs[] = $row['photoID'];
                }
@@ -1988,10 +1988,10 @@ class WBB3xExporter extends AbstractExporter {
                $tags = $this->getTags('com.woltlab.wcf.user.gallery.photo', $imageIDs);
                
                // get categories
-               $categories = array();
+               $categories = [];
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('photo_to_category.objectType = ?', array('photo'));
-               $conditionBuilder->add('photo_to_category.objectID IN (?)', array($imageIDs));
+               $conditionBuilder->add('photo_to_category.objectType = ?', ['photo']);
+               $conditionBuilder->add('photo_to_category.objectID IN (?)', [$imageIDs]);
                
                $sql = "SELECT          photo_to_category.*
                        FROM            wcf".$this->dbNo."_user_gallery_category_to_object photo_to_category
@@ -2001,13 +2001,13 @@ class WBB3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       if (!isset($categories[$row['objectID']])) $categories[$row['objectID']] = array();
+                       if (!isset($categories[$row['objectID']])) $categories[$row['objectID']] = [];
                        $categories[$row['objectID']][] = $row['categoryID'];
                }
                
                // get images
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('user_gallery.photoID IN (?)', array($imageIDs));
+               $conditionBuilder->add('user_gallery.photoID IN (?)', [$imageIDs]);
                
                $sql = "SELECT          user_gallery.*
                        FROM            wcf".$this->dbNo."_user_gallery user_gallery
@@ -2015,13 +2015,13 @@ class WBB3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       $additionalData = array(
-                               'fileLocation' => $this->fileSystemPath . 'images/photos/photo-' . $row['photoID'] . ($row['photoHash'] ? ('-' . $row['photoHash']) : '') . '.' . $row['fileExtension'] 
-                       );
+                       $additionalData = [
+                               'fileLocation' => $this->fileSystemPath . 'images/photos/photo-' . $row['photoID'] . ($row['photoHash'] ? ('-' . $row['photoHash']) : '') . '.' . $row['fileExtension']
+                       ];
                        if (isset($tags[$row['photoID']])) $additionalData['tags'] = $tags[$row['photoID']];
                        if (isset($categories[$row['photoID']])) $additionalData['categories'] = array_unique($categories[$row['photoID']]);
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.gallery.image')->import($row['photoID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.gallery.image')->import($row['photoID'], [
                                'userID' => ($row['ownerID'] ?: null),
                                'username' => $row['username'],
                                'albumID' => ($row['albumID'] ?: null),
@@ -2040,7 +2040,7 @@ class WBB3xExporter extends AbstractExporter {
                                'latitude' => $row['latitude'],
                                'longitude' => $row['longitude'],
                                'ipAddress' => UserUtil::convertIPv4To6($row['ipAddress'])
-                       ), $additionalData);
+                       ], $additionalData);
                }
        }
        
@@ -2060,15 +2060,15 @@ class WBB3xExporter extends AbstractExporter {
                        WHERE           commentID BETWEEN ? AND ?
                        ORDER BY        commentID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.gallery.image.comment')->import($row['commentID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.gallery.image.comment')->import($row['commentID'], [
                                'objectID' => $row['photoID'],
                                'userID' => ($row['userID'] ?: null),
                                'username' => $row['username'],
                                'message' => $row['comment'],
                                'time' => $row['time']
-                       ));
+                       ]);
                }
        }
        
@@ -2082,7 +2082,7 @@ class WBB3xExporter extends AbstractExporter {
                                AND userID <> ?
                                AND rating NOT IN (?, ?)";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('com.woltlab.wcf.user.gallery.photo', 0, 0, 3));
+               $statement->execute(['com.woltlab.wcf.user.gallery.photo', 0, 0, 3]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -2100,14 +2100,14 @@ class WBB3xExporter extends AbstractExporter {
                                        AND rating.rating NOT IN (?, ?)
                        ORDER BY        rating.objectID, rating.userID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array('com.woltlab.wcf.user.gallery.photo', 0, 0, 3));
+               $statement->execute(['com.woltlab.wcf.user.gallery.photo', 0, 0, 3]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.gallery.image.like')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.gallery.image.like')->import(0, [
                                'objectID' => $row['objectID'],
                                'objectUserID' => ($row['objectUserID'] ?: null),
                                'userID' => $row['userID'],
                                'likeValue' => ($row['rating'] > 3 ? Like::LIKE : Like::DISLIKE)
-                       ));
+                       ]);
                }
        }
        
@@ -2120,7 +2120,7 @@ class WBB3xExporter extends AbstractExporter {
                        WHERE   calendarID IN (SELECT calendarID FROM wcf".$this->dbNo."_calendar_to_group)
                                AND className <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('BirthdayEvent'));
+               $statement->execute(['BirthdayEvent']);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -2135,13 +2135,13 @@ class WBB3xExporter extends AbstractExporter {
                                        AND className <> ?
                        ORDER BY        calendarID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array('BirthdayEvent'));
+               $statement->execute(['BirthdayEvent']);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.calendar.category')->import($row['calendarID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.calendar.category')->import($row['calendarID'], [
                                'title' => $row['title'],
                                'parentCategoryID' => 0,
                                'showOrder' => 0
-                       ));
+                       ]);
                }
        }
        
@@ -2165,7 +2165,7 @@ class WBB3xExporter extends AbstractExporter {
                        WHERE           calendar_event.eventID BETWEEN ? AND ?                  
                        ORDER BY        calendar_event.eventID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $oldEventDateData = @unserialize($row['eventDate']);
                        
@@ -2176,7 +2176,7 @@ class WBB3xExporter extends AbstractExporter {
                        $repeatType = '';
                        $repeatMonthlyByMonthDay = $repeatMonthlyByWeekDay = $repeatMonthlyDayOffset = 1;
                        $repeatYearlyByMonthDay = $repeatYearlyByWeekDay = $repeatYearlyDayOffset = $repeatYearlyByMonth = 1;
-                       $repeatWeeklyByDay = array();
+                       $repeatWeeklyByDay = [];
                        $dateTime = DateUtil::getDateTimeByTimestamp($oldEventDateData['startTime']);
                        if ($oldEventDateData['repeatType'] != 'no') {
                                $repeatType = $oldEventDateData['repeatType'];
@@ -2185,7 +2185,7 @@ class WBB3xExporter extends AbstractExporter {
                                                $repeatWeeklyByDay = $oldEventDateData['repeatByDay'];
                                        }
                                        else {
-                                               $repeatWeeklyByDay = array($dateTime->format('w'));
+                                               $repeatWeeklyByDay = [$dateTime->format('w')];
                                        }
                                }
                                
@@ -2238,7 +2238,7 @@ class WBB3xExporter extends AbstractExporter {
                        if (isset($oldEventDateData['repeatEndCount']) && $oldEventDateData['repeatEndCount'] < $repeatEndCount) $repeatEndCount = $oldEventDateData['repeatEndCount'];
                        $repeatEndDate = 1395415497;
                        if (isset($oldEventDateData['repeatEndTime']) && $oldEventDateData['repeatEndTime'] < $repeatEndDate) $repeatEndDate = $oldEventDateData['repeatEndTime'];
-                       $eventDateData = array(
+                       $eventDateData = [
                                'startTime' => $oldEventDateData['startTime'],
                                'endTime' => $oldEventDateData['endTime'],
                                'isFullDay' => $oldEventDateData['isFullDay'],
@@ -2257,9 +2257,9 @@ class WBB3xExporter extends AbstractExporter {
                                'repeatEndType' => $repeatEndType,
                                'repeatEndCount' => $repeatEndCount,
                                'repeatEndDate' => $repeatEndDate
-                       );
+                       ];
                        
-                       $data = array(
+                       $data = [
                                'userID' => ($row['userID'] ?: null),
                                'username' => $row['username'],
                                'location' => $row['location'],
@@ -2274,7 +2274,7 @@ class WBB3xExporter extends AbstractExporter {
                                'enableBBCodes' => $row['enableBBCodes'],
                                'showSignature' => $row['showSignature'],
                                'eventDate' => serialize($eventDateData)
-                       );
+                       ];
                        if ($row['participationID']) {
                                $data['enableParticipation'] = 1;
                                $data['participationEndTime'] = $row['endTime'];
@@ -2283,7 +2283,7 @@ class WBB3xExporter extends AbstractExporter {
                                $data['participationIsPublic'] = $row['isPublic'];
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.calendar.event')->import($row['eventID'], $data, array('categories' => array($row['calendarID'])));
+                       ImportHandler::getInstance()->getImporter('com.woltlab.calendar.event')->import($row['eventID'], $data, ['categories' => [$row['calendarID']]]);
                }
        }
        
@@ -2323,12 +2323,12 @@ class WBB3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.calendar.event.date')->import($row['eventID'] . '-' . $row['startTime'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.calendar.event.date')->import($row['eventID'] . '-' . $row['startTime'], [
                                'eventID' => $row['eventID'],
                                'startTime' => $row['startTime'],
                                'endTime' => $row['endTime'],
                                'isFullDay' => $row['isFullDay']
-                       ));
+                       ]);
                }
        }
        
@@ -2363,16 +2363,16 @@ class WBB3xExporter extends AbstractExporter {
                $statement->execute();
                while ($row = $statement->fetchArray()) {
                        // get first event date
-                       $firstEventDateStatement->execute(array($row['eventID']));
+                       $firstEventDateStatement->execute([$row['eventID']]);
                        $startTime = $firstEventDateStatement->fetchColumn();
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.calendar.event.date.comment')->import($row['messageID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.calendar.event.date.comment')->import($row['messageID'], [
                                'objectID' => $row['eventID'] . '-' . $startTime,
                                'userID' => $row['userID'],
                                'username' => $row['username'],
                                'message' => $row['message'],
                                'time' => $row['time']
-                       ));
+                       ]);
                }
        }
        
@@ -2407,17 +2407,17 @@ class WBB3xExporter extends AbstractExporter {
                $statement->execute();
                while ($row = $statement->fetchArray()) {
                        // get first event date
-                       $firstEventDateStatement->execute(array($row['eventID']));
+                       $firstEventDateStatement->execute([$row['eventID']]);
                        $startTime = $firstEventDateStatement->fetchColumn();
                        if (!$startTime) continue;
                                
-                       ImportHandler::getInstance()->getImporter('com.woltlab.calendar.event.date.participation')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.calendar.event.date.participation')->import(0, [
                                'eventDateID' => $row['eventID'] . '-' . $startTime,
                                'userID' => $row['userID'],
                                'username' => $row['username'],
                                'decision' => $row['decision'],
                                'decisionTime' => $row['decisionTime']
-                       ));
+                       ]);
                }
        }
        
@@ -2435,7 +2435,7 @@ class WBB3xExporter extends AbstractExporter {
                                        AND messageID > ?";
                }
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($type, 0));
+               $statement->execute([$type, 0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -2457,11 +2457,11 @@ class WBB3xExporter extends AbstractExporter {
                }
                
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array($type, 0));
+               $statement->execute([$type, 0]);
                while ($row = $statement->fetchArray()) {
                        $fileLocation = $this->fileSystemPath.'attachments/attachment-'.$row['attachmentID'];
                        
-                       ImportHandler::getInstance()->getImporter($objectType)->import($row['attachmentID'], array(
+                       ImportHandler::getInstance()->getImporter($objectType)->import($row['attachmentID'], [
                                'objectID' => (!empty($row['containerID']) ? $row['containerID'] : $row['messageID']),
                                'userID' => ($row['userID'] ?: null),
                                'filename' => $row['attachmentName'],
@@ -2472,7 +2472,7 @@ class WBB3xExporter extends AbstractExporter {
                                'lastDownloadTime' => $row['lastDownloadTime'],
                                'uploadTime' => $row['uploadTime'],
                                'showOrder' => (!empty($row['showOrder']) ? $row['showOrder'] : 0)
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
@@ -2482,12 +2482,12 @@ class WBB3xExporter extends AbstractExporter {
         * @return      array
         */
        private function getExistingUserOptions() {
-               $optionsNames = array();
+               $optionsNames = [];
                $sql = "SELECT  optionName
                        FROM    wcf".WCF_N."_user_option
                        WHERE   optionName NOT LIKE ?";
                $statement = WCF::getDB()->prepareStatement($sql);
-               $statement->execute(array('option%'));
+               $statement->execute(['option%']);
                while ($row = $statement->fetchArray()) {
                        $optionsNames[] = $row['optionName'];
                }
@@ -2500,7 +2500,7 @@ class WBB3xExporter extends AbstractExporter {
                        FROM    wcf".$this->dbNo."_package
                        WHERE   package = ?";
                $statement = $this->database->prepareStatement($sql, 1);
-               $statement->execute(array($name));
+               $statement->execute([$name]);
                $row = $statement->fetchArray();
                if ($row !== false) return $row['packageVersion'];
                
@@ -2508,7 +2508,7 @@ class WBB3xExporter extends AbstractExporter {
        }
        
        private function getTags($name, array $objectIDs) {
-               $tags = array();
+               $tags = [];
                if (substr($this->getPackageVersion('com.woltlab.wcf'), 0, 3) == '1.1' && $this->getPackageVersion('com.woltlab.wcf.tagging')) {
                        // get taggable id
                        $sql = "SELECT          taggableID
@@ -2516,12 +2516,12 @@ class WBB3xExporter extends AbstractExporter {
                                WHERE           name = ?
                                ORDER BY        packageID";
                        $statement = $this->database->prepareStatement($sql, 1);
-                       $statement->execute(array($name));
+                       $statement->execute([$name]);
                        $taggableID = $statement->fetchColumn();
                        if ($taggableID) {
                                $conditionBuilder = new PreparedStatementConditionBuilder();
-                               $conditionBuilder->add('tag_to_object.taggableID = ?', array($taggableID));
-                               $conditionBuilder->add('tag_to_object.objectID IN (?)', array($objectIDs));
+                               $conditionBuilder->add('tag_to_object.taggableID = ?', [$taggableID]);
+                               $conditionBuilder->add('tag_to_object.objectID IN (?)', [$objectIDs]);
                                
                                $sql = "SELECT          tag.name, tag_to_object.objectID
                                        FROM            wcf".$this->dbNo."_tag_to_object tag_to_object
@@ -2531,7 +2531,7 @@ class WBB3xExporter extends AbstractExporter {
                                $statement = $this->database->prepareStatement($sql);
                                $statement->execute($conditionBuilder->getParameters());
                                while ($row = $statement->fetchArray()) {
-                                       if (!isset($tags[$row['objectID']])) $tags[$row['objectID']] = array();
+                                       if (!isset($tags[$row['objectID']])) $tags[$row['objectID']] = [];
                                        $tags[$row['objectID']][] = $row['name'];
                                }
                        }
index 17b18f62007fb0e1e98c7e2266ec983e7f543865..9bd7e4adb1df217db823d5a0c48d3a19c886fc7a 100644 (file)
@@ -31,12 +31,12 @@ class WBB4xExporter extends AbstractExporter {
         * board cache
         * @var array
         */
-       protected $boardCache = array();
+       protected $boardCache = [];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$methods
         */
-       protected $methods = array(
+       protected $methods = [
                'com.woltlab.wcf.user' => 'Users',
                'com.woltlab.wcf.user.group' => 'UserGroups',
                'com.woltlab.wcf.user.rank' => 'UserRanks',
@@ -88,19 +88,19 @@ class WBB4xExporter extends AbstractExporter {
                'com.woltlab.calendar.event.date.comment.response' => 'CalendarEventDateCommentResponses',
                'com.woltlab.calendar.event.date.participation' => 'CalendarEventDateParticipation',
                'com.woltlab.calendar.event.like' => 'CalendarEventLikes'
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$limits
         */
-       protected $limits = array(
+       protected $limits = [
                'com.woltlab.wcf.user' => 100,
                'com.woltlab.wcf.user.avatar' => 100,
                'com.woltlab.wcf.conversation.attachment' => 100,
                'com.woltlab.wbb.thread' => 200,
                'com.woltlab.wbb.attachment' => 100,
                'com.woltlab.wbb.acl' => 50
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\IExporter::init()
@@ -124,52 +124,52 @@ class WBB4xExporter extends AbstractExporter {
         * @see \wcf\system\exporter\IExporter::getSupportedData()
         */
        public function getSupportedData() {
-               $supportedData = array(
-                       'com.woltlab.wcf.user' => array(
+               $supportedData = [
+                       'com.woltlab.wcf.user' => [
                                'com.woltlab.wcf.user.group',
                                'com.woltlab.wcf.user.avatar',
                                'com.woltlab.wcf.user.option',
                                'com.woltlab.wcf.user.comment',
                                'com.woltlab.wcf.user.follower',
                                'com.woltlab.wcf.user.rank'
-                       ),
-                       'com.woltlab.wbb.board' => array(
+                       ],
+                       'com.woltlab.wbb.board' => [
                                'com.woltlab.wbb.acl',
                                'com.woltlab.wbb.attachment',
                                'com.woltlab.wbb.poll',
                                'com.woltlab.wbb.watchedThread',
                                'com.woltlab.wbb.like',
                                'com.woltlab.wcf.label'
-                       ),
-                       'com.woltlab.wcf.conversation' => array(
+                       ],
+                       'com.woltlab.wcf.conversation' => [
                                'com.woltlab.wcf.conversation.attachment',
                                'com.woltlab.wcf.conversation.label'
-                       ),
-                       'com.woltlab.blog.entry' => array(
+                       ],
+                       'com.woltlab.blog.entry' => [
                                'com.woltlab.blog.category',
                                'com.woltlab.blog.entry.attachment',
                                'com.woltlab.blog.entry.comment',
                                'com.woltlab.blog.entry.like'
-                       ),
-                       'com.woltlab.calendar.event' => array(
+                       ],
+                       'com.woltlab.calendar.event' => [
                                'com.woltlab.calendar.category',
                                'com.woltlab.calendar.event.attachment',
                                'com.woltlab.calendar.event.date.comment',
                                'com.woltlab.calendar.event.date.participation',
                                'com.woltlab.calendar.event.like'
-                       ),
-                       'com.woltlab.wcf.smiley' => array(),
-               );
+                       ],
+                       'com.woltlab.wcf.smiley' => [],
+               ];
                
                $gallery = PackageCache::getInstance()->getPackageByIdentifier('com.woltlab.gallery');
                if ($gallery && Package::compareVersion('2.1.0 Alpha 1', $gallery->packageVersion) != 1) {
-                       $supportedData['com.woltlab.gallery.image'] = array(
+                       $supportedData['com.woltlab.gallery.image'] = [
                                'com.woltlab.gallery.category',
                                'com.woltlab.gallery.album',
                                'com.woltlab.gallery.image.comment',
                                'com.woltlab.gallery.image.like',
                                'com.woltlab.gallery.image.marker'
-                       );
+                       ];
                }
                
                return $supportedData;
@@ -201,7 +201,7 @@ class WBB4xExporter extends AbstractExporter {
         * @see \wcf\system\exporter\IExporter::getQueue()
         */
        public function getQueue() {
-               $queue = array();
+               $queue = [];
                
                // user
                if (in_array('com.woltlab.wcf.user', $this->selectedData)) {
@@ -338,14 +338,14 @@ class WBB4xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['groupID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['groupID'], [
                                'groupName' => $row['groupName'],
                                'groupDescription' => $row['groupDescription'],
                                'groupType' => $row['groupType'],
                                'priority' => $row['priority'],
                                'userOnlineMarking' => (!empty($row['userOnlineMarking']) ? $row['userOnlineMarking'] : ''),
                                'showOnTeamPage' => (!empty($row['showOnTeamPage']) ? $row['showOnTeamPage'] : 0)
-                       ));
+                       ]);
                }
        }
        
@@ -361,7 +361,7 @@ class WBB4xExporter extends AbstractExporter {
         */
        public function exportUsers($offset, $limit) {
                // cache existing user options
-               $existingUserOptions = array();
+               $existingUserOptions = [];
                $sql = "SELECT  optionName, optionID
                        FROM    wcf".WCF_N."_user_option
                        WHERE   optionName NOT LIKE 'option%'";
@@ -372,7 +372,7 @@ class WBB4xExporter extends AbstractExporter {
                }
                
                // cache user options
-               $userOptions = array();
+               $userOptions = [];
                $sql = "SELECT  optionName, optionID
                        FROM    wcf".$this->dbNo."_user_option";
                $statement = $this->database->prepareStatement($sql);
@@ -407,9 +407,9 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           user_table.userID BETWEEN ? AND ?
                        ORDER BY        user_table.userID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'username' => $row['username'],
                                'password' => '',
                                'email' => $row['email'],
@@ -431,12 +431,12 @@ class WBB4xExporter extends AbstractExporter {
                                'profileHits' => $row['profileHits'],
                                'userTitle' => $row['userTitle'],
                                'lastActivityTime' => $row['lastActivityTime']
-                       );
-                       $additionalData = array(
+                       ];
+                       $additionalData = [
                                'groupIDs' => explode(',', $row['groupIDs']),
                                'languages' => explode(',', $row['languageCodes']),
-                               'options' => array()
-                       );
+                               'options' => []
+                       ];
                        
                        // handle user options
                        foreach ($userOptions as $optionID => $optionName) {
@@ -450,7 +450,7 @@ class WBB4xExporter extends AbstractExporter {
                        
                        // update password hash
                        if ($newUserID) {
-                               $passwordUpdateStatement->execute(array($row['password'], $newUserID));
+                               $passwordUpdateStatement->execute([$row['password'], $newUserID]);
                        }
                }
        }
@@ -477,7 +477,7 @@ class WBB4xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['rankID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['rankID'], [
                                'groupID' => $row['groupID'],
                                'requiredPoints' => $row['requiredPoints'],
                                'rankTitle' => $row['rankTitle'],
@@ -485,7 +485,7 @@ class WBB4xExporter extends AbstractExporter {
                                'rankImage' => $row['rankImage'],
                                'repeatImage' => $row['repeatImage'],
                                'requiredGender' => $row['requiredGender']
-                       ));
+                       ]);
                }
        }
        
@@ -505,13 +505,13 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           followID BETWEEN ? AND ?
                        ORDER BY        followID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, [
                                'userID' => $row['userID'],
                                'followUserID' => $row['followUserID'],
                                'time' => $row['time']
-                       ));
+                       ]);
                }
        }
        
@@ -559,9 +559,9 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           avatarID BETWEEN ? AND ?
                        ORDER BY        avatarID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import($row['avatarID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import($row['avatarID'], [
                                'avatarName' => $row['avatarName'],
                                'avatarExtension' => $row['avatarExtension'],
                                'width' => $row['width'],
@@ -570,7 +570,7 @@ class WBB4xExporter extends AbstractExporter {
                                'fileHash' => $row['fileHash'],
                                'cropX' => $row['cropX'],
                                'cropY' => $row['cropY']
-                       ), array('fileLocation' => $this->fileSystemPath . 'images/avatars/' . substr($row['fileHash'], 0, 2) . '/' . $row['avatarID'] . '-' . $row['fileHash'] . '.' . $row['avatarExtension']));
+                       ], ['fileLocation' => $this->fileSystemPath . 'images/avatars/' . substr($row['fileHash'], 0, 2) . '/' . $row['avatarID'] . '-' . $row['fileHash'] . '.' . $row['avatarExtension']]);
                }
        }
        
@@ -582,8 +582,8 @@ class WBB4xExporter extends AbstractExporter {
                $optionsNames = $this->getExistingUserOptions();
                
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('categoryName IN (SELECT categoryName FROM wcf'.$this->dbNo.'_user_option_category WHERE parentCategoryName = ?)', array('profile'));
-               if (!empty($optionsNames)) $conditionBuilder->add('optionName NOT IN (?)', array($optionsNames));
+               $conditionBuilder->add('categoryName IN (SELECT categoryName FROM wcf'.$this->dbNo.'_user_option_category WHERE parentCategoryName = ?)', ['profile']);
+               if (!empty($optionsNames)) $conditionBuilder->add('optionName NOT IN (?)', [$optionsNames]);
                
                $sql = "SELECT  COUNT(*) AS count
                        FROM    wcf".$this->dbNo."_user_option
@@ -602,8 +602,8 @@ class WBB4xExporter extends AbstractExporter {
                $optionsNames = $this->getExistingUserOptions();
                
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('categoryName IN (SELECT categoryName FROM wcf'.$this->dbNo.'_user_option_category WHERE parentCategoryName = ?)', array('profile'));
-               if (!empty($optionsNames)) $conditionBuilder->add('optionName NOT IN (?)', array($optionsNames));
+               $conditionBuilder->add('categoryName IN (SELECT categoryName FROM wcf'.$this->dbNo.'_user_option_category WHERE parentCategoryName = ?)', ['profile']);
+               if (!empty($optionsNames)) $conditionBuilder->add('optionName NOT IN (?)', [$optionsNames]);
                
                $sql = "SELECT  user_option.*, (
                                        SELECT  languageItemValue
@@ -621,7 +621,7 @@ class WBB4xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['optionID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import($row['optionID'], [
                                'categoryName' => $row['categoryName'],
                                'optionType' => $row['optionType'],
                                'defaultValue' => $row['defaultValue'],
@@ -634,7 +634,7 @@ class WBB4xExporter extends AbstractExporter {
                                'editable' => $row['editable'],
                                'visible' => $row['visible'],
                                'showOrder' => $row['showOrder']
-                       ), array('name' => ($row['name'] ?: $row['optionName'])));
+                       ], ['name' => ($row['name'] ?: $row['optionName'])]);
                }
        }
        
@@ -654,13 +654,13 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           labelID BETWEEN ? AND ?
                        ORDER BY        labelID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.label')->import($row['labelID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.label')->import($row['labelID'], [
                                'userID' => $row['userID'],
                                'label' => $row['label'],
                                'cssClassName' => $row['cssClassName']
-                       ));
+                       ]);
                }
        }
        
@@ -680,9 +680,9 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           conversationID BETWEEN ? AND ?
                        ORDER BY        conversationID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($row['conversationID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($row['conversationID'], [
                                'subject' => $row['subject'],
                                'time' => $row['time'],
                                'userID' => $row['userID'],
@@ -691,7 +691,7 @@ class WBB4xExporter extends AbstractExporter {
                                'isClosed' => $row['isClosed'],
                                'isDraft' => $row['isDraft'],
                                'draftData' => $row['draftData']
-                       ));
+                       ]);
                }
        }
        
@@ -711,9 +711,9 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           messageID BETWEEN ? AND ?
                        ORDER BY        messageID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['messageID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['messageID'], [
                                'conversationID' => $row['conversationID'],
                                'userID' => $row['userID'],
                                'username' => $row['username'],
@@ -725,7 +725,7 @@ class WBB4xExporter extends AbstractExporter {
                                'enableBBCodes' => $row['enableBBCodes'],
                                'showSignature' => $row['showSignature'],
                                'ipAddress' => $row['ipAddress']
-                       ));
+                       ]);
                }
        }
        
@@ -745,7 +745,7 @@ class WBB4xExporter extends AbstractExporter {
         * Exports conversation recipients.
         */
        public function exportConversationUsers($offset, $limit) {
-               $conversationIDs = $userID = $rows = array();
+               $conversationIDs = $userID = $rows = [];
                $sql = "SELECT          *
                        FROM            wcf".$this->dbNo."_conversation_to_user
                        ORDER BY        conversationID, participantID";
@@ -758,11 +758,11 @@ class WBB4xExporter extends AbstractExporter {
                }
                
                // get labels
-               $labels = array();
+               $labels = [];
                $conditionBuilder = new PreparedStatementConditionBuilder();
                $conditionBuilder->add('label.labelID = label_to_object.labelID');
-               $conditionBuilder->add('label_to_object.conversationID IN (?)', array($conversationIDs));
-               $conditionBuilder->add('label.userID IN (?)', array($userIDs));
+               $conditionBuilder->add('label_to_object.conversationID IN (?)', [$conversationIDs]);
+               $conditionBuilder->add('label.userID IN (?)', [$userIDs]);
                
                $sql = "SELECT          label_to_object.conversationID, label.userID, label.labelID
                        FROM            wcf".$this->dbNo."_conversation_label_to_object label_to_object,
@@ -775,14 +775,14 @@ class WBB4xExporter extends AbstractExporter {
                }
                
                foreach ($rows as $row) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, [
                                'conversationID' => $row['conversationID'],
                                'participantID' => $row['participantID'],
                                'username' => $row['username'],
                                'hideConversation' => $row['hideConversation'],
                                'isInvisible' => $row['isInvisible'],
                                'lastVisitTime' => $row['lastVisitTime']
-                       ), array('labelIDs' => (isset($labels[$row['conversationID']][$row['participantID']]) ? $labels[$row['conversationID']][$row['participantID']] : array())));
+                       ], ['labelIDs' => (isset($labels[$row['conversationID']][$row['participantID']]) ? $labels[$row['conversationID']][$row['participantID']] : [])]);
                }
        }
        
@@ -835,7 +835,7 @@ class WBB4xExporter extends AbstractExporter {
                if (!isset($this->boardCache[$parentID])) return;
                
                foreach ($this->boardCache[$parentID] as $board) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['boardID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['boardID'], [
                                'parentID' => $board['parentID'],
                                'position' => $board['position'],
                                'boardType' => $board['boardType'],
@@ -861,7 +861,7 @@ class WBB4xExporter extends AbstractExporter {
                                'clicks' => $board['clicks'],
                                'posts' => $board['posts'],
                                'threads' => $board['threads']
-                       ));
+                       ]);
                        
                        $this->exportBoardsRecursively($board['boardID']);
                }
@@ -879,13 +879,13 @@ class WBB4xExporter extends AbstractExporter {
         */
        public function exportThreads($offset, $limit) {
                // get thread ids
-               $threadIDs = $announcementIDs = array();
+               $threadIDs = $announcementIDs = [];
                $sql = "SELECT          threadID, isAnnouncement
                        FROM            wbb".$this->dbNo."_thread
                        WHERE           threadID BETWEEN ? AND ?
                        ORDER BY        threadID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $threadIDs[] = $row['threadID'];
                        if ($row['isAnnouncement']) $announcementIDs[] = $row['threadID'];
@@ -894,10 +894,10 @@ class WBB4xExporter extends AbstractExporter {
                if (empty($threadIDs)) return;
                
                // get assigned boards (for announcements)
-               $assignedBoards = array();
+               $assignedBoards = [];
                if (!empty($announcementIDs)) {
                        $conditionBuilder = new PreparedStatementConditionBuilder();
-                       $conditionBuilder->add('threadID IN (?)', array($announcementIDs));
+                       $conditionBuilder->add('threadID IN (?)', [$announcementIDs]);
                        
                        $sql = "SELECT          boardID, threadID
                                FROM            wbb".$this->dbNo."_thread_announcement
@@ -905,7 +905,7 @@ class WBB4xExporter extends AbstractExporter {
                        $statement = $this->database->prepareStatement($sql);
                        $statement->execute($conditionBuilder->getParameters());
                        while ($row = $statement->fetchArray()) {
-                               if (!isset($assignedBoards[$row['threadID']])) $assignedBoards[$row['threadID']] = array();
+                               if (!isset($assignedBoards[$row['threadID']])) $assignedBoards[$row['threadID']] = [];
                                $assignedBoards[$row['threadID']][] = $row['boardID'];
                        }
                }
@@ -918,7 +918,7 @@ class WBB4xExporter extends AbstractExporter {
                
                // get threads
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('threadID IN (?)', array($threadIDs));
+               $conditionBuilder->add('threadID IN (?)', [$threadIDs]);
                
                $sql = "SELECT          thread.*, language.languageCode
                        FROM            wbb".$this->dbNo."_thread thread
@@ -928,7 +928,7 @@ class WBB4xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'boardID' => $row['boardID'],
                                'topic' => $row['topic'],
                                'time' => $row['time'],
@@ -946,8 +946,8 @@ class WBB4xExporter extends AbstractExporter {
                                'deleteTime' => $row['deleteTime'],
                                'lastPostTime' => $row['lastPostTime'],
                                'hasLabels' => $row['hasLabels']
-                       );
-                       $additionalData = array();
+                       ];
+                       $additionalData = [];
                        if ($row['languageCode']) $additionalData['languageCode'] = $row['languageCode'];
                        if (!empty($assignedBoards[$row['threadID']])) $additionalData['assignedBoards'] = $assignedBoards[$row['threadID']];
                        if (isset($labels[$row['threadID']])) $additionalData['labels'] = $labels[$row['threadID']];
@@ -973,9 +973,9 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           postID BETWEEN ? AND ?
                        ORDER BY        postID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['postID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['postID'], [
                                'threadID' => $row['threadID'],
                                'userID' => $row['userID'],
                                'username' => $row['username'],
@@ -997,7 +997,7 @@ class WBB4xExporter extends AbstractExporter {
                                'showSignature' => $row['showSignature'],
                                'ipAddress' => $row['ipAddress'],
                                'deleteTime' => $row['deleteTime']
-                       ));
+                       ]);
                }
        }
        
@@ -1023,7 +1023,7 @@ class WBB4xExporter extends AbstractExporter {
                        FROM    wcf".$this->dbNo."_user_object_watch
                        WHERE   objectTypeID = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.user.objectWatch', 'com.woltlab.wbb.thread')));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.user.objectWatch', 'com.woltlab.wbb.thread')]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1037,13 +1037,13 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           objectTypeID = ?
                        ORDER BY        watchID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.user.objectWatch', 'com.woltlab.wbb.thread')));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.user.objectWatch', 'com.woltlab.wbb.thread')]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import(0, [
                                'objectID' => $row['objectID'],
                                'userID' => $row['userID'],
                                'notification' => $row['notification']
-                       ));
+                       ]);
                }
        }
        
@@ -1055,7 +1055,7 @@ class WBB4xExporter extends AbstractExporter {
                        FROM    wcf".$this->dbNo."_poll
                        WHERE   objectTypeID = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.poll', 'com.woltlab.wbb.post')));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.poll', 'com.woltlab.wbb.post')]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1069,9 +1069,9 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           objectTypeID = ?
                        ORDER BY        pollID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.poll', 'com.woltlab.wbb.post')));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.poll', 'com.woltlab.wbb.post')]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['pollID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['pollID'], [
                                'objectID' => $row['objectID'],
                                'question' => $row['question'],
                                'time' => $row['time'],
@@ -1082,7 +1082,7 @@ class WBB4xExporter extends AbstractExporter {
                                'resultsRequireVote' => $row['resultsRequireVote'],
                                'maxVotes' => $row['maxVotes'],
                                'votes' => $row['votes']
-                       ));
+                       ]);
                }
        }
        
@@ -1098,7 +1098,7 @@ class WBB4xExporter extends AbstractExporter {
                                        WHERE   objectTypeID = ?
                                )";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.poll', 'com.woltlab.wbb.post')));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.poll', 'com.woltlab.wbb.post')]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1116,14 +1116,14 @@ class WBB4xExporter extends AbstractExporter {
                                        )
                        ORDER BY        optionID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.poll', 'com.woltlab.wbb.post')));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.poll', 'com.woltlab.wbb.post')]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['optionID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['optionID'], [
                                'pollID' => $row['pollID'],
                                'optionValue' => $row['optionValue'],
                                'showOrder' => $row['showOrder'],
                                'votes' => $row['votes']
-                       ));
+                       ]);
                }
        }
        
@@ -1139,7 +1139,7 @@ class WBB4xExporter extends AbstractExporter {
                                        WHERE   objectTypeID = ?
                                )";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.poll', 'com.woltlab.wbb.post')));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.poll', 'com.woltlab.wbb.post')]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1157,13 +1157,13 @@ class WBB4xExporter extends AbstractExporter {
                                        )
                        ORDER BY        optionID, userID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.poll', 'com.woltlab.wbb.post')));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.poll', 'com.woltlab.wbb.post')]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, [
                                'pollID' => $row['pollID'],
                                'optionID' => $row['optionID'],
                                'userID' => $row['userID']
-                       ));
+                       ]);
                }
        }
        
@@ -1198,18 +1198,18 @@ class WBB4xExporter extends AbstractExporter {
         */
        public function exportLabels($offset, $limit) {
                // get labels array($this->getObjectTypeID('com.woltlab.wcf.label.object', 'com.woltlab.wbb.thread'))
-               $labels = array();
+               $labels = [];
                $sql = "SELECT  *
                        FROM    wcf".$this->dbNo."_label";
                $statement = $this->database->prepareStatement($sql);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       if (!isset($labels[$row['groupID']])) $labels[$row['groupID']] = array();
+                       if (!isset($labels[$row['groupID']])) $labels[$row['groupID']] = [];
                        $labels[$row['groupID']][] = $row;
                }
                
                // get label groups
-               $labelGroups = array();
+               $labelGroups = [];
                $sql = "SELECT  *
                        FROM    wcf".$this->dbNo."_label_group";
                $statement = $this->database->prepareStatement($sql);
@@ -1219,14 +1219,14 @@ class WBB4xExporter extends AbstractExporter {
                }
                
                // get board ids
-               $boardIDs = array();
+               $boardIDs = [];
                $sql = "SELECT  *
                        FROM    wcf".$this->dbNo."_label_group_to_object
                        WHERE   objectTypeID = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.label.objectType', 'com.woltlab.wbb.board')));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.label.objectType', 'com.woltlab.wbb.board')]);
                while ($row = $statement->fetchArray()) {
-                       if (!isset($boardIDs[$row['groupID']])) $boardIDs[$row['groupID']] = array();
+                       if (!isset($boardIDs[$row['groupID']])) $boardIDs[$row['groupID']] = [];
                        $boardIDs[$row['groupID']][] = $row['objectID'];
                }
                
@@ -1235,18 +1235,18 @@ class WBB4xExporter extends AbstractExporter {
                                
                        foreach ($labelGroups as $labelGroup) {
                                // import label group
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label.group')->import($labelGroup['groupID'], array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label.group')->import($labelGroup['groupID'], [
                                        'groupName' => $labelGroup['groupName']
-                               ), array('objects' => array($objectType->objectTypeID => (!empty($boardIDs[$labelGroup['groupID']]) ? $boardIDs[$labelGroup['groupID']] : array()))));
+                               ], ['objects' => [$objectType->objectTypeID => (!empty($boardIDs[$labelGroup['groupID']]) ? $boardIDs[$labelGroup['groupID']] : [])]]);
                                
                                // import labels
                                if (!empty($labels[$labelGroup['groupID']])) {
                                        foreach ($labels[$labelGroup['groupID']] as $label) {
-                                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label')->import($label['labelID'], array(
+                                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label')->import($label['labelID'], [
                                                        'groupID' => $labelGroup['groupID'],
                                                        'label' => $label['label'],
                                                        'cssClassName' => $label['cssClassName']
-                                               ));
+                                               ]);
                                        }
                                }
                        }
@@ -1290,16 +1290,16 @@ class WBB4xExporter extends AbstractExporter {
                        )
                        ORDER BY        optionID, objectID, userID, groupID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array($objectTypeID, $objectTypeID));
+               $statement->execute([$objectTypeID, $objectTypeID]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'objectID' => $row['objectID'],
                                'optionValue' => $row['optionValue']
-                       );
+                       ];
                        if ($row['userID']) $data['userID'] = $row['userID'];
                        if ($row['groupID']) $data['groupID'] = $row['groupID'];
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, $data, array('optionName' => $row['optionName']));
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, $data, ['optionName' => $row['optionName']]);
                }
        }
        
@@ -1327,13 +1327,13 @@ class WBB4xExporter extends AbstractExporter {
                while ($row = $statement->fetchArray()) {
                        $fileLocation = $this->fileSystemPath . $row['smileyPath'];
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley')->import($row['smileyID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley')->import($row['smileyID'], [
                                'categoryID' => $row['categoryID'],
                                'smileyTitle' => $row['smileyTitle'],
                                'smileyCode' => $row['smileyCode'],
                                'aliases' => $row['aliases'],
                                'showOrder' => $row['showOrder']
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
@@ -1345,7 +1345,7 @@ class WBB4xExporter extends AbstractExporter {
                        FROM    wcf".$this->dbNo."_category
                        WHERE   objectTypeID = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.category', 'com.woltlab.wcf.bbcode.smiley')));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.category', 'com.woltlab.wcf.bbcode.smiley')]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1359,16 +1359,16 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           objectTypeID = ?                
                        ORDER BY        categoryID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.category', 'com.woltlab.wcf.bbcode.smiley')));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.category', 'com.woltlab.wcf.bbcode.smiley')]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley.category')->import($row['categoryID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley.category')->import($row['categoryID'], [
                                'title' => $row['title'],
                                'description' => $row['description'],
                                'parentCategoryID' => 0,
                                'showOrder' => $row['showOrder'],
                                'time' => $row['time'],
                                'isDisabled' => $row['isDisabled']
-                       ));
+                       ]);
                }
        }
        
@@ -1396,19 +1396,19 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           blogID BETWEEN ? AND ?
                        ORDER BY        blogID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $additionalData = array();
+                       $additionalData = [];
                        if ($row['languageCode']) $additionalData['languageCode'] = $row['languageCode'];
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.blog')->import($row['blogID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.blog')->import($row['blogID'], [
                                'userID' => $row['userID'],
                                'username' => $row['username'],
                                'title' => $row['title'],
                                'description' => $row['description'],
                                'accessLevel' => $row['accessLevel'],
                                'isFeatured' => $row['isFeatured']
-                       ), $additionalData);
+                       ], $additionalData);
                }
        }
        
@@ -1441,13 +1441,13 @@ class WBB4xExporter extends AbstractExporter {
                $destVersion21 = version_compare(BLOGCore::getInstance()->getPackage()->packageVersion, '2.1.0 Alpha 1', '>=');
                
                // get entry ids
-               $entryIDs = array();
+               $entryIDs = [];
                $sql = "SELECT          entryID
                        FROM            blog".$this->dbNo."_entry
                        WHERE           entryID BETWEEN ? AND ?
                        ORDER BY        entryID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $entryIDs[] = $row['entryID'];
                }
@@ -1458,9 +1458,9 @@ class WBB4xExporter extends AbstractExporter {
                $tags = $this->getTags('com.woltlab.blog.entry', $entryIDs);
                
                // get categories
-               $categories = array();
+               $categories = [];
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('entryID IN (?)', array($entryIDs));
+               $conditionBuilder->add('entryID IN (?)', [$entryIDs]);
                
                $sql = "SELECT          * 
                        FROM            blog".$this->dbNo."_entry_to_category
@@ -1468,13 +1468,13 @@ class WBB4xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       if (!isset($categories[$row['entryID']])) $categories[$row['entryID']] = array();
+                       if (!isset($categories[$row['entryID']])) $categories[$row['entryID']] = [];
                        $categories[$row['entryID']][] = $row['categoryID'];
                }
                
                // get entries
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('entry.entryID IN (?)', array($entryIDs));
+               $conditionBuilder->add('entry.entryID IN (?)', [$entryIDs]);
                
                $sql = "SELECT          entry.*, language.languageCode
                        FROM            blog".$this->dbNo."_entry entry
@@ -1484,12 +1484,12 @@ class WBB4xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       $additionalData = array();
+                       $additionalData = [];
                        if ($row['languageCode']) $additionalData['languageCode'] = $row['languageCode'];
                        if (isset($tags[$row['entryID']])) $additionalData['tags'] = $tags[$row['entryID']];
                        if (isset($categories[$row['entryID']])) $additionalData['categories'] = $categories[$row['entryID']];
                        
-                       $data = array(
+                       $data = [
                                'userID' => $row['userID'],
                                'username' => $row['username'],
                                'subject' => $row['subject'],
@@ -1509,7 +1509,7 @@ class WBB4xExporter extends AbstractExporter {
                                'publicationDate' => $row['publicationDate'],
                                'ipAddress' => $row['ipAddress'],
                                'deleteTime' => $row['deleteTime']
-                       );
+                       ];
                        
                        if ($sourceVersion21 && $destVersion21) {
                                $data['blogID'] = $row['blogID'];
@@ -1597,15 +1597,15 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           albumID BETWEEN ? AND ?
                        ORDER BY        albumID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'userID' => $row['userID'],
                                'username' => ($row['username'] ?: ''),
                                'title' => $row['title'],
                                'description' => $row['description'],
                                'lastUpdateTime' => $row['lastUpdateTime']
-                       );
+                       ];
                        
                        if ($sourceVersion21 && $destVersion21) {
                                $data['accessLevel'] = $row['accessLevel'];
@@ -1648,7 +1648,7 @@ class WBB4xExporter extends AbstractExporter {
                        FROM    wcf".$this->dbNo."_package
                        WHERE   package = ?";
                $statement = $this->database->prepareStatement($sql, 1);
-               $statement->execute(array('com.woltlab.gallery'));
+               $statement->execute(['com.woltlab.gallery']);
                $packageDir = $statement->fetchColumn();
                $imageFilePath = FileUtil::getRealPath($this->fileSystemPath.'/'.$packageDir);
                
@@ -1658,13 +1658,13 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           imageID BETWEEN ? AND ?
                        ORDER BY        imageID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                
-               $imageIDs = $images = array();
+               $imageIDs = $images = [];
                while ($row = $statement->fetchArray()) {
                        $imageIDs[] = $row['imageID'];
                        
-                       $images[$row['imageID']] = array(
+                       $images[$row['imageID']] = [
                                'tmpHash' => $row['tmpHash'],
                                'userID' => $row['userID'],
                                'username' => $row['username'],
@@ -1703,10 +1703,10 @@ class WBB4xExporter extends AbstractExporter {
                                'isDeleted' => $row['isDeleted'],
                                'deleteTime' => $row['deleteTime'],
                                'exifData' => $row['exifData'],
-                       );
+                       ];
                        
                        if ($sourceVersion21 && $destVersion21) {
-                               $images[$row['imageID']] = array_merge($images[$row['imageID']], array(
+                               $images[$row['imageID']] = array_merge($images[$row['imageID']], [
                                        'enableSmilies' => $row['enableSmilies'],
                                        'enableHtml' => $row['enableHtml'],
                                        'enableBBCodes' => $row['enableBBCodes'],
@@ -1715,7 +1715,7 @@ class WBB4xExporter extends AbstractExporter {
                                        'hasMarkers' => $row['hasMarkers'],
                                        'showOrder' => $row['showOrder'],
                                        'hasOriginalWatermark' => $row['hasOriginalWatermark']
-                               ));
+                               ]);
                        }
                }
                
@@ -1725,9 +1725,9 @@ class WBB4xExporter extends AbstractExporter {
                $tags = $this->getTags('com.woltlab.gallery.image', $imageIDs);
                
                // fetch categories
-               $categories = array();
+               $categories = [];
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('imageID IN (?)', array($imageIDs));
+               $conditionBuilder->add('imageID IN (?)', [$imageIDs]);
                
                $sql = "SELECT          *
                        FROM            gallery".$this->dbNo."_image_to_category
@@ -1736,15 +1736,15 @@ class WBB4xExporter extends AbstractExporter {
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
                        if (!isset($categories[$row['imageID']])) {
-                               $categories[$row['imageID']] = array();
+                               $categories[$row['imageID']] = [];
                        }
                        $categories[$row['imageID']][] = $row['categoryID'];
                }
                
                foreach ($images as $imageID => $imageData) {
-                       $additionalData = array(
+                       $additionalData = [
                                'fileLocation' => $imageFilePath .'/userImages/' . substr($imageData['fileHash'], 0, 2) . '/' . ($imageID) . '-' . $imageData['fileHash'] . '.' . $imageData['fileExtension']
-                       );
+                       ];
                        
                        if (isset($categories[$imageID])) {
                                $additionalData['categories'] = $categories[$imageID];
@@ -1779,15 +1779,15 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           markerID BETWEEN ? AND ?
                        ORDER BY        markerID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.gallery.image.marker')->import($row['markerID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.gallery.image.marker')->import($row['markerID'], [
                                'imageID' => $row['imageID'],
                                'positionX' => $row['positionX'],
                                'positionY' => $row['positionY'],
                                'userID' => $row['userID'],
                                'description' => $row['description']
-                       ));
+                       ]);
                }
        }
        
@@ -1845,13 +1845,13 @@ class WBB4xExporter extends AbstractExporter {
         */
        public function exportCalendarEvents($offset, $limit) {
                // get event ids
-               $eventIDs = array();
+               $eventIDs = [];
                $sql = "SELECT          eventID
                        FROM            calendar".$this->dbNo."_event
                        WHERE           eventID BETWEEN ? AND ?
                        ORDER BY        eventID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        $eventIDs[] = $row['eventID'];
                }
@@ -1862,9 +1862,9 @@ class WBB4xExporter extends AbstractExporter {
                $tags = $this->getTags('com.woltlab.calendar.event', $eventIDs);
                
                // get categories
-               $categories = array();
+               $categories = [];
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('eventID IN (?)', array($eventIDs));
+               $conditionBuilder->add('eventID IN (?)', [$eventIDs]);
                
                $sql = "SELECT          *
                        FROM            calendar".$this->dbNo."_event_to_category
@@ -1872,13 +1872,13 @@ class WBB4xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       if (!isset($categories[$row['eventID']])) $categories[$row['eventID']] = array();
+                       if (!isset($categories[$row['eventID']])) $categories[$row['eventID']] = [];
                        $categories[$row['eventID']][] = $row['categoryID'];
                }
                
                // get event
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('event.eventID IN (?)', array($eventIDs));
+               $conditionBuilder->add('event.eventID IN (?)', [$eventIDs]);
                $sql = "SELECT          event.*, language.languageCode
                        FROM            calendar".$this->dbNo."_event event
                        LEFT JOIN       wcf".$this->dbNo."_language language
@@ -1887,12 +1887,12 @@ class WBB4xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       $additionalData = array();
+                       $additionalData = [];
                        if ($row['languageCode']) $additionalData['languageCode'] = $row['languageCode'];
                        if (isset($tags[$row['eventID']])) $additionalData['tags'] = $tags[$row['eventID']];
                        if (isset($categories[$row['eventID']])) $additionalData['categories'] = $categories[$row['eventID']];
                        
-                       $data = array(
+                       $data = [
                                'userID' => $row['userID'],
                                'username' => $row['username'],
                                'subject' => $row['subject'],
@@ -1919,7 +1919,7 @@ class WBB4xExporter extends AbstractExporter {
                                'maxCompanions' => $row['maxCompanions'],
                                'participationIsChangeable' => $row['participationIsChangeable'],
                                'participationIsPublic' => $row['participationIsPublic']
-                       );
+                       ];
                                
                        ImportHandler::getInstance()->getImporter('com.woltlab.calendar.event')->import($row['eventID'], $data, $additionalData);
                }
@@ -1941,15 +1941,15 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           eventDateID BETWEEN ? AND ?
                        ORDER BY        eventDateID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.calendar.event.date')->import($row['eventDateID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.calendar.event.date')->import($row['eventDateID'], [
                                'eventID' => $row['eventID'],
                                'startTime' => $row['startTime'],
                                'endTime' => $row['endTime'],
                                'isFullDay' => $row['isFullDay'],
                                'participants' => $row['participants']
-                       ));
+                       ]);
                }
        }
        
@@ -1969,9 +1969,9 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           participationID BETWEEN ? AND ?
                        ORDER BY        participationID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.calendar.event.date.participation')->import($row['participationID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.calendar.event.date.participation')->import($row['participationID'], [
                                'eventDateID' => $row['eventDateID'],
                                'userID' => $row['userID'],
                                'username' => $row['username'],
@@ -1979,7 +1979,7 @@ class WBB4xExporter extends AbstractExporter {
                                'decisionTime' => $row['decisionTime'],
                                'participants' => $row['participants'],
                                'message' => $row['message']
-                       ));
+                       ]);
                }
        }
        
@@ -2061,7 +2061,7 @@ class WBB4xExporter extends AbstractExporter {
                        FROM    wcf".$this->dbNo."_comment
                        WHERE   objectTypeID = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.comment.commentableContent', $objectType)));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.comment.commentableContent', $objectType)]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -2075,15 +2075,15 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           objectTypeID = ?
                        ORDER BY        commentID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.comment.commentableContent', $objectType)));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.comment.commentableContent', $objectType)]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter($importer)->import($row['commentID'], array(
+                       ImportHandler::getInstance()->getImporter($importer)->import($row['commentID'], [
                                'objectID' => $row['objectID'],
                                'userID' => $row['userID'],
                                'username' => $row['username'],
                                'message' => $row['message'],
                                'time' => $row['time']
-                       ));
+                       ]);
                }
        }
        
@@ -2095,7 +2095,7 @@ class WBB4xExporter extends AbstractExporter {
                        FROM    wcf".$this->dbNo."_comment_response
                        WHERE   commentID IN (SELECT commentID FROM wcf".$this->dbNo."_comment WHERE objectTypeID = ?)";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.comment.commentableContent', $objectType)));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.comment.commentableContent', $objectType)]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -2109,15 +2109,15 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           commentID IN (SELECT commentID FROM wcf".$this->dbNo."_comment WHERE objectTypeID = ?)
                        ORDER BY        responseID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.comment.commentableContent', $objectType)));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.comment.commentableContent', $objectType)]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter($importer)->import($row['responseID'], array(
+                       ImportHandler::getInstance()->getImporter($importer)->import($row['responseID'], [
                                'commentID' => $row['commentID'],
                                'time' => $row['time'],
                                'userID' => $row['userID'],
                                'username' => $row['username'],
                                'message' => $row['message'],
-                       ));
+                       ]);
                }
        }
        
@@ -2129,7 +2129,7 @@ class WBB4xExporter extends AbstractExporter {
                        FROM    wcf".$this->dbNo."_like
                        WHERE   objectTypeID = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.like.likeableObject', $objectType)));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.like.likeableObject', $objectType)]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -2143,15 +2143,15 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           objectTypeID = ?
                        ORDER BY        likeID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.like.likeableObject', $objectType)));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.like.likeableObject', $objectType)]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter($importer)->import(0, array(
+                       ImportHandler::getInstance()->getImporter($importer)->import(0, [
                                'objectID' => $row['objectID'],
                                'objectUserID' => $row['objectUserID'],
                                'userID' => $row['userID'],
                                'likeValue' => $row['likeValue'],
                                'time' => $row['time']
-                       ));
+                       ]);
                }
        }
        
@@ -2161,7 +2161,7 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE   objectTypeID = ?
                                AND objectID IS NOT NULL";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.attachment.objectType', $objectType)));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.attachment.objectType', $objectType)]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -2173,11 +2173,11 @@ class WBB4xExporter extends AbstractExporter {
                                        AND objectID IS NOT NULL
                        ORDER BY        attachmentID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.attachment.objectType', $objectType)));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.attachment.objectType', $objectType)]);
                while ($row = $statement->fetchArray()) {
                        $fileLocation = $this->fileSystemPath . 'attachments/' . substr($row['fileHash'], 0, 2) . '/' . $row['attachmentID'] . '-' . $row['fileHash'];
                        
-                       ImportHandler::getInstance()->getImporter($importer)->import($row['attachmentID'], array(
+                       ImportHandler::getInstance()->getImporter($importer)->import($row['attachmentID'], [
                                'objectID' => $row['objectID'],
                                'userID' => ($row['userID'] ?: null),
                                'filename' => $row['filename'],
@@ -2191,7 +2191,7 @@ class WBB4xExporter extends AbstractExporter {
                                'lastDownloadTime' => $row['lastDownloadTime'],
                                'uploadTime' => $row['uploadTime'],
                                'showOrder' => $row['showOrder']
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
@@ -2201,12 +2201,12 @@ class WBB4xExporter extends AbstractExporter {
         * @return      array
         */
        private function getExistingUserOptions() {
-               $optionsNames = array();
+               $optionsNames = [];
                $sql = "SELECT  optionName
                        FROM    wcf".WCF_N."_user_option
                        WHERE   optionName NOT LIKE ?";
                $statement = WCF::getDB()->prepareStatement($sql);
-               $statement->execute(array('option%'));
+               $statement->execute(['option%']);
                while ($row = $statement->fetchArray()) {
                        $optionsNames[] = $row['optionName'];
                }
@@ -2219,7 +2219,7 @@ class WBB4xExporter extends AbstractExporter {
                        FROM    wcf".$this->dbNo."_package
                        WHERE   package = ?";
                $statement = $this->database->prepareStatement($sql, 1);
-               $statement->execute(array($name));
+               $statement->execute([$name]);
                $row = $statement->fetchArray();
                if ($row !== false) return $row['packageVersion'];
                
@@ -2227,10 +2227,10 @@ class WBB4xExporter extends AbstractExporter {
        }
        
        private function getTags($objectType, array $objectIDs) {
-               $tags = array();
+               $tags = [];
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('tag_to_object.objectTypeID = ?', array($this->getObjectTypeID('com.woltlab.wcf.tagging.taggableObject', $objectType)));
-               $conditionBuilder->add('tag_to_object.objectID IN (?)', array($objectIDs));
+               $conditionBuilder->add('tag_to_object.objectTypeID = ?', [$this->getObjectTypeID('com.woltlab.wcf.tagging.taggableObject', $objectType)]);
+               $conditionBuilder->add('tag_to_object.objectID IN (?)', [$objectIDs]);
                
                $sql = "SELECT          tag.name, tag_to_object.objectID
                        FROM            wcf".$this->dbNo."_tag_to_object tag_to_object
@@ -2240,7 +2240,7 @@ class WBB4xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       if (!isset($tags[$row['objectID']])) $tags[$row['objectID']] = array();
+                       if (!isset($tags[$row['objectID']])) $tags[$row['objectID']] = [];
                        $tags[$row['objectID']][] = $row['name'];
                }
                
@@ -2248,10 +2248,10 @@ class WBB4xExporter extends AbstractExporter {
        }
        
        private function getLabels($objectType, array $objectIDs) {
-               $labels = array();
+               $labels = [];
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('objectTypeID = ?', array($this->getObjectTypeID('com.woltlab.wcf.label.object', $objectType)));
-               $conditionBuilder->add('objectID IN (?)', array($objectIDs));
+               $conditionBuilder->add('objectTypeID = ?', [$this->getObjectTypeID('com.woltlab.wcf.label.object', $objectType)]);
+               $conditionBuilder->add('objectID IN (?)', [$objectIDs]);
                
                $sql = "SELECT          labelID, objectID
                        FROM            wcf".$this->dbNo."_label_object
@@ -2259,7 +2259,7 @@ class WBB4xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       if (!isset($labels[$row['objectID']])) $labels[$row['objectID']] = array();
+                       if (!isset($labels[$row['objectID']])) $labels[$row['objectID']] = [];
                        $labels[$row['objectID']][] = $row['labelID'];
                }
                
@@ -2274,7 +2274,7 @@ class WBB4xExporter extends AbstractExporter {
                                        SELECT definitionID FROM wcf".$this->dbNo."_object_type_definition WHERE definitionName = ?
                                )";
                $statement = $this->database->prepareStatement($sql, 1);
-               $statement->execute(array($objectTypeName, $definitionName));
+               $statement->execute([$objectTypeName, $definitionName]);
                $row = $statement->fetchArray();
                if ($row !== false) return $row['objectTypeID'];
                
@@ -2286,7 +2286,7 @@ class WBB4xExporter extends AbstractExporter {
                        FROM    wcf".$this->dbNo."_category
                        WHERE   objectTypeID = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.category', $objectType)));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.category', $objectType)]);
                
                return $statement->fetchColumn();
        }
@@ -2297,16 +2297,16 @@ class WBB4xExporter extends AbstractExporter {
                        WHERE           objectTypeID = ?
                        ORDER BY        parentCategoryID, categoryID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array($this->getObjectTypeID('com.woltlab.wcf.category', $objectType)));
+               $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.category', $objectType)]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter($importer)->import($row['categoryID'], array(
+                       ImportHandler::getInstance()->getImporter($importer)->import($row['categoryID'], [
                                'title' => $row['title'],
                                'description' => $row['description'],
                                'parentCategoryID' => $row['parentCategoryID'],
                                'showOrder' => $row['showOrder'],
                                'time' => $row['time'],
                                'isDisabled' => $row['isDisabled']
-                       ));
+                       ]);
                }
        }
 }
index c40ec8f5615fd1478082a0c715f5d745c3783616..bdcce9bf56cc6221e7ecbd44bb0a7c601bfa01e3 100644 (file)
@@ -20,39 +20,39 @@ class WordPress3xExporter extends AbstractExporter {
         * category cache
         * @var array
         */
-       protected $categoryCache = array();
+       protected $categoryCache = [];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$methods
         */
-       protected $methods = array(
+       protected $methods = [
                'com.woltlab.wcf.user' => 'Users',
                'com.woltlab.blog.category' => 'BlogCategories',
                'com.woltlab.blog.entry' => 'BlogEntries',
                'com.woltlab.blog.entry.comment' => 'BlogComments',
                'com.woltlab.blog.entry.attachment' => 'BlogAttachments'
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\IExporter::getSupportedData()
         */
        public function getSupportedData() {
-               return array(
-                       'com.woltlab.wcf.user' => array(
-                       ),
-                       'com.woltlab.blog.entry' => array(
+               return [
+                       'com.woltlab.wcf.user' => [
+                       ],
+                       'com.woltlab.blog.entry' => [
                                'com.woltlab.blog.category',
                                'com.woltlab.blog.entry.comment',
                                'com.woltlab.blog.entry.attachment'
-                       )
-               );
+                       ]
+               ];
        }
        
        /**
         * @see \wcf\system\exporter\IExporter::getQueue()
         */
        public function getQueue() {
-               $queue = array();
+               $queue = [];
                
                // user
                if (in_array('com.woltlab.wcf.user', $this->selectedData)) {
@@ -122,21 +122,21 @@ class WordPress3xExporter extends AbstractExporter {
                        WHERE           ID BETWEEN ? AND ?
                        ORDER BY        ID";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'username' => $row['user_login'],
                                'password' => '',
                                'email' => $row['user_email'],
                                'registrationDate' => @strtotime($row['user_registered'])
-                       );
+                       ];
                        
                        // import user
                        $newUserID = ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user')->import($row['ID'], $data);
                        
                        // update password hash
                        if ($newUserID) {
-                               $passwordUpdateStatement->execute(array('phpass:'.$row['user_pass'].':', $newUserID));
+                               $passwordUpdateStatement->execute(['phpass:'.$row['user_pass'].':', $newUserID]);
                        }
                }
        }
@@ -149,7 +149,7 @@ class WordPress3xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."term_taxonomy
                        WHERE   taxonomy = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('category'));
+               $statement->execute(['category']);
                $row = $statement->fetchArray();
                return ($row['count'] ? 1 : 0);
        }
@@ -165,7 +165,7 @@ class WordPress3xExporter extends AbstractExporter {
                        WHERE           term_taxonomy.taxonomy = ?
                        ORDER BY        term_taxonomy.parent, term_taxonomy.term_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('category'));
+               $statement->execute(['category']);
                while ($row = $statement->fetchArray()) {
                        $this->categoryCache[$row['parent']][] = $row;
                }
@@ -180,11 +180,11 @@ class WordPress3xExporter extends AbstractExporter {
                if (!isset($this->categoryCache[$parentID])) return;
                
                foreach ($this->categoryCache[$parentID] as $category) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.category')->import($category['term_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.category')->import($category['term_id'], [
                                'title' => StringUtil::decodeHTML($category['name']),
                                'parentCategoryID' => $category['parent'],
                                'showOrder' => 0
-                       ));
+                       ]);
                                
                        $this->exportBlogCategoriesRecursively($category['term_id']);
                }
@@ -198,7 +198,7 @@ class WordPress3xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."posts
                        WHERE   post_type = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('post'));
+               $statement->execute(['post']);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -208,24 +208,24 @@ class WordPress3xExporter extends AbstractExporter {
         */
        public function exportBlogEntries($offset, $limit) {
                // get entry ids
-               $entryIDs = array();
+               $entryIDs = [];
                $sql = "SELECT          ID
                        FROM            ".$this->databasePrefix."posts
                        WHERE           post_type = ?
                                        AND post_status IN (?, ?, ?, ?, ?, ?)
                        ORDER BY        ID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array('post', 'publish', 'pending', 'draft', 'future', 'private', 'trash'));
+               $statement->execute(['post', 'publish', 'pending', 'draft', 'future', 'private', 'trash']);
                while ($row = $statement->fetchArray()) {
                        $entryIDs[] = $row['ID'];
                }
                
                // get tags
-               $tags = array();
+               $tags = [];
                $conditionBuilder = new PreparedStatementConditionBuilder();
                $conditionBuilder->add('term_taxonomy.term_taxonomy_id = term_relationships.term_taxonomy_id');
-               $conditionBuilder->add('term_relationships.object_id IN (?)', array($entryIDs));
-               $conditionBuilder->add('term_taxonomy.taxonomy = ?', array('post_tag'));
+               $conditionBuilder->add('term_relationships.object_id IN (?)', [$entryIDs]);
+               $conditionBuilder->add('term_taxonomy.taxonomy = ?', ['post_tag']);
                $conditionBuilder->add('term.term_id IS NOT NULL');
                $sql = "SELECT          term.name, term_relationships.object_id
                        FROM            ".$this->databasePrefix."term_relationships term_relationships,
@@ -236,16 +236,16 @@ class WordPress3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       if (!isset($tags[$row['object_id']])) $tags[$row['object_id']] = array();
+                       if (!isset($tags[$row['object_id']])) $tags[$row['object_id']] = [];
                        $tags[$row['object_id']][] = $row['name'];
                }
                
                // get categories
-               $categories = array();
+               $categories = [];
                $conditionBuilder = new PreparedStatementConditionBuilder();
                $conditionBuilder->add('term_taxonomy.term_taxonomy_id = term_relationships.term_taxonomy_id');
-               $conditionBuilder->add('term_relationships.object_id IN (?)', array($entryIDs));
-               $conditionBuilder->add('term_taxonomy.taxonomy = ?', array('category'));
+               $conditionBuilder->add('term_relationships.object_id IN (?)', [$entryIDs]);
+               $conditionBuilder->add('term_taxonomy.taxonomy = ?', ['category']);
                $sql = "SELECT          term_taxonomy.term_id, term_relationships.object_id
                        FROM            ".$this->databasePrefix."term_relationships term_relationships,
                                        ".$this->databasePrefix."term_taxonomy term_taxonomy
@@ -253,13 +253,13 @@ class WordPress3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       if (!isset($categories[$row['object_id']])) $categories[$row['object_id']] = array();
+                       if (!isset($categories[$row['object_id']])) $categories[$row['object_id']] = [];
                        $categories[$row['object_id']][] = $row['term_id'];
                }
                
                // get entries
                $conditionBuilder = new PreparedStatementConditionBuilder();
-               $conditionBuilder->add('post.ID IN (?)', array($entryIDs));
+               $conditionBuilder->add('post.ID IN (?)', [$entryIDs]);
                
                $sql = "SELECT          post.*, user.user_login
                        FROM            ".$this->databasePrefix."posts post
@@ -269,14 +269,14 @@ class WordPress3xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql);
                $statement->execute($conditionBuilder->getParameters());
                while ($row = $statement->fetchArray()) {
-                       $additionalData = array();
+                       $additionalData = [];
                        if (isset($tags[$row['ID']])) $additionalData['tags'] = $tags[$row['ID']];
                        if (isset($categories[$row['ID']])) $additionalData['categories'] = $categories[$row['ID']];
                        
                        $time = @strtotime($row['post_date_gmt']);
                        if (!$time) $time = @strtotime($row['post_date']);
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry')->import($row['ID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry')->import($row['ID'], [
                                'userID' => ($row['post_author'] ?: null),
                                'username' => ($row['user_login'] ?: ''),
                                'subject' => $row['post_title'],
@@ -288,7 +288,7 @@ class WordPress3xExporter extends AbstractExporter {
                                'enableBBCodes' => 0,
                                'isPublished' => ($row['post_status'] == 'publish' ? 1 : 0),
                                'isDeleted' => ($row['post_status'] == 'trash' ? 1 : 0)
-                       ), $additionalData);
+                       ], $additionalData);
                }
        }
        
@@ -300,7 +300,7 @@ class WordPress3xExporter extends AbstractExporter {
                        FROM    ".$this->databasePrefix."comments
                        WHERE   comment_approved = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(1));
+               $statement->execute([1]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -319,32 +319,32 @@ class WordPress3xExporter extends AbstractExporter {
                        WHERE   comment_approved = ?
                        ORDER BY        comment_parent, comment_ID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(1));
+               $statement->execute([1]);
                while ($row = $statement->fetchArray()) {
                        if (!$row['comment_parent']) {
-                               ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry.comment')->import($row['comment_ID'], array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry.comment')->import($row['comment_ID'], [
                                        'objectID' => $row['comment_post_ID'],
                                        'userID' => ($row['user_id'] ?: null),
                                        'username' => $row['comment_author'],
                                        'message' => StringUtil::decodeHTML($row['comment_content']),
                                        'time' => @strtotime($row['comment_date_gmt'])
-                               ));
+                               ]);
                        }
                        else {
                                $parentID = $row['comment_parent'];
                                
                                do {
-                                       $parentCommentStatement->execute(array($parentID));
+                                       $parentCommentStatement->execute([$parentID]);
                                        $row2 = $parentCommentStatement->fetchArray();
                                        
                                        if (!$row2['comment_parent']) {
-                                               ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry.comment.response')->import($row['comment_ID'], array(
+                                               ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry.comment.response')->import($row['comment_ID'], [
                                                        'commentID' => $row2['comment_ID'],
                                                        'userID' => ($row['user_id'] ?: null),
                                                        'username' => $row['comment_author'],
                                                        'message' => StringUtil::decodeHTML($row['comment_content']),
                                                        'time' => @strtotime($row['comment_date_gmt'])
-                                               ));
+                                               ]);
                                                break;
                                        }
                                        $parentID = $row2['comment_parent'];
@@ -369,7 +369,7 @@ class WordPress3xExporter extends AbstractExporter {
                                                        AND post_status IN (?, ?, ?, ?, ?, ?)
                                        )";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('attachment', 'post', 'publish', 'pending', 'draft', 'future', 'private', 'trash'));
+               $statement->execute(['attachment', 'post', 'publish', 'pending', 'draft', 'future', 'private', 'trash']);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -391,7 +391,7 @@ class WordPress3xExporter extends AbstractExporter {
                                        )
                        ORDER BY        ID";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array('_wp_attached_file', 'attachment', 'post', 'publish', 'pending', 'draft', 'future', 'private', 'trash'));
+               $statement->execute(['_wp_attached_file', 'attachment', 'post', 'publish', 'pending', 'draft', 'future', 'private', 'trash']);
                while ($row = $statement->fetchArray()) {
                        $fileLocation = $this->fileSystemPath.'wp-content/uploads/'.$row['meta_value'];
                        
@@ -401,7 +401,7 @@ class WordPress3xExporter extends AbstractExporter {
                        $time = @strtotime($row['post_date_gmt']);
                        if (!$time) $time = @strtotime($row['post_date']);
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry.attachment')->import($row['meta_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry.attachment')->import($row['meta_id'], [
                                'objectID' => $row['post_parent'],
                                'userID' => ($row['post_author'] ?: null),
                                'filename' => basename($fileLocation),
@@ -412,7 +412,7 @@ class WordPress3xExporter extends AbstractExporter {
                                'lastDownloadTime' => 0,
                                'uploadTime' => $time,
                                'showOrder' => 0
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
index 0949ad480d4383369b63b5981f259f72901fd662..cfe90c46ed02a06763b6f10c131adffc6e39e2d0 100644 (file)
@@ -29,18 +29,18 @@ use wcf\util\UserUtil;
  * @category   Community Framework
  */
 class XF12xExporter extends AbstractExporter {
-       protected static $knownProfileFields = array('facebook', 'icq', 'twitter', 'skype');
+       protected static $knownProfileFields = ['facebook', 'icq', 'twitter', 'skype'];
        
        /**
         * board cache
         * @var array
         */
-       protected $boardCache = array();
+       protected $boardCache = [];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$methods
         */
-       protected $methods = array(
+       protected $methods = [
                'com.woltlab.wcf.user' => 'Users',
                'com.woltlab.wcf.user.group' => 'UserGroups',
                'com.woltlab.wcf.user.rank' => 'UserRanks',
@@ -72,47 +72,47 @@ class XF12xExporter extends AbstractExporter {
                'com.woltlab.blog.entry.attachment' => 'BlogAttachments',
                'com.woltlab.blog.entry.comment' => 'BlogComments',
                'com.woltlab.blog.entry.like' => 'BlogEntryLikes'
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\AbstractExporter::$limits
         */
-       protected $limits = array(
+       protected $limits = [
                'com.woltlab.wcf.user' => 200,
                'com.woltlab.wcf.user.avatar' => 100,
                'com.woltlab.wcf.user.follower' => 100
-       );
+       ];
        
        /**
         * @see \wcf\system\exporter\IExporter::getSupportedData()
         */
        public function getSupportedData() {
-               return array(
-                       'com.woltlab.wcf.user' => array(
+               return [
+                       'com.woltlab.wcf.user' => [
                                'com.woltlab.wcf.user.group',
                                'com.woltlab.wcf.user.avatar',
                                'com.woltlab.wcf.user.option',
                                'com.woltlab.wcf.user.comment',
                                'com.woltlab.wcf.user.follower',
                                'com.woltlab.wcf.user.rank'
-                       ),
-                       'com.woltlab.wbb.board' => array(
+                       ],
+                       'com.woltlab.wbb.board' => [
                                'com.woltlab.wbb.acl',
                                'com.woltlab.wbb.attachment',
                                'com.woltlab.wbb.poll',
                                'com.woltlab.wbb.watchedThread',
                                'com.woltlab.wcf.label'
-                       ),
-                       'com.woltlab.wcf.conversation' => array(
+                       ],
+                       'com.woltlab.wcf.conversation' => [
                                'com.woltlab.wcf.conversation.label'
-                       ),
-                       'com.woltlab.blog.entry' => array(
+                       ],
+                       'com.woltlab.blog.entry' => [
                                'com.woltlab.blog.category',
                                'com.woltlab.blog.entry.attachment',
                                'com.woltlab.blog.entry.comment',
                                'com.woltlab.blog.entry.like'
-                       )
-               );
+                       ]
+               ];
        }
        
        /**
@@ -141,7 +141,7 @@ class XF12xExporter extends AbstractExporter {
         * @see \wcf\system\exporter\IExporter::getQueue()
         */
        public function getQueue() {
-               $queue = array();
+               $queue = [];
                
                // user
                if (in_array('com.woltlab.wcf.user', $this->selectedData)) {
@@ -229,12 +229,12 @@ class XF12xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['user_group_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.group')->import($row['user_group_id'], [
                                'groupName' => $row['title'],
                                'groupType' => UserGroup::OTHER,
-                               'userOnlineMarking' => ($row['username_css'] ? '<span style="'.str_replace(array("\n", "\r"), '', $row['username_css']).'">%s</span>' : '%s'),
+                               'userOnlineMarking' => ($row['username_css'] ? '<span style="'.str_replace(["\n", "\r"], '', $row['username_css']).'">%s</span>' : '%s'),
                                'priority' => $row['display_style_priority']
-                       ));
+                       ]);
                }
        }
        
@@ -273,9 +273,9 @@ class XF12xExporter extends AbstractExporter {
                        WHERE           user_table.user_id BETWEEN ? AND ?
                        ORDER BY        user_table.user_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('user', 'register', $offset + 1, $offset + $limit));
+               $statement->execute(['user', 'register', $offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'username' => $row['username'],
                                'password' => '',
                                'email' => $row['email'],
@@ -288,14 +288,14 @@ class XF12xExporter extends AbstractExporter {
                                'signatureEnableHtml' => 0,
                                'signatureEnableSmilies' => 1,
                                'lastActivityTime' => $row['last_activity']
-                       );
-                       $options = array(
+                       ];
+                       $options = [
                                'location' => $row['location'],
                                'occupation' => $row['occupation'],
                                'homepage' => $row['homepage'],
                                'aboutMe' => self::fixBBCodes($row['about']),
                                'birthday' => $row['dob_year'].'-'.$row['dob_month'].'-'.$row['dob_day']
-                       );
+                       ];
                        
                        $customFields = unserialize($row['custom_fields']);
                        
@@ -314,11 +314,11 @@ class XF12xExporter extends AbstractExporter {
                        $countryCode = '';
                        if ($row['language_code']) list($languageCode, $countryCode) = explode('-', $row['language_code'], 2);
                        
-                       $additionalData = array(
+                       $additionalData = [
                                'groupIDs' => explode(',', $row['secondary_group_ids'].','.$row['user_group_id']),
-                               'languages' => array($languageCode),
+                               'languages' => [$languageCode],
                                'options' => $options
-                       );
+                       ];
                        
                        // import user
                        $newUserID = ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user')->import($row['user_id'], $data, $additionalData);
@@ -355,7 +355,7 @@ class XF12xExporter extends AbstractExporter {
                                                $password = 'invalid:-:-';
                                        break;
                                }
-                               $passwordUpdateStatement->execute(array($password, $newUserID));
+                               $passwordUpdateStatement->execute([$password, $newUserID]);
                        }
                }
        }
@@ -365,7 +365,7 @@ class XF12xExporter extends AbstractExporter {
         */
        public function countUserOptions() {
                $condition = new PreparedStatementConditionBuilder();
-               $condition->add('field_id NOT IN (?)', array(self::$knownProfileFields));
+               $condition->add('field_id NOT IN (?)', [self::$knownProfileFields]);
                
                $sql = "SELECT  COUNT(*) AS count
                        FROM    xf_user_field
@@ -381,7 +381,7 @@ class XF12xExporter extends AbstractExporter {
         */
        public function exportUserOptions($offset, $limit) {
                $condition = new PreparedStatementConditionBuilder();
-               $condition->add('field_id NOT IN (?)', array(self::$knownProfileFields));
+               $condition->add('field_id NOT IN (?)', [self::$knownProfileFields]);
                
                $sql = "SELECT  *
                        FROM    xf_user_field
@@ -408,7 +408,7 @@ class XF12xExporter extends AbstractExporter {
                                        continue;
                        }
                                
-                       $selectOptions = array();
+                       $selectOptions = [];
                        if ($row['field_choices']) {
                                $field_choices = @unserialize($row['field_choices']);
                                if (!$field_choices) continue;
@@ -418,7 +418,7 @@ class XF12xExporter extends AbstractExporter {
                        }
                        
                        // the ID is transformed into an integer, because the importer cannot handle strings as IDs
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import(hexdec(substr(sha1($row['field_id']), 0, 7)), array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.option')->import(hexdec(substr(sha1($row['field_id']), 0, 7)), [
                                'categoryName' => 'profile.personal',
                                'optionType' => $row['field_type'],
                                'editable' => $row['user_editable'] == 'yes' ? UserOption::EDITABILITY_ALL : UserOption::EDITABILITY_ADMINISTRATOR,
@@ -427,7 +427,7 @@ class XF12xExporter extends AbstractExporter {
                                'selectOptions' => implode("\n", $selectOptions),
                                'visible' => UserOption::VISIBILITY_ALL,
                                'outputClass' => $row['field_type'] == 'select' ? 'wcf\system\option\user\SelectOptionsUserOptionOutput' : '',
-                       ), array('name' => $row['field_id']));
+                       ], ['name' => $row['field_id']]);
                }
        }
        
@@ -469,14 +469,14 @@ class XF12xExporter extends AbstractExporter {
                
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['minimum_level'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.rank')->import($row['minimum_level'], [
                                'groupID' => 2, // 2 = registered users
                                'requiredPoints' => $row['minimum_level'],
                                'rankTitle' => $row['title'],
                                'rankImage' => '',
                                'repeatImage' => 0,
                                'requiredGender' => 0 // neutral
-                       ));
+                       ]);
                }
        }
        
@@ -502,11 +502,11 @@ class XF12xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, [
                                'userID' => $row['user_id'],
                                'followUserID' => $row['follow_user_id'],
                                'time' => $row['follow_date']
-                       ));
+                       ]);
                }
        }
        
@@ -526,15 +526,15 @@ class XF12xExporter extends AbstractExporter {
                        WHERE           profile_post_id BETWEEN ? AND ?
                        ORDER BY        profile_post_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.comment')->import($row['profile_post_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.comment')->import($row['profile_post_id'], [
                                'objectID' => $row['profile_user_id'],
                                'userID' => $row['user_id'],
                                'username' => $row['username'],
                                'message' => self::fixComment($row['message']),
                                'time' => $row['post_date']
-                       ));
+                       ]);
                }
        }
        
@@ -554,15 +554,15 @@ class XF12xExporter extends AbstractExporter {
                        WHERE           profile_post_comment_id BETWEEN ? AND ?
                        ORDER BY        profile_post_comment_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.comment.response')->import($row['profile_post_comment_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.comment.response')->import($row['profile_post_comment_id'], [
                                'commentID' => $row['profile_post_id'],
                                'time' => $row['comment_date'],
                                'userID' => $row['user_id'],
                                'username' => $row['username'],
                                'message' => self::fixComment($row['message']),
-                       ));
+                       ]);
                }
        }
        
@@ -574,7 +574,7 @@ class XF12xExporter extends AbstractExporter {
                        FROM    xf_user
                        WHERE   avatar_date <> ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -588,7 +588,7 @@ class XF12xExporter extends AbstractExporter {
                        WHERE           avatar_date <> ?
                        ORDER BY        user_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                while ($row = $statement->fetchArray()) {
                        $config = $this->getConfig();
                        $location = $this->fileSystemPath.$config['externalDataPath'].'/avatars/l/'.floor($row['user_id'] / 1000).'/'.$row['user_id'].'.jpg';
@@ -606,11 +606,11 @@ class XF12xExporter extends AbstractExporter {
                                        $extension = 'gif';
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import($row['user_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.avatar')->import($row['user_id'], [
                                'avatarName' => '',
                                'avatarExtension' => $extension,
                                'userID' => $row['user_id']
-                       ), array('fileLocation' => $location));
+                       ], ['fileLocation' => $location]);
                }
        }
        
@@ -629,12 +629,12 @@ class XF12xExporter extends AbstractExporter {
                        FROM            xf_user
                        ORDER BY        user_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(''));
+               $statement->execute(['']);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.label')->import($row['userid'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.label')->import($row['userid'], [
                                'userID' => $row['user_id'],
                                'label' => 'Star'
-                       ));
+                       ]);
                }
        }
        
@@ -654,9 +654,9 @@ class XF12xExporter extends AbstractExporter {
                        WHERE           conversation_id BETWEEN ? AND ?
                        ORDER BY        conversation_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($row['conversation_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation')->import($row['conversation_id'], [
                                'subject' => $row['title'],
                                'time' => $row['start_date'],
                                'userID' => $row['user_id'],
@@ -664,7 +664,7 @@ class XF12xExporter extends AbstractExporter {
                                'isDraft' => 0,
                                'isClosed' => $row['conversation_open'] ? 0 : 1,
                                'participantCanInvite' => $row['open_invite'] ? 1 : 0
-                       ));
+                       ]);
                }
        }
        
@@ -686,16 +686,16 @@ class XF12xExporter extends AbstractExporter {
                        WHERE           message_table.message_id BETWEEN ? AND ?
                        ORDER BY        message_table.message_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['message_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['message_id'], [
                                'conversationID' => $row['conversation_id'],
                                'userID' => $row['user_id'],
                                'username' => $row['username'],
                                'message' => self::fixBBCodes($row['message']),
                                'time' => $row['message_date'],
                                'ipAddress' => $row['ip'] ? UserUtil::convertIPv4To6($row['ip']) : ''
-                       ));
+                       ]);
                }
        }
        
@@ -726,14 +726,14 @@ class XF12xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.user')->import(0, [
                                'conversationID' => $row['conversation_id'],
                                'participantID' => $row['user_id'],
                                'username' => $row['username'] ?: '',
                                'hideConversation' => ($row['recipient_state'] == 'deleted_ignored' ? Conversation::STATE_LEFT : ($row['recipient_state'] == 'deleted' ? Conversation::STATE_HIDDEN : Conversation::STATE_DEFAULT)),
                                'isInvisible' => 0,
                                'lastVisitTime' => $row['last_read_date']
-                       ), array('labelIDs' => ($row['is_starred'] ? array($row['user_id']) : array())));
+                       ], ['labelIDs' => ($row['is_starred'] ? [$row['user_id']] : [])]);
                }
        }
        
@@ -745,7 +745,7 @@ class XF12xExporter extends AbstractExporter {
                        FROM    xf_node
                        WHERE   node_type_id IN (?, ?, ?)";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('Forum', 'Category', 'LinkForum'));
+               $statement->execute(['Forum', 'Category', 'LinkForum']);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -763,10 +763,10 @@ class XF12xExporter extends AbstractExporter {
                        WHERE           node_type_id IN (?, ?, ?)
                        ORDER BY        node.lft";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('Forum', 'Category', 'LinkForum'));
+               $statement->execute(['Forum', 'Category', 'LinkForum']);
                
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($row['nodeID'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($row['nodeID'], [
                                'parentID' => ($row['parent_node_id'] ?: null),
                                'position' => $row['lft'],
                                'boardType' => ($row['node_type_id'] == 'Category' ? Board::TYPE_CATEGORY : ($row['node_type_id'] == 'Forum' ? Board::TYPE_BOARD : Board::TYPE_LINK)),
@@ -780,7 +780,7 @@ class XF12xExporter extends AbstractExporter {
                                'clicks' => $row['redirect_count'] ?: 0,
                                'posts' => $row['message_count'] ?: 0,
                                'threads' => $row['discussion_count'] ?: 0
-                       ));
+                       ]);
                }
        }
        
@@ -800,9 +800,9 @@ class XF12xExporter extends AbstractExporter {
                        WHERE           thread_id BETWEEN ? AND ?
                        ORDER BY        thread_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       $data = array(
+                       $data = [
                                'boardID' => $row['node_id'],
                                'topic' => $row['title'],
                                'time' => $row['post_date'],
@@ -814,10 +814,10 @@ class XF12xExporter extends AbstractExporter {
                                'isClosed' => $row['discussion_open'] ? 0 : 1,
                                'isDeleted' => $row['discussion_state'] == 'deleted' ? 1 : 0,
                                'deleteTime' => $row['discussion_state'] == 'deleted' ? TIME_NOW : 0
-                       );
+                       ];
                        
-                       $additionalData = array();
-                       if ($row['prefix_id']) $additionalData['labels'] = array($row['node_id'].'-'.$row['prefix_id']);
+                       $additionalData = [];
+                       if ($row['prefix_id']) $additionalData['labels'] = [$row['node_id'].'-'.$row['prefix_id']];
                        
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.thread')->import($row['thread_id'], $data, $additionalData);
                }
@@ -845,9 +845,9 @@ class XF12xExporter extends AbstractExporter {
                        WHERE           post_id BETWEEN ? AND ?
                        ORDER BY        post_id";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($offset + 1, $offset + $limit));
+               $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['post_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['post_id'], [
                                'threadID' => $row['thread_id'],
                                'userID' => $row['user_id'],
                                'username' => $row['username'],
@@ -862,7 +862,7 @@ class XF12xExporter extends AbstractExporter {
                                'enableSmilies' => 1,
                                'showSignature' => 1,
                                'ipAddress' => $row['ip'] ? UserUtil::convertIPv4To6($row['ip']) : ''
-                       ));
+                       ]);
                }
        }
        
@@ -902,10 +902,10 @@ class XF12xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.watchedThread')->import(0, [
                                'objectID' => $row['thread_id'],
                                'userID' => $row['user_id']
-                       ));
+                       ]);
                }
        }
        
@@ -917,7 +917,7 @@ class XF12xExporter extends AbstractExporter {
                        FROM    xf_poll
                        WHERE   content_type = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('thread'));
+               $statement->execute(['thread']);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -934,9 +934,9 @@ class XF12xExporter extends AbstractExporter {
                        WHERE           content_type = ?
                        ORDER BY        poll.poll_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array('thread'));
+               $statement->execute(['thread']);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['poll_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['poll_id'], [
                                'objectID' => $row['first_post_id'],
                                'question' => $row['question'],
                                'endTime' => $row['close_date'],
@@ -944,7 +944,7 @@ class XF12xExporter extends AbstractExporter {
                                'isPublic' => $row['public_votes'] ? 1 : 0,
                                'maxVotes' => isset($row['max_votes']) ? $row['max_votes'] : ($row['multiple'] ? $row['responses'] : 1),
                                'votes' => $row['voter_count']
-                       ));
+                       ]);
                }
        }
        
@@ -970,12 +970,12 @@ class XF12xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['poll_response_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option')->import($row['poll_response_id'], [
                                'pollID' => $row['poll_id'],
                                'optionValue' => $row['response'],
                                'showOrder' => $row['poll_response_id'],
                                'votes' => $row['response_vote_count']
-                       ));
+                       ]);
                }
        }
        
@@ -999,13 +999,13 @@ class XF12xExporter extends AbstractExporter {
                        FROM            xf_poll_vote
                        ORDER BY        poll_response_id, user_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll.option.vote')->import(0, [
                                'pollID' => $row['poll_id'],
                                'optionID' => $row['poll_response_id'],
                                'userID' => $row['user_id']
-                       ));
+                       ]);
                }
        }
        
@@ -1036,16 +1036,16 @@ class XF12xExporter extends AbstractExporter {
                while ($row = $statement->fetchArray()) {
                        // import label group
                        if (!ImportHandler::getInstance()->getNewID('com.woltlab.wcf.label.group', $row['node_id'])) {
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label.group')->import($row['node_id'], array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label.group')->import($row['node_id'], [
                                        'groupName' => 'labelgroup'.$row['node_id']
-                               ), array('objects' => array($objectType->objectTypeID => array(ImportHandler::getInstance()->getNewID('com.woltlab.wbb.board', $row['node_id'])))));
+                               ], ['objects' => [$objectType->objectTypeID => [ImportHandler::getInstance()->getNewID('com.woltlab.wbb.board', $row['node_id'])]]]);
                        }
                        
                        if (!ImportHandler::getInstance()->getNewID('com.woltlab.wcf.label', $row['node_id'].'-'.$row['prefix_id'])) {
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label')->import($row['node_id'].'-'.$row['prefix_id'], array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label')->import($row['node_id'].'-'.$row['prefix_id'], [
                                        'groupID' => $row['node_id'],
                                        'label' => $row['phrase_text']
-                               ));
+                               ]);
                        }
                }
        }
@@ -1060,7 +1060,7 @@ class XF12xExporter extends AbstractExporter {
                                AND     permission_value <> ?
                                AND     content_type = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('forum', 'use_int', 'node'));
+               $statement->execute(['forum', 'use_int', 'node']);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1069,27 +1069,27 @@ class XF12xExporter extends AbstractExporter {
         * Exports ACLs.
         */
        public function exportACLs($offset, $limit) {
-               static $mapping = array(
-                       'approveUnapprove' => array('canEnableThread', 'canEnablePost'),
-                       'deleteAnyPost' => array('canDeletePost'),
-                       'deleteAnyThread' => array('canDeleteThread'),
-                       'deleteOwnPost' => array('canDeleteOwnPost'),
-                       'editAnyPost' => array('canEditPost'),
-                       'editOwnPost' => array('canEditOwnPost'),
-                       'hardDeleteAnyPost' => array('canDeletePostCompletely'),
-                       'hardDeleteAnyThread' => array('canDeleteThreadCompletely'),
-                       'lockUnlockThread' => array('canCloseThread'),
-                       'manageAnyThread' => array('canMoveThread', 'canMergeThread'),
-                       'postReply' => array('canReplyThread'),
-                       'postThread' => array('canStartThread'),
-                       'stickUnstickThread' => array('canPinThread'),
-                       'undelete' => array('canRestorePost', 'canRestoreThread'),
-                       'uploadAttachments' => array('canUploadAttachment'),
-                       'viewAttachment' => array('canDownloadAttachment'),
-                       'viewContent' => array('canReadThread'),
-                       'viewDeleted' => array('canReadDeletedPost', 'canReadDeletedThread'),
-                       'votePoll' => array('canVotePoll')
-               );
+               static $mapping = [
+                       'approveUnapprove' => ['canEnableThread', 'canEnablePost'],
+                       'deleteAnyPost' => ['canDeletePost'],
+                       'deleteAnyThread' => ['canDeleteThread'],
+                       'deleteOwnPost' => ['canDeleteOwnPost'],
+                       'editAnyPost' => ['canEditPost'],
+                       'editOwnPost' => ['canEditOwnPost'],
+                       'hardDeleteAnyPost' => ['canDeletePostCompletely'],
+                       'hardDeleteAnyThread' => ['canDeleteThreadCompletely'],
+                       'lockUnlockThread' => ['canCloseThread'],
+                       'manageAnyThread' => ['canMoveThread', 'canMergeThread'],
+                       'postReply' => ['canReplyThread'],
+                       'postThread' => ['canStartThread'],
+                       'stickUnstickThread' => ['canPinThread'],
+                       'undelete' => ['canRestorePost', 'canRestoreThread'],
+                       'uploadAttachments' => ['canUploadAttachment'],
+                       'viewAttachment' => ['canDownloadAttachment'],
+                       'viewContent' => ['canReadThread'],
+                       'viewDeleted' => ['canReadDeletedPost', 'canReadDeletedThread'],
+                       'votePoll' => ['canVotePoll']
+               ];
                
                $sql = "SELECT          *
                        FROM            xf_permission_entry_content
@@ -1098,18 +1098,18 @@ class XF12xExporter extends AbstractExporter {
                                AND     content_type = ?
                        ORDER BY        permission_entry_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array('forum', 'use_int', 'node'));
+               $statement->execute(['forum', 'use_int', 'node']);
                while ($row = $statement->fetchArray()) {
                        if (!isset($mapping[$row['permission_id']])) continue;
                        
                        foreach ($mapping[$row['permission_id']] as $permission) {
-                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, array(
+                               ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, [
                                        'objectID' => $row['content_id'],
                                        ($row['user_id'] ? 'userID' : 'groupID') => $row['user_id'] ?: $row['user_group_id'],
                                        'optionValue' => $row['permission_value'] == 'content_allow' ? 1 : 0
-                               ), array(
+                               ], [
                                        'optionName' => $permission
-                               ));
+                               ]);
                        }
                }
        }
@@ -1123,7 +1123,7 @@ class XF12xExporter extends AbstractExporter {
                        FROM    xfa_blog_category
                        WHERE   user_id = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1137,13 +1137,13 @@ class XF12xExporter extends AbstractExporter {
                        WHERE           user_id = ?
                        ORDER BY        category_id ASC";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array(0));
+               $statement->execute([0]);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.category')->import($row['category_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.category')->import($row['category_id'], [
                                'title' => $row['category_name'],
                                'parentCategoryID' => 0, // by intent as Community Blog does not support arbitrary nested categories
                                'showOrder' => $row['display_order']
-                       ));
+                       ]);
                }
        }
        
@@ -1194,7 +1194,7 @@ class XF12xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       $additionalData = array();
+                       $additionalData = [];
                        if ($row['isPublished']) {
                                $additionalData['categories'] = explode(',', $row['categories']);
                        }
@@ -1203,7 +1203,7 @@ class XF12xExporter extends AbstractExporter {
                                if ($categories) $additionalData['categories'] = $categories;
                        }
                        
-                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry')->import($row['entry_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry')->import($row['entry_id'], [
                                'userID' => $row['user_id'] ?: null,
                                'username' => $row['username'] ?: '',
                                'subject' => $row['title'],
@@ -1213,7 +1213,7 @@ class XF12xExporter extends AbstractExporter {
                                'views' => $row['view_count'],
                                'isPublished' => $row['isPublished'],
                                'publicationDate' => $row['post_date']
-                       ), $additionalData);
+                       ], $additionalData);
                }
        }
        
@@ -1241,13 +1241,13 @@ class XF12xExporter extends AbstractExporter {
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
                $statement->execute();
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry.comment')->import($row['comment_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry.comment')->import($row['comment_id'], [
                                'objectID' => $row['entry_id'],
                                'userID' => $row['user_id'] ?: null,
                                'username' => $row['username'] ?: '',
                                'message' => self::fixComment($row['message']),
                                'time' => $row['post_date']
-                       ));
+                       ]);
                }
        }
        
@@ -1259,7 +1259,7 @@ class XF12xExporter extends AbstractExporter {
                        FROM    xf_liked_content
                        WHERE   content_type = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array('xfa_blog_entry'));
+               $statement->execute(['xfa_blog_entry']);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1273,15 +1273,15 @@ class XF12xExporter extends AbstractExporter {
                        WHERE           content_type = ?
                        ORDER BY        like_id ASC";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array('xfa_blog_entry'));
+               $statement->execute(['xfa_blog_entry']);
                while ($row = $statement->fetchArray()) {
-                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry.like')->import($row['like_id'], array(
+                       ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry.like')->import($row['like_id'], [
                                'objectID' => $row['content_id'],
                                'objectUserID' => $row['content_user_id'] ?: null,
                                'userID' => $row['like_user_id'],
                                'likeValue' => Like::LIKE,
                                'time' => $row['like_date']
-                       ));
+                       ]);
                }
        }
        
@@ -1298,7 +1298,7 @@ class XF12xExporter extends AbstractExporter {
                FROM    xf_attachment
                WHERE   content_type = ?";
                $statement = $this->database->prepareStatement($sql);
-               $statement->execute(array($type));
+               $statement->execute([$type]);
                $row = $statement->fetchArray();
                return $row['count'];
        }
@@ -1311,7 +1311,7 @@ class XF12xExporter extends AbstractExporter {
                WHERE           attachment.content_type = ?
                ORDER BY        attachment.attachment_id";
                $statement = $this->database->prepareStatement($sql, $limit, $offset);
-               $statement->execute(array($type));
+               $statement->execute([$type]);
                while ($row = $statement->fetchArray()) {
                        $config = self::getConfig();
                        $fileLocation = $this->fileSystemPath.$config['internalDataPath'].'/attachments/'.floor($row['data_id'] / 1000).'/'.$row['data_id'].'-'.$row['file_hash'].'.data';
@@ -1327,7 +1327,7 @@ class XF12xExporter extends AbstractExporter {
                                $row['isImage'] = $row['width'] = $row['height'] = 0;
                        }
                        
-                       ImportHandler::getInstance()->getImporter($objectType)->import($row['attachment_id'], array(
+                       ImportHandler::getInstance()->getImporter($objectType)->import($row['attachment_id'], [
                                'objectID' => $row['content_id'],
                                'userID' => ($row['user_id'] ?: null),
                                'filename' => $row['filename'],
@@ -1338,13 +1338,13 @@ class XF12xExporter extends AbstractExporter {
                                'height' => $row['height'],
                                'downloads' => $row['view_count'],
                                'uploadTime' => $row['upload_date']
-                       ), array('fileLocation' => $fileLocation));
+                       ], ['fileLocation' => $fileLocation]);
                }
        }
        
        public function getConfig() {
-               $config = array(
-                       'db' => array(
+               $config = [
+                       'db' => [
                                'adapter' => 'mysqli',
                                'host' => 'localhost',
                                'port' => '3306',
@@ -1352,34 +1352,34 @@ class XF12xExporter extends AbstractExporter {
                                'password' => '',
                                'dbname' => '',
                                'adapterNamespace' => 'Zend_Db_Adapter'
-                       ),
-                       'cache' => array(
+                       ],
+                       'cache' => [
                                'enabled' => false,
                                'cacheSessions' => false,
                                'frontend' => 'core',
-                               'frontendOptions' => array(
+                               'frontendOptions' => [
                                        'caching' => true,
                                        'cache_id_prefix' => 'xf_'
-                               ),
+                               ],
                                'backend' => 'file',
-                               'backendOptions' => array(
+                               'backendOptions' => [
                                        'file_name_prefix' => 'xf_'
-                               )
-                       ),
+                               ]
+                       ],
                        'debug' => false,
                        'enableListeners' => true,
-                       'development' => array(
+                       'development' => [
                                'directory' => '',
                                'default_addon' => ''
-                       ),
+                       ],
                        'superAdmins' => '1',
                        'globalSalt' => '1717c7e013ff20562bcc1483c1e0c8a8',
                        'jsVersion' => '',
-                       'cookie' => array(
+                       'cookie' => [
                                'prefix' => 'xf_',
                                'path' => '/',
                                'domain' => ''
-                       ),
+                       ],
                        'enableMail' => true,
                        'enableMailQueue' => true,
                        'internalDataPath' => 'internal_data',
@@ -1396,7 +1396,7 @@ class XF12xExporter extends AbstractExporter {
                        'enableTemplateModificationCallbacks' => true,
                        'enableClickjackingProtection' => true,
                        'maxImageResizePixelCount' => 20000000
-               );
+               ];
                require($this->fileSystemPath.'library/config.php');
                
                return $config;
@@ -1430,12 +1430,12 @@ class XF12xExporter extends AbstractExporter {
                        
                        $userRegex = new Regex('\[user=(\d+)\](.*?)\[/user\]', Regex::CASE_INSENSITIVE);
                        $userCallback = new Callback(function ($matches) {
-                               $userLink = LinkHandler::getInstance()->getLink('User', array(
+                               $userLink = LinkHandler::getInstance()->getLink('User', [
                                        'userID' => $matches[1],
                                        'forceFrontend' => true
-                               ));
+                               ]);
                                
-                               $userLink = str_replace(array("\\", "'"), array("\\\\", "\'"), $userLink);
+                               $userLink = str_replace(["\\", "'"], ["\\\\", "\'"], $userLink);
                                
                                return "[url='".$userLink."']".$matches[2]."[/url]";
                        });
@@ -1443,15 +1443,15 @@ class XF12xExporter extends AbstractExporter {
                        $quoteRegex = new Regex('\[quote=("?)(?P<username>[^,\]\n]*)(?:, post: (?P<postID>\d+)(?:, member: \d+)?)?\1\]', Regex::CASE_INSENSITIVE);
                        $quoteCallback = new Callback(function ($matches) {
                                if (isset($matches['username']) && $matches['username']) {
-                                       $username = str_replace(array("\\", "'"), array("\\\\", "\'"), $matches['username']);
+                                       $username = str_replace(["\\", "'"], ["\\\\", "\'"], $matches['username']);
                                        
                                        if (isset($matches['postID']) && $matches['postID']) {
-                                               $postLink = LinkHandler::getInstance()->getLink('Thread', array(
+                                               $postLink = LinkHandler::getInstance()->getLink('Thread', [
                                                        'application' => 'wbb',
                                                        'postID' => $matches['postID'],
                                                        'forceFrontend' => true
-                                               )).'#post'.$matches['postID'];
-                                               $postLink = str_replace(array("\\", "'"), array("\\\\", "\'"), $postLink);
+                                                       ]).'#post'.$matches['postID'];
+                                               $postLink = str_replace(["\\", "'"], ["\\\\", "\'"], $postLink);
                                                
                                                return "[quote='".$username."','".$postLink."']";
                                        }
@@ -1494,7 +1494,7 @@ class XF12xExporter extends AbstractExporter {
                        return '[size='.$size.']';
                }, $message);
                
-               static $map = array(
+               static $map = [
                        '[php]' => '[code=php]',
                        '[/php]' => '[/code]',
                        '[html]' => '[code=html]',
@@ -1504,7 +1504,7 @@ class XF12xExporter extends AbstractExporter {
                        '[right]' => '[align=right]',
                        '[/right]' => '[/align]',
                        '[attach=full]' => '[attach]'
-               );
+               ];
                
                // use proper WCF 2 bbcode
                $message = str_ireplace(array_keys($map), array_values($map), $message);