'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']
];
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'
]);
}
}
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']
]);
'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']),
]);
}
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']
]);
}
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']
]);
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']
]);
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'],
'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']
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']),
'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']
]);
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']
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'],
'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']
];
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'
]);
}
}
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']
]);
'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']),
]);
}
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']
]);
}
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']
]);
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']
]);
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'],
'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']
];
'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']),
'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']
]);
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']
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'],
'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'])
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
'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);
'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
]);
}
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'],
'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']] : []]);
}
}
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
'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,
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'],
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']
]);
}
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
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'],
'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
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']
]);
}
'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']] : []]);
}
}
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
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'],
'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'])
'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']
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'],
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']
]);
}
'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']] : []]);
}
}
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
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'])
'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']
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'],
'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
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('&', '&', $board['name']),
'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'])
]);
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'],
'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']] : []]);
}
}
};
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,
'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,
'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'])
]);
}
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);
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']
]);
}
];
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'] : ''),
$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']
}
$data = [
- 'userID' => ($row['userid'] ?: null),
+ 'userID' => $row['userid'] ?: null,
'username' => $row['username'],
'subject' => $row['title'],
'message' => self::fixBBCodes($row['event']),
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'],
'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'])
]);
}
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);
'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) {
'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
'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'],
'hideConversation' => $row['deletepm'],
'isInvisible' => $row['blindcopy'],
'lastVisitTime' => $row['view']
- ], ['labelIDs' => ($row['folderid'] ? [$row['folderid']] : [])]);
+ ], ['labelIDs' => $row['folderid'] ? [$row['folderid']] : []]);
}
}
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'],
'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 = [];
'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'],
'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
]);
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,
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
]);
}
}
'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'],
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
]);
}
}
'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']]);
}
}
'hideConversation' => $row['isDeleted'],
'isInvisible' => $row['isBlindCopy'],
'lastVisitTime' => $row['isViewed']
- ], ['labelIDs' => ($row['folderID'] ? [$row['folderID']] : [])]);
+ ], ['labelIDs' => $row['folderID'] ? [$row['folderID']] : []]);
}
}
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'],
'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']
'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']
];
'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']),
'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']
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']
]);
}
'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]);
}
}
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']),
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
]);
}
}
while ($row = $statement->fetchArray()) {
$data = [
'userID' => $row['ownerID'],
- 'username' => ($row['username'] ?: ''),
+ 'username' => $row['username'] ?: '',
'title' => $row['title'],
'description' => $row['description'],
'lastUpdateTime' => $row['lastUpdateTime']
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'],
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']
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
]);
}
}
'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,
];
$data = [
- 'userID' => ($row['userID'] ?: null),
+ 'userID' => $row['userID'] ?: null,
'username' => $row['username'],
'location' => $row['location'],
'enableComments' => $row['enableComments'],
$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'],
'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]);
}
}
'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
]);
}
}
'editable' => $row['editable'],
'visible' => $row['visible'],
'showOrder' => $row['showOrder']
- ], ['name' => ($row['name'] ?: $row['optionName'])]);
+ ], ['name' => $row['name'] ?: $row['optionName']]);
}
}
'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']] : []]);
}
}
// 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']])) {
while ($row = $statement->fetchArray()) {
$data = [
'userID' => $row['userID'],
- 'username' => ($row['username'] ?: ''),
+ 'username' => $row['username'] ?: '',
'title' => $row['title'],
'description' => $row['description'],
'lastUpdateTime' => $row['lastUpdateTime']
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])) {
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'],
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);
}
}
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'])
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'])
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'],
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']
]);
}
'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']] : []]);
}
}
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
'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,
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
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',