From: Tim Düsterhus Date: Thu, 5 Sep 2013 15:33:07 +0000 (+0200) Subject: Replaces deprecated StringUtil methods X-Git-Tag: 2.0.0_Beta_4~1^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=29aaec0fc3304a2cb62a8896b91408d644bc8138;p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.exporter.git Replaces deprecated StringUtil methods see ec994d914200cb90e6b178f79a31d63c940534ff --- diff --git a/files/lib/system/exporter/PhpBB3xExporter.class.php b/files/lib/system/exporter/PhpBB3xExporter.class.php index 7947551..9665417 100644 --- a/files/lib/system/exporter/PhpBB3xExporter.class.php +++ b/files/lib/system/exporter/PhpBB3xExporter.class.php @@ -304,7 +304,7 @@ class PhpBB3xExporter extends AbstractExporter { 'banReason' => $row['banReason'], 'registrationIpAddress' => UserUtil::convertIPv4To6($row['user_ip']), 'signature' => self::fixBBCodes(StringUtil::decodeHTML($row['user_sig']), $row['user_sig_bbcode_uid']), - 'signatureEnableBBCodes' => ($row['user_sig_bbcode_uid'] ? (StringUtil::indexOf($row['user_sig'], $row['user_sig_bbcode_uid']) !== false ? 1 : 0) : 1), + 'signatureEnableBBCodes' => ($row['user_sig_bbcode_uid'] ? (mb_strpos($row['user_sig'], $row['user_sig_bbcode_uid']) !== false ? 1 : 0) : 1), 'signatureEnableHtml' => 0, 'signatureEnableSmilies' => preg_match('//', $row['user_sig']), 'lastActivityTime' => $row['user_lastvisit'] @@ -470,7 +470,7 @@ class PhpBB3xExporter extends AbstractExporter { while ($row = $statement->fetchArray()) { ImportHandler::getInstance()->getImporter('com.woltlab.wcf.conversation.label')->import($row['folder_id'], array( 'userID' => $row['user_id'], - 'label' => StringUtil::substring($row['folder_name'], 0, 80) + 'label' => mb_substr($row['folder_name'], 0, 80) )); } } @@ -1149,7 +1149,7 @@ class PhpBB3xExporter extends AbstractExporter { $aliases = explode("\n", $row['aliases']); $code = array_shift($aliases); - $emotion = StringUtil::substring($row['emotion'], 0, StringUtil::indexOf($row['emotion'], "\n") ?: StringUtil::length($row['emotion'])); // we had to GROUP_CONCAT it because of SQL strict mode + $emotion = mb_substr($row['emotion'], 0, mb_strpos($row['emotion'], "\n") ?: mb_strlen($row['emotion'])); // we had to GROUP_CONCAT it because of SQL strict mode ImportHandler::getInstance()->getImporter('com.woltlab.wcf.smiley')->import($row['smiley_id'], array( 'smileyTitle' => $emotion,