Remove unnecessary parentheses
authorMatthias Schmidt <gravatronics@live.com>
Sun, 31 Jul 2016 07:33:14 +0000 (09:33 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 31 Jul 2016 07:33:14 +0000 (09:33 +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 9f2cdec1737210b005192d843b8b10a811d2f198..c3658ee012a96c41a3d1ddcbde89f510ae751c0a 100644 (file)
@@ -204,10 +204,10 @@ class IPB3xExporter extends AbstractExporter {
                                'registrationDate' => $row['joined'],
                                'banned' => $row['member_banned'],
                                'registrationIpAddress' => UserUtil::convertIPv4To6($row['ip_address']),
-                               'enableGravatar' => ((!empty($row['pp_gravatar']) && $row['pp_gravatar'] == $row['email']) ? 1 : 0),
+                               'enableGravatar' => (!empty($row['pp_gravatar']) && $row['pp_gravatar'] == $row['email']) ? 1 : 0,
                                'signature' => self::fixMessage($row['signature']),
                                'profileHits' => $row['members_profile_views'],
-                               'userTitle' => ($row['title'] ?: ''),
+                               'userTitle' => $row['title'] ?: '',
                                'lastActivityTime' => $row['last_activity']
                        ];
                        
@@ -334,7 +334,7 @@ class IPB3xExporter extends AbstractExporter {
                        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')
+                               'userOnlineMarking' => !empty($row['prefix']) ? ($row['prefix'].'%s'.$row['suffix']) : '%s'
                        ]);
                }
        }
@@ -422,7 +422,7 @@ class IPB3xExporter extends AbstractExporter {
                        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'] ?: ''),
+                               'username' => $row['name'] ?: '',
                                'message' => self::fixStatusUpdate($row['status_content']),
                                'time' => $row['status_date']
                        ]);
@@ -456,7 +456,7 @@ class IPB3xExporter extends AbstractExporter {
                                'commentID' => $row['reply_status_id'],
                                'time' => $row['reply_date'],
                                'userID' => $row['reply_member_id'],
-                               'username' => ($row['name'] ?: ''),
+                               'username' => $row['name'] ?: '',
                                'message' => self::fixStatusUpdate($row['reply_content']),
                        ]);
                }
@@ -517,8 +517,8 @@ class IPB3xExporter extends AbstractExporter {
                        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'] ?: '')),
+                               'userID' => $row['mt_starter_id'] ?: null,
+                               'username' => $row['mt_is_system'] ? 'System' : ($row['name'] ?: ''),
                                'isDraft' => $row['mt_is_draft']
                        ]);
                }
@@ -549,8 +549,8 @@ class IPB3xExporter extends AbstractExporter {
                while ($row = $statement->fetchArray()) {
                        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'] ?: ''),
+                               'userID' => $row['msg_author_id'] ?: null,
+                               'username' => $row['name'] ?: '',
                                'message' => self::fixMessage($row['msg_post']),
                                'time' => $row['msg_date']
                        ]);
@@ -583,8 +583,8 @@ class IPB3xExporter extends AbstractExporter {
                        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),
+                               'username' => $row['name'] ?: '',
+                               'hideConversation' => $row['map_left_time'] ? 1 : 0,
                                'isInvisible' => 0,
                                'lastVisitTime' => $row['map_read_time']
                        ]);
@@ -649,9 +649,9 @@ class IPB3xExporter extends AbstractExporter {
                
                foreach ($this->boardCache[$parentID] as $board) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['id'], [
-                               'parentID' => ($board['parent_id'] != -1 ? $board['parent_id'] : null),
+                               '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)),
+                               'boardType' => $board['redirect_on'] ? Board::TYPE_LINK : ($board['sub_can_post'] ? Board::TYPE_BOARD : Board::TYPE_CATEGORY),
                                'title' => self::fixSubject($board['name']),
                                'description' => $board['description'],
                                'externalURL' => $board['redirect_url'],
@@ -712,10 +712,10 @@ class IPB3xExporter extends AbstractExporter {
                                'username' => $row['starter_name'],
                                'views' => $row['views'],
                                'isSticky' => $row['pinned'],
-                               'isDisabled' => ($row['approved'] == 0 ? 1 : 0),
-                               'isClosed' => ($row['state'] == 'close' ? 1 : 0),
-                               'isDeleted' => ($row['tdelete_time'] ? 1 : 0),
-                               'movedThreadID' => ($row['moved_to'] ? intval($row['moved_to']) : null),
+                               'isDisabled' => $row['approved'] == 0 ? 1 : 0,
+                               'isClosed' => $row['state'] == 'close' ? 1 : 0,
+                               'isDeleted' => $row['tdelete_time'] ? 1 : 0,
+                               'movedThreadID' => $row['moved_to'] ? intval($row['moved_to']) : null,
                                'movedTime' => $row['moved_on'],
                                'deleteTime' => $row['tdelete_time'],
                                'lastPostTime' => $row['last_post']
@@ -751,12 +751,12 @@ class IPB3xExporter extends AbstractExporter {
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.post')->import($row['pid'], [
                                'threadID' => $row['topic_id'],
                                'userID' => $row['author_id'],
-                               'username' => ($row['author_name'] ?: ''),
+                               'username' => $row['author_name'] ?: '',
                                'message' => self::fixMessage($row['post']),
                                'time' => $row['post_date'],
-                               'isDeleted' => ($row['queued'] == 3 ? 1 : 0),
-                               'isDisabled' => ($row['queued'] == 2 ? 1 : 0),
-                               'lastEditTime' => ($row['edit_time'] ?: 0),
+                               'isDeleted' => $row['queued'] == 3 ? 1 : 0,
+                               'isDisabled' => $row['queued'] == 2 ? 1 : 0,
+                               'lastEditTime' => $row['edit_time'] ?: 0,
                                'editorID' => null,
                                'editReason' => $row['post_edit_reason'],
                                'ipAddress' => UserUtil::convertIPv4To6($row['ip_address']),
@@ -834,7 +834,7 @@ class IPB3xExporter extends AbstractExporter {
                                '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),
+                               'maxVotes' => !empty($data[1]['multi']) ? count($data[1]['choice']) : 1,
                                'votes' => $row['votes']
                        ]);
                        
@@ -922,7 +922,7 @@ class IPB3xExporter extends AbstractExporter {
                while ($row = $statement->fetchArray()) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.like')->import(0, [
                                'objectID' => $row['topic_firstpost'],
-                               'objectUserID' => ($row['starter_id'] ?: null),
+                               'objectUserID' => $row['starter_id'] ?: null,
                                'userID' => $row['like_member_id'],
                                'likeValue' => Like::LIKE,
                                'time' => $row['like_added']
@@ -985,7 +985,7 @@ class IPB3xExporter extends AbstractExporter {
 
                        ImportHandler::getInstance()->getImporter($objectType)->import($row['attach_id'], [
                                'objectID' => $row['attach_rel_id'],
-                               'userID' => ($row['attach_member_id'] ?: null),
+                               'userID' => $row['attach_member_id'] ?: null,
                                'filename' => $row['attach_file'],
                                'filesize' => $row['attach_filesize'],
                                'isImage' => $row['attach_is_image'],
index de7b20d1d0a31f76fc853d2e43d2bfd79b771def..6ea7e8707dea8bb167c040990f0f4e8bc775fed6 100644 (file)
@@ -206,12 +206,12 @@ class IPB4xExporter extends AbstractExporter {
                                'password' => '',
                                'email' => $row['email'],
                                'registrationDate' => $row['joined'],
-                               'banned' => ($row['temp_ban'] == -1 ? 1 : 0),
+                               'banned' => $row['temp_ban'] == -1 ? 1 : 0,
                                'registrationIpAddress' => UserUtil::convertIPv4To6($row['ip_address']),
-                               'enableGravatar' => ((!empty($row['pp_gravatar']) && $row['pp_gravatar'] == $row['email']) ? 1 : 0),
+                               'enableGravatar' => (!empty($row['pp_gravatar']) && $row['pp_gravatar'] == $row['email']) ? 1 : 0,
                                'signature' => self::fixMessage($row['signature']),
                                'profileHits' => $row['members_profile_views'],
-                               'userTitle' => ($row['member_title'] ?: ''),
+                               'userTitle' => $row['member_title'] ?: '',
                                'lastActivityTime' => $row['last_activity']
                        ];
                        
@@ -316,7 +316,7 @@ class IPB4xExporter extends AbstractExporter {
                        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')
+                               'userOnlineMarking' => !empty($row['prefix']) ? ($row['prefix'].'%s'.$row['suffix']) : '%s'
                        ]);
                }
        }
@@ -387,7 +387,7 @@ class IPB4xExporter extends AbstractExporter {
                        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'] ?: ''),
+                               'username' => $row['name'] ?: '',
                                'message' => self::fixMessage($row['status_content']),
                                'time' => $row['status_date']
                        ]);
@@ -421,7 +421,7 @@ class IPB4xExporter extends AbstractExporter {
                                'commentID' => $row['reply_status_id'],
                                'time' => $row['reply_date'],
                                'userID' => $row['reply_member_id'],
-                               'username' => ($row['name'] ?: ''),
+                               'username' => $row['name'] ?: '',
                                'message' => self::fixMessage($row['reply_content']),
                        ]);
                }
@@ -490,8 +490,8 @@ class IPB4xExporter extends AbstractExporter {
                        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'] ?: '')),
+                               'userID' => $row['mt_starter_id'] ?: null,
+                               'username' => $row['mt_is_system'] ? 'System' : ($row['name'] ?: ''),
                                'isDraft' => $row['mt_is_draft']
                        ]);
                }
@@ -522,8 +522,8 @@ class IPB4xExporter extends AbstractExporter {
                while ($row = $statement->fetchArray()) {
                        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'] ?: ''),
+                               'userID' => $row['msg_author_id'] ?: null,
+                               'username' => $row['name'] ?: '',
                                'message' => self::fixMessage($row['msg_post']),
                                'time' => $row['msg_date']
                        ]);
@@ -556,8 +556,8 @@ class IPB4xExporter extends AbstractExporter {
                        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),
+                               'username' => $row['name'] ?: '',
+                               'hideConversation' => $row['map_left_time'] ? 1 : 0,
                                'isInvisible' => 0,
                                'lastVisitTime' => $row['map_read_time']
                        ]);
@@ -622,13 +622,13 @@ class IPB4xExporter extends AbstractExporter {
                
                foreach ($this->boardCache[$parentID] as $board) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['id'], [
-                               'parentID' => ($board['parent_id'] != -1 ? $board['parent_id'] : null),
+                               '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)),
+                               'boardType' => $board['redirect_on'] ? Board::TYPE_LINK : ($board['sub_can_post'] ? Board::TYPE_BOARD : Board::TYPE_CATEGORY),
                                'title' => $this->getLanguageVar('forums_forum', $board['id']),
                                'description' => $this->getLanguageVar('forums_forum', $board['id'], 'desc'),
                                'descriptionUseHtml' => 1,
-                               'externalURL' => ($board['redirect_url'] ?: ''),
+                               'externalURL' => $board['redirect_url'] ?: '',
                                'countUserPosts' => $board['inc_postcount'],
                                'clicks' => $board['redirect_hits'],
                                'posts' => $board['posts'],
@@ -686,9 +686,9 @@ class IPB4xExporter extends AbstractExporter {
                                'username' => $row['starter_name'],
                                'views' => $row['views'],
                                'isSticky' => $row['pinned'],
-                               'isDisabled' => ($row['approved'] == 0 ? 1 : 0),
-                               'isClosed' => ($row['state'] == 'close' ? 1 : 0),
-                               'movedThreadID' => ($row['moved_to'] ? intval($row['moved_to']) : null),
+                               'isDisabled' => $row['approved'] == 0 ? 1 : 0,
+                               'isClosed' => $row['state'] == 'close' ? 1 : 0,
+                               'movedThreadID' => $row['moved_to'] ? intval($row['moved_to']) : null,
                                'movedTime' => $row['moved_on'],
                                'lastPostTime' => $row['last_post']
                        ];
@@ -726,9 +726,9 @@ class IPB4xExporter extends AbstractExporter {
                                'username' => $row['author_name'],
                                'message' => self::fixMessage($row['post']),
                                'time' => $row['post_date'],
-                               'isDeleted' => ($row['queued'] == 3 ? 1 : 0),
-                               'isDisabled' => ($row['queued'] == 2 ? 1 : 0),
-                               'lastEditTime' => ($row['edit_time'] ?: 0),
+                               'isDeleted' => ($row['queued'] == 3) ? 1 : 0,
+                               'isDisabled' => ($row['queued'] == 2) ? 1 : 0,
+                               'lastEditTime' => $row['edit_time'] ?: 0,
                                'editorID' => null,
                                'editReason' => $row['post_edit_reason'],
                                'ipAddress' => UserUtil::convertIPv4To6($row['ip_address']),
@@ -815,7 +815,7 @@ class IPB4xExporter extends AbstractExporter {
                                'question' => $data[1]['question'],
                                'time' => $row['start_date'],
                                'isPublic' => $row['poll_view_voters'],
-                               'maxVotes' => (!empty($data[1]['multi']) ? count($data[1]['choice']) : 1),
+                               'maxVotes' => !empty($data[1]['multi']) ? count($data[1]['choice']) : 1,
                                'votes' => $row['votes']
                        ]);
                        
@@ -908,7 +908,7 @@ class IPB4xExporter extends AbstractExporter {
                while ($row = $statement->fetchArray()) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.like')->import(0, [
                                'objectID' => $row['type_id'],
-                               'objectUserID' => ($row['author_id'] ?: null),
+                               'objectUserID' => $row['author_id'] ?: null,
                                'userID' => $row['member_id'],
                                'likeValue' => Like::LIKE,
                                'time' => $row['rep_date']
@@ -973,7 +973,7 @@ class IPB4xExporter extends AbstractExporter {
                        
                        ImportHandler::getInstance()->getImporter($objectType)->import($row['attach_id'], [
                                'objectID' => $row['id2'],
-                               'userID' => ($row['attach_member_id'] ?: null),
+                               'userID' => $row['attach_member_id'] ?: null,
                                'filename' => $row['attach_file'],
                                'filesize' => $row['attach_filesize'],
                                'isImage' => $row['attach_is_image'],
index 2affb023017cf545255c717841d58011f20871dc..cca1592d91e05464a5b136bca463cba82e370a71 100644 (file)
@@ -205,7 +205,7 @@ class Kunena3xExporter extends AbstractExporter {
                                'username' => $row['username'],
                                'password' => StringUtil::getRandomID(),
                                'email' => $row['email'],
-                               'banned' => ($row['banned'] ? 1 : 0),
+                               'banned' => $row['banned'] ? 1 : 0,
                                'registrationDate' => @strtotime($row['registerDate']),
                                'lastActivityTime' => @strtotime($row['lastvisitDate']),
                                'signature' => self::fixBBCodes($row['signature'])
@@ -364,9 +364,9 @@ class Kunena3xExporter extends AbstractExporter {
                
                foreach ($this->boardCache[$parentID] as $board) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['id'], [
-                               'parentID' => ($board['parent_id'] ?: null),
+                               'parentID' => $board['parent_id'] ?: null,
                                'position' => $board['ordering'],
-                               'boardType' => ($board['parent_id'] ? 0 : 1),
+                               'boardType' => $board['parent_id'] ? 0 : 1,
                                'title' => $board['name'],
                                'description' => $board['description'],
                                'isClosed' => $board['locked'] ? 1 : 0
@@ -403,11 +403,11 @@ class Kunena3xExporter extends AbstractExporter {
                                'topic' => $row['subject'],
                                'time' => $row['first_post_time'],
                                'userID' => $row['first_post_userid'],
-                               'username' => ($row['first_post_guest_name'] ?: ''),
+                               'username' => $row['first_post_guest_name'] ?: '',
                                'views' => $row['hits'],
                                'isSticky' => $row['ordering'] == 1 ? 1 : 0,
                                'isClosed' => $row['locked'] == 1 ? 1 : 0,
-                               'movedThreadID' => ($row['moved_id'] ? $row['moved_id'] : null)
+                               'movedThreadID' => $row['moved_id'] ? $row['moved_id'] : null
                        ];
                                
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.thread')->import($row['id'], $data);
@@ -445,7 +445,7 @@ class Kunena3xExporter extends AbstractExporter {
                                'message' => self::fixBBCodes($row['message']),
                                'time' => $row['time'],
                                'ipAddress' => UserUtil::convertIPv4To6($row['ip']),
-                               'isClosed' => ($row['locked'] ? 1 : 0),
+                               'isClosed' => $row['locked'] ? 1 : 0,
                                'editorID' => null
                        ]);
                }
@@ -479,7 +479,7 @@ class Kunena3xExporter extends AbstractExporter {
                                
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.attachment')->import($row['id'], [
                                'objectID' => $row['mesid'],
-                               'userID' => ($row['userid'] ?: null),
+                               'userID' => $row['userid'] ?: null,
                                'filename' => $row['filename'],
                                'filesize' => $row['size'],
                                'fileType' => $row['filetype'],
index c9e8e36b4737f168b1f9cd715424d7958fb4af54..83cc0c294c4889584000c326e70987e12ff446af 100644 (file)
@@ -659,7 +659,7 @@ class MyBB16xExporter extends AbstractExporter {
                                'hideConversation' => $row['deletetime'] ? 1 : 0,
                                'isInvisible' => (isset($recipients['bcc']) && in_array($row['uid'], $recipients['bcc'])) ? 1 : 0,
                                'lastVisitTime' => $row['readtime']
-                       ], ['labelIDs' => ($row['folder'] > 4 ? [$row['folder']] : [])]);
+                       ], ['labelIDs' => ($row['folder'] > 4) ? [$row['folder']] : []]);
                }
        }
        
@@ -704,9 +704,9 @@ class MyBB16xExporter extends AbstractExporter {
                
                foreach ($this->boardCache[$parentID] as $board) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['fid'], [
-                               'parentID' => ($board['pid'] ?: null),
+                               'parentID' => $board['pid'] ?: null,
                                'position' => $board['disporder'],
-                               'boardType' => ($board['linkto'] ? Board::TYPE_LINK : ($board['type'] == 'c' ? Board::TYPE_CATEGORY : Board::TYPE_BOARD)),
+                               'boardType' => $board['linkto'] ? Board::TYPE_LINK : ($board['type'] == 'c' ? Board::TYPE_CATEGORY : Board::TYPE_BOARD),
                                'title' => $board['name'],
                                'description' => $board['description'],
                                'descriptionUseHtml' => 1, // cannot be disabled
@@ -795,7 +795,7 @@ class MyBB16xExporter extends AbstractExporter {
                                'message' => self::fixBBCodes($row['message']),
                                'time' => $row['dateline'],
                                'isDisabled' => $row['visible'] ? 0 : 1,
-                               'editorID' => ($row['edituid'] ?: null),
+                               'editorID' => $row['edituid'] ?: null,
                                'editor' => $row['editor'] ?: '',
                                'lastEditTime' => $row['edittime'],
                                'editCount' => $row['editor'] ? 1 : 0,
@@ -850,7 +850,7 @@ class MyBB16xExporter extends AbstractExporter {
                        
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.attachment')->import($row['aid'], [
                                'objectID' => $row['pid'],
-                               'userID' => ($row['uid'] ?: null),
+                               'userID' => $row['uid'] ?: null,
                                'filename' => $row['filename'],
                                'filesize' => $row['filesize'],
                                'fileType' => $row['filetype'],
@@ -1031,9 +1031,9 @@ class MyBB16xExporter extends AbstractExporter {
                while ($row = $statement->fetchArray()) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.like')->import($row['rid'], [
                                'objectID' => $row['pid'],
-                               'objectUserID' => ($row['uid'] ?: null),
+                               'objectUserID' => $row['uid'] ?: null,
                                'userID' => $row['adduid'],
-                               'likeValue' => ($row['reputation'] > 0 ? Like::LIKE : Like::DISLIKE),
+                               'likeValue' => ($row['reputation'] > 0) ? Like::LIKE : Like::DISLIKE,
                                'time' => $row['dateline']
                        ]);
                }
@@ -1188,7 +1188,7 @@ class MyBB16xExporter extends AbstractExporter {
                                        foreach ($permissions as $permission) {
                                                ImportHandler::getInstance()->getImporter('com.woltlab.wbb.acl')->import(0, [
                                                        'objectID' => $row['fid'],
-                                                       ($row['isgroup'] ? 'groupID' : 'userID') => $row['id'],
+                                                       $row['isgroup'] ? 'groupID' : 'userID' => $row['id'],
                                                        'optionValue' => $row[$mybbPermission]
                                                ], [
                                                        'optionName' => $permission
index 6577ef2dded03e2bc96c073d5230f9bf055f3b8d..2e7905101e6f05821b2d316576b7456c231f3cd5 100644 (file)
@@ -256,7 +256,7 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                
                foreach ($this->boardCache[$parentID] as $board) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['cid'], [
-                               'parentID' => ($board['parentCid'] ?: null),
+                               'parentID' => $board['parentCid'] ?: null,
                                'position' => $board['order'] ?: 0,
                                'boardType' => $board['link'] ? Board::TYPE_LINK : Board::TYPE_BOARD,
                                'title' => $board['name'],
@@ -344,7 +344,7 @@ class NodeBB0xRedisExporter extends AbstractExporter {
                                'time' => intval($row['timestamp'] / 1000),
                                'isDeleted' => $row['deleted'],
                                'deleteTime' => TIME_NOW,
-                               'editorID' => ($row['editor'] ?: null),
+                               'editorID' => $row['editor'] ?: null,
                                'editor' => $this->database->hget('user:'.$row['editor'], 'username'),
                                'lastEditTime' => intval($row['edited'] / 1000),
                                'editCount' => $row['edited'] ? 1 : 0
index 8b2b23ab8a2fa3a0adbf419fa5546539f4df6de1..4920df89d2f11f2edfe9890247fdbbf973d2427c 100644 (file)
@@ -250,7 +250,7 @@ class PhpBB31xExporter extends AbstractExporter {
                        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'),
+                               'userOnlineMarking' => $row['group_colour'] ? '<span style="color: #'.$row['group_colour'].'">%s</span>' : '%s',
                                'showOnTeamPage' => $row['group_legend']
                        ]);
                }
@@ -866,7 +866,7 @@ class PhpBB31xExporter extends AbstractExporter {
                                'hideConversation' => $row['pm_deleted'],
                                'isInvisible' => in_array('u_'.$row['user_id'], $bcc) ? 1 : 0,
                                'lastVisitTime' => $row['pm_new'] ? 0 : $row['message_time']
-                       ], ['labelIDs' => ($row['folder_id'] > 0 ? [$row['folder_id']] : [])]);
+                       ], ['labelIDs' => $row['folder_id'] > 0 ? [$row['folder_id']] : []]);
                }
        }
        
@@ -928,9 +928,9 @@ class PhpBB31xExporter extends AbstractExporter {
                
                foreach ($this->boardCache[$parentID] as $board) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['forum_id'], [
-                               'parentID' => ($board['parent_id'] ?: null),
+                               '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)),
+                               'boardType' => $board['forum_type'] == self::BOARD_TYPE_LINK ? Board::TYPE_LINK : ($board['forum_type'] == self::BOARD_TYPE_CATEGORY ? Board::TYPE_CATEGORY : Board::TYPE_BOARD),
                                'title' => StringUtil::decodeHTML($board['forum_name']),
                                'description' => $board['forum_desc'],
                                'descriptionUseHtml' => 1, // cannot be disabled
@@ -1025,7 +1025,7 @@ class PhpBB31xExporter extends AbstractExporter {
                        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']) ?: '')),
+                               'username' => $row['post_username'] ?: (StringUtil::decodeHTML($row['username']) ?: ''),
                                'subject' => StringUtil::decodeHTML($row['post_subject']),
                                'message' => self::fixBBCodes(StringUtil::decodeHTML($row['post_text']), $row['bbcode_uid']),
                                'time' => $row['post_time'],
@@ -1033,11 +1033,11 @@ class PhpBB31xExporter extends AbstractExporter {
                                'isDeleted' => $row['post_visibility'] == self::ITEM_DELETED ? 1 : 0,
                                'deleteTime' => $row['post_delete_time'],
                                'isClosed' => $row['post_edit_locked'] ? 1 : 0,
-                               'editorID' => ($row['post_edit_user'] ?: null),
+                               'editorID' => $row['post_edit_user'] ?: null,
                                'editor' => $row['editorName'] ?: '',
                                'lastEditTime' => $row['post_edit_time'],
                                'editCount' => $row['post_edit_count'],
-                               'editReason' => (!empty($row['post_edit_reason']) ? $row['post_edit_reason'] : ''),
+                               'editReason' => !empty($row['post_edit_reason']) ? $row['post_edit_reason'] : '',
                                'attachments' => $row['attachments'],
                                'enableHtml' => 0,
                                'ipAddress' => UserUtil::convertIPv4To6($row['poster_ip'])
@@ -1130,7 +1130,7 @@ class PhpBB31xExporter extends AbstractExporter {
                                'question' => $row['poll_title'],
                                'time' => $row['poll_start'],
                                'endTime' => $row['poll_length'] ? $row['poll_start'] + $row['poll_length'] : 0,
-                               'isChangeable' => ($row['poll_vote_change'] ? 1 : 0),
+                               'isChangeable' => $row['poll_vote_change'] ? 1 : 0,
                                'isPublic' => 0,
                                'maxVotes' => $row['poll_max_options'],
                                'votes' => $row['poll_votes']
@@ -1455,7 +1455,7 @@ class PhpBB31xExporter extends AbstractExporter {
                        
                        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),
+                               'userID' => $row['poster_id'] ?: null,
                                'filename' => $row['real_filename'],
                                'filesize' => $row['filesize'],
                                'fileType' => $row['mimetype'],
index 252b76bafe42410979e22e144b3f6ba80396e776..4854e7f8896b5bf57e44df7b109a37ef300dbc9c 100644 (file)
@@ -239,7 +239,7 @@ class PhpBB3xExporter extends AbstractExporter {
                        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'),
+                               'userOnlineMarking' => $row['group_colour'] ? '<span style="color: #'.$row['group_colour'].'">%s</span>' : '%s',
                                'showOnTeamPage' => $row['group_legend']
                        ]);
                }
@@ -803,7 +803,7 @@ class PhpBB3xExporter extends AbstractExporter {
                                'hideConversation' => $row['pm_deleted'],
                                'isInvisible' => in_array('u_'.$row['user_id'], $bcc) ? 1 : 0,
                                'lastVisitTime' => $row['pm_new'] ? 0 : $row['message_time']
-                       ], ['labelIDs' => ($row['folder_id'] > 0 ? [$row['folder_id']] : [])]);
+                       ], ['labelIDs' => ($row['folder_id'] > 0) ? [$row['folder_id']] : []]);
                }
        }
        
@@ -865,9 +865,9 @@ class PhpBB3xExporter extends AbstractExporter {
                
                foreach ($this->boardCache[$parentID] as $board) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['forum_id'], [
-                               'parentID' => ($board['parent_id'] ?: null),
+                               '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)),
+                               'boardType' => ($board['forum_type'] == self::BOARD_TYPE_LINK) ? Board::TYPE_LINK : (($board['forum_type'] == self::BOARD_TYPE_CATEGORY) ? Board::TYPE_CATEGORY : Board::TYPE_BOARD),
                                'title' => StringUtil::decodeHTML($board['forum_name']),
                                'description' => $board['forum_desc'],
                                'descriptionUseHtml' => 1, // cannot be disabled
@@ -960,17 +960,17 @@ class PhpBB3xExporter extends AbstractExporter {
                        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']) ?: '')),
+                               'username' => $row['post_username'] ?: (StringUtil::decodeHTML($row['username']) ?: ''),
                                'subject' => StringUtil::decodeHTML($row['post_subject']),
                                'message' => self::fixBBCodes(StringUtil::decodeHTML($row['post_text']), $row['bbcode_uid']),
                                'time' => $row['post_time'],
                                'isDisabled' => $row['post_approved'] ? 0 : 1,
                                'isClosed' => $row['post_edit_locked'] ? 1 : 0,
-                               'editorID' => ($row['post_edit_user'] ?: null),
+                               'editorID' => $row['post_edit_user'] ?: null,
                                'editor' => $row['editorName'] ?: '',
                                'lastEditTime' => $row['post_edit_time'],
                                'editCount' => $row['post_edit_count'],
-                               'editReason' => (!empty($row['post_edit_reason']) ? $row['post_edit_reason'] : ''),
+                               'editReason' => !empty($row['post_edit_reason']) ? $row['post_edit_reason'] : '',
                                'attachments' => $row['attachments'],
                                'enableHtml' => 0,
                                'ipAddress' => UserUtil::convertIPv4To6($row['poster_ip'])
@@ -1063,7 +1063,7 @@ class PhpBB3xExporter extends AbstractExporter {
                                'question' => $row['poll_title'],
                                'time' => $row['poll_start'],
                                'endTime' => $row['poll_length'] ? $row['poll_start'] + $row['poll_length'] : 0,
-                               'isChangeable' => ($row['poll_vote_change'] ? 1 : 0),
+                               'isChangeable' => $row['poll_vote_change'] ? 1 : 0,
                                'isPublic' => 0,
                                'maxVotes' => $row['poll_max_options'],
                                'votes' => $row['poll_votes']
@@ -1388,7 +1388,7 @@ class PhpBB3xExporter extends AbstractExporter {
                        
                        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),
+                               'userID' => $row['poster_id'] ?: null,
                                'filename' => $row['real_filename'],
                                'filesize' => $row['filesize'],
                                'fileType' => $row['mimetype'],
index cbed4328c8929cb485217bed8f0124396ef74d2d..1f0c4cb11e8737b76d153e60ef58ac823c6f4ce1 100644 (file)
@@ -311,7 +311,7 @@ class SMF2xExporter extends AbstractExporter {
                                'password' => '',
                                'email' => $row['email_address'],
                                'registrationDate' => $row['date_registered'],
-                               'banned' => ($row['ban_time'] && $row['banExpire'] === null ? 1 : 0), // only permabans are imported
+                               'banned' => ($row['ban_time'] && $row['banExpire'] === null) ? 1 : 0, // only permabans are imported
                                'banReason' => $row['banReason'],
                                'activationCode' => $row['validation_code'] ? UserRegistrationUtil::getActivationCode() : 0, // smf's codes are strings
                                'registrationIpAddress' => $row['member_ip'], // member_ip2 is HTTP_X_FORWARDED_FOR
@@ -809,7 +809,7 @@ class SMF2xExporter extends AbstractExporter {
                
                foreach ($this->boardCache[$parentID] as $board) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['id_board'], [
-                               'parentID' => ($board['id_parent'] ?: 'cat-'.$board['id_cat']),
+                               'parentID' => $board['id_parent'] ?: 'cat-'.$board['id_cat'],
                                'position' => $board['board_order'],
                                'boardType' => $board['redirect'] ? Board::TYPE_LINK : Board::TYPE_BOARD,
                                'title' => str_replace('&amp;', '&', $board['name']),
@@ -898,11 +898,11 @@ class SMF2xExporter extends AbstractExporter {
                                'message' => self::fixBBCodes($row['body']),
                                'time' => $row['poster_time'],
                                'isDisabled' => $row['approved'] ? 0 : 1,
-                               'editorID' => ($row['editorID'] ?: null),
+                               'editorID' => $row['editorID'] ?: null,
                                'editor' => $row['modified_name'],
                                'lastEditTime' => $row['modified_time'],
                                'editCount' => $row['modified_time'] ? 1 : 0,
-                               'editReason' => (!empty($row['editReason']) ? $row['editReason'] : ''),
+                               'editReason' => !empty($row['editReason']) ? $row['editReason'] : '',
                                'enableHtml' => 0,
                                'ipAddress' => UserUtil::convertIPv4To6($row['poster_ip'])
                        ]);
@@ -953,7 +953,7 @@ class SMF2xExporter extends AbstractExporter {
                        
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.attachment')->import($row['id_attach'], [
                                'objectID' => $row['id_msg'],
-                               'userID' => ($row['id_member'] ?: null),
+                               'userID' => $row['id_member'] ?: null,
                                'filename' => $row['filename'],
                                'filesize' => $row['size'],
                                'fileType' => $row['mime_type'],
index 85004af8a45a005ca5f3853632bfec5c6c5ef7e6..46592c399cfb0149dbf4f7b914a9a4b2fc50d4d1 100644 (file)
@@ -936,7 +936,7 @@ class VB3or4xExporter extends AbstractExporter {
                                'hideConversation' => 0, // there is no trash
                                'isInvisible' => (isset($recipients['bcc']) && isset($recipients['bcc'][$row['userid']])) ? 1 : 0,
                                'lastVisitTime' => $row['messageread'] ? $row['dateline'] : 0
-                       ], ['labelIDs' => ($row['folderid'] > 0 ? [$row['userid'].'-'.$row['folderid']] : [])]);
+                       ], ['labelIDs' => ($row['folderid'] > 0) ? [$row['userid'].'-'.$row['folderid']] : []]);
                }
        }
        
@@ -991,9 +991,9 @@ class VB3or4xExporter extends AbstractExporter {
                };
                foreach ($this->boardCache[$parentID] as $board) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['forumid'], [
-                               'parentID' => ($board['parentid'] != -1 ? $board['parentid'] : null),
+                               '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)),
+                               'boardType' => $board['link'] ? Board::TYPE_LINK : ($board['options'] & self::FORUMOPTIONS_CANCONTAINTHREADS ? Board::TYPE_BOARD : Board::TYPE_CATEGORY),
                                'title' => StringUtil::decodeHTML($board['title_clean']),
                                'description' => StringUtil::decodeHTML($board['description_clean']),
                                'descriptionUseHtml' => 0,
@@ -1054,7 +1054,7 @@ class VB3or4xExporter extends AbstractExporter {
                                'isDisabled' => $row['visible'] == 1 ? 0 : 1, // visible = 2 is deleted
                                'isClosed' => $row['open'] == 1 ? 0 : 1, // open = 10 is redirect
                                'isDeleted' => $row['visible'] == 2 ? 1 : 0,
-                               'movedThreadID' => ($row['open'] == 10 && $row['pollid'] ? $row['pollid'] : null), // target thread is saved in pollid...
+                               'movedThreadID' => ($row['open'] == 10 && $row['pollid']) ? $row['pollid'] : null, // target thread is saved in pollid...
                                'movedTime' => 0,
                                'isDone' => 0,
                                'deleteTime' => $row['deleteTime'] ?: 0,
@@ -1119,13 +1119,13 @@ class VB3or4xExporter extends AbstractExporter {
                                'isDeleted' => $row['visible'] == 2 ? 1 : 0,
                                'isDisabled' => $row['visible'] == 0 ? 1 : 0,
                                'isClosed' => 0,
-                               'editorID' => ($row['editorID'] ?: null),
+                               'editorID' => $row['editorID'] ?: null,
                                'editor' => $row['editor'] ?: '',
                                'lastEditTime' => $row['lastEditTime'] ?: 0,
-                               'editCount' => ($row['editCount'] && $row['editCount'] > 0 ? $row['editCount'] : 0),
+                               'editCount' => $row['editCount'] && $row['editCount'] > 0 ? $row['editCount'] : 0,
                                'editReason' => $row['editReason'] ?: '',
                                'attachments' => $row['attach'],
-                               'enableHtml' => (isset($row['htmlState']) && $row['htmlState'] != 'off' ? 1 : 0),
+                               'enableHtml' => isset($row['htmlState']) && $row['htmlState'] != 'off' ? 1 : 0,
                                'ipAddress' => UserUtil::convertIPv4To6($row['ipaddress'])
                        ]);
                }
@@ -1216,16 +1216,16 @@ class VB3or4xExporter extends AbstractExporter {
                                
                                ImportHandler::getInstance()->getImporter('com.woltlab.wbb.attachment')->import($row['attachmentid'], [
                                        'objectID' => $row['postid'],
-                                       'userID' => ($row['userid'] ?: null),
+                                       'userID' => $row['userid'] ?: null,
                                        'filename' => $row['filename'],
-                                       'filesize' => (isset($row['filesize']) ? $row['filesize'] : filesize($file)),
+                                       'filesize' => isset($row['filesize']) ? $row['filesize'] : filesize($file),
                                        'fileType' => FileUtil::getMimeType($file),
                                        'isImage' => $row['isImage'],
                                        'width' => $row['width'],
                                        'height' => $row['height'],
                                        'downloads' => $row['counter'],
                                        'uploadTime' => $row['dateline'],
-                                       'showOrder' => (isset($row['displayOrder']) ? $row['displayOrder'] : 0)
+                                       'showOrder' => isset($row['displayOrder']) ? $row['displayOrder'] : 0
                                ], ['fileLocation' => $file]);
                                
                                if ($this->readOption('attachfile') == self::ATTACHFILE_DATABASE) unlink($file);
@@ -1397,9 +1397,9 @@ class VB3or4xExporter extends AbstractExporter {
                while ($row = $statement->fetchArray()) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.like')->import(0, [
                                'objectID' => $row['postid'],
-                               'objectUserID' => ($row['userid'] ?: null),
+                               'objectUserID' => $row['userid'] ?: null,
                                'userID' => $row['whoadded'],
-                               'likeValue' => ($row['reputation'] > 0 ? Like::LIKE : Like::DISLIKE),
+                               'likeValue' => ($row['reputation'] > 0) ? Like::LIKE : Like::DISLIKE,
                                'time' => $row['dateline']
                        ]);
                }
@@ -1720,9 +1720,9 @@ class VB3or4xExporter extends AbstractExporter {
                                ];
                                
                                ImportHandler::getInstance()->getImporter('com.woltlab.gallery.image')->import((isset($row['pictureid']) ? $row['pictureid'] : $row['filedataid']), [
-                                       'userID' => ($row['userid'] ?: null),
+                                       'userID' => $row['userid'] ?: null,
                                        'username' => StringUtil::decodeHTML($row['username'] ?: ''),
-                                       'albumID' => ($row['albumid'] ?: null),
+                                       'albumID' => $row['albumid'] ?: null,
                                        'title' => StringUtil::decodeHTML($row['caption']),
                                        'description' => '',
                                        'filename' => StringUtil::decodeHTML(isset($row['filename']) ? $row['filename'] : ''),
@@ -1767,8 +1767,8 @@ class VB3or4xExporter extends AbstractExporter {
                $statement->execute([$offset + 1, $offset + $limit]);
                while ($row = $statement->fetchArray()) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.gallery.image.comment')->import($row['commentid'], [
-                               'objectID' => (isset($row['pictureid']) ? $row['pictureid'] : $row['filedataid']),
-                               'userID' => ($row['postuserid'] ?: null),
+                               'objectID' => isset($row['pictureid']) ? $row['pictureid'] : $row['filedataid'],
+                               'userID' => $row['postuserid'] ?: null,
                                'username' => StringUtil::decodeHTML($row['username'] ?: ''),
                                'message' => $row['pagetext'],
                                'time' => $row['dateline']
@@ -1921,7 +1921,7 @@ class VB3or4xExporter extends AbstractExporter {
                        }
                        
                        $data = [
-                               'userID' => ($row['userid'] ?: null),
+                               'userID' => $row['userid'] ?: null,
                                'username' => $row['username'],
                                'subject' => $row['title'],
                                'message' => self::fixBBCodes($row['event']),
index 3ea1a2a868334fc0836195d4e21805f2ce8ef347..ded2ffe63a33130be4b68c305ea1f3e45ccdebcd 100644 (file)
@@ -421,7 +421,7 @@ class VB5xExporter extends AbstractExporter {
                
                foreach ($this->boardCache[$parentID] as $board) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['nodeid'], [
-                               'parentID' => ($board['parentid'] ?: null),
+                               'parentID' => $board['parentid'] ?: null,
                                'position' => $board['displayorder'] ?: 0,
                                'boardType' => Board::TYPE_BOARD,
                                'title' => $board['title'],
@@ -531,7 +531,7 @@ class VB5xExporter extends AbstractExporter {
                                'lastEditTime' => 0,
                                'editCount' => 0,
                                'editReason' => '',
-                               'enableHtml' => (isset($row['htmlState']) && $row['htmlState'] != 'off' ? 1 : 0),
+                               'enableHtml' => (isset($row['htmlState']) && $row['htmlState'] != 'off') ? 1 : 0,
                                'ipAddress' => UserUtil::convertIPv4To6($row['ipaddress'])
                        ]);
                }
@@ -601,16 +601,16 @@ class VB5xExporter extends AbstractExporter {
                                
                                ImportHandler::getInstance()->getImporter('com.woltlab.wbb.attachment')->import($row['nodeid'], [
                                        'objectID' => $row['parentid'],
-                                       'userID' => ($row['userid'] ?: null),
+                                       'userID' => $row['userid'] ?: null,
                                        'filename' => $row['filename'],
-                                       'filesize' => (isset($row['filesize']) ? $row['filesize'] : filesize($file)),
+                                       'filesize' => isset($row['filesize']) ? $row['filesize'] : filesize($file),
                                        'fileType' => FileUtil::getMimeType($file),
                                        'isImage' => $row['isImage'],
                                        'width' => $row['width'],
                                        'height' => $row['height'],
                                        'downloads' => $row['counter'],
                                        'uploadTime' => $row['dateline'],
-                                       'showOrder' => (isset($row['displayOrder']) ? $row['displayOrder'] : 0)
+                                       'showOrder' => isset($row['displayOrder']) ? $row['displayOrder'] : 0
                                ], ['fileLocation' => $file]);
                                
                                if ($this->readOption('attachfile') == self::ATTACHFILE_DATABASE) unlink($file);
index 66a4bbf85925cf9eb29b61de43ff3b34bfa89ee9..5e0c976006f18b263dcd26cde7274b323df5da42 100644 (file)
@@ -289,17 +289,17 @@ class WBB2xExporter extends AbstractExporter {
                                'disableSignature' => $row['disablesignature'],
                                'banned' => $row['blocked'],
                                'signatureEnableHtml' => $row['allowsightml'],
-                               'registrationIpAddress' => (!empty($row['reg_ipaddress']) ? $row['reg_ipaddress'] : '')
+                               'registrationIpAddress' => !empty($row['reg_ipaddress']) ? $row['reg_ipaddress'] : ''
                        ];
                        
                        $options = [
                                'birthday' => $row['birthday'],
                                'gender' => $row['gender'],
                                'homepage' => $row['homepage'],
-                               'icq' => ($row['icq'] ? $row['icq'] : ''),
-                               'location' => (!empty($row['field1']) ? $row['field1'] : ''),
-                               'hobbies' => (!empty($row['field2']) ? $row['field2'] : ''),
-                               'occupation' => (!empty($row['field3']) ? $row['field3'] : ''),
+                               'icq' => $row['icq'] ? $row['icq'] : '',
+                               'location' => !empty($row['field1']) ? $row['field1'] : '',
+                               'hobbies' => !empty($row['field2']) ? $row['field2'] : '',
+                               'occupation' => !empty($row['field3']) ? $row['field3'] : '',
                        ];
                        
                        foreach ($profileFields as $profileFieldID) {
@@ -441,7 +441,7 @@ class WBB2xExporter extends AbstractExporter {
                                'categoryName' => 'profile.personal',
                                'optionType' => $optionType,
                                'required' => $row['required'],
-                               'visible' => ($row['hidden'] ? 0 : UserOption::VISIBILITY_ALL),
+                               'visible' => $row['hidden'] ? 0 : UserOption::VISIBILITY_ALL,
                                'showOrder' => $row['fieldorder'],
                                'selectOptions' => $row['fieldoptions'],
                                'editable' => UserOption::EDITABILITY_ALL
@@ -508,14 +508,14 @@ class WBB2xExporter extends AbstractExporter {
                                'subject' => $row['subject'],
                                'time' => $row['sendtime'],
                                'userID' => $row['senderid'],
-                               'username' => ($row['username'] ?: '')
+                               'username' => $row['username'] ?: ''
                        ]);
                        
                        // import message
                        ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.message')->import($row['privatemessageid'], [
                                'conversationID' => $row['privatemessageid'],
                                'userID' => $row['senderid'],
-                               'username' => ($row['username'] ?: ''),
+                               'username' => $row['username'] ?: '',
                                'message' => self::fixBBCodes($row['message']),
                                'time' => $row['sendtime'],
                                'attachments' => $row['attachments'],
@@ -556,7 +556,7 @@ class WBB2xExporter extends AbstractExporter {
                                'hideConversation' => $row['deletepm'],
                                'isInvisible' => $row['blindcopy'],
                                'lastVisitTime' => $row['view']
-                       ], ['labelIDs' => ($row['folderid'] ? [$row['folderid']] : [])]);
+                       ], ['labelIDs' => $row['folderid'] ? [$row['folderid']] : []]);
                }
        }
        
@@ -618,9 +618,9 @@ class WBB2xExporter extends AbstractExporter {
                
                foreach ($this->boardCache[$parentID] as $board) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['boardid'], [
-                               'parentID' => ($board['parentid'] ?: null),
+                               'parentID' => $board['parentid'] ?: null,
                                'position' => $board['boardorder'],
-                               'boardType' => (!$board['isboard'] ? 1 : (!empty($board['externalurl']) ? 2 : 0)),
+                               'boardType' => !$board['isboard'] ? 1 : (!empty($board['externalurl']) ? 2 : 0),
                                'title' => $board['title'],
                                'description' => $board['description'],
                                'externalURL' => $board['externalurl'],
@@ -738,7 +738,7 @@ class WBB2xExporter extends AbstractExporter {
                                'isSticky' => intval($row['important'] == 1),
                                'isDisabled' => intval(!$row['visible']),
                                'isClosed' => intval($row['closed'] == 1),
-                               'movedThreadID' => ($row['closed'] == 3 ? $row['pollid'] : null),
+                               'movedThreadID' => ($row['closed'] == 3) ? $row['pollid'] : null,
                                'lastPostTime' => $row['lastposttime']
                        ];
                        $additionalData = [];
@@ -778,7 +778,7 @@ class WBB2xExporter extends AbstractExporter {
                                'message' => self::fixBBCodes($row['message']),
                                'time' => $row['posttime'],
                                'isDisabled' => intval(!$row['visible']),
-                               'editorID' => ($row['editorid'] ?: null),
+                               'editorID' => $row['editorid'] ?: null,
                                'editor' => $row['editor'],
                                'lastEditTime' => $row['edittime'],
                                'editCount' => $row['editcount'],
@@ -893,7 +893,7 @@ class WBB2xExporter extends AbstractExporter {
                                'objectID' => $postID,
                                'question' => $row['question'],
                                'time' => $row['starttime'],
-                               'endTime' => ($row['timeout'] ? $row['starttime'] + $row['timeout'] * 86400 : 0),
+                               'endTime' => $row['timeout'] ? $row['starttime'] + $row['timeout'] * 86400 : 0,
                                'maxVotes' => $row['choicecount'],
                                'votes' => $votes
                        ]);
@@ -1148,7 +1148,7 @@ class WBB2xExporter extends AbstractExporter {
                        
                        ImportHandler::getInstance()->getImporter($objectType)->import($row['attachmentid'], [
                                'objectID' => $row[$indexName],
-                               'userID' => ($row['userid'] ?: null),
+                               'userID' => $row['userid'] ?: null,
                                'filename' => $row['attachmentname'].'.'.$row['attachmentextension'],
                                'filesize' => $row['attachmentsize'],
                                'fileType' => $fileType,
index e24d9e4bcb4cb61b6f9e622f2b44eac7b5f6f4f1..cf2c08341c1d6d45775f0ea840066c6337653e30 100644 (file)
@@ -327,8 +327,8 @@ class WBB3xExporter extends AbstractExporter {
                        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)
+                               'userOnlineMarking' => !empty($row['userOnlineMarking']) ? $row['userOnlineMarking'] : '',
+                               'showOnTeamPage' => !empty($row['showOnTeamPage']) ? $row['showOnTeamPage'] : 0
                        ]);
                }
        }
@@ -431,8 +431,8 @@ class WBB3xExporter extends AbstractExporter {
                                'oldUsername' => $row['oldUsername'],
                                'registrationIpAddress' => UserUtil::convertIPv4To6($row['registrationIpAddress']),
                                'disableAvatar' => $row['disableAvatar'],
-                               'disableAvatarReason' => (!empty($row['disableAvatarReason']) ? $row['disableAvatarReason'] : ''),
-                               'enableGravatar' => ((!empty($row['gravatar']) && $row['gravatar'] == $row['email']) ? 1 : 0),
+                               'disableAvatarReason' => !empty($row['disableAvatarReason']) ? $row['disableAvatarReason'] : '',
+                               'enableGravatar' => (!empty($row['gravatar']) && $row['gravatar'] == $row['email']) ? 1 : 0,
                                'signature' => $row['signature'],
                                'signatureEnableHtml' => $row['enableSignatureHtml'],
                                'disableSignature' => $row['disableSignature'],
@@ -526,7 +526,7 @@ class WBB3xExporter extends AbstractExporter {
                        ImportHandler::getInstance()->getImporter('com.woltlab.wcf.user.follower')->import(0, [
                                'userID' => $row['userID'],
                                'followUserID' => $row['whiteUserID'],
-                               'time' => (!empty($row['time']) ? $row['time'] : 0)
+                               'time' => !empty($row['time']) ? $row['time'] : 0
                        ]);
                }
        }
@@ -754,13 +754,13 @@ class WBB3xExporter extends AbstractExporter {
                                'validationPattern' => $row['validationPattern'],
                                'selectOptions' => $row['selectOptions'],
                                'required' => $row['required'],
-                               'askDuringRegistration' => (!empty($row['askDuringRegistration']) ? 1 : 0),
+                               'askDuringRegistration' => !empty($row['askDuringRegistration']) ? 1 : 0,
                                'searchable' => $row['searchable'],
                                'isDisabled' => $row['disabled'],
                                'editable' => $editable,
                                'visible' => $visible,
                                'showOrder' => $row['showOrder']
-                       ], ['name' => ($row['name'] ?: $row['optionName'])]);
+                       ], ['name' => $row['name'] ?: $row['optionName']]);
                }
        }
        
@@ -957,7 +957,7 @@ class WBB3xExporter extends AbstractExporter {
                                'hideConversation' => $row['isDeleted'],
                                'isInvisible' => $row['isBlindCopy'],
                                'lastVisitTime' => $row['isViewed']
-                       ], ['labelIDs' => ($row['folderID'] ? [$row['folderID']] : [])]);
+                       ], ['labelIDs' => $row['folderID'] ? [$row['folderID']] : []]);
                }
        }
        
@@ -1023,8 +1023,8 @@ class WBB3xExporter extends AbstractExporter {
                        if (!in_array($board['sortField'], self::$availableThreadSortFields)) $board['sortField'] = 'lastPostTime';
                        
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($board['boardID'], [
-                               'parentID' => ($board['parentID'] ?: null),
-                               'position' => ($board['position'] ?: 0),
+                               'parentID' => $board['parentID'] ?: null,
+                               'position' => $board['position'] ?: 0,
                                'boardType' => $board['boardType'],
                                'title' => $board['title'],
                                'description' => $board['description'],
@@ -1033,18 +1033,18 @@ class WBB3xExporter extends AbstractExporter {
                                'time' => $board['time'],
                                'countUserPosts' => $board['countUserPosts'],
                                'daysPrune' => $board['daysPrune'],
-                               'enableMarkingAsDone' => (!empty($board['enableMarkingAsDone']) ? $board['enableMarkingAsDone'] : 0),
-                               'ignorable' => (!empty($board['ignorable']) ? $board['ignorable'] : 0),
+                               'enableMarkingAsDone' => !empty($board['enableMarkingAsDone']) ? $board['enableMarkingAsDone'] : 0,
+                               'ignorable' => !empty($board['ignorable']) ? $board['ignorable'] : 0,
                                'isClosed' => $board['isClosed'],
                                'isInvisible' => $board['isInvisible'],
-                               'postSortOrder' => (!empty($board['postSortOrder']) ? $board['postSortOrder'] : ''),
-                               'postsPerPage' => (!empty($board['postsPerPage']) ? $board['postsPerPage'] : 0),
-                               'searchable' => (!empty($board['searchable']) ? $board['searchable'] : 0),
-                               'searchableForSimilarThreads' => (!empty($board['searchableForSimilarThreads']) ? $board['searchableForSimilarThreads'] : 0),
+                               'postSortOrder' => !empty($board['postSortOrder']) ? $board['postSortOrder'] : '',
+                               'postsPerPage' => !empty($board['postsPerPage']) ? $board['postsPerPage'] : 0,
+                               'searchable' => !empty($board['searchable']) ? $board['searchable'] : 0,
+                               'searchableForSimilarThreads' => !empty($board['searchableForSimilarThreads']) ? $board['searchableForSimilarThreads'] : 0,
                                'showSubBoards' => $board['showSubBoards'],
                                'sortField' => $board['sortField'],
                                'sortOrder' => $board['sortOrder'],
-                               'threadsPerPage' => (!empty($board['threadsPerPage']) ? $board['threadsPerPage'] : 0),
+                               'threadsPerPage' => !empty($board['threadsPerPage']) ? $board['threadsPerPage'] : 0,
                                'clicks' => $board['clicks'],
                                'posts' => $board['posts'],
                                'threads' => $board['threads']
@@ -1176,9 +1176,9 @@ class WBB3xExporter extends AbstractExporter {
                                'isDisabled' => $row['isDisabled'],
                                'isClosed' => $row['isClosed'],
                                'isDeleted' => $row['isDeleted'],
-                               'movedThreadID' => ($row['movedThreadID'] ?: null),
-                               'movedTime' => (!empty($row['movedTime']) ? $row['movedTime'] : 0),
-                               'isDone' => (!empty($row['isDone']) ? $row['isDone'] : 0),
+                               'movedThreadID' => $row['movedThreadID'] ?: null,
+                               'movedTime' => !empty($row['movedTime']) ? $row['movedTime'] : 0,
+                               'isDone' => !empty($row['isDone']) ? $row['isDone'] : 0,
                                'deleteTime' => $row['deleteTime'],
                                'lastPostTime' => $row['lastPostTime']
                        ];
@@ -1223,11 +1223,11 @@ class WBB3xExporter extends AbstractExporter {
                                'isDeleted' => $row['isDeleted'],
                                'isDisabled' => $row['isDisabled'],
                                'isClosed' => $row['isClosed'],
-                               'editorID' => ($row['editorID'] ?: null),
+                               'editorID' => $row['editorID'] ?: null,
                                'editor' => $row['editor'],
                                'lastEditTime' => $row['lastEditTime'],
                                'editCount' => $row['editCount'],
-                               'editReason' => (!empty($row['editReason']) ? $row['editReason'] : ''),
+                               'editReason' => !empty($row['editReason']) ? $row['editReason'] : '',
                                'attachments' => $row['attachments'],
                                'enableHtml' => $row['enableHtml'],
                                'ipAddress' => UserUtil::convertIPv4To6($row['ipAddress']),
@@ -1319,9 +1319,9 @@ class WBB3xExporter extends AbstractExporter {
                                'objectID' => $row['messageID'],
                                'question' => $row['question'],
                                'time' => $row['time'],
-                               'endTime' => ($row['endTime'] > 2147483647 ? 2147483647 : $row['endTime']),
-                               'isChangeable' => ($row['votesNotChangeable'] ? 0 : 1),
-                               'isPublic' => (!empty($row['isPublic']) ? $row['isPublic'] : 0),
+                               'endTime' => $row['endTime'] > 2147483647 ? 2147483647 : $row['endTime'],
+                               'isChangeable' => $row['votesNotChangeable'] ? 0 : 1,
+                               'isPublic' => !empty($row['isPublic']) ? $row['isPublic'] : 0,
                                'sortByVotes' => $row['sortByResult'],
                                'maxVotes' => $row['choiceCount'],
                                'votes' => $row['votes']
@@ -1454,9 +1454,9 @@ class WBB3xExporter extends AbstractExporter {
                while ($row = $statement->fetchArray()) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.like')->import(0, [
                                'objectID' => $row['firstPostID'],
-                               'objectUserID' => ($row['objectUserID'] ?: null),
+                               'objectUserID' => $row['objectUserID'] ?: null,
                                'userID' => $row['userID'],
-                               'likeValue' => ($row['rating'] > 3 ? Like::LIKE : Like::DISLIKE),
+                               'likeValue' => ($row['rating'] > 3) ? Like::LIKE : Like::DISLIKE,
                                'time' => $row['time']
                        ]);
                }
@@ -1737,7 +1737,7 @@ class WBB3xExporter extends AbstractExporter {
                                'smileyTitle' => $row['smileyTitle'],
                                'smileyCode' => $row['smileyCode'],
                                'showOrder' => $row['showOrder'],
-                               'categoryID' => (!empty($row['smileyCategoryID']) ? $row['smileyCategoryID'] : null)
+                               'categoryID' => !empty($row['smileyCategoryID']) ? $row['smileyCategoryID'] : null
                        ], ['fileLocation' => $fileLocation]);
                }
        }
@@ -1876,7 +1876,7 @@ class WBB3xExporter extends AbstractExporter {
                        if (isset($categories[$row['entryID']])) $additionalData['categories'] = $categories[$row['entryID']];
                        
                        ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry')->import($row['entryID'], [
-                               'userID' => ($row['userID'] ?: null),
+                               'userID' => $row['userID'] ?: null,
                                'username' => $row['username'],
                                'subject' => $row['subject'],
                                'message' => self::fixBBCodes($row['message']),
@@ -1974,9 +1974,9 @@ class WBB3xExporter extends AbstractExporter {
                while ($row = $statement->fetchArray()) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry.like')->import(0, [
                                'objectID' => $row['objectID'],
-                               'objectUserID' => ($row['objectUserID'] ?: null),
+                               'objectUserID' => $row['objectUserID'] ?: null,
                                'userID' => $row['userID'],
-                               'likeValue' => ($row['rating'] > 3 ? Like::LIKE : Like::DISLIKE)
+                               'likeValue' => ($row['rating'] > 3) ? Like::LIKE : Like::DISLIKE
                        ]);
                }
        }
@@ -2041,7 +2041,7 @@ class WBB3xExporter extends AbstractExporter {
                while ($row = $statement->fetchArray()) {
                        $data = [
                                'userID' => $row['ownerID'],
-                               'username' => ($row['username'] ?: ''),
+                               'username' => $row['username'] ?: '',
                                'title' => $row['title'],
                                'description' => $row['description'],
                                'lastUpdateTime' => $row['lastUpdateTime']
@@ -2119,9 +2119,9 @@ class WBB3xExporter extends AbstractExporter {
                        if (isset($categories[$row['photoID']])) $additionalData['categories'] = array_unique($categories[$row['photoID']]);
                        
                        ImportHandler::getInstance()->getImporter('com.woltlab.gallery.image')->import($row['photoID'], [
-                               'userID' => ($row['ownerID'] ?: null),
+                               'userID' => $row['ownerID'] ?: null,
                                'username' => $row['username'],
-                               'albumID' => ($row['albumID'] ?: null),
+                               'albumID' => $row['albumID'] ?: null,
                                'title' => $row['title'],
                                'description' => $row['description'],
                                'filename' => $row['filename'],
@@ -2164,7 +2164,7 @@ class WBB3xExporter extends AbstractExporter {
                while ($row = $statement->fetchArray()) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.gallery.image.comment')->import($row['commentID'], [
                                'objectID' => $row['photoID'],
-                               'userID' => ($row['userID'] ?: null),
+                               'userID' => $row['userID'] ?: null,
                                'username' => $row['username'],
                                'message' => $row['comment'],
                                'time' => $row['time']
@@ -2207,9 +2207,9 @@ class WBB3xExporter extends AbstractExporter {
                while ($row = $statement->fetchArray()) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.gallery.image.like')->import(0, [
                                'objectID' => $row['objectID'],
-                               'objectUserID' => ($row['objectUserID'] ?: null),
+                               'objectUserID' => $row['objectUserID'] ?: null,
                                'userID' => $row['userID'],
-                               'likeValue' => ($row['rating'] > 3 ? Like::LIKE : Like::DISLIKE)
+                               'likeValue' => ($row['rating'] > 3) ? Like::LIKE : Like::DISLIKE
                        ]);
                }
        }
@@ -2352,9 +2352,9 @@ class WBB3xExporter extends AbstractExporter {
                                'endTime' => $oldEventDateData['endTime'],
                                'isFullDay' => $oldEventDateData['isFullDay'],
                                'timezone' => 'UTC',
-                               'firstDayOfWeek' => (isset($oldEventDateData['wkst']) ? $oldEventDateData['wkst'] : 1),
+                               'firstDayOfWeek' => isset($oldEventDateData['wkst']) ? $oldEventDateData['wkst'] : 1,
                                'repeatType' => $repeatType,
-                               'repeatInterval' => (isset($oldEventDateData['repeatInterval']) ? $oldEventDateData['repeatInterval'] : 1),
+                               'repeatInterval' => isset($oldEventDateData['repeatInterval']) ? $oldEventDateData['repeatInterval'] : 1,
                                'repeatWeeklyByDay' => $repeatWeeklyByDay,
                                'repeatMonthlyByMonthDay' => $repeatMonthlyByMonthDay,
                                'repeatMonthlyDayOffset' => $repeatMonthlyDayOffset,
@@ -2369,7 +2369,7 @@ class WBB3xExporter extends AbstractExporter {
                        ];
                        
                        $data = [
-                               'userID' => ($row['userID'] ?: null),
+                               'userID' => $row['userID'] ?: null,
                                'username' => $row['username'],
                                'location' => $row['location'],
                                'enableComments' => $row['enableComments'],
@@ -2594,8 +2594,8 @@ class WBB3xExporter extends AbstractExporter {
                        $fileLocation = $this->fileSystemPath.'attachments/attachment-'.$row['attachmentID'];
                        
                        ImportHandler::getInstance()->getImporter($objectType)->import($row['attachmentID'], [
-                               'objectID' => (!empty($row['containerID']) ? $row['containerID'] : $row['messageID']),
-                               'userID' => ($row['userID'] ?: null),
+                               'objectID' => !empty($row['containerID']) ? $row['containerID'] : $row['messageID'],
+                               'userID' => $row['userID'] ?: null,
                                'filename' => $row['attachmentName'],
                                'filesize' => $row['attachmentSize'],
                                'fileType' => $row['fileType'],
@@ -2603,7 +2603,7 @@ class WBB3xExporter extends AbstractExporter {
                                'downloads' => $row['downloads'],
                                'lastDownloadTime' => $row['lastDownloadTime'],
                                'uploadTime' => $row['uploadTime'],
-                               'showOrder' => (!empty($row['showOrder']) ? $row['showOrder'] : 0)
+                               'showOrder' => !empty($row['showOrder']) ? $row['showOrder'] : 0
                        ], ['fileLocation' => $fileLocation]);
                }
        }
index c88b37256ee67a2e5999989b7eba41e2ba0d1ed3..92f3d4303a6feb95686091aab3ff1dca3a9b5673 100644 (file)
@@ -346,8 +346,8 @@ class WBB4xExporter extends AbstractExporter {
                                'groupDescription' => $row['groupDescription'],
                                'groupType' => $row['groupType'],
                                'priority' => $row['priority'],
-                               'userOnlineMarking' => (!empty($row['userOnlineMarking']) ? $row['userOnlineMarking'] : ''),
-                               'showOnTeamPage' => (!empty($row['showOnTeamPage']) ? $row['showOnTeamPage'] : 0)
+                               'userOnlineMarking' => !empty($row['userOnlineMarking']) ? $row['userOnlineMarking'] : '',
+                               'showOnTeamPage' => !empty($row['showOnTeamPage']) ? $row['showOnTeamPage'] : 0
                        ]);
                }
        }
@@ -654,7 +654,7 @@ class WBB4xExporter extends AbstractExporter {
                                'editable' => $row['editable'],
                                'visible' => $row['visible'],
                                'showOrder' => $row['showOrder']
-                       ], ['name' => ($row['name'] ?: $row['optionName'])]);
+                       ], ['name' => $row['name'] ?: $row['optionName']]);
                }
        }
        
@@ -811,7 +811,7 @@ class WBB4xExporter extends AbstractExporter {
                                'hideConversation' => $row['hideConversation'],
                                'isInvisible' => $row['isInvisible'],
                                'lastVisitTime' => $row['lastVisitTime']
-                       ], ['labelIDs' => (isset($labels[$row['conversationID']][$row['participantID']]) ? $labels[$row['conversationID']][$row['participantID']] : [])]);
+                       ], ['labelIDs' => isset($labels[$row['conversationID']][$row['participantID']]) ? $labels[$row['conversationID']][$row['participantID']] : []]);
                }
        }
        
@@ -1298,7 +1298,7 @@ class WBB4xExporter extends AbstractExporter {
                                // import label group
                                ImportHandler::getInstance()->getImporter('com.woltlab.wcf.label.group')->import($labelGroup['groupID'], [
                                        'groupName' => $labelGroup['groupName']
-                               ], ['objects' => [$objectType->objectTypeID => (!empty($boardIDs[$labelGroup['groupID']]) ? $boardIDs[$labelGroup['groupID']] : [])]]);
+                               ], ['objects' => [$objectType->objectTypeID => !empty($boardIDs[$labelGroup['groupID']]) ? $boardIDs[$labelGroup['groupID']] : []]]);
                                
                                // import labels
                                if (!empty($labels[$labelGroup['groupID']])) {
@@ -1689,7 +1689,7 @@ class WBB4xExporter extends AbstractExporter {
                while ($row = $statement->fetchArray()) {
                        $data = [
                                'userID' => $row['userID'],
-                               'username' => ($row['username'] ?: ''),
+                               'username' => $row['username'] ?: '',
                                'title' => $row['title'],
                                'description' => $row['description'],
                                'lastUpdateTime' => $row['lastUpdateTime']
@@ -1833,7 +1833,7 @@ class WBB4xExporter extends AbstractExporter {
                
                foreach ($images as $imageID => $imageData) {
                        $additionalData = [
-                               'fileLocation' => $imageFilePath .'/userImages/' . substr($imageData['fileHash'], 0, 2) . '/' . ($imageID) . '-' . $imageData['fileHash'] . '.' . $imageData['fileExtension']
+                               'fileLocation' => $imageFilePath .'/userImages/' . substr($imageData['fileHash'], 0, 2) . '/' . $imageID . '-' . $imageData['fileHash'] . '.' . $imageData['fileExtension']
                        ];
                        
                        if (isset($categories[$imageID])) {
@@ -2337,7 +2337,7 @@ class WBB4xExporter extends AbstractExporter {
                        
                        ImportHandler::getInstance()->getImporter($importer)->import($row['attachmentID'], [
                                'objectID' => $row['objectID'],
-                               'userID' => ($row['userID'] ?: null),
+                               'userID' => $row['userID'] ?: null,
                                'filename' => $row['filename'],
                                'filesize' => $row['filesize'],
                                'fileType' => $row['fileType'],
index ef82f556e8d251d1728af825e38964e3ef6d213f..3d6a0262e492686e0f93253fb5b1bf911c2466c8 100644 (file)
@@ -288,15 +288,15 @@ class WordPress3xExporter extends AbstractExporter {
                        if (!$time) $time = @strtotime($row['post_date']);
                        
                        ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry')->import($row['ID'], [
-                               'userID' => ($row['post_author'] ?: null),
-                               'username' => ($row['user_login'] ?: ''),
+                               'userID' => $row['post_author'] ?: null,
+                               'username' => $row['user_login'] ?: '',
                                'subject' => $row['post_title'],
                                'message' => self::fixMessage($row['post_content']),
                                'time' => $time,
                                'comments' => $row['comment_count'],
                                'enableHtml' => 1,
-                               'isPublished' => ($row['post_status'] == 'publish' ? 1 : 0),
-                               'isDeleted' => ($row['post_status'] == 'trash' ? 1 : 0)
+                               'isPublished' => ($row['post_status'] == 'publish') ? 1 : 0,
+                               'isDeleted' => ($row['post_status'] == 'trash') ? 1 : 0
                        ], $additionalData);
                }
        }
@@ -336,7 +336,7 @@ class WordPress3xExporter extends AbstractExporter {
                        if (!$row['comment_parent']) {
                                ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry.comment')->import($row['comment_ID'], [
                                        'objectID' => $row['comment_post_ID'],
-                                       'userID' => ($row['user_id'] ?: null),
+                                       'userID' => $row['user_id'] ?: null,
                                        'username' => $row['comment_author'],
                                        'message' => StringUtil::decodeHTML($row['comment_content']),
                                        'time' => @strtotime($row['comment_date_gmt'])
@@ -352,7 +352,7 @@ class WordPress3xExporter extends AbstractExporter {
                                        if (!$row2['comment_parent']) {
                                                ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry.comment.response')->import($row['comment_ID'], [
                                                        'commentID' => $row2['comment_ID'],
-                                                       'userID' => ($row['user_id'] ?: null),
+                                                       'userID' => $row['user_id'] ?: null,
                                                        'username' => $row['comment_author'],
                                                        'message' => StringUtil::decodeHTML($row['comment_content']),
                                                        'time' => @strtotime($row['comment_date_gmt'])
@@ -418,7 +418,7 @@ class WordPress3xExporter extends AbstractExporter {
                        
                        ImportHandler::getInstance()->getImporter('com.woltlab.blog.entry.attachment')->import($row['meta_id'], [
                                'objectID' => $row['post_parent'],
-                               'userID' => ($row['post_author'] ?: null),
+                               'userID' => $row['post_author'] ?: null,
                                'filename' => basename($fileLocation),
                                'filesize' => filesize($fileLocation),
                                'fileType' => $row['post_mime_type'],
index 657236e2f84af51e6aaa294641d12102647c81dc..6ef27dcf0670014fad394becc79b1a544374dbc6 100644 (file)
@@ -235,7 +235,7 @@ class XF12xExporter extends AbstractExporter {
                        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(["\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']
                        ]);
                }
@@ -762,10 +762,10 @@ class XF12xExporter extends AbstractExporter {
                                '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)),
+                               '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']
-                       ], ['labelIDs' => ($row['is_starred'] ? [$row['user_id']] : [])]);
+                       ], ['labelIDs' => $row['is_starred'] ? [$row['user_id']] : []]);
                }
        }
        
@@ -802,9 +802,9 @@ class XF12xExporter extends AbstractExporter {
                
                while ($row = $statement->fetchArray()) {
                        ImportHandler::getInstance()->getImporter('com.woltlab.wbb.board')->import($row['nodeID'], [
-                               'parentID' => ($row['parent_node_id'] ?: null),
+                               '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)),
+                               'boardType' => $row['node_type_id'] == 'Category' ? Board::TYPE_CATEGORY : ($row['node_type_id'] == 'Forum' ? Board::TYPE_BOARD : Board::TYPE_LINK),
                                'title' => $row['title'],
                                'description' => $row['description'],
                                'descriptionUseHtml' => 1, // cannot be disabled
@@ -896,7 +896,7 @@ class XF12xExporter extends AbstractExporter {
                                'message' => self::fixBBCodes($row['message']),
                                'time' => $row['post_date'],
                                'isDisabled' => $row['message_state'] == 'moderated' ? 1 : 0,
-                               'editorID' => ($row['last_edit_user_id'] ?: null),
+                               'editorID' => $row['last_edit_user_id'] ?: null,
                                'editor' => $row['editor'] ?: '',
                                'lastEditTime' => $row['last_edit_date'],
                                'editCount' => $row['editor'] ? $row['edit_count'] : 0,
@@ -1165,7 +1165,7 @@ class XF12xExporter extends AbstractExporter {
                        foreach ($mapping[$row['permission_id']] as $permission) {
                                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'],
+                                       $row['user_id'] ? 'userID' : 'groupID' => $row['user_id'] ?: $row['user_group_id'],
                                        'optionValue' => $row['permission_value'] == 'content_allow' ? 1 : 0
                                ], [
                                        'optionName' => $permission
@@ -1426,7 +1426,7 @@ class XF12xExporter extends AbstractExporter {
                        
                        ImportHandler::getInstance()->getImporter($objectType)->import($row['attachment_id'], [
                                'objectID' => $row['content_id'],
-                               'userID' => ($row['user_id'] ?: null),
+                               'userID' => $row['user_id'] ?: null,
                                'filename' => $row['filename'],
                                'filesize' => $row['file_size'],
                                'fileType' => FileUtil::getMimeType($fileLocation) ?: 'application/octet-stream',