From: Cyperghost Date: Thu, 24 Oct 2024 09:43:16 +0000 (+0200) Subject: Use `Database::prepareUnmanaged()` instead of `Database::prepareStatement()`. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=486e97bf40527c7071d0be2544c325360ecadf83;p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.exporter.git Use `Database::prepareUnmanaged()` instead of `Database::prepareStatement()`. --- diff --git a/files/lib/system/exporter/Flarum1xExporter.class.php b/files/lib/system/exporter/Flarum1xExporter.class.php index 3d1addf..a64a455 100644 --- a/files/lib/system/exporter/Flarum1xExporter.class.php +++ b/files/lib/system/exporter/Flarum1xExporter.class.php @@ -72,7 +72,7 @@ final class Flarum1xExporter extends AbstractExporter $sql = "SELECT COUNT(*) FROM migrations"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); } @@ -150,7 +150,7 @@ final class Flarum1xExporter extends AbstractExporter FROM `groups` WHERE id BETWEEN ? AND ? ORDER BY id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $userOnlineMarking = '%s'; @@ -202,7 +202,7 @@ final class Flarum1xExporter extends AbstractExporter FROM users WHERE users.id BETWEEN ? AND ? ORDER BY users.id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $banned = 0; @@ -290,7 +290,7 @@ final class Flarum1xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM tags"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -307,7 +307,7 @@ final class Flarum1xExporter extends AbstractExporter { $sql = "SELECT * FROM tags"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); $objectType = ObjectTypeCache::getInstance() ->getObjectTypeByName('com.woltlab.wcf.label.objectType', 'com.woltlab.wbb.board'); @@ -384,7 +384,7 @@ final class Flarum1xExporter extends AbstractExporter ON users.id = discussions.user_id WHERE discussions.id BETWEEN ? AND ? ORDER BY discussions.id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -434,7 +434,7 @@ final class Flarum1xExporter extends AbstractExporter INNER JOIN tags ON discussion_tag.tag_id = tags.id {$condition}"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($condition->getParameters()); return $statement->fetchMap('discussion_id', 'name', false); @@ -469,7 +469,7 @@ final class Flarum1xExporter extends AbstractExporter ON discussions.id = posts.discussion_id WHERE posts.id BETWEEN ? AND ? ORDER BY posts.id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { switch ($row['type']) { @@ -515,7 +515,7 @@ final class Flarum1xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM post_likes"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -537,7 +537,7 @@ final class Flarum1xExporter extends AbstractExporter ON post_likes.post_id = posts.id ORDER BY post_likes.post_id, post_likes.user_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -561,7 +561,7 @@ final class Flarum1xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM polls"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -589,7 +589,7 @@ final class Flarum1xExporter extends AbstractExporter GROUP BY discussion_id ) ORDER BY polls.id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -615,7 +615,7 @@ final class Flarum1xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM poll_options"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -633,7 +633,7 @@ final class Flarum1xExporter extends AbstractExporter $sql = "SELECT * FROM poll_options ORDER BY id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -659,7 +659,7 @@ final class Flarum1xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM poll_votes"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -677,7 +677,7 @@ final class Flarum1xExporter extends AbstractExporter $sql = "SELECT * FROM poll_votes ORDER BY id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ diff --git a/files/lib/system/exporter/IPB3xExporter.class.php b/files/lib/system/exporter/IPB3xExporter.class.php index f6ad699..b036b5c 100644 --- a/files/lib/system/exporter/IPB3xExporter.class.php +++ b/files/lib/system/exporter/IPB3xExporter.class.php @@ -95,7 +95,7 @@ final class IPB3xExporter extends AbstractExporter $sql = "SELECT COUNT(*) FROM " . $this->databasePrefix . "core_like"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); } @@ -214,7 +214,7 @@ final class IPB3xExporter extends AbstractExporter $profileFields = $knownProfileFields = []; $sql = "SELECT * FROM " . $this->databasePrefix . "pfields_data"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { if (\in_array($row['pf_key'], self::$knownProfileFields)) { @@ -239,7 +239,7 @@ final class IPB3xExporter extends AbstractExporter ON pfields_content.member_id = members.member_id WHERE members.member_id BETWEEN ? AND ? ORDER BY members.member_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -335,7 +335,7 @@ final class IPB3xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "pfields_data " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); $row = $statement->fetchArray(); @@ -357,7 +357,7 @@ final class IPB3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "pfields_data " . $conditionBuilder . " ORDER BY pf_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $data = [ @@ -396,7 +396,7 @@ final class IPB3xExporter extends AbstractExporter FROM `" . $this->databasePrefix . "groups` WHERE g_id BETWEEN ? AND ? ORDER BY g_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $groupType = UserGroup::OTHER; @@ -430,7 +430,7 @@ final class IPB3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "profile_portal WHERE avatar_location <> '' OR pp_main_photo <> ''"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); if ($row !== false) { @@ -456,7 +456,7 @@ final class IPB3xExporter extends AbstractExporter OR pp_main_photo <> '' ) ORDER BY pp_member_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { if ($row['pp_main_photo']) { @@ -515,7 +515,7 @@ final class IPB3xExporter extends AbstractExporter ON members.member_id = status_updates.status_author_id WHERE status_updates.status_id BETWEEN ? AND ? ORDER BY status_updates.status_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -554,7 +554,7 @@ final class IPB3xExporter extends AbstractExporter ON members.member_id = member_status_replies.reply_member_id WHERE member_status_replies.reply_id BETWEEN ? AND ? ORDER BY member_status_replies.reply_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -591,7 +591,7 @@ final class IPB3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "profile_friends WHERE friends_id BETWEEN ? AND ? ORDER BY friends_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -628,7 +628,7 @@ final class IPB3xExporter extends AbstractExporter ON members.member_id = message_topics.mt_starter_id WHERE message_topics.mt_id BETWEEN ? AND ? ORDER BY message_topics.mt_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -667,7 +667,7 @@ final class IPB3xExporter extends AbstractExporter ON members.member_id = message_posts.msg_author_id WHERE message_posts.msg_id BETWEEN ? AND ? ORDER BY message_posts.msg_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -706,7 +706,7 @@ final class IPB3xExporter extends AbstractExporter ON members.member_id = message_topic_user_map.map_user_id WHERE message_topic_user_map.map_id BETWEEN ? AND ? ORDER BY message_topic_user_map.map_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -750,7 +750,7 @@ final class IPB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "forums"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -768,7 +768,7 @@ final class IPB3xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "forums ORDER BY parent_id, id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $this->boardCache[$row['parent_id']][] = $row; @@ -839,7 +839,7 @@ final class IPB3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "topics WHERE tid BETWEEN ? AND ? ORDER BY tid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $threadIDs[] = $row['tid']; @@ -858,7 +858,7 @@ final class IPB3xExporter extends AbstractExporter $sql = "SELECT topics.* FROM " . $this->databasePrefix . "topics topics " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $data = [ @@ -913,7 +913,7 @@ final class IPB3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "posts WHERE pid BETWEEN ? AND ? ORDER BY pid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -946,7 +946,7 @@ final class IPB3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "core_like WHERE like_app = ? AND like_area = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['forums', 'topics']); $row = $statement->fetchArray(); @@ -966,7 +966,7 @@ final class IPB3xExporter extends AbstractExporter WHERE like_app = ? AND like_area = ? ORDER BY like_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['forums', 'topics']); while ($row = $statement->fetchArray()) { $data = [ @@ -1002,7 +1002,7 @@ final class IPB3xExporter extends AbstractExporter ON topics.tid = polls.tid WHERE pid BETWEEN ? AND ? ORDER BY pid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = @\unserialize($row['choices']); @@ -1068,7 +1068,7 @@ final class IPB3xExporter extends AbstractExporter ON polls.tid = voters.tid WHERE voters.vid BETWEEN ? AND ? ORDER BY voters.vid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = @\unserialize($row['member_choices']); @@ -1103,7 +1103,7 @@ final class IPB3xExporter extends AbstractExporter WHERE like_app = ? AND like_area = ? AND like_visible = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['forums', 'topics', 1]); $row = $statement->fetchArray(); @@ -1126,7 +1126,7 @@ final class IPB3xExporter extends AbstractExporter AND core_like.like_area = ? AND core_like.like_visible = ? ORDER BY core_like.like_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['forums', 'topics', 1]); while ($row = $statement->fetchArray()) { $data = [ @@ -1188,7 +1188,7 @@ final class IPB3xExporter extends AbstractExporter WHERE attach_rel_module = ? AND attach_rel_id > ? AND attach_id BETWEEN ? AND ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([ $type, 0, @@ -1223,7 +1223,7 @@ final class IPB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "gallery_categories"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1241,7 +1241,7 @@ final class IPB3xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "gallery_categories ORDER BY category_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1278,7 +1278,7 @@ final class IPB3xExporter extends AbstractExporter ON members.member_id = albums.album_owner_id WHERE albums.album_id BETWEEN ? AND ? ORDER BY albums.album_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1317,7 +1317,7 @@ final class IPB3xExporter extends AbstractExporter ON members.member_id = images.image_member_id WHERE image_id BETWEEN ? AND ? ORDER BY image_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $fileLocation = $this->fileSystemPath . 'uploads/' . $row['image_directory'] . '/' . $row['image_masked_file_name']; @@ -1373,7 +1373,7 @@ final class IPB3xExporter extends AbstractExporter $sql = "SELECT tag_meta_id, tag_text FROM " . $this->databasePrefix . "core_tags " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($tags[$row['tag_meta_id']])) { diff --git a/files/lib/system/exporter/IPB4xExporter.class.php b/files/lib/system/exporter/IPB4xExporter.class.php index 0e27054..61c87b9 100644 --- a/files/lib/system/exporter/IPB4xExporter.class.php +++ b/files/lib/system/exporter/IPB4xExporter.class.php @@ -134,7 +134,7 @@ final class IPB4xExporter extends AbstractExporter $sql = "SELECT COUNT(*) FROM " . $this->databasePrefix . "core_admin_permission_rows"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); } @@ -276,7 +276,7 @@ final class IPB4xExporter extends AbstractExporter $profileFields = []; $sql = "SELECT * FROM " . $this->databasePrefix . "core_pfields_data"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $profileFields[] = $row; @@ -295,7 +295,7 @@ final class IPB4xExporter extends AbstractExporter ON pfields_content.member_id = members.member_id WHERE members.member_id BETWEEN ? AND ? ORDER BY members.member_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -372,7 +372,7 @@ final class IPB4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "core_pfields_data"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -390,7 +390,7 @@ final class IPB4xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "core_pfields_data ORDER BY pf_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -431,7 +431,7 @@ final class IPB4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "core_groups WHERE g_id BETWEEN ? AND ? ORDER BY g_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $groupType = UserGroup::OTHER; @@ -464,7 +464,7 @@ final class IPB4xExporter extends AbstractExporter $sql = "SELECT MAX(member_id) AS maxID FROM " . $this->databasePrefix . "core_members WHERE pp_main_photo <> ''"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); if ($row !== false) { @@ -487,7 +487,7 @@ final class IPB4xExporter extends AbstractExporter WHERE member_id BETWEEN ? AND ? AND pp_main_photo <> '' ORDER BY member_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $avatarName = \basename($row['pp_main_photo']); @@ -530,7 +530,7 @@ final class IPB4xExporter extends AbstractExporter ON members.member_id = status_updates.status_author_id WHERE status_updates.status_id BETWEEN ? AND ? ORDER BY status_updates.status_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -569,7 +569,7 @@ final class IPB4xExporter extends AbstractExporter ON members.member_id = member_status_replies.reply_member_id WHERE member_status_replies.reply_id BETWEEN ? AND ? ORDER BY member_status_replies.reply_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -595,7 +595,7 @@ final class IPB4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "core_follow WHERE follow_app = ? AND follow_area = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['core', 'member']); $row = $statement->fetchArray(); @@ -615,7 +615,7 @@ final class IPB4xExporter extends AbstractExporter WHERE follow_app = ? AND follow_area = ? ORDER BY follow_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['core', 'member']); while ($row = $statement->fetchArray()) { $data = [ @@ -652,7 +652,7 @@ final class IPB4xExporter extends AbstractExporter ON members.member_id = message_topics.mt_starter_id WHERE message_topics.mt_id BETWEEN ? AND ? ORDER BY message_topics.mt_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -691,7 +691,7 @@ final class IPB4xExporter extends AbstractExporter ON members.member_id = message_posts.msg_author_id WHERE message_posts.msg_id BETWEEN ? AND ? ORDER BY message_posts.msg_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -730,7 +730,7 @@ final class IPB4xExporter extends AbstractExporter ON members.member_id = message_topic_user_map.map_user_id WHERE message_topic_user_map.map_id BETWEEN ? AND ? ORDER BY message_topic_user_map.map_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -774,7 +774,7 @@ final class IPB4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "forums_forums"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -792,7 +792,7 @@ final class IPB4xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "forums_forums ORDER BY parent_id, id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $this->boardCache[$row['parent_id']][] = $row; @@ -864,7 +864,7 @@ final class IPB4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "forums_topics WHERE tid BETWEEN ? AND ? ORDER BY tid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $threadIDs[] = $row['tid']; @@ -884,7 +884,7 @@ final class IPB4xExporter extends AbstractExporter $sql = "SELECT topics.* FROM " . $this->databasePrefix . "forums_topics topics " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $data = [ @@ -936,7 +936,7 @@ final class IPB4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "forums_posts WHERE pid BETWEEN ? AND ? ORDER BY pid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -969,7 +969,7 @@ final class IPB4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "core_follow WHERE follow_app = ? AND follow_area = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['forums', 'topic']); $row = $statement->fetchArray(); @@ -989,7 +989,7 @@ final class IPB4xExporter extends AbstractExporter WHERE follow_app = ? AND follow_area = ? ORDER BY follow_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['forums', 'topic']); while ($row = $statement->fetchArray()) { $data = [ @@ -1025,7 +1025,7 @@ final class IPB4xExporter extends AbstractExporter ON topics.poll_state = polls.pid WHERE pid BETWEEN ? AND ? ORDER BY pid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { if (!$row['topic_firstpost']) { @@ -1097,7 +1097,7 @@ final class IPB4xExporter extends AbstractExporter ON polls.pid = voters.poll WHERE voters.vid BETWEEN ? AND ? ORDER BY voters.vid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { try { @@ -1139,7 +1139,7 @@ final class IPB4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "core_reputation_index WHERE app = ? AND type = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['forums', 'pid']); $row = $statement->fetchArray(); @@ -1161,7 +1161,7 @@ final class IPB4xExporter extends AbstractExporter WHERE core_reputation_index.app = ? AND core_reputation_index.type = ? ORDER BY core_reputation_index.id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['forums', 'pid']); while ($row = $statement->fetchArray()) { $data = [ @@ -1209,7 +1209,7 @@ final class IPB4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "core_attachments_map WHERE location_key = ? AND id2 IS NOT NULL"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$type]); $row = $statement->fetchArray(); @@ -1233,7 +1233,7 @@ final class IPB4xExporter extends AbstractExporter WHERE core_attachments_map.location_key = ? AND core_attachments_map.id2 IS NOT NULL ORDER BY core_attachments_map.attachment_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([$type]); while ($row = $statement->fetchArray()) { if (!$row['attach_id']) { @@ -1267,7 +1267,7 @@ final class IPB4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "gallery_categories"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1285,7 +1285,7 @@ final class IPB4xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "gallery_categories ORDER BY category_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1322,7 +1322,7 @@ final class IPB4xExporter extends AbstractExporter ON members.member_id = albums.album_owner_id WHERE albums.album_id BETWEEN ? AND ? ORDER BY albums.album_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1361,7 +1361,7 @@ final class IPB4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "gallery_images WHERE image_id BETWEEN ? AND ? ORDER BY image_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $imageIDs[] = $row['image_id']; @@ -1381,7 +1381,7 @@ final class IPB4xExporter extends AbstractExporter LEFT JOIN " . $this->databasePrefix . "core_members members ON members.member_id = images.image_member_id " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $fileLocation = $this->fileSystemPath . 'uploads/' . $row['image_original_file_name']; @@ -1440,7 +1440,7 @@ final class IPB4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "gallery_comments WHERE comment_id BETWEEN ? AND ? ORDER BY comment_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1466,7 +1466,7 @@ final class IPB4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "core_reputation_index WHERE app = ? AND type = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['gallery', 'image_id']); $row = $statement->fetchArray(); @@ -1488,7 +1488,7 @@ final class IPB4xExporter extends AbstractExporter WHERE core_reputation_index.app = ? AND core_reputation_index.type = ? ORDER BY core_reputation_index.id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['gallery', 'image_id']); while ($row = $statement->fetchArray()) { $data = [ @@ -1527,7 +1527,7 @@ final class IPB4xExporter extends AbstractExporter ON members.member_id = blogs.blog_member_id WHERE blogs.blog_id BETWEEN ? AND ? ORDER BY blogs.blog_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1560,7 +1560,7 @@ final class IPB4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "blog_entry_categories"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1578,7 +1578,7 @@ final class IPB4xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "blog_entry_categories ORDER BY entry_category_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1613,7 +1613,7 @@ final class IPB4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "blog_entries WHERE entry_id BETWEEN ? AND ? ORDER BY entry_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $entryIDs[] = $row['entry_id']; @@ -1633,7 +1633,7 @@ final class IPB4xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "blog_entries " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $additionalData = []; @@ -1704,7 +1704,7 @@ final class IPB4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "blog_comments WHERE comment_id BETWEEN ? AND ? ORDER BY comment_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1730,7 +1730,7 @@ final class IPB4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "core_reputation_index WHERE app = ? AND type = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['blog', 'entry_id']); $row = $statement->fetchArray(); @@ -1752,7 +1752,7 @@ final class IPB4xExporter extends AbstractExporter WHERE core_reputation_index.app = ? AND core_reputation_index.type = ? ORDER BY core_reputation_index.id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['blog', 'entry_id']); while ($row = $statement->fetchArray()) { $data = [ @@ -1789,7 +1789,7 @@ final class IPB4xExporter extends AbstractExporter $sql = "SELECT tag_meta_id, tag_text FROM " . $this->databasePrefix . "core_tags " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($tags[$row['tag_meta_id']])) { @@ -1812,7 +1812,7 @@ final class IPB4xExporter extends AbstractExporter $sql = "SELECT lang_id FROM " . $this->databasePrefix . "core_sys_lang WHERE lang_default = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([1]); $row = $statement->fetchArray(); if ($row !== false) { @@ -1840,7 +1840,7 @@ final class IPB4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "core_sys_lang_words WHERE lang_id = ? AND word_key = ?"; - $this->languageStatement = $this->database->prepareStatement($sql, 1); + $this->languageStatement = $this->database->prepareUnmanaged($sql, 1); } $this->languageStatement->execute([ $this->getDefaultLanguageID(), diff --git a/files/lib/system/exporter/Kunena3xExporter.class.php b/files/lib/system/exporter/Kunena3xExporter.class.php index d6343c3..3e06b38 100644 --- a/files/lib/system/exporter/Kunena3xExporter.class.php +++ b/files/lib/system/exporter/Kunena3xExporter.class.php @@ -110,7 +110,7 @@ final class Kunena3xExporter extends AbstractExporter $sql = "SELECT COUNT(*) FROM " . $this->databasePrefix . "kunena_users"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); } @@ -154,7 +154,7 @@ final class Kunena3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "usergroups WHERE id BETWEEN ? AND ? ORDER BY id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { switch ($row['id']) { @@ -190,7 +190,7 @@ final class Kunena3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "kunena_users kunena_users, " . $this->databasePrefix . "users users WHERE users.id = kunena_users.userid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -222,7 +222,7 @@ final class Kunena3xExporter extends AbstractExporter " . $this->databasePrefix . "users users WHERE users.id = kunena_users.userid ORDER BY kunena_users.userid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -283,7 +283,7 @@ final class Kunena3xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "kunena_ranks WHERE rank_special = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $row = $statement->fetchArray(); @@ -302,7 +302,7 @@ final class Kunena3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "kunena_ranks WHERE rank_special = ? ORDER BY rank_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0]); while ($row = $statement->fetchArray()) { $data = [ @@ -328,7 +328,7 @@ final class Kunena3xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "kunena_users WHERE avatar <> ''"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -347,7 +347,7 @@ final class Kunena3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "kunena_users WHERE avatar <> '' ORDER BY userid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $filepath = $this->fileSystemPath . 'media/kunena/avatars/' . $row['avatar']; @@ -377,7 +377,7 @@ final class Kunena3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "kunena_categories"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -395,7 +395,7 @@ final class Kunena3xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "kunena_categories ORDER BY parent_id, ordering, id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $this->boardCache[$row['parent_id']][] = $row; @@ -453,7 +453,7 @@ final class Kunena3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "kunena_topics kunena_topics WHERE id BETWEEN ? AND ? ORDER BY id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -496,7 +496,7 @@ final class Kunena3xExporter extends AbstractExporter ON kunena_messages_text.mesid = kunena_messages.id WHERE id BETWEEN ? AND ? ORDER BY id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -537,7 +537,7 @@ final class Kunena3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "kunena_attachments WHERE id BETWEEN ? AND ? ORDER BY id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $fileLocation = FileUtil::addTrailingSlash($this->fileSystemPath . $row['folder']) . $row['filename']; diff --git a/files/lib/system/exporter/MyBB16xExporter.class.php b/files/lib/system/exporter/MyBB16xExporter.class.php index 80a5a93..502ef83 100644 --- a/files/lib/system/exporter/MyBB16xExporter.class.php +++ b/files/lib/system/exporter/MyBB16xExporter.class.php @@ -113,7 +113,7 @@ final class MyBB16xExporter extends AbstractExporter $sql = "SELECT cache FROM " . $this->databasePrefix . "datacache WHERE title = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['version']); $row = $statement->fetchArray(); $data = \unserialize($row['cache']); @@ -244,7 +244,7 @@ final class MyBB16xExporter extends AbstractExporter FROM " . $this->databasePrefix . "usergroups WHERE gid BETWEEN ? AND ? ORDER BY gid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { switch ($row['gid']) { @@ -293,7 +293,7 @@ final class MyBB16xExporter extends AbstractExporter $profileFields = $knownProfileFields = []; $sql = "SELECT * FROM " . $this->databasePrefix . "profilefields"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { if (\in_array($row['name'], self::$knownProfileFields)) { @@ -320,7 +320,7 @@ final class MyBB16xExporter extends AbstractExporter ON user_table.uid = ban_table.uid WHERE user_table.uid BETWEEN ? AND ? ORDER BY user_table.uid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -410,7 +410,7 @@ final class MyBB16xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "profilefields " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); $row = $statement->fetchArray(); @@ -432,7 +432,7 @@ final class MyBB16xExporter extends AbstractExporter FROM " . $this->databasePrefix . "profilefields " . $conditionBuilder . " ORDER BY fid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $selectOptions = ''; @@ -496,7 +496,7 @@ final class MyBB16xExporter extends AbstractExporter FROM " . $this->databasePrefix . "usergroups WHERE usertitle <> ? AND gid <> ? ) AS count"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['', 1]); $row = $statement->fetchArray(); @@ -523,7 +523,7 @@ final class MyBB16xExporter extends AbstractExporter AND gid <> ? ) ORDER BY utid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['', 1]); while ($row = $statement->fetchArray()) { $data = [ @@ -549,7 +549,7 @@ final class MyBB16xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "users WHERE buddylist <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['']); $row = $statement->fetchArray(); @@ -568,7 +568,7 @@ final class MyBB16xExporter extends AbstractExporter FROM " . $this->databasePrefix . "users WHERE buddylist <> ? ORDER BY uid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['']); while ($row = $statement->fetchArray()) { $buddylist = \array_unique(ArrayUtil::toIntegerArray(\explode(',', $row['buddylist']))); @@ -595,7 +595,7 @@ final class MyBB16xExporter extends AbstractExporter FROM " . $this->databasePrefix . "users WHERE avatar <> ? AND avatartype IN (?, ?)"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['', 'upload', 'gallery']); $row = $statement->fetchArray(); @@ -615,7 +615,7 @@ final class MyBB16xExporter extends AbstractExporter WHERE avatar <> ? AND avatartype IN (?, ?) ORDER BY uid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['', 'upload', 'gallery']); while ($row = $statement->fetchArray()) { @@ -657,7 +657,7 @@ final class MyBB16xExporter extends AbstractExporter $sql = "SELECT uid, pmfolders FROM " . $this->databasePrefix . "users ORDER BY uid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { if (empty($row['pmfolders'])) { @@ -712,7 +712,7 @@ final class MyBB16xExporter extends AbstractExporter GROUP BY fromid, dateline ) ORDER BY pmid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $row['isDraft'] = $row['folder'] == 3 ? 1 : 0; @@ -768,7 +768,7 @@ final class MyBB16xExporter extends AbstractExporter ON user_table.uid = message_table.uid WHERE pmid BETWEEN ? AND ? ORDER BY pmid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $recipients = \unserialize($row['recipients']); @@ -801,7 +801,7 @@ final class MyBB16xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "forums"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -819,7 +819,7 @@ final class MyBB16xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "forums ORDER BY pid, disporder, fid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $this->boardCache[$row['pid']][] = $row; @@ -890,7 +890,7 @@ final class MyBB16xExporter extends AbstractExporter FROM " . $this->databasePrefix . "threads WHERE tid BETWEEN ? AND ? ORDER BY tid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -948,7 +948,7 @@ final class MyBB16xExporter extends AbstractExporter ON user_table.uid = post_table.edituid WHERE pid BETWEEN ? AND ? ORDER BY pid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -995,7 +995,7 @@ final class MyBB16xExporter extends AbstractExporter $sql = "SELECT value FROM " . $this->databasePrefix . "settings WHERE name = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['uploadspath']); $row = $statement->fetchArray(); $uploadsPath = $row['value']; @@ -1007,7 +1007,7 @@ final class MyBB16xExporter extends AbstractExporter FROM " . $this->databasePrefix . "attachments WHERE aid BETWEEN ? AND ? ORDER BY aid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $fileLocation = FileUtil::addTrailingSlash($uploadsPath) . $row['attachname']; @@ -1050,7 +1050,7 @@ final class MyBB16xExporter extends AbstractExporter FROM " . $this->databasePrefix . "threadsubscriptions WHERE sid BETWEEN ? AND ? ORDER BY sid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1087,7 +1087,7 @@ final class MyBB16xExporter extends AbstractExporter ON poll_table.tid = thread_table.tid WHERE pid BETWEEN ? AND ? ORDER BY pid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1126,7 +1126,7 @@ final class MyBB16xExporter extends AbstractExporter $sql = "SELECT pid, options, votes FROM " . $this->databasePrefix . "polls ORDER BY pid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $options = \explode('||~|~||', $row['options']); @@ -1159,7 +1159,7 @@ final class MyBB16xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "pollvotes"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1177,7 +1177,7 @@ final class MyBB16xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "pollvotes ORDER BY vid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1202,7 +1202,7 @@ final class MyBB16xExporter extends AbstractExporter WHERE pid <> ? AND adduid <> ? AND reputation <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0, 0, 0]); $row = $statement->fetchArray(); @@ -1223,7 +1223,7 @@ final class MyBB16xExporter extends AbstractExporter AND adduid <> ? AND reputation <> ? ORDER BY rid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0, 0, 0]); while ($row = $statement->fetchArray()) { $data = [ @@ -1247,7 +1247,7 @@ final class MyBB16xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "threadprefixes"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1267,7 +1267,7 @@ final class MyBB16xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "threadprefixes"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $forums = \array_unique(ArrayUtil::toIntegerArray(\explode(',', $row['forums']))); @@ -1347,7 +1347,7 @@ final class MyBB16xExporter extends AbstractExporter SELECT COUNT(*) FROM " . $this->databasePrefix . "forumpermissions ) AS count"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1374,7 +1374,7 @@ final class MyBB16xExporter extends AbstractExporter FROM " . $this->databasePrefix . "forumpermissions ) ORDER BY type, id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { /** @noinspection PhpVariableVariableInspection */ @@ -1421,7 +1421,7 @@ final class MyBB16xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "moderators " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { foreach ($modPermissionMap as $mybbPermission => $permissions) { @@ -1470,7 +1470,7 @@ final class MyBB16xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "forumpermissions " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { @@ -1496,7 +1496,7 @@ final class MyBB16xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "smilies"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1514,7 +1514,7 @@ final class MyBB16xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "smilies ORDER BY sid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([]); while ($row = $statement->fetchArray()) { $fileLocation = $this->fileSystemPath . $row['image']; diff --git a/files/lib/system/exporter/PhpBB31xExporter.class.php b/files/lib/system/exporter/PhpBB31xExporter.class.php index cbd845a..60d524b 100644 --- a/files/lib/system/exporter/PhpBB31xExporter.class.php +++ b/files/lib/system/exporter/PhpBB31xExporter.class.php @@ -150,7 +150,7 @@ final class PhpBB31xExporter extends AbstractExporter $sql = "SELECT COUNT(*) FROM " . $this->databasePrefix . "zebra"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); } @@ -276,7 +276,7 @@ final class PhpBB31xExporter extends AbstractExporter FROM " . $this->databasePrefix . "groups WHERE group_id BETWEEN ? AND ? ORDER BY group_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { switch ($row['group_id']) { @@ -320,7 +320,7 @@ final class PhpBB31xExporter extends AbstractExporter $sql = "SELECT MAX(user_id) AS maxID FROM " . $this->databasePrefix . "users WHERE user_type <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([self::USER_TYPE_USER_IGNORE]); $row = $statement->fetchArray(); if ($row !== false) { @@ -342,7 +342,7 @@ final class PhpBB31xExporter extends AbstractExporter $profileFields = []; $sql = "SELECT * FROM " . $this->databasePrefix . "profile_fields"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $profileFields[] = $row; @@ -371,7 +371,7 @@ final class PhpBB31xExporter extends AbstractExporter WHERE user_table.user_type <> ? AND user_table.user_id BETWEEN ? AND ? ORDER BY user_table.user_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0, 0, self::USER_TYPE_USER_IGNORE, $offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -469,7 +469,7 @@ final class PhpBB31xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "profile_fields"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -504,7 +504,7 @@ final class PhpBB31xExporter extends AbstractExporter FROM " . $this->databasePrefix . "profile_fields fields " . $condition . " ORDER BY fields.field_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(\array_merge( ['profilefields.type.dropdown'], $condition->getParameters() @@ -581,7 +581,7 @@ final class PhpBB31xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "ranks WHERE rank_special = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $row = $statement->fetchArray(); @@ -600,7 +600,7 @@ final class PhpBB31xExporter extends AbstractExporter FROM " . $this->databasePrefix . "ranks WHERE rank_special = ? ORDER BY rank_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0]); while ($row = $statement->fetchArray()) { $data = [ @@ -627,7 +627,7 @@ final class PhpBB31xExporter extends AbstractExporter FROM " . $this->databasePrefix . "zebra WHERE friend = ? AND foe = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([1, 0]); $row = $statement->fetchArray(); @@ -647,7 +647,7 @@ final class PhpBB31xExporter extends AbstractExporter WHERE friend = ? AND foe = ? ORDER BY user_id, zebra_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([1, 0]); while ($row = $statement->fetchArray()) { $data = [ @@ -669,7 +669,7 @@ final class PhpBB31xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "users WHERE user_avatar_type IN (?, ?)"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([ self::AVATAR_TYPE_GALLERY, self::AVATAR_TYPE_UPLOADED, @@ -692,7 +692,7 @@ final class PhpBB31xExporter extends AbstractExporter $sql = "SELECT config_name, config_value FROM " . $this->databasePrefix . "config WHERE config_name IN (?, ?, ?)"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['avatar_path', 'avatar_salt', 'avatar_gallery_path']); while ($row = $statement->fetchArray()) { $config_name = $row['config_name']; @@ -705,7 +705,7 @@ final class PhpBB31xExporter extends AbstractExporter FROM " . $this->databasePrefix . "users WHERE user_avatar_type IN (?, ?) ORDER BY user_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([self::AVATAR_TYPE_GALLERY, self::AVATAR_TYPE_UPLOADED]); while ($row = $statement->fetchArray()) { $extension = \pathinfo($row['user_avatar'], \PATHINFO_EXTENSION); @@ -741,7 +741,7 @@ final class PhpBB31xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "privmsgs_folder"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -759,7 +759,7 @@ final class PhpBB31xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "privmsgs_folder ORDER BY folder_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -800,7 +800,7 @@ final class PhpBB31xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "privmsgs"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -848,7 +848,7 @@ final class PhpBB31xExporter extends AbstractExporter WHERE forum_id = ? ) ORDER BY isDraft, msg_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0]); while ($row = $statement->fetchArray()) { if (!$row['isDraft']) { @@ -886,7 +886,7 @@ final class PhpBB31xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "privmsgs"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -947,7 +947,7 @@ final class PhpBB31xExporter extends AbstractExporter WHERE forum_id = ? ) ORDER BY msg_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([1, 0]); while ($row = $statement->fetchArray()) { $participants = \explode(',', $row['participants'] ?: ''); @@ -976,7 +976,7 @@ final class PhpBB31xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "privmsgs_to"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1005,7 +1005,7 @@ final class PhpBB31xExporter extends AbstractExporter LEFT JOIN " . $this->databasePrefix . "users user_table ON to_table.user_id = user_table.user_id ORDER BY to_table.msg_id, to_table.user_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $participants = \explode(',', $row['participants'] ?: ''); @@ -1060,7 +1060,7 @@ final class PhpBB31xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "forums"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1078,7 +1078,7 @@ final class PhpBB31xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "forums ORDER BY parent_id, left_id, forum_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $this->boardCache[$row['parent_id']][] = $row; @@ -1153,7 +1153,7 @@ final class PhpBB31xExporter extends AbstractExporter FROM " . $this->databasePrefix . "topics WHERE topic_id BETWEEN ? AND ? ORDER BY topic_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1221,7 +1221,7 @@ final class PhpBB31xExporter extends AbstractExporter ON post_table.post_edit_user = editor.user_id WHERE post_id BETWEEN ? AND ? ORDER BY post_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0, $offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1277,7 +1277,7 @@ final class PhpBB31xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "topics_watch"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1297,7 +1297,7 @@ final class PhpBB31xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "topics_watch ORDER BY topic_id, user_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1320,7 +1320,7 @@ final class PhpBB31xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "topics WHERE poll_start <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $row = $statement->fetchArray(); @@ -1345,7 +1345,7 @@ final class PhpBB31xExporter extends AbstractExporter FROM " . $this->databasePrefix . "topics topic WHERE poll_start <> ? ORDER BY topic_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0]); while ($row = $statement->fetchArray()) { $data = [ @@ -1372,7 +1372,7 @@ final class PhpBB31xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "poll_options"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1390,7 +1390,7 @@ final class PhpBB31xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "poll_options ORDER BY poll_option_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1417,7 +1417,7 @@ final class PhpBB31xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "poll_votes WHERE vote_user_id <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $row = $statement->fetchArray(); @@ -1436,7 +1436,7 @@ final class PhpBB31xExporter extends AbstractExporter FROM " . $this->databasePrefix . "poll_votes WHERE vote_user_id <> ? ORDER BY poll_option_id, vote_user_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0]); while ($row = $statement->fetchArray()) { $data = [ @@ -1465,7 +1465,7 @@ final class PhpBB31xExporter extends AbstractExporter FROM " . $this->databasePrefix . "acl_groups WHERE forum_id <> ? ) AS count"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0, 0]); $row = $statement->fetchArray(); @@ -1483,7 +1483,7 @@ final class PhpBB31xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "acl_options WHERE is_local = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([1]); $options = []; while ($row = $statement->fetchArray()) { @@ -1495,7 +1495,7 @@ final class PhpBB31xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "acl_roles_data " . $condition; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($condition->getParameters()); $roles = []; while ($row = $statement->fetchArray()) { @@ -1510,7 +1510,7 @@ final class PhpBB31xExporter extends AbstractExporter FROM " . $this->databasePrefix . "acl_groups WHERE forum_id <> ? ORDER BY auth_role_id DESC"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $key = 'group'; } elseif ($offset == 1) { @@ -1519,7 +1519,7 @@ final class PhpBB31xExporter extends AbstractExporter FROM " . $this->databasePrefix . "acl_users WHERE forum_id <> ? ORDER BY auth_role_id DESC"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $key = 'user'; } @@ -1630,7 +1630,7 @@ final class PhpBB31xExporter extends AbstractExporter { $sql = "SELECT COUNT(DISTINCT smiley_url) AS count FROM " . $this->databasePrefix . "smilies"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1653,7 +1653,7 @@ final class PhpBB31xExporter extends AbstractExporter FROM " . $this->databasePrefix . "smilies GROUP BY smiley_url ORDER BY smiley_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([]); while ($row = $statement->fetchArray()) { $fileLocation = $this->fileSystemPath . 'images/smilies/' . $row['smiley_url']; @@ -1695,7 +1695,7 @@ final class PhpBB31xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "attachments WHERE in_message = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$conversation ? 1 : 0]); $row = $statement->fetchArray(); @@ -1716,7 +1716,7 @@ final class PhpBB31xExporter extends AbstractExporter $sql = "SELECT config_name, config_value FROM " . $this->databasePrefix . "config WHERE config_name IN (?)"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['upload_path']); while ($row = $statement->fetchArray()) { $config_name = $row['config_name']; @@ -1729,7 +1729,7 @@ final class PhpBB31xExporter extends AbstractExporter FROM " . $this->databasePrefix . "attachments WHERE in_message = ? ORDER BY attach_id DESC"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([$conversation ? 1 : 0]); while ($row = $statement->fetchArray()) { $fileLocation = FileUtil::addTrailingSlash($this->fileSystemPath . $upload_path) . $row['physical_filename']; diff --git a/files/lib/system/exporter/PhpBB3xExporter.class.php b/files/lib/system/exporter/PhpBB3xExporter.class.php index 4c36034..57b69ed 100644 --- a/files/lib/system/exporter/PhpBB3xExporter.class.php +++ b/files/lib/system/exporter/PhpBB3xExporter.class.php @@ -135,7 +135,7 @@ final class PhpBB3xExporter extends AbstractExporter $sql = "SELECT COUNT(*) FROM " . $this->databasePrefix . "zebra"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); } @@ -261,7 +261,7 @@ final class PhpBB3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "groups WHERE group_id BETWEEN ? AND ? ORDER BY group_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { switch ($row['group_id']) { @@ -305,7 +305,7 @@ final class PhpBB3xExporter extends AbstractExporter $sql = "SELECT MAX(user_id) AS maxID FROM " . $this->databasePrefix . "users WHERE user_type <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([self::USER_TYPE_USER_IGNORE]); $row = $statement->fetchArray(); if ($row !== false) { @@ -327,7 +327,7 @@ final class PhpBB3xExporter extends AbstractExporter $profileFields = []; $sql = "SELECT * FROM " . $this->databasePrefix . "profile_fields"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $profileFields[] = $row; @@ -356,7 +356,7 @@ final class PhpBB3xExporter extends AbstractExporter WHERE user_table.user_type <> ? AND user_table.user_id BETWEEN ? AND ? ORDER BY user_table.user_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0, 0, self::USER_TYPE_USER_IGNORE, $offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -426,7 +426,7 @@ final class PhpBB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "profile_fields"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -454,7 +454,7 @@ final class PhpBB3xExporter extends AbstractExporter ) AS selectOptions FROM " . $this->databasePrefix . "profile_fields fields ORDER BY fields.field_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([5]); while ($row = $statement->fetchArray()) { switch ($row['field_type']) { @@ -512,7 +512,7 @@ final class PhpBB3xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "ranks WHERE rank_special = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $row = $statement->fetchArray(); @@ -531,7 +531,7 @@ final class PhpBB3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "ranks WHERE rank_special = ? ORDER BY rank_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0]); while ($row = $statement->fetchArray()) { $data = [ @@ -558,7 +558,7 @@ final class PhpBB3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "zebra WHERE friend = ? AND foe = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([1, 0]); $row = $statement->fetchArray(); @@ -578,7 +578,7 @@ final class PhpBB3xExporter extends AbstractExporter WHERE friend = ? AND foe = ? ORDER BY user_id, zebra_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([1, 0]); while ($row = $statement->fetchArray()) { $data = [ @@ -600,7 +600,7 @@ final class PhpBB3xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "users WHERE user_avatar_type IN (?, ?)"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([self::AVATAR_TYPE_GALLERY, self::AVATAR_TYPE_UPLOADED]); $row = $statement->fetchArray(); @@ -620,7 +620,7 @@ final class PhpBB3xExporter extends AbstractExporter $sql = "SELECT config_name, config_value FROM " . $this->databasePrefix . "config WHERE config_name IN (?, ?, ?)"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['avatar_path', 'avatar_salt', 'avatar_gallery_path']); while ($row = $statement->fetchArray()) { $config_name = $row['config_name']; @@ -633,7 +633,7 @@ final class PhpBB3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "users WHERE user_avatar_type IN (?, ?) ORDER BY user_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([self::AVATAR_TYPE_GALLERY, self::AVATAR_TYPE_UPLOADED]); while ($row = $statement->fetchArray()) { $extension = \pathinfo($row['user_avatar'], \PATHINFO_EXTENSION); @@ -670,7 +670,7 @@ final class PhpBB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "privmsgs_folder"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -688,7 +688,7 @@ final class PhpBB3xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "privmsgs_folder ORDER BY folder_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -729,7 +729,7 @@ final class PhpBB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "privmsgs"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -777,7 +777,7 @@ final class PhpBB3xExporter extends AbstractExporter WHERE forum_id = ? ) ORDER BY isDraft, msg_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0]); while ($row = $statement->fetchArray()) { if (!$row['isDraft']) { @@ -815,7 +815,7 @@ final class PhpBB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "privmsgs"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -876,7 +876,7 @@ final class PhpBB3xExporter extends AbstractExporter WHERE forum_id = ? ) ORDER BY msg_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([1, 0]); while ($row = $statement->fetchArray()) { $participants = \explode(',', $row['participants'] ?: ''); @@ -905,7 +905,7 @@ final class PhpBB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "privmsgs_to"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -933,7 +933,7 @@ final class PhpBB3xExporter extends AbstractExporter LEFT JOIN " . $this->databasePrefix . "users user_table ON to_table.user_id = user_table.user_id ORDER BY to_table.msg_id, to_table.user_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $participants = \explode(',', $row['participants'] ?: ''); @@ -989,7 +989,7 @@ final class PhpBB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "forums"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1007,7 +1007,7 @@ final class PhpBB3xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "forums ORDER BY parent_id, left_id, forum_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $this->boardCache[$row['parent_id']][] = $row; @@ -1082,7 +1082,7 @@ final class PhpBB3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "topics WHERE topic_id BETWEEN ? AND ? ORDER BY topic_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1148,7 +1148,7 @@ final class PhpBB3xExporter extends AbstractExporter ON post_table.post_edit_user = editor.user_id WHERE post_id BETWEEN ? AND ? ORDER BY post_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0, $offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1202,7 +1202,7 @@ final class PhpBB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "topics_watch"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1222,7 +1222,7 @@ final class PhpBB3xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "topics_watch ORDER BY topic_id, user_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1245,7 +1245,7 @@ final class PhpBB3xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "topics WHERE poll_start <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $row = $statement->fetchArray(); @@ -1270,7 +1270,7 @@ final class PhpBB3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "topics topic WHERE poll_start <> ? ORDER BY topic_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0]); while ($row = $statement->fetchArray()) { $data = [ @@ -1297,7 +1297,7 @@ final class PhpBB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "poll_options"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1315,7 +1315,7 @@ final class PhpBB3xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "poll_options ORDER BY poll_option_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1342,7 +1342,7 @@ final class PhpBB3xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "poll_votes WHERE vote_user_id <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $row = $statement->fetchArray(); @@ -1361,7 +1361,7 @@ final class PhpBB3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "poll_votes WHERE vote_user_id <> ? ORDER BY poll_option_id, vote_user_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0]); while ($row = $statement->fetchArray()) { $data = [ @@ -1390,7 +1390,7 @@ final class PhpBB3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "acl_groups WHERE forum_id <> ? ) AS count"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0, 0]); $row = $statement->fetchArray(); @@ -1408,7 +1408,7 @@ final class PhpBB3xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "acl_options WHERE is_local = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([1]); $options = []; while ($row = $statement->fetchArray()) { @@ -1420,7 +1420,7 @@ final class PhpBB3xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "acl_roles_data " . $condition; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($condition->getParameters()); $roles = []; while ($row = $statement->fetchArray()) { @@ -1435,7 +1435,7 @@ final class PhpBB3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "acl_groups WHERE forum_id <> ? ORDER BY auth_role_id DESC"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $key = 'group'; } elseif ($offset == 1) { @@ -1444,7 +1444,7 @@ final class PhpBB3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "acl_users WHERE forum_id <> ? ORDER BY auth_role_id DESC"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $key = 'user'; } @@ -1561,7 +1561,7 @@ final class PhpBB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(DISTINCT smiley_url) AS count FROM " . $this->databasePrefix . "smilies"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1584,7 +1584,7 @@ final class PhpBB3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "smilies GROUP BY smiley_url ORDER BY smiley_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([]); while ($row = $statement->fetchArray()) { $fileLocation = $this->fileSystemPath . 'images/smilies/' . $row['smiley_url']; @@ -1626,7 +1626,7 @@ final class PhpBB3xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "attachments WHERE in_message = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$conversation ? 1 : 0]); $row = $statement->fetchArray(); @@ -1647,7 +1647,7 @@ final class PhpBB3xExporter extends AbstractExporter $sql = "SELECT config_name, config_value FROM " . $this->databasePrefix . "config WHERE config_name IN (?)"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['upload_path']); while ($row = $statement->fetchArray()) { $config_name = $row['config_name']; @@ -1660,7 +1660,7 @@ final class PhpBB3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "attachments WHERE in_message = ? ORDER BY attach_id DESC"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([$conversation ? 1 : 0]); while ($row = $statement->fetchArray()) { $fileLocation = FileUtil::addTrailingSlash($this->fileSystemPath . $upload_path) . $row['physical_filename']; diff --git a/files/lib/system/exporter/SMF2xExporter.class.php b/files/lib/system/exporter/SMF2xExporter.class.php index e6188d5..4833828 100644 --- a/files/lib/system/exporter/SMF2xExporter.class.php +++ b/files/lib/system/exporter/SMF2xExporter.class.php @@ -224,7 +224,7 @@ final class SMF2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "membergroups"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -256,7 +256,7 @@ final class SMF2xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "membergroups ORDER BY id_group"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -291,7 +291,7 @@ final class SMF2xExporter extends AbstractExporter $profileFields = []; $sql = "SELECT col_name, id_field FROM " . $this->databasePrefix . "custom_fields"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $profileFields[$row['col_name']] = $row; @@ -309,7 +309,7 @@ final class SMF2xExporter extends AbstractExporter FROM " . $this->databasePrefix . "members WHERE id_member BETWEEN ? AND ? ORDER BY id_member"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $userIDs[] = $row['id_member']; @@ -329,7 +329,7 @@ final class SMF2xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "themes " . $condition; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($condition->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($profileFieldValues[$row['id_member']])) { @@ -355,7 +355,7 @@ final class SMF2xExporter extends AbstractExporter LEFT JOIN " . $this->databasePrefix . "ban_groups ban_group ON ban_item.id_ban_group = ban_group.id_ban_group " . $condition; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($condition->getParameters()); while ($row = $statement->fetchArray()) { $data = [ @@ -431,7 +431,7 @@ final class SMF2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "custom_fields"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -449,7 +449,7 @@ final class SMF2xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "custom_fields ORDER BY id_field"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { switch ($row['field_type']) { @@ -523,7 +523,7 @@ final class SMF2xExporter extends AbstractExporter FROM " . $this->databasePrefix . "membergroups WHERE min_posts <> ? AND {$fieldName} <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([-1, '']); $row = $statement->fetchArray(); @@ -548,7 +548,7 @@ final class SMF2xExporter extends AbstractExporter WHERE min_posts <> ? AND {$fieldName} <> ? ORDER BY id_group"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([-1, '']); while ($row = $statement->fetchArray()) { [$repeatImage, $rankImage] = \explode('#', $row[$fieldName], 2); @@ -577,7 +577,7 @@ final class SMF2xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "members WHERE buddy_list <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['']); $row = $statement->fetchArray(); @@ -596,7 +596,7 @@ final class SMF2xExporter extends AbstractExporter FROM " . $this->databasePrefix . "members WHERE buddy_list <> ? ORDER BY id_member"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['']); while ($row = $statement->fetchArray()) { $buddylist = \array_unique(ArrayUtil::toIntegerArray(\explode(',', $row['buddy_list']))); @@ -628,7 +628,7 @@ final class SMF2xExporter extends AbstractExporter FROM " . $this->databasePrefix . "members WHERE avatar <> ? ) AS count"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['', 0]); $row = $statement->fetchArray(); @@ -666,7 +666,7 @@ final class SMF2xExporter extends AbstractExporter FROM " . $this->databasePrefix . "members WHERE avatar <> ? )"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['', 0]); while ($row = $statement->fetchArray()) { @@ -712,7 +712,7 @@ final class SMF2xExporter extends AbstractExporter // SMF 2.1 $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "pm_labels"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -724,7 +724,7 @@ final class SMF2xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "members WHERE message_labels <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['']); $row = $statement->fetchArray(); @@ -744,7 +744,7 @@ final class SMF2xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "pm_labels ORDER BY id_label"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -769,7 +769,7 @@ final class SMF2xExporter extends AbstractExporter FROM " . $this->databasePrefix . "members WHERE message_labels <> ? ORDER BY id_member"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['']); while ($row = $statement->fetchArray()) { $labels = ArrayUtil::trim(\explode(',', $row['message_labels']), false); @@ -836,7 +836,7 @@ final class SMF2xExporter extends AbstractExporter FROM " . $this->databasePrefix . "personal_messages pm WHERE pm.id_pm BETWEEN ? AND ? ORDER BY pm.id_pm"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { if ($row['participants'] === null) { @@ -891,7 +891,7 @@ final class SMF2xExporter extends AbstractExporter FROM " . $this->databasePrefix . "personal_messages pm WHERE pm.id_pm BETWEEN ? AND ? ORDER BY pm.id_pm"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { if ($row['participants'] === null) { @@ -925,7 +925,7 @@ final class SMF2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "pm_recipients"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -959,7 +959,7 @@ final class SMF2xExporter extends AbstractExporter LEFT JOIN " . $this->databasePrefix . "members members ON recipients.id_member = members.id_member ORDER BY recipients.id_pm, recipients.id_member"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); } catch (DatabaseException $e) { // SMF 2.0 @@ -975,7 +975,7 @@ final class SMF2xExporter extends AbstractExporter LEFT JOIN " . $this->databasePrefix . "members members ON recipients.id_member = members.id_member ORDER BY recipients.id_pm, recipients.id_member"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); } @@ -1022,7 +1022,7 @@ final class SMF2xExporter extends AbstractExporter SELECT COUNT(*) FROM " . $this->databasePrefix . "categories ) AS count"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1040,7 +1040,7 @@ final class SMF2xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "categories ORDER BY id_cat"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1058,7 +1058,7 @@ final class SMF2xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "boards ORDER BY id_board"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $this->boardCache[$row['id_parent']][] = $row; @@ -1124,7 +1124,7 @@ final class SMF2xExporter extends AbstractExporter ON post.id_msg = topic.id_first_msg WHERE topic.id_topic BETWEEN ? AND ? ORDER BY topic.id_topic"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1170,7 +1170,7 @@ final class SMF2xExporter extends AbstractExporter ON message.modified_name = member.real_name WHERE message.id_msg BETWEEN ? AND ? ORDER BY message.id_msg"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1205,7 +1205,7 @@ final class SMF2xExporter extends AbstractExporter FROM " . $this->databasePrefix . "attachments WHERE id_member = ? AND id_msg <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0, 0]); $row = $statement->fetchArray(); @@ -1227,7 +1227,7 @@ final class SMF2xExporter extends AbstractExporter WHERE attachment.id_member = ? AND attachment.id_msg <> ? ORDER BY attachment.id_attach"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0, 0]); while ($row = $statement->fetchArray()) { if (\substr($row['filename'], -6) == '_thumb') { @@ -1268,7 +1268,7 @@ final class SMF2xExporter extends AbstractExporter FROM " . $this->databasePrefix . "log_notify WHERE id_topic <> ? AND id_board = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0, 0]); $row = $statement->fetchArray(); @@ -1288,7 +1288,7 @@ final class SMF2xExporter extends AbstractExporter WHERE id_topic <> ? AND id_board = ? ORDER BY id_member, id_topic"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0, 0]); while ($row = $statement->fetchArray()) { $data = [ @@ -1309,7 +1309,7 @@ final class SMF2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "polls"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1334,7 +1334,7 @@ final class SMF2xExporter extends AbstractExporter INNER JOIN " . $this->databasePrefix . "topics topic ON topic.id_poll = poll.id_poll ORDER BY id_poll"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1360,7 +1360,7 @@ final class SMF2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "poll_choices"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1378,7 +1378,7 @@ final class SMF2xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "poll_choices ORDER BY id_poll, id_choice"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1405,7 +1405,7 @@ final class SMF2xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "log_polls WHERE id_member <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $row = $statement->fetchArray(); @@ -1424,7 +1424,7 @@ final class SMF2xExporter extends AbstractExporter FROM " . $this->databasePrefix . "log_polls WHERE id_member <> ? ORDER BY id_poll, id_member, id_choice"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0]); while ($row = $statement->fetchArray()) { $data = [ @@ -1468,7 +1468,7 @@ final class SMF2xExporter extends AbstractExporter ) AS moderators FROM " . $this->databasePrefix . "boards board ORDER BY id_board"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { if (!isset($profileToBoard[$row['id_profile']])) { @@ -1582,7 +1582,7 @@ final class SMF2xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "board_permissions ORDER BY id_group, id_profile, permission"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { if (!isset($profileToBoard[$row['id_profile']])) { @@ -1648,7 +1648,7 @@ final class SMF2xExporter extends AbstractExporter { $sql = "SELECT COUNT(DISTINCT filename) AS count FROM " . $this->databasePrefix . "smileys"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1671,7 +1671,7 @@ final class SMF2xExporter extends AbstractExporter FROM " . $this->databasePrefix . "smileys GROUP BY filename ORDER BY id_smiley"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([]); while ($row = $statement->fetchArray()) { $fileLocation = $this->readOption('smileys_dir') . '/' . $this->readOption('smiley_sets_default') . '/' . $row['filename']; @@ -1716,7 +1716,7 @@ final class SMF2xExporter extends AbstractExporter $sql = "SELECT value FROM " . $this->databasePrefix . "settings WHERE variable = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$optionName]); $row = $statement->fetchArray(); diff --git a/files/lib/system/exporter/VB3or4xExporter.class.php b/files/lib/system/exporter/VB3or4xExporter.class.php index 5db3a8b..30fb3ae 100644 --- a/files/lib/system/exporter/VB3or4xExporter.class.php +++ b/files/lib/system/exporter/VB3or4xExporter.class.php @@ -388,7 +388,7 @@ final class VB3or4xExporter extends AbstractExporter // Check whether the blog appears to be available. $sql = "SELECT COUNT(*) FROM " . $this->databasePrefix . "blog"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $dummy = $statement->fetchSingleColumn(); @@ -416,7 +416,7 @@ final class VB3or4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "usergroup"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -434,7 +434,7 @@ final class VB3or4xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "usergroup ORDER BY usergroupid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { switch ($row['usergroupid']) { @@ -482,7 +482,7 @@ final class VB3or4xExporter extends AbstractExporter $userOptions = []; $sql = "SELECT * FROM " . $this->databasePrefix . "profilefield"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { if ($row['type'] == 'select_multiple' || $row['type'] == 'checkbox') { @@ -513,7 +513,7 @@ final class VB3or4xExporter extends AbstractExporter ON userfield.userid = user_table.userid WHERE user_table.userid BETWEEN ? AND ? ORDER BY user_table.userid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -602,7 +602,7 @@ final class VB3or4xExporter extends AbstractExporter WHERE usergroupid NOT IN(?, ?) AND usertitle <> ? ) AS count"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([1, 2, '']); $row = $statement->fetchArray(); @@ -630,7 +630,7 @@ final class VB3or4xExporter extends AbstractExporter AND usertitle <> ? ) ORDER BY usertitleid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([1, 2, '']); while ($row = $statement->fetchArray()) { $data = [ @@ -653,7 +653,7 @@ final class VB3or4xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "usertextfield WHERE buddylist <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['']); $row = $statement->fetchArray(); @@ -672,7 +672,7 @@ final class VB3or4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "usertextfield WHERE buddylist <> ? ORDER BY userid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['']); while ($row = $statement->fetchArray()) { $buddies = \array_unique(ArrayUtil::toIntegerArray(\explode(' ', $row['buddylist']))); @@ -709,7 +709,7 @@ final class VB3or4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "visitormessage WHERE vmid BETWEEN ? AND ? ORDER BY vmid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -733,7 +733,7 @@ final class VB3or4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "customavatar"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -754,7 +754,7 @@ final class VB3or4xExporter extends AbstractExporter LEFT JOIN " . $this->databasePrefix . "user user ON user.userid = customavatar.userid ORDER BY customavatar.userid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $file = null; @@ -804,7 +804,7 @@ final class VB3or4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "profilefield"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -821,7 +821,7 @@ final class VB3or4xExporter extends AbstractExporter { $sql = "SELECT * FROM " . $this->databasePrefix . "profilefield"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $editable = 0; @@ -914,7 +914,7 @@ final class VB3or4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "phrase WHERE languageid = ? AND varname = ?"; - $statement2 = $this->database->prepareStatement($sql); + $statement2 = $this->database->prepareUnmanaged($sql); $statement2->execute([0, 'field' . $row['profilefieldid'] . '_title']); $row2 = $statement2->fetchArray(); if ($row2 !== false) { @@ -954,7 +954,7 @@ final class VB3or4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "usertextfield WHERE pmfolders IS NOT NULL AND pmfolders <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['']); $row = $statement->fetchArray(); @@ -974,7 +974,7 @@ final class VB3or4xExporter extends AbstractExporter WHERE pmfolders IS NOT NULL AND pmfolders <> ? ORDER BY userid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['']); while ($row = $statement->fetchArray()) { $convert = false; @@ -1060,7 +1060,7 @@ final class VB3or4xExporter extends AbstractExporter ON pm.pmtextid = text.pmtextid WHERE pm.pmid BETWEEN ? AND ? ORDER BY pm.pmid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $participants = \explode(',', $row['participants']); @@ -1117,7 +1117,7 @@ final class VB3or4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "pmtext pmtext WHERE pmtext.pmtextid BETWEEN ? AND ? ORDER BY pmtext.pmtextid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $participants = \explode(',', $row['participants']); @@ -1145,7 +1145,7 @@ final class VB3or4xExporter extends AbstractExporter { $sql = "SELECT MAX(pmid) AS count FROM " . $this->databasePrefix . "pm"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1173,7 +1173,7 @@ final class VB3or4xExporter extends AbstractExporter ON pmtext.pmtextid = pm.pmtextid WHERE pm.pmid BETWEEN ? AND ? ORDER BY pm.pmid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $participants = \explode(',', $row['participants']); @@ -1219,7 +1219,7 @@ final class VB3or4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "forum"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1237,7 +1237,7 @@ final class VB3or4xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "forum ORDER BY forumid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $this->boardCache[$row['parentid']][] = $row; @@ -1337,7 +1337,7 @@ final class VB3or4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "thread thread WHERE thread.threadid BETWEEN ? AND ? ORDER BY thread.threadid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([14, $offset + 1, $offset + $limit]); // 14 = soft delete while ($row = $statement->fetchArray()) { $data = [ @@ -1413,7 +1413,7 @@ final class VB3or4xExporter extends AbstractExporter ) WHERE post.postid BETWEEN ? AND ? ORDER BY post.postid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { if (isset($row['htmlState']) && $row['htmlState'] == 'on_nl2br') { @@ -1486,7 +1486,7 @@ final class VB3or4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "subscribethread WHERE subscribethreadid BETWEEN ? AND ? ORDER BY subscribethreadid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1507,7 +1507,7 @@ final class VB3or4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "poll"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([]); $row = $statement->fetchArray(); @@ -1528,7 +1528,7 @@ final class VB3or4xExporter extends AbstractExporter ON poll.pollid = thread.pollid AND thread.open <> ? ORDER BY poll.pollid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([10]); while ($row = $statement->fetchArray()) { $data = [ @@ -1568,7 +1568,7 @@ final class VB3or4xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "poll ORDER BY pollid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $options = \explode('|||', $row['options']); @@ -1619,7 +1619,7 @@ final class VB3or4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "pollvote WHERE pollvoteid BETWEEN ? AND ? ORDER BY pollvoteid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1654,7 +1654,7 @@ final class VB3or4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "reputation WHERE reputationid BETWEEN ? AND ? ORDER BY reputationid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1678,7 +1678,7 @@ final class VB3or4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "prefix"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1702,7 +1702,7 @@ final class VB3or4xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "prefixset ORDER BY prefixsetid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { @@ -1725,7 +1725,7 @@ final class VB3or4xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "prefix ORDER BY prefixid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1746,7 +1746,7 @@ final class VB3or4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "forumpermission"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1780,7 +1780,7 @@ final class VB3or4xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "forumpermission ORDER BY forumpermissionid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { @@ -1803,7 +1803,7 @@ final class VB3or4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "smilie"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1821,7 +1821,7 @@ final class VB3or4xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "smilie ORDER BY smilieid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([]); while ($row = $statement->fetchArray()) { $fileLocation = $this->fileSystemPath . $row['smiliepath']; @@ -1851,7 +1851,7 @@ final class VB3or4xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "imagecategory WHERE imagetype = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([3]); $row = $statement->fetchArray(); @@ -1870,7 +1870,7 @@ final class VB3or4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "imagecategory WHERE imagetype = ? ORDER BY imagecategoryid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([3]); while ($row = $statement->fetchArray()) { $data = [ @@ -1892,7 +1892,7 @@ final class VB3or4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "album"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1912,7 +1912,7 @@ final class VB3or4xExporter extends AbstractExporter LEFT JOIN " . $this->databasePrefix . "user user ON album.userid = user.userid ORDER BY albumid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1937,7 +1937,7 @@ final class VB3or4xExporter extends AbstractExporter try { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "picture"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); } catch (DatabaseException $e) { $sql = "SELECT COUNT(*) AS count @@ -1947,7 +1947,7 @@ final class VB3or4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "contenttype WHERE class = 'Album' )"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); } @@ -1974,7 +1974,7 @@ final class VB3or4xExporter extends AbstractExporter LEFT JOIN " . $this->databasePrefix . "user user ON picture.userid = user.userid ORDER BY picture.pictureid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); $vB = 3; @@ -1993,7 +1993,7 @@ final class VB3or4xExporter extends AbstractExporter WHERE contenttype.class = 'Album' ) ORDER BY attachment.attachmentid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); $vB = 4; @@ -2104,7 +2104,7 @@ final class VB3or4xExporter extends AbstractExporter ON comment.postuserid = user.userid WHERE comment.commentid BETWEEN ? AND ? ORDER BY comment.commentid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -2128,7 +2128,7 @@ final class VB3or4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "calendar"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -2146,7 +2146,7 @@ final class VB3or4xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "calendar ORDER BY calendarid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -2184,7 +2184,7 @@ final class VB3or4xExporter extends AbstractExporter ON event.userid = user.userid WHERE eventid BETWEEN ? AND ? ORDER BY eventid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); $timezones = []; @@ -2320,7 +2320,7 @@ final class VB3or4xExporter extends AbstractExporter ON blog_text.blogtextid = blog.firstblogtextid WHERE blog.blogid BETWEEN ? AND ? ORDER BY blog.blogid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -2363,7 +2363,7 @@ final class VB3or4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "blog ) ORDER BY blogtextid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -2417,7 +2417,7 @@ final class VB3or4xExporter extends AbstractExporter FROM " . $this->databasePrefix . "contenttype WHERE class = ? )"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$contentType]); } catch (DatabaseException $e) { // vb 3 @@ -2427,7 +2427,7 @@ final class VB3or4xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "attachment"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); } $row = $statement->fetchArray(); @@ -2457,7 +2457,7 @@ final class VB3or4xExporter extends AbstractExporter WHERE contenttype.class = ? ) ORDER BY attachment.attachmentid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([$contentType]); } catch (DatabaseException $e) { // vb 3 @@ -2468,7 +2468,7 @@ final class VB3or4xExporter extends AbstractExporter $sql = "SELECT attachment.*, attachment.postid AS contentid FROM " . $this->databasePrefix . "attachment attachment ORDER BY attachment.attachmentid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); } @@ -2548,7 +2548,7 @@ final class VB3or4xExporter extends AbstractExporter $sql = "SELECT value FROM " . $this->databasePrefix . "setting WHERE varname = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$optionName]); $row = $statement->fetchArray(); diff --git a/files/lib/system/exporter/VB5xExporter.class.php b/files/lib/system/exporter/VB5xExporter.class.php index 85a8e55..ff9dc26 100644 --- a/files/lib/system/exporter/VB5xExporter.class.php +++ b/files/lib/system/exporter/VB5xExporter.class.php @@ -294,7 +294,7 @@ final class VB5xExporter extends AbstractExporter FROM " . $this->databasePrefix . "usergroup WHERE usergroupid BETWEEN ? AND ? ORDER BY usergroupid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { switch ($row['systemgroupid']) { @@ -342,7 +342,7 @@ final class VB5xExporter extends AbstractExporter $userOptions = []; $sql = "SELECT * FROM " . $this->databasePrefix . "profilefield"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { if ($row['type'] == 'select_multiple' || $row['type'] == 'checkbox') { @@ -373,7 +373,7 @@ final class VB5xExporter extends AbstractExporter ON userfield.userid = user_table.userid WHERE user_table.userid BETWEEN ? AND ? ORDER BY user_table.userid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -477,7 +477,7 @@ final class VB5xExporter extends AbstractExporter ON user.userid = customavatar.userid WHERE customavatar.userid BETWEEN ? AND ? ORDER BY customavatar.userid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $file = null; @@ -528,7 +528,7 @@ final class VB5xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "profilefield"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -545,7 +545,7 @@ final class VB5xExporter extends AbstractExporter { $sql = "SELECT * FROM " . $this->databasePrefix . "profilefield"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $editable = 0; @@ -638,7 +638,7 @@ final class VB5xExporter extends AbstractExporter FROM " . $this->databasePrefix . "phrase WHERE languageid = ? AND varname = ?"; - $statement2 = $this->database->prepareStatement($sql); + $statement2 = $this->database->prepareUnmanaged($sql); $statement2->execute([0, 'field' . $row['profilefieldid'] . '_title']); $row2 = $statement2->fetchArray(); if ($row2 !== false) { @@ -682,7 +682,7 @@ final class VB5xExporter extends AbstractExporter WHERE class = ? ) x ON x.contenttypeid = node.contenttypeid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['Channel']); $row = $statement->fetchArray(); @@ -711,7 +711,7 @@ final class VB5xExporter extends AbstractExporter INNER JOIN " . $this->databasePrefix . "channel channel ON channel.nodeid = node.nodeid ORDER BY parentid, displayorder"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['Channel']); $boardRoot = 0; @@ -809,7 +809,7 @@ final class VB5xExporter extends AbstractExporter ON y.contenttypeid = child.contenttypeid WHERE child.nodeid BETWEEN ? AND ? ORDER BY child.nodeid ASC"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['Channel', 'Text', 'Poll', $offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -892,7 +892,7 @@ final class VB5xExporter extends AbstractExporter ON x.contenttypeid = child.contenttypeid WHERE child.nodeid BETWEEN ? AND ? ORDER BY child.nodeid ASC"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['Text', 'Poll', $offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -972,7 +972,7 @@ final class VB5xExporter extends AbstractExporter ON z.contenttypeid = child.contenttypeid WHERE child.nodeid BETWEEN ? AND ? ORDER BY child.nodeid ASC"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); // Text in a Text or Poll should be a post // Text in a Channel should be a thread @@ -1061,7 +1061,7 @@ final class VB5xExporter extends AbstractExporter ON poll.nodeid = node.nodeid WHERE poll.nodeid BETWEEN ? AND ? ORDER BY poll.nodeid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1104,7 +1104,7 @@ final class VB5xExporter extends AbstractExporter ON poll.nodeid = polloption.nodeid WHERE polloption.polloptionid BETWEEN ? AND ? ORDER BY polloption.polloptionid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1139,7 +1139,7 @@ final class VB5xExporter extends AbstractExporter FROM " . $this->databasePrefix . "pollvote WHERE pollvoteid BETWEEN ? AND ? ORDER BY pollvoteid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1167,7 +1167,7 @@ final class VB5xExporter extends AbstractExporter WHERE class = ? ) x ON x.contenttypeid = node.contenttypeid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['Channel']); $row = $statement->fetchArray(); @@ -1193,7 +1193,7 @@ final class VB5xExporter extends AbstractExporter INNER JOIN " . $this->databasePrefix . "channel channel ON channel.nodeid = node.nodeid ORDER BY nodeid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['Channel']); $blogRoot = 0; @@ -1278,7 +1278,7 @@ final class VB5xExporter extends AbstractExporter ON y.contenttypeid = child.contenttypeid WHERE child.nodeid BETWEEN ? AND ? ORDER BY child.nodeid ASC"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['Channel', 'Text', $offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { // The importer will create blogs on demand. As we cannot specifically filter out blogs within MySQL @@ -1357,7 +1357,7 @@ final class VB5xExporter extends AbstractExporter ON z.contenttypeid = child.contenttypeid WHERE child.nodeid BETWEEN ? AND ? ORDER BY child.nodeid ASC"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['Channel', 'Text', 'Attach', $offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { @@ -1442,7 +1442,7 @@ final class VB5xExporter extends AbstractExporter ON y.contenttypeid = child.contenttypeid WHERE child.nodeid BETWEEN ? AND ? ORDER BY child.nodeid ASC"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['Text', 'Text', $offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1485,7 +1485,7 @@ final class VB5xExporter extends AbstractExporter ON x.contenttypeid = node.contenttypeid WHERE node.nodeid BETWEEN ? AND ? ORDER BY node.nodeid ASC"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['Gallery', $offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1541,7 +1541,7 @@ final class VB5xExporter extends AbstractExporter ON y.contenttypeid = child.contenttypeid WHERE child.nodeid BETWEEN ? AND ? ORDER BY child.nodeid ASC"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['Gallery', 'Photo', $offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $file = null; @@ -1590,7 +1590,7 @@ final class VB5xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "smilie"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1608,7 +1608,7 @@ final class VB5xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "smilie ORDER BY smilieid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $fileLocation = $this->fileSystemPath . $row['smiliepath']; @@ -1638,7 +1638,7 @@ final class VB5xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "imagecategory WHERE imagetype = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([3]); $row = $statement->fetchArray(); @@ -1657,7 +1657,7 @@ final class VB5xExporter extends AbstractExporter FROM " . $this->databasePrefix . "imagecategory WHERE imagetype = ? ORDER BY imagecategoryid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([3]); while ($row = $statement->fetchArray()) { $data = [ @@ -1686,7 +1686,7 @@ final class VB5xExporter extends AbstractExporter $sql = "SELECT value FROM " . $this->databasePrefix . "setting WHERE varname = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$optionName]); $row = $statement->fetchArray(); diff --git a/files/lib/system/exporter/WBB2xExporter.class.php b/files/lib/system/exporter/WBB2xExporter.class.php index f9fe581..c13d774 100644 --- a/files/lib/system/exporter/WBB2xExporter.class.php +++ b/files/lib/system/exporter/WBB2xExporter.class.php @@ -90,7 +90,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT COUNT(*) FROM " . $this->databasePrefix . "posts"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); } @@ -225,7 +225,7 @@ final class WBB2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "groups"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -243,7 +243,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "groups ORDER BY groupid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $groupType = 4; @@ -293,7 +293,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT profilefieldid FROM " . $this->databasePrefix . "profilefields WHERE profilefieldid > 3"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $profileFields[] = $row['profilefieldid']; @@ -317,7 +317,7 @@ final class WBB2xExporter extends AbstractExporter ON userfields.userid = user.userid WHERE user.userid BETWEEN ? AND ? ORDER BY user.userid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -386,7 +386,7 @@ final class WBB2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "ranks"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -404,7 +404,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "ranks ORDER BY rankid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -428,7 +428,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "avatars WHERE userid <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $row = $statement->fetchArray(); @@ -447,7 +447,7 @@ final class WBB2xExporter extends AbstractExporter FROM " . $this->databasePrefix . "avatars WHERE userid <> ? ORDER BY avatarid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0]); while ($row = $statement->fetchArray()) { $fileLocation = $this->fileSystemPath . 'images/avatars/avatar-' . $row['avatarid'] . '.' . $row['avatarextension']; @@ -475,7 +475,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "profilefields WHERE profilefieldid > ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([3]); $row = $statement->fetchArray(); @@ -494,7 +494,7 @@ final class WBB2xExporter extends AbstractExporter FROM " . $this->databasePrefix . "profilefields WHERE profilefieldid > ? ORDER BY profilefieldid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([3]); while ($row = $statement->fetchArray()) { $optionType = 'text'; @@ -540,7 +540,7 @@ final class WBB2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "folders"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -558,7 +558,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "folders ORDER BY folderid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -594,7 +594,7 @@ final class WBB2xExporter extends AbstractExporter ON user_table.userid = pm.senderid WHERE pm.privatemessageid BETWEEN ? AND ? ORDER BY pm.privatemessageid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -632,7 +632,7 @@ final class WBB2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "privatemessagereceipts"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -650,7 +650,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "privatemessagereceipts ORDER BY privatemessageid DESC, recipientid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -700,7 +700,7 @@ final class WBB2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "boards"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -718,7 +718,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "boards ORDER BY parentid, boardorder"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $this->boardCache[$row['parentid']][] = $row; @@ -780,7 +780,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT value FROM " . $this->databasePrefix . "options WHERE varname = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['default_prefix']); $row = $statement->fetchArray(); if ($row !== false) { @@ -793,7 +793,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT boardid, prefix, prefixuse FROM " . $this->databasePrefix . "boards WHERE prefixuse > ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); while ($row = $statement->fetchArray()) { $prefixes = ''; @@ -823,7 +823,7 @@ final class WBB2xExporter extends AbstractExporter FROM " . $this->databasePrefix . "threads WHERE threadid BETWEEN ? AND ? ORDER BY threadid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $threadIDs[] = $row['threadid']; @@ -841,7 +841,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT boardid, threadid FROM " . $this->databasePrefix . "announcements " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($assignedBoards[$row['threadid']])) { @@ -862,7 +862,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "threads " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $data = [ @@ -918,7 +918,7 @@ final class WBB2xExporter extends AbstractExporter FROM " . $this->databasePrefix . "posts WHERE postid BETWEEN ? AND ? ORDER BY postid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -970,7 +970,7 @@ final class WBB2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "subscribethreads"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -988,7 +988,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "subscribethreads ORDER BY userid, threadid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1009,7 +1009,7 @@ final class WBB2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "polls"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1029,17 +1029,17 @@ final class WBB2xExporter extends AbstractExporter FROM " . $this->databasePrefix . "posts WHERE threadid = ? ORDER BY posttime"; - $firstPostStatement = $this->database->prepareStatement($sql, 1); + $firstPostStatement = $this->database->prepareUnmanaged($sql, 1); $sql = "SELECT COUNT(*) AS votes FROM " . $this->databasePrefix . "votes WHERE id = ? AND votemode = 1"; - $votesStatement = $this->database->prepareStatement($sql); + $votesStatement = $this->database->prepareUnmanaged($sql); $sql = "SELECT * FROM " . $this->databasePrefix . "polls poll ORDER BY pollid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $postID = null; @@ -1082,7 +1082,7 @@ final class WBB2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "polloptions"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([]); $row = $statement->fetchArray(); @@ -1100,7 +1100,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "polloptions ORDER BY polloptionid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([]); while ($row = $statement->fetchArray()) { $data = [ @@ -1123,7 +1123,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "boards WHERE prefixuse > ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $row = $statement->fetchArray(); @@ -1145,7 +1145,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT value FROM " . $this->databasePrefix . "options WHERE varname = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['default_prefix']); $row = $statement->fetchArray(); if ($row !== false) { @@ -1156,7 +1156,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT boardid, prefix, prefixuse FROM " . $this->databasePrefix . "boards WHERE prefixuse > ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); while ($row = $statement->fetchArray()) { $prefixes = ''; @@ -1241,7 +1241,7 @@ final class WBB2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "permissions"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1259,7 +1259,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "permissions ORDER BY boardid, groupid"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1296,7 +1296,7 @@ final class WBB2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "smilies"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1314,7 +1314,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT * FROM " . $this->databasePrefix . "smilies ORDER BY smilieid"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { // replace imagefolder @@ -1352,7 +1352,7 @@ final class WBB2xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "attachments WHERE " . $indexName . " > ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $row = $statement->fetchArray(); @@ -1373,7 +1373,7 @@ final class WBB2xExporter extends AbstractExporter FROM " . $this->databasePrefix . "attachments WHERE " . $indexName . " > ? ORDER BY attachmentid DESC"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0]); while ($row = $statement->fetchArray()) { $fileLocation = $this->fileSystemPath . 'attachments/attachment-' . $row['attachmentid'] . '.' . $row['attachmentextension']; diff --git a/files/lib/system/exporter/WBB3xExporter.class.php b/files/lib/system/exporter/WBB3xExporter.class.php index 01fd2da..e2f5d3f 100644 --- a/files/lib/system/exporter/WBB3xExporter.class.php +++ b/files/lib/system/exporter/WBB3xExporter.class.php @@ -196,7 +196,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT COUNT(*) FROM wbb" . $this->dbNo . "_" . $this->instanceNo . "_post"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); } @@ -401,7 +401,7 @@ final class WBB3xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_group WHERE groupID BETWEEN ? AND ? ORDER BY groupID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -448,7 +448,7 @@ final class WBB3xExporter extends AbstractExporter $userOptions = []; $sql = "SELECT optionName, optionID FROM wcf" . $this->dbNo . "_user_option"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $userOptions[$row['optionID']] = (isset($existingUserOptions[$row['optionName']]) ? $row['optionName'] : $row['optionID']); @@ -470,7 +470,7 @@ final class WBB3xExporter extends AbstractExporter 'encryption_method', 'encryption_salt_position' )"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $encryptionData = []; while ($row = $statement->fetchArray()) { @@ -515,7 +515,7 @@ final class WBB3xExporter extends AbstractExporter ON user_option_value.userID = user_table.userID WHERE user_table.userID BETWEEN ? AND ? ORDER BY user_table.userID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -594,7 +594,7 @@ final class WBB3xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_user_rank WHERE rankID BETWEEN ? AND ? ORDER BY rankID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -619,7 +619,7 @@ final class WBB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_user_whitelist"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -637,7 +637,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT * FROM wcf" . $this->dbNo . "_user_whitelist ORDER BY userID, whiteUserID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -672,7 +672,7 @@ final class WBB3xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_user_guestbook WHERE entryID BETWEEN ? AND ? ORDER BY entryID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -697,7 +697,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT MAX(entryID) AS maxID FROM wcf" . $this->dbNo . "_user_guestbook WHERE commentTime > ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $row = $statement->fetchArray(); if ($row !== false) { @@ -722,7 +722,7 @@ final class WBB3xExporter extends AbstractExporter WHERE user_guestbook.commentTime > ? AND user_guestbook.entryID BETWEEN ? AND ? ORDER BY user_guestbook.entryID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0, $offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -747,7 +747,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT MAX(avatarID) AS maxID FROM wcf" . $this->dbNo . "_avatar WHERE userID <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $row = $statement->fetchArray(); if ($row !== false) { @@ -770,7 +770,7 @@ final class WBB3xExporter extends AbstractExporter WHERE userID <> ? AND avatarID BETWEEN ? AND ? ORDER BY avatarID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0, $offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $fileLocation = $this->fileSystemPath . 'images/avatars/avatar-' . $row['avatarID'] . '.' . $row['avatarExtension']; @@ -811,7 +811,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_user_option " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); $row = $statement->fetchArray(); @@ -852,7 +852,7 @@ final class WBB3xExporter extends AbstractExporter ) AS name FROM wcf" . $this->dbNo . "_user_option user_option " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $editable = 0; @@ -957,7 +957,7 @@ final class WBB3xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_pm_folder WHERE folderID BETWEEN ? AND ? ORDER BY folderID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $cssClassName = ''; @@ -1029,7 +1029,7 @@ final class WBB3xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_pm pm WHERE pm.pmID BETWEEN ? AND ? ORDER BY pm.pmID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $participants = \explode(',', $row['participants'] ?: ''); @@ -1079,7 +1079,7 @@ final class WBB3xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_pm pm WHERE pm.pmID BETWEEN ? AND ? ORDER BY pm.pmID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $participants = \explode(',', $row['participants'] ?: ''); @@ -1109,7 +1109,7 @@ final class WBB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_pm_to_user"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1138,7 +1138,7 @@ final class WBB3xExporter extends AbstractExporter LEFT JOIN wcf" . $this->dbNo . "_pm pm ON pm.pmID = pm_to_user.pmID ORDER BY pm_to_user.pmID DESC, pm_to_user.recipientID DESC"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $participants = \explode(',', $row['participants'] ?: ''); @@ -1196,7 +1196,7 @@ final class WBB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM wbb" . $this->dbNo . "_" . $this->instanceNo . "_board"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1216,7 +1216,7 @@ final class WBB3xExporter extends AbstractExporter LEFT JOIN wbb" . $this->dbNo . "_" . $this->instanceNo . "_board_structure structure ON structure.boardID = board.boardID ORDER BY board.parentID, structure.position"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $this->boardCache[$row['parentID']][] = $row; @@ -1296,7 +1296,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT optionValue FROM wcf" . $this->dbNo . "_option WHERE optionName = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['thread_default_prefixes']); $row = $statement->fetchArray(); if ($row !== false) { @@ -1310,13 +1310,13 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT boardID, prefixes, prefixMode FROM wbb" . $this->dbNo . "_" . $this->instanceNo . "_board WHERE prefixMode > ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); } else { $sql = "SELECT boardID, prefixes, 2 AS prefixMode FROM wbb" . $this->dbNo . "_" . $this->instanceNo . "_board WHERE prefixes <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['']); } @@ -1348,7 +1348,7 @@ final class WBB3xExporter extends AbstractExporter FROM wbb" . $this->dbNo . "_" . $this->instanceNo . "_thread WHERE threadID BETWEEN ? AND ? ORDER BY threadID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $threadIDs[] = $row['threadID']; @@ -1369,7 +1369,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT boardID, threadID FROM wbb" . $this->dbNo . "_" . $this->instanceNo . "_thread_announcement " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($assignedBoards[$row['threadID']])) { @@ -1391,7 +1391,7 @@ final class WBB3xExporter extends AbstractExporter LEFT JOIN wcf" . $this->dbNo . "_language language ON language.languageID = thread.languageID " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $data = [ @@ -1457,7 +1457,7 @@ final class WBB3xExporter extends AbstractExporter FROM wbb" . $this->dbNo . "_" . $this->instanceNo . "_post WHERE postID BETWEEN ? AND ? ORDER BY postID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1513,7 +1513,7 @@ final class WBB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM wbb" . $this->dbNo . "_" . $this->instanceNo . "_thread_subscription"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1531,7 +1531,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT * FROM wbb" . $this->dbNo . "_" . $this->instanceNo . "_thread_subscription ORDER BY userID, threadID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1554,7 +1554,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT MAX(pollID) AS maxID FROM wcf" . $this->dbNo . "_poll WHERE messageType = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['post']); $row = $statement->fetchArray(); if ($row !== false) { @@ -1577,7 +1577,7 @@ final class WBB3xExporter extends AbstractExporter WHERE messageType = ? AND pollID BETWEEN ? AND ? ORDER BY pollID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['post', $offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1610,7 +1610,7 @@ final class WBB3xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_poll WHERE messageType = ? )"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['post']); $row = $statement->fetchArray(); if ($row !== false) { @@ -1637,7 +1637,7 @@ final class WBB3xExporter extends AbstractExporter ) AND pollOptionID BETWEEN ? AND ? ORDER BY pollOptionID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['post', $offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1666,7 +1666,7 @@ final class WBB3xExporter extends AbstractExporter WHERE messageType = ? ) AND userID <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['post', 0]); $row = $statement->fetchArray(); @@ -1690,7 +1690,7 @@ final class WBB3xExporter extends AbstractExporter ) AND userID <> ? ORDER BY pollOptionID, userID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['post', 0]); while ($row = $statement->fetchArray()) { $data = [ @@ -1714,7 +1714,7 @@ final class WBB3xExporter extends AbstractExporter FROM wbb" . $this->dbNo . "_" . $this->instanceNo . "_thread_rating WHERE userID <> ? AND rating NOT IN (?, ?)"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0, 0, 3]); $row = $statement->fetchArray(); @@ -1737,7 +1737,7 @@ final class WBB3xExporter extends AbstractExporter WHERE thread_rating.userID <> ? AND thread_rating.rating NOT IN (?, ?) ORDER BY thread_rating.threadID, thread_rating.userID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0, 0, 3]); while ($row = $statement->fetchArray()) { $data = [ @@ -1763,13 +1763,13 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM wbb" . $this->dbNo . "_" . $this->instanceNo . "_board WHERE prefixMode > ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); } else { $sql = "SELECT COUNT(*) AS count FROM wbb" . $this->dbNo . "_" . $this->instanceNo . "_board WHERE prefixes <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['']); } @@ -1793,7 +1793,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT optionValue FROM wcf" . $this->dbNo . "_option WHERE optionName = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['thread_default_prefixes']); $row = $statement->fetchArray(); if ($row !== false) { @@ -1805,13 +1805,13 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT boardID, prefixes, prefixMode FROM wbb" . $this->dbNo . "_" . $this->instanceNo . "_board WHERE prefixMode > ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); } else { $sql = "SELECT boardID, prefixes, 2 AS prefixMode FROM wbb" . $this->dbNo . "_" . $this->instanceNo . "_board WHERE prefixes <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['']); } @@ -1909,7 +1909,7 @@ final class WBB3xExporter extends AbstractExporter SELECT COUNT(*) FROM wbb" . $this->dbNo . "_" . $this->instanceNo . "_board_to_user ) AS count"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1942,7 +1942,7 @@ final class WBB3xExporter extends AbstractExporter FROM wbb" . $this->dbNo . "_" . $this->instanceNo . "_board_to_user ) ORDER BY boardID, userID, groupID, type"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { /** @noinspection PhpVariableVariableInspection */ @@ -1962,7 +1962,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT * FROM wbb" . $this->dbNo . "_" . $this->instanceNo . "_board_moderator " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $data = [ @@ -2005,7 +2005,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT * FROM wbb" . $this->dbNo . "_" . $this->instanceNo . "_board_to_group " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $data = [ @@ -2044,7 +2044,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT * FROM wbb" . $this->dbNo . "_" . $this->instanceNo . "_board_to_user " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $data = [ @@ -2081,7 +2081,7 @@ final class WBB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_smiley"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -2099,7 +2099,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT * FROM wcf" . $this->dbNo . "_smiley ORDER BY smileyID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $fileLocation = $this->fileSystemPath . $row['smileyPath']; @@ -2128,7 +2128,7 @@ final class WBB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_smiley_category"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -2146,7 +2146,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT * FROM wcf" . $this->dbNo . "_smiley_category ORDER BY smileyCategoryID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -2169,7 +2169,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_user_blog_category WHERE userID = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $row = $statement->fetchArray(); @@ -2188,7 +2188,7 @@ final class WBB3xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_user_blog_category WHERE userID = ? ORDER BY categoryID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0]); while ($row = $statement->fetchArray()) { $data = [ @@ -2225,7 +2225,7 @@ final class WBB3xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_user_blog WHERE entryID BETWEEN ? AND ? ORDER BY entryID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $entryIDs[] = $row['entryID']; @@ -2248,7 +2248,7 @@ final class WBB3xExporter extends AbstractExporter LEFT JOIN wcf" . $this->dbNo . "_user_blog_category category ON category.categoryID = entry_to_category.categoryID " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($categories[$row['entryID']])) { @@ -2266,7 +2266,7 @@ final class WBB3xExporter extends AbstractExporter LEFT JOIN wcf" . $this->dbNo . "_language language ON language.languageID = user_blog.languageID " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $data = [ @@ -2343,7 +2343,7 @@ final class WBB3xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_user_blog_comment WHERE commentID BETWEEN ? AND ? ORDER BY commentID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -2370,7 +2370,7 @@ final class WBB3xExporter extends AbstractExporter WHERE objectName = ? AND userID <> ? AND rating NOT IN (?, ?)"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['com.woltlab.wcf.user.blog.entry', 0, 0, 3]); $row = $statement->fetchArray(); @@ -2393,7 +2393,7 @@ final class WBB3xExporter extends AbstractExporter AND rating.userID <> ? AND rating.rating NOT IN (?, ?) ORDER BY rating.objectID, rating.userID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([ 'com.woltlab.wcf.user.blog.entry', 0, @@ -2421,7 +2421,7 @@ final class WBB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_user_gallery_category"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -2439,7 +2439,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT * FROM wcf" . $this->dbNo . "_user_gallery_category ORDER BY categoryID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -2482,7 +2482,7 @@ final class WBB3xExporter extends AbstractExporter ON user_table.userID = gallery_album.ownerID WHERE gallery_album.albumID BETWEEN ? AND ? ORDER BY albumID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -2524,7 +2524,7 @@ final class WBB3xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_user_gallery WHERE photoID BETWEEN ? AND ? ORDER BY photoID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $imageIDs[] = $row['photoID']; @@ -2547,7 +2547,7 @@ final class WBB3xExporter extends AbstractExporter LEFT JOIN wcf" . $this->dbNo . "_user_gallery_category category ON category.categoryID = photo_to_category.categoryID " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($categories[$row['objectID']])) { @@ -2563,7 +2563,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT user_gallery.* FROM wcf" . $this->dbNo . "_user_gallery user_gallery " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $data = [ @@ -2626,7 +2626,7 @@ final class WBB3xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_user_gallery_comment WHERE commentID BETWEEN ? AND ? ORDER BY commentID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -2653,7 +2653,7 @@ final class WBB3xExporter extends AbstractExporter WHERE objectName = ? AND userID <> ? AND rating NOT IN (?, ?)"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['com.woltlab.wcf.user.gallery.photo', 0, 0, 3]); $row = $statement->fetchArray(); @@ -2676,7 +2676,7 @@ final class WBB3xExporter extends AbstractExporter AND rating.userID <> ? AND rating.rating NOT IN (?, ?) ORDER BY rating.objectID, rating.userID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([ 'com.woltlab.wcf.user.gallery.photo', 0, @@ -2709,7 +2709,7 @@ final class WBB3xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_calendar_to_group ) AND className <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['BirthdayEvent']); $row = $statement->fetchArray(); @@ -2732,7 +2732,7 @@ final class WBB3xExporter extends AbstractExporter ) AND className <> ? ORDER BY calendarID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['BirthdayEvent']); while ($row = $statement->fetchArray()) { $data = [ @@ -2771,7 +2771,7 @@ final class WBB3xExporter extends AbstractExporter ON calendar_event_participation.eventID = calendar_event.eventID WHERE calendar_event.eventID BETWEEN ? AND ? ORDER BY calendar_event.eventID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $oldEventDateData = @\unserialize($row['eventDate']); @@ -2938,7 +2938,7 @@ final class WBB3xExporter extends AbstractExporter ORDER BY attachmentID DESC"; } - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['event', 0]); while ($row = $statement->fetchArray()) { $fileLocation = $this->fileSystemPath . 'attachments/attachment-' . $row['attachmentID']; @@ -2970,7 +2970,7 @@ final class WBB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_calendar_event_date"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -2988,7 +2988,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT * FROM wcf" . $this->dbNo . "_calendar_event_date ORDER BY eventID, startTime"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -3018,7 +3018,7 @@ final class WBB3xExporter extends AbstractExporter SELECT messageID FROM wcf" . $this->dbNo . "_calendar_event )"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -3037,7 +3037,7 @@ final class WBB3xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_calendar_event_date WHERE eventID = ? ORDER BY startTime"; - $firstEventDateStatement = $this->database->prepareStatement($sql, 1); + $firstEventDateStatement = $this->database->prepareUnmanaged($sql, 1); $sql = "SELECT event_message.* FROM wcf" . $this->dbNo . "_calendar_event_message event_message @@ -3046,7 +3046,7 @@ final class WBB3xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_calendar_event ) ORDER BY event_message.messageID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { // get first event date @@ -3074,7 +3074,7 @@ final class WBB3xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_calendar_event_participation_to_user"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -3093,14 +3093,14 @@ final class WBB3xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_calendar_event_date WHERE eventID = ? ORDER BY startTime"; - $firstEventDateStatement = $this->database->prepareStatement($sql, 1); + $firstEventDateStatement = $this->database->prepareUnmanaged($sql, 1); $sql = "SELECT participation_to_user.*, participation.eventID FROM wcf" . $this->dbNo . "_calendar_event_participation_to_user participation_to_user LEFT JOIN wcf" . $this->dbNo . "_calendar_event_participation participation ON participation.participationID = participation_to_user.participationID ORDER BY participation_to_user.participationID, participation_to_user.userID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { // get first event date @@ -3150,7 +3150,7 @@ final class WBB3xExporter extends AbstractExporter AND messageType = ? AND messageID > ?"; } - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$packageID, $type, 0]); return $statement->fetchSingleColumn(); @@ -3187,7 +3187,7 @@ final class WBB3xExporter extends AbstractExporter ORDER BY attachmentID"; } - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([$packageID, $type, 0]); while ($row = $statement->fetchArray()) { $fileLocation = $this->fileSystemPath . 'attachments/attachment-' . $row['attachmentID']; @@ -3227,7 +3227,7 @@ final class WBB3xExporter extends AbstractExporter WHERE messageType = ? LIMIT 1"; } - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$type]); return $statement->fetchSingleColumn() ?: 0; @@ -3265,7 +3265,7 @@ final class WBB3xExporter extends AbstractExporter $sql = "SELECT packageVersion FROM wcf" . $this->dbNo . "_package WHERE package = ?"; - $statement = $this->database->prepareStatement($sql, 1); + $statement = $this->database->prepareUnmanaged($sql, 1); $statement->execute([$name]); $row = $statement->fetchArray(); if ($row !== false) { @@ -3294,7 +3294,7 @@ final class WBB3xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_tag_taggable WHERE name = ? ORDER BY packageID"; - $statement = $this->database->prepareStatement($sql, 1); + $statement = $this->database->prepareUnmanaged($sql, 1); $statement->execute([$name]); $taggableID = $statement->fetchColumn(); if ($taggableID) { @@ -3307,7 +3307,7 @@ final class WBB3xExporter extends AbstractExporter INNER JOIN wcf" . $this->dbNo . "_tag tag ON tag.tagID = tag_to_object.tagID " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($tags[$row['objectID']])) { diff --git a/files/lib/system/exporter/WBB4xExporter.class.php b/files/lib/system/exporter/WBB4xExporter.class.php index 211590b..cb7bfa2 100644 --- a/files/lib/system/exporter/WBB4xExporter.class.php +++ b/files/lib/system/exporter/WBB4xExporter.class.php @@ -248,7 +248,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT COUNT(*) FROM wcf" . $this->dbNo . "_user"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); } @@ -501,7 +501,7 @@ final class WBB4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_user_group"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -519,7 +519,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT * FROM wcf" . $this->dbNo . "_user_group ORDER BY groupID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); $groups = []; @@ -596,7 +596,7 @@ final class WBB4xExporter extends AbstractExporter $userOptions = []; $sql = "SELECT optionName, optionID FROM wcf" . $this->dbNo . "_user_option"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $userOptions[$row['optionID']] = (isset($existingUserOptions[$row['optionName']]) ? $row['optionName'] : $row['optionID']); @@ -627,7 +627,7 @@ final class WBB4xExporter extends AbstractExporter ON user_option_value.userID = user_table.userID WHERE user_table.userID BETWEEN ? AND ? ORDER BY user_table.userID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -687,7 +687,7 @@ final class WBB4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_user_rank"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -705,7 +705,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT * FROM wcf" . $this->dbNo . "_user_rank ORDER BY rankID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -744,7 +744,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_user_follow WHERE followID BETWEEN ? AND ? ORDER BY followID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -827,7 +827,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_user_avatar WHERE avatarID BETWEEN ? AND ? ORDER BY avatarID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $fileLocation = $this->fileSystemPath . 'images/avatars/' . \substr($row['fileHash'], 0, 2) . '/' . $row['avatarID'] . '-' . $row['fileHash'] . '.' . $row['avatarExtension']; @@ -868,7 +868,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_user_option " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); $row = $statement->fetchArray(); @@ -910,7 +910,7 @@ final class WBB4xExporter extends AbstractExporter ) AS name FROM wcf" . $this->dbNo . "_user_option user_option " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $optionType = StringUtil::firstCharToUpperCase($row['optionType']); @@ -976,7 +976,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_conversation_label WHERE labelID BETWEEN ? AND ? ORDER BY labelID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1011,7 +1011,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_conversation WHERE conversationID BETWEEN ? AND ? ORDER BY conversationID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1051,7 +1051,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_conversation_message WHERE messageID BETWEEN ? AND ? ORDER BY messageID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1078,7 +1078,7 @@ final class WBB4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_conversation_to_user"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1097,7 +1097,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT * FROM wcf" . $this->dbNo . "_conversation_to_user ORDER BY conversationID, participantID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $rows[] = $row; @@ -1116,7 +1116,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_conversation_label_to_object label_to_object, wcf" . $this->dbNo . "_conversation_label label " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $labels[$row['conversationID']][$row['userID']][] = $row['labelID']; @@ -1175,7 +1175,7 @@ final class WBB4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM wbb" . $this->dbNo . "_board"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1193,7 +1193,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT * FROM wbb" . $this->dbNo . "_board ORDER BY parentID, position"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $i18nValues = []; while ($row = $statement->fetchArray()) { @@ -1307,7 +1307,7 @@ final class WBB4xExporter extends AbstractExporter FROM wbb" . $this->dbNo . "_thread WHERE threadID BETWEEN ? AND ? ORDER BY threadID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $threadIDs[] = $row['threadID']; @@ -1329,7 +1329,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT boardID, threadID FROM wbb" . $this->dbNo . "_thread_announcement " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($assignedBoards[$row['threadID']])) { @@ -1354,7 +1354,7 @@ final class WBB4xExporter extends AbstractExporter LEFT JOIN wcf" . $this->dbNo . "_language language ON language.languageID = thread.languageID " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $data = [ @@ -1420,7 +1420,7 @@ final class WBB4xExporter extends AbstractExporter FROM wbb" . $this->dbNo . "_post WHERE postID BETWEEN ? AND ? ORDER BY postID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1482,7 +1482,7 @@ final class WBB4xExporter extends AbstractExporter if (\version_compare($this->getPackageVersion('com.woltlab.wbb'), '5.5.0 Alpha 1', '>=')) { $sql = "SELECT COUNT(*) AS count FROM wbb" . $this->dbNo . "_thread_user_status"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); return $statement->fetchSingleColumn(); @@ -1490,7 +1490,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_user_object_watch WHERE objectTypeID = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.user.objectWatch', 'com.woltlab.wbb.thread')]); return $statement->fetchSingleColumn(); @@ -1509,7 +1509,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT * FROM wbb" . $this->dbNo . "_thread_user_status ORDER BY userID, threadID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1527,7 +1527,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_user_object_watch WHERE objectTypeID = ? ORDER BY watchID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([ $this->getObjectTypeID('com.woltlab.wcf.user.objectWatch', 'com.woltlab.wbb.thread'), ]); @@ -1552,7 +1552,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_poll WHERE objectTypeID = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([ $this->getObjectTypeID('com.woltlab.wcf.poll', 'com.woltlab.wbb.post'), ]); @@ -1573,7 +1573,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_poll WHERE objectTypeID = ? ORDER BY pollID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.poll', 'com.woltlab.wbb.post')]); while ($row = $statement->fetchArray()) { $data = [ @@ -1607,7 +1607,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_poll WHERE objectTypeID = ? )"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([ $this->getObjectTypeID('com.woltlab.wcf.poll', 'com.woltlab.wbb.post'), ]); @@ -1632,7 +1632,7 @@ final class WBB4xExporter extends AbstractExporter WHERE objectTypeID = ? ) ORDER BY optionID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([ $this->getObjectTypeID('com.woltlab.wcf.poll', 'com.woltlab.wbb.post'), ]); @@ -1662,7 +1662,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_poll WHERE objectTypeID = ? )"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([ $this->getObjectTypeID('com.woltlab.wcf.poll', 'com.woltlab.wbb.post'), ]); @@ -1687,7 +1687,7 @@ final class WBB4xExporter extends AbstractExporter WHERE objectTypeID = ? ) ORDER BY optionID, userID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([ $this->getObjectTypeID('com.woltlab.wcf.poll', 'com.woltlab.wbb.post'), ]); @@ -1735,7 +1735,7 @@ final class WBB4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_label"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1754,7 +1754,7 @@ final class WBB4xExporter extends AbstractExporter $labels = []; $sql = "SELECT * FROM wcf" . $this->dbNo . "_label"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { if (!isset($labels[$row['groupID']])) { @@ -1767,7 +1767,7 @@ final class WBB4xExporter extends AbstractExporter $labelGroups = []; $sql = "SELECT * FROM wcf" . $this->dbNo . "_label_group"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $labelGroups[] = $row; @@ -1778,7 +1778,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT * FROM wcf" . $this->dbNo . "_label_group_to_object WHERE objectTypeID = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([ $this->getObjectTypeID('com.woltlab.wcf.label.objectType', 'com.woltlab.wbb.board'), ]); @@ -1844,7 +1844,7 @@ final class WBB4xExporter extends AbstractExporter SELECT COUNT(*) FROM wcf" . $this->dbNo . "_acl_option_to_user ) AS count"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1879,7 +1879,7 @@ final class WBB4xExporter extends AbstractExporter AND acl_option.objectTypeID = ? ) ORDER BY optionID, objectID, userID, groupID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([$objectTypeID, $objectTypeID]); while ($row = $statement->fetchArray()) { $data = [ @@ -1910,7 +1910,7 @@ final class WBB4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_smiley"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1928,7 +1928,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT * FROM wcf" . $this->dbNo . "_smiley ORDER BY smileyID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $fileLocation = $this->fileSystemPath . $row['smileyPath']; @@ -1959,7 +1959,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_category WHERE objectTypeID = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([ $this->getObjectTypeID('com.woltlab.wcf.category', 'com.woltlab.wcf.bbcode.smiley'), ]); @@ -2017,7 +2017,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT packageDir FROM wcf" . $this->dbNo . "_package WHERE package = ?"; - $statement = $this->database->prepareStatement($sql, 1); + $statement = $this->database->prepareUnmanaged($sql, 1); $statement->execute(['com.woltlab.blog']); $packageDir = $statement->fetchColumn(); $blogFilePath = FileUtil::getRealPath($this->fileSystemPath . '/' . $packageDir); @@ -2039,7 +2039,7 @@ final class WBB4xExporter extends AbstractExporter WHERE blog.blogID BETWEEN ? AND ? ORDER BY blog.blogID"; } - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -2128,7 +2128,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT packageDir FROM wcf" . $this->dbNo . "_package WHERE package = ?"; - $statement = $this->database->prepareStatement($sql, 1); + $statement = $this->database->prepareUnmanaged($sql, 1); $statement->execute(['com.woltlab.blog']); $packageDir = $statement->fetchColumn(); $blogFilePath = FileUtil::getRealPath($this->fileSystemPath . '/' . $packageDir); @@ -2139,7 +2139,7 @@ final class WBB4xExporter extends AbstractExporter FROM blog" . $this->dbNo . "_entry WHERE entryID BETWEEN ? AND ? ORDER BY entryID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $entryIDs[] = $row['entryID']; @@ -2160,7 +2160,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT * FROM blog" . $this->dbNo . "_entry_to_category " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($categories[$row['entryID']])) { @@ -2188,7 +2188,7 @@ final class WBB4xExporter extends AbstractExporter ON language.languageID = entry.languageID " . $conditionBuilder; } - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $additionalData = []; @@ -2370,7 +2370,7 @@ final class WBB4xExporter extends AbstractExporter FROM gallery" . $this->dbNo . "_album WHERE albumID BETWEEN ? AND ? ORDER BY albumID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -2446,7 +2446,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT packageDir FROM wcf" . $this->dbNo . "_package WHERE package = ?"; - $statement = $this->database->prepareStatement($sql, 1); + $statement = $this->database->prepareUnmanaged($sql, 1); $statement->execute(['com.woltlab.gallery']); $packageDir = $statement->fetchColumn(); $imageFilePath = FileUtil::getRealPath($this->fileSystemPath . '/' . $packageDir); @@ -2456,7 +2456,7 @@ final class WBB4xExporter extends AbstractExporter FROM gallery" . $this->dbNo . "_image WHERE imageID BETWEEN ? AND ? ORDER BY imageID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); $imageIDs = $images = []; @@ -2529,7 +2529,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT * FROM gallery" . $this->dbNo . "_image_to_category " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($categories[$row['imageID']])) { @@ -2588,7 +2588,7 @@ final class WBB4xExporter extends AbstractExporter FROM gallery" . $this->dbNo . "_image_marker WHERE markerID BETWEEN ? AND ? ORDER BY markerID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -2694,7 +2694,7 @@ final class WBB4xExporter extends AbstractExporter FROM calendar" . $this->dbNo . "_event WHERE eventID BETWEEN ? AND ? ORDER BY eventID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $eventIDs[] = $row['eventID']; @@ -2713,7 +2713,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT packageDir FROM wcf" . $this->dbNo . "_package WHERE package = ?"; - $statement = $this->database->prepareStatement($sql, 1); + $statement = $this->database->prepareUnmanaged($sql, 1); $statement->execute(['com.woltlab.calendar']); $packageDir = $statement->fetchColumn(); $calendarFilePath = FileUtil::getRealPath($this->fileSystemPath . '/' . $packageDir); @@ -2731,7 +2731,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT * FROM calendar" . $this->dbNo . "_event_to_category " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($categories[$row['eventID']])) { @@ -2759,7 +2759,7 @@ final class WBB4xExporter extends AbstractExporter ON language.languageID = event.languageID " . $conditionBuilder; } - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $additionalData = []; @@ -2838,7 +2838,7 @@ final class WBB4xExporter extends AbstractExporter FROM calendar" . $this->dbNo . "_event_date WHERE eventDateID BETWEEN ? AND ? ORDER BY eventDateID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -2875,7 +2875,7 @@ final class WBB4xExporter extends AbstractExporter FROM calendar" . $this->dbNo . "_event_date_participation WHERE participationID BETWEEN ? AND ? ORDER BY participationID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -3067,14 +3067,14 @@ final class WBB4xExporter extends AbstractExporter FROM filebase" . $this->dbNo . "_license WHERE licenseID BETWEEN ? AND ? ORDER BY licenseID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); $sql = "SELECT language_item.languageItemValue, language.languageCode FROM wcf" . $this->dbNo . "_language_item language_item LEFT JOIN wcf" . $this->dbNo . "_language language ON (language.languageID = language_item.languageID) WHERE language_item.languageItem = ?"; - $languageStatement = $this->database->prepareStatement($sql); + $languageStatement = $this->database->prepareUnmanaged($sql); while ($row = $statement->fetchArray()) { $additionalData = []; @@ -3137,7 +3137,7 @@ final class WBB4xExporter extends AbstractExporter FROM filebase" . $this->dbNo . "_file WHERE fileID BETWEEN ? AND ? ORDER BY fileID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $fileIDs[] = $row['fileID']; @@ -3159,7 +3159,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT * FROM filebase" . $this->dbNo . "_file_to_category " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($categories[$row['fileID']])) { @@ -3177,7 +3177,7 @@ final class WBB4xExporter extends AbstractExporter LEFT JOIN wcf" . $this->dbNo . "_language language ON language.languageID = file.languageID " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $contents = [ @@ -3211,7 +3211,7 @@ final class WBB4xExporter extends AbstractExporter FROM filebase" . $this->dbNo . "_file WHERE fileID BETWEEN ? AND ? ORDER BY fileID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $fileIDs[] = $row['fileID']; @@ -3228,7 +3228,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT fileIconID FROM filebase" . $this->dbNo . "_file " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); $coreFiles = $this->getFileLocations($statement->fetchAll(\PDO::FETCH_COLUMN)); } @@ -3240,7 +3240,7 @@ final class WBB4xExporter extends AbstractExporter LEFT JOIN wcf" . $this->dbNo . "_language language ON language.languageID = file_content.languageID " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $fileContents[$row['fileID']][$row['languageCode'] ?: ''] = $row; @@ -3254,7 +3254,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT * FROM filebase" . $this->dbNo . "_file " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $contents = []; @@ -3367,7 +3367,7 @@ final class WBB4xExporter extends AbstractExporter ON language.languageID = file.languageID WHERE file_version.versionID BETWEEN ? AND ? ORDER BY file_version.versionID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $contents[$row['languageCode'] ?: ''] = [ @@ -3392,7 +3392,7 @@ final class WBB4xExporter extends AbstractExporter FROM filebase" . $this->dbNo . "_file_version WHERE versionID BETWEEN ? AND ? ORDER BY versionID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $versionIDs[] = $row['versionID']; @@ -3409,7 +3409,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT coreFileID FROM filebase" . $this->dbNo . "_file_version " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); $coreFiles = $this->getFileLocations($statement->fetchAll(\PDO::FETCH_COLUMN)); } @@ -3423,7 +3423,7 @@ final class WBB4xExporter extends AbstractExporter LEFT JOIN wcf" . $this->dbNo . "_language language ON language.languageID = version_content.languageID " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $versionContents[$row['versionID']][$row['languageCode'] ?: ''] = $row; @@ -3433,7 +3433,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT * FROM filebase" . $this->dbNo . "_file_version " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $contents = []; @@ -3644,7 +3644,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_page WHERE pageType IN (?, ?, ?) AND originIsSystem = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['text', 'html', 'tpl', 0]); $row = $statement->fetchArray(); @@ -3666,7 +3666,7 @@ final class WBB4xExporter extends AbstractExporter WHERE pageType IN (?, ?, ?) AND originIsSystem = ? ORDER BY pageID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['text', 'html', 'tpl', 0]); while ($pageID = $statement->fetchColumn()) { $pageIDs[] = $pageID; @@ -3687,7 +3687,7 @@ final class WBB4xExporter extends AbstractExporter ) AS languageCode FROM wcf" . $this->dbNo . "_page_content page_content " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($contents[$row['pageID']])) { @@ -3708,7 +3708,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_page " . $conditionBuilder . " ORDER BY pageID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($contents[$row['pageID']])) { @@ -3771,7 +3771,7 @@ final class WBB4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_media"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -3791,7 +3791,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT mediaID FROM wcf" . $this->dbNo . "_media ORDER BY mediaID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($mediaID = $statement->fetchColumn()) { $mediaIDs[] = $mediaID; @@ -3812,7 +3812,7 @@ final class WBB4xExporter extends AbstractExporter ) AS languageCode FROM wcf" . $this->dbNo . "_media_content media_content " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($contents[$row['mediaID']])) { @@ -3836,7 +3836,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_media media " . $conditionBuilder . " ORDER BY media.mediaID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $fileLocation = $this->fileSystemPath . 'media_files/' . \substr($row['fileHash'], 0, 2) . '/' . $row['mediaID'] . '-' . $row['fileHash']; @@ -3898,7 +3898,7 @@ final class WBB4xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_article"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -3918,7 +3918,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT articleID FROM wcf" . $this->dbNo . "_article ORDER BY articleID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($articleID = $statement->fetchColumn()) { $articleIDs[] = $articleID; @@ -3939,7 +3939,7 @@ final class WBB4xExporter extends AbstractExporter ) AS languageCode FROM wcf" . $this->dbNo . "_article_content article_content " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($contents[$row['articleID']])) { @@ -3963,7 +3963,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_article " . $conditionBuilder . " ORDER BY articleID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($contents[$row['articleID']])) { @@ -4053,7 +4053,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_comment WHERE objectTypeID = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([ $this->getObjectTypeID('com.woltlab.wcf.comment.commentableContent', $objectType), ]); @@ -4076,7 +4076,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_comment WHERE objectTypeID = ? ORDER BY commentID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([ $this->getObjectTypeID('com.woltlab.wcf.comment.commentableContent', $objectType), ]); @@ -4112,7 +4112,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_comment WHERE objectTypeID = ? )"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([ $this->getObjectTypeID('com.woltlab.wcf.comment.commentableContent', $objectType), ]); @@ -4139,7 +4139,7 @@ final class WBB4xExporter extends AbstractExporter WHERE objectTypeID = ? ) ORDER BY responseID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([ $this->getObjectTypeID('com.woltlab.wcf.comment.commentableContent', $objectType), ]); @@ -4171,7 +4171,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM wcf" . $this->dbNo . "_like WHERE objectTypeID = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([ $this->getObjectTypeID('com.woltlab.wcf.like.likeableObject', $objectType), ]); @@ -4194,7 +4194,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_like WHERE objectTypeID = ? ORDER BY likeID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([ $this->getObjectTypeID('com.woltlab.wcf.like.likeableObject', $objectType), ]); @@ -4225,7 +4225,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_attachment WHERE objectTypeID = ? AND objectID IS NOT NULL"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([ $this->getObjectTypeID('com.woltlab.wcf.attachment.objectType', $objectType), ]); @@ -4249,7 +4249,7 @@ final class WBB4xExporter extends AbstractExporter WHERE objectTypeID = ? AND objectID IS NOT NULL ORDER BY attachmentID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([$this->getObjectTypeID('com.woltlab.wcf.attachment.objectType', $objectType)]); while ($row = $statement->fetchArray()) { $fileLocation = $this->fileSystemPath . 'attachments/' . \substr($row['fileHash'], 0, 2) . '/' . $row['attachmentID'] . '-' . $row['fileHash']; @@ -4311,7 +4311,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT packageVersion FROM wcf" . $this->dbNo . "_package WHERE package = ?"; - $statement = $this->database->prepareStatement($sql, 1); + $statement = $this->database->prepareUnmanaged($sql, 1); $statement->execute([$name]); $row = $statement->fetchArray(); if ($row !== false) { @@ -4346,7 +4346,7 @@ final class WBB4xExporter extends AbstractExporter INNER JOIN wcf" . $this->dbNo . "_tag tag ON tag.tagID = tag_to_object.tagID " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($tags[$row['objectID']])) { @@ -4381,7 +4381,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT labelID, objectID FROM wcf" . $this->dbNo . "_label_object " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($labels[$row['objectID']])) { @@ -4411,7 +4411,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_object_type_definition WHERE definitionName = ? )"; - $statement = $this->database->prepareStatement($sql, 1); + $statement = $this->database->prepareUnmanaged($sql, 1); $statement->execute([ $objectTypeName, $definitionName, @@ -4435,7 +4435,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT COUNT(*) FROM wcf" . $this->dbNo . "_category WHERE objectTypeID = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([ $this->getObjectTypeID('com.woltlab.wcf.category', $objectType), ]); @@ -4457,7 +4457,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_category WHERE objectTypeID = ? ORDER BY parentCategoryID, categoryID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([ $this->getObjectTypeID('com.woltlab.wcf.category', $objectType), ]); @@ -4526,7 +4526,7 @@ final class WBB4xExporter extends AbstractExporter LEFT JOIN wcf" . $this->dbNo . "_language language ON language_item.languageID = language.languageID " . $conditions; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditions->getParameters()); $i18nValues = []; @@ -4556,7 +4556,7 @@ final class WBB4xExporter extends AbstractExporter $sql = "SELECT packageDir FROM wcf" . $this->dbNo . "_package WHERE package = ?"; - $statement = $this->database->prepareStatement($sql, 1); + $statement = $this->database->prepareUnmanaged($sql, 1); $statement->execute(['com.woltlab.filebase']); $row = $statement->fetchArray(); if ($row !== false) { @@ -4586,7 +4586,7 @@ final class WBB4xExporter extends AbstractExporter FROM wcf" . $this->dbNo . "_file " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); $files = []; diff --git a/files/lib/system/exporter/WordPress3xExporter.class.php b/files/lib/system/exporter/WordPress3xExporter.class.php index b53976d..1aa4014 100644 --- a/files/lib/system/exporter/WordPress3xExporter.class.php +++ b/files/lib/system/exporter/WordPress3xExporter.class.php @@ -104,7 +104,7 @@ final class WordPress3xExporter extends AbstractExporter $sql = "SELECT COUNT(*) FROM " . $this->databasePrefix . "posts"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); } @@ -157,7 +157,7 @@ final class WordPress3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "users WHERE ID BETWEEN ? AND ? ORDER BY ID"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -190,7 +190,7 @@ final class WordPress3xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "term_taxonomy WHERE taxonomy = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['category']); $row = $statement->fetchArray(); @@ -211,7 +211,7 @@ final class WordPress3xExporter extends AbstractExporter ON term.term_id = term_taxonomy.term_id WHERE term_taxonomy.taxonomy = ? ORDER BY term_taxonomy.parent, term_taxonomy.term_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['category']); while ($row = $statement->fetchArray()) { $this->categoryCache[$row['parent']][] = $row; @@ -255,7 +255,7 @@ final class WordPress3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "posts WHERE post_type = ? AND post_status IN (?, ?, ?, ?, ?)"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['post', 'publish', 'pending', 'draft', 'future', 'private']); $row = $statement->fetchArray(); @@ -277,7 +277,7 @@ final class WordPress3xExporter extends AbstractExporter WHERE post_type = ? AND post_status IN (?, ?, ?, ?, ?) ORDER BY ID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['post', 'publish', 'pending', 'draft', 'future', 'private']); while ($row = $statement->fetchArray()) { $entryIDs[] = $row['ID']; @@ -296,7 +296,7 @@ final class WordPress3xExporter extends AbstractExporter LEFT JOIN " . $this->databasePrefix . "terms term ON term.term_id = term_taxonomy.term_id " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($tags[$row['object_id']])) { @@ -315,7 +315,7 @@ final class WordPress3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "term_relationships term_relationships, " . $this->databasePrefix . "term_taxonomy term_taxonomy " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($categories[$row['object_id']])) { @@ -340,7 +340,7 @@ final class WordPress3xExporter extends AbstractExporter LEFT JOIN " . $this->databasePrefix . "users user ON user.ID = post.post_author " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $time = @\strtotime($row['post_date_gmt']); @@ -384,7 +384,7 @@ final class WordPress3xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM " . $this->databasePrefix . "comments WHERE comment_approved = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([1]); $row = $statement->fetchArray(); @@ -402,13 +402,13 @@ final class WordPress3xExporter extends AbstractExporter $sql = "SELECT comment_ID, comment_parent FROM " . $this->databasePrefix . "comments WHERE comment_ID = ?"; - $parentCommentStatement = $this->database->prepareStatement($sql, $limit, $offset); + $parentCommentStatement = $this->database->prepareUnmanaged($sql, $limit, $offset); $sql = "SELECT * FROM " . $this->databasePrefix . "comments WHERE comment_approved = ? ORDER BY comment_parent, comment_ID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([1]); while ($row = $statement->fetchArray()) { if (!$row['comment_parent']) { @@ -472,7 +472,7 @@ final class WordPress3xExporter extends AbstractExporter WHERE post_type IN (?, ?) AND post_status IN (?, ?, ?, ?, ?, ?) )"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([ 'attachment', @@ -512,7 +512,7 @@ final class WordPress3xExporter extends AbstractExporter AND post_status IN (?, ?, ?, ?, ?, ?) ) ORDER BY ID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([ '_wp_attached_file', @@ -564,7 +564,7 @@ final class WordPress3xExporter extends AbstractExporter FROM " . $this->databasePrefix . "posts WHERE post_type = ? AND post_status IN (?, ?, ?, ?, ?)"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([ 'page', @@ -592,7 +592,7 @@ final class WordPress3xExporter extends AbstractExporter WHERE post_type = ? AND post_status IN (?, ?, ?, ?, ?) ORDER BY ID"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([ 'page', diff --git a/files/lib/system/exporter/XF12xExporter.class.php b/files/lib/system/exporter/XF12xExporter.class.php index 4cc3f99..39748cc 100644 --- a/files/lib/system/exporter/XF12xExporter.class.php +++ b/files/lib/system/exporter/XF12xExporter.class.php @@ -120,7 +120,7 @@ final class XF12xExporter extends AbstractExporter $sql = "SELECT COUNT(*) FROM xf_template_compiled"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); } @@ -251,7 +251,7 @@ final class XF12xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM xf_user_group"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -269,7 +269,7 @@ final class XF12xExporter extends AbstractExporter $sql = "SELECT * FROM xf_user_group ORDER BY user_group_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $userOnlineMarking = '%s'; @@ -330,7 +330,7 @@ final class XF12xExporter extends AbstractExporter AND action = ? WHERE user_table.user_id BETWEEN ? AND ? ORDER BY user_table.user_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['user', 'register', $offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -439,7 +439,7 @@ final class XF12xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM xf_user_field " . $condition; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($condition->getParameters()); $row = $statement->fetchArray(); @@ -461,7 +461,7 @@ final class XF12xExporter extends AbstractExporter FROM xf_user_field " . $condition . " ORDER BY field_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute($condition->getParameters()); while ($row = $statement->fetchArray()) { switch ($row['field_type']) { @@ -523,11 +523,11 @@ final class XF12xExporter extends AbstractExporter try { $sql = "SELECT COUNT(*) AS count FROM xf_user_title_ladder"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); } catch (SystemException $e) { $sql = "SELECT COUNT(*) AS count FROM xf_trophy_user_title"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); } $statement->execute(); $row = $statement->fetchArray(); @@ -547,12 +547,12 @@ final class XF12xExporter extends AbstractExporter $sql = "SELECT * FROM xf_user_title_ladder ORDER BY minimum_level"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); } catch (SystemException $e) { $sql = "SELECT minimum_points AS minimum_level, title FROM xf_trophy_user_title ORDER BY minimum_points"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); } $statement->execute(); @@ -579,7 +579,7 @@ final class XF12xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM xf_user_follow"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -597,7 +597,7 @@ final class XF12xExporter extends AbstractExporter $sql = "SELECT * FROM xf_user_follow ORDER BY user_id, follow_user_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -632,7 +632,7 @@ final class XF12xExporter extends AbstractExporter FROM xf_profile_post WHERE profile_post_id BETWEEN ? AND ? ORDER BY profile_post_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -669,7 +669,7 @@ final class XF12xExporter extends AbstractExporter FROM xf_profile_post_comment WHERE profile_post_comment_id BETWEEN ? AND ? ORDER BY profile_post_comment_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -694,7 +694,7 @@ final class XF12xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM xf_user WHERE avatar_date <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $row = $statement->fetchArray(); @@ -713,7 +713,7 @@ final class XF12xExporter extends AbstractExporter FROM xf_user WHERE avatar_date <> ? ORDER BY user_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0]); while ($row = $statement->fetchArray()) { $config = $this->getConfig(); @@ -753,7 +753,7 @@ final class XF12xExporter extends AbstractExporter $sql = "SELECT user_id FROM xf_user ORDER BY user_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -787,7 +787,7 @@ final class XF12xExporter extends AbstractExporter FROM xf_conversation_master WHERE conversation_id BETWEEN ? AND ? ORDER BY conversation_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -828,7 +828,7 @@ final class XF12xExporter extends AbstractExporter ON message_table.ip_id = ip_table.ip_id WHERE message_table.message_id BETWEEN ? AND ? ORDER BY message_table.message_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -853,7 +853,7 @@ final class XF12xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM xf_conversation_recipient"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -876,7 +876,7 @@ final class XF12xExporter extends AbstractExporter ON cuser_table.owner_user_id = recipient_table.user_id AND cuser_table.conversation_id = recipient_table.conversation_id ORDER BY recipient_table.conversation_id, recipient_table.user_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $hideConversation = Conversation::STATE_DEFAULT; @@ -915,7 +915,7 @@ final class XF12xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM xf_node WHERE node_type_id IN (?, ?, ?)"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['Forum', 'Category', 'LinkForum']); $row = $statement->fetchArray(); @@ -938,7 +938,7 @@ final class XF12xExporter extends AbstractExporter ON node.node_id = link_forum.node_id WHERE node_type_id IN (?, ?, ?) ORDER BY node.lft"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['Forum', 'Category', 'LinkForum']); while ($row = $statement->fetchArray()) { @@ -995,7 +995,7 @@ final class XF12xExporter extends AbstractExporter FROM xf_thread WHERE thread_id BETWEEN ? AND ? ORDER BY thread_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1054,7 +1054,7 @@ final class XF12xExporter extends AbstractExporter AND thread.first_post_id = post.post_id WHERE post_id BETWEEN ? AND ? ORDER BY post_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1105,7 +1105,7 @@ final class XF12xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM xf_thread_watch"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1123,7 +1123,7 @@ final class XF12xExporter extends AbstractExporter $sql = "SELECT * FROM xf_thread_watch ORDER BY user_id, thread_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1145,7 +1145,7 @@ final class XF12xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM xf_poll WHERE content_type = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['thread']); $row = $statement->fetchArray(); @@ -1171,7 +1171,7 @@ final class XF12xExporter extends AbstractExporter ON poll.content_id = thread.thread_id WHERE content_type = ? ORDER BY poll.poll_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['thread']); while ($row = $statement->fetchArray()) { $data = [ @@ -1197,7 +1197,7 @@ final class XF12xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM xf_poll_response"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1215,7 +1215,7 @@ final class XF12xExporter extends AbstractExporter $sql = "SELECT * FROM xf_poll_response ORDER BY poll_response_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1238,7 +1238,7 @@ final class XF12xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM xf_poll_vote"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1256,7 +1256,7 @@ final class XF12xExporter extends AbstractExporter $sql = "SELECT * FROM xf_poll_vote ORDER BY poll_response_id, user_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1278,7 +1278,7 @@ final class XF12xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM xf_forum_prefix"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1300,7 +1300,7 @@ final class XF12xExporter extends AbstractExporter FROM xf_forum_prefix forum LEFT JOIN xf_phrase phrase ON phrase.title = ('thread_prefix_' || forum.prefix_id)"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { // import label group @@ -1352,7 +1352,7 @@ final class XF12xExporter extends AbstractExporter WHERE permission_group_id = ? AND permission_value <> ? AND content_type = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['forum', 'use_int', 'node']); $row = $statement->fetchArray(); @@ -1395,7 +1395,7 @@ final class XF12xExporter extends AbstractExporter AND permission_value <> ? AND content_type = ? ORDER BY permission_entry_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['forum', 'use_int', 'node']); while ($row = $statement->fetchArray()) { if (!isset($mapping[$row['permission_id']])) { @@ -1430,7 +1430,7 @@ final class XF12xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM xfa_blog_category WHERE user_id = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $row = $statement->fetchArray(); @@ -1449,7 +1449,7 @@ final class XF12xExporter extends AbstractExporter FROM xfa_blog_category WHERE user_id = ? ORDER BY category_id ASC"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0]); while ($row = $statement->fetchArray()) { $data = [ @@ -1476,7 +1476,7 @@ final class XF12xExporter extends AbstractExporter SELECT COUNT(*) FROM xfa_blog_entry_scheduled ) AS count"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1515,7 +1515,7 @@ final class XF12xExporter extends AbstractExporter ON entry.user_id = user.user_id ) ORDER BY isPublished DESC, entry_id ASC"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1557,7 +1557,7 @@ final class XF12xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM xfa_blog_comment"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1577,7 +1577,7 @@ final class XF12xExporter extends AbstractExporter LEFT JOIN xf_user user ON comment.user_id = user.user_id ORDER BY comment.comment_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1602,7 +1602,7 @@ final class XF12xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM xf_liked_content WHERE content_type = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['xfa_blog_entry']); $row = $statement->fetchArray(); @@ -1621,7 +1621,7 @@ final class XF12xExporter extends AbstractExporter FROM xf_liked_content WHERE content_type = ? ORDER BY like_id ASC"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['xfa_blog_entry']); while ($row = $statement->fetchArray()) { $data = [ @@ -1670,7 +1670,7 @@ final class XF12xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM xf_attachment WHERE content_type = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$type]); $row = $statement->fetchArray(); @@ -1693,7 +1693,7 @@ final class XF12xExporter extends AbstractExporter ON attachment.data_id = data.data_id WHERE attachment.content_type = ? ORDER BY attachment.attachment_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([$type]); while ($row = $statement->fetchArray()) { $config = $this->getConfig(); diff --git a/files/lib/system/exporter/XF2xExporter.class.php b/files/lib/system/exporter/XF2xExporter.class.php index 1c52189..ca6ed17 100644 --- a/files/lib/system/exporter/XF2xExporter.class.php +++ b/files/lib/system/exporter/XF2xExporter.class.php @@ -140,7 +140,7 @@ final class XF2xExporter extends AbstractExporter $sql = "SELECT COUNT(*) FROM xf_email_bounce_log"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); } @@ -287,7 +287,7 @@ final class XF2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM xf_user_group"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -305,7 +305,7 @@ final class XF2xExporter extends AbstractExporter $sql = "SELECT * FROM xf_user_group ORDER BY user_group_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $userOnlineMarking = '%s'; @@ -366,7 +366,7 @@ final class XF2xExporter extends AbstractExporter AND action = ? WHERE user_table.user_id BETWEEN ? AND ? ORDER BY user_table.user_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['user', 'register', $offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -475,7 +475,7 @@ final class XF2xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM xf_user_field " . $condition; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($condition->getParameters()); $row = $statement->fetchArray(); @@ -497,7 +497,7 @@ final class XF2xExporter extends AbstractExporter FROM xf_user_field " . $condition . " ORDER BY field_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute($condition->getParameters()); while ($row = $statement->fetchArray()) { switch ($row['field_type']) { @@ -563,11 +563,11 @@ final class XF2xExporter extends AbstractExporter try { $sql = "SELECT COUNT(*) AS count FROM xf_user_title_ladder"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); } catch (SystemException $e) { $sql = "SELECT COUNT(*) AS count FROM xf_trophy_user_title"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); } $statement->execute(); $row = $statement->fetchArray(); @@ -587,12 +587,12 @@ final class XF2xExporter extends AbstractExporter $sql = "SELECT * FROM xf_user_title_ladder ORDER BY minimum_level"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); } catch (SystemException $e) { $sql = "SELECT minimum_points AS minimum_level, title FROM xf_trophy_user_title ORDER BY minimum_points"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); } $statement->execute(); @@ -619,7 +619,7 @@ final class XF2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM xf_user_follow"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -637,7 +637,7 @@ final class XF2xExporter extends AbstractExporter $sql = "SELECT * FROM xf_user_follow ORDER BY user_id, follow_user_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -672,7 +672,7 @@ final class XF2xExporter extends AbstractExporter FROM xf_profile_post WHERE profile_post_id BETWEEN ? AND ? ORDER BY profile_post_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -709,7 +709,7 @@ final class XF2xExporter extends AbstractExporter FROM xf_profile_post_comment WHERE profile_post_comment_id BETWEEN ? AND ? ORDER BY profile_post_comment_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -734,7 +734,7 @@ final class XF2xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM xf_user WHERE avatar_date <> ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([0]); $row = $statement->fetchArray(); @@ -753,7 +753,7 @@ final class XF2xExporter extends AbstractExporter FROM xf_user WHERE avatar_date <> ? ORDER BY user_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([0]); while ($row = $statement->fetchArray()) { $config = $this->getConfig(); @@ -793,7 +793,7 @@ final class XF2xExporter extends AbstractExporter $sql = "SELECT user_id FROM xf_user ORDER BY user_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['']); while ($row = $statement->fetchArray()) { $data = [ @@ -827,7 +827,7 @@ final class XF2xExporter extends AbstractExporter FROM xf_conversation_master WHERE conversation_id BETWEEN ? AND ? ORDER BY conversation_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -868,7 +868,7 @@ final class XF2xExporter extends AbstractExporter ON message_table.ip_id = ip_table.ip_id WHERE message_table.message_id BETWEEN ? AND ? ORDER BY message_table.message_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -893,7 +893,7 @@ final class XF2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM xf_conversation_recipient"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -916,7 +916,7 @@ final class XF2xExporter extends AbstractExporter ON cuser_table.owner_user_id = recipient_table.user_id AND cuser_table.conversation_id = recipient_table.conversation_id ORDER BY recipient_table.conversation_id, recipient_table.user_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $hideConversation = Conversation::STATE_DEFAULT; @@ -955,7 +955,7 @@ final class XF2xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM xf_node WHERE node_type_id IN (?, ?, ?)"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['Forum', 'Category', 'LinkForum']); $row = $statement->fetchArray(); @@ -978,7 +978,7 @@ final class XF2xExporter extends AbstractExporter ON node.node_id = link_forum.node_id WHERE node_type_id IN (?, ?, ?) ORDER BY node.lft"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['Forum', 'Category', 'LinkForum']); while ($row = $statement->fetchArray()) { @@ -1037,7 +1037,7 @@ final class XF2xExporter extends AbstractExporter FROM xf_thread WHERE thread_id BETWEEN ? AND ? ORDER BY thread_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $threadIDs[] = $row['thread_id']; @@ -1055,7 +1055,7 @@ final class XF2xExporter extends AbstractExporter $sql = "SELECT * FROM xf_thread " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $data = [ @@ -1116,7 +1116,7 @@ final class XF2xExporter extends AbstractExporter ON thread.first_post_id = post.post_id WHERE post_id BETWEEN ? AND ? ORDER BY post_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1166,7 +1166,7 @@ final class XF2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM xf_thread_watch"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1184,7 +1184,7 @@ final class XF2xExporter extends AbstractExporter $sql = "SELECT * FROM xf_thread_watch ORDER BY user_id, thread_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1206,7 +1206,7 @@ final class XF2xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM xf_poll WHERE content_type = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['thread']); $row = $statement->fetchArray(); @@ -1232,7 +1232,7 @@ final class XF2xExporter extends AbstractExporter ON poll.content_id = thread.thread_id WHERE content_type = ? ORDER BY poll.poll_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['thread']); while ($row = $statement->fetchArray()) { $data = [ @@ -1258,7 +1258,7 @@ final class XF2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM xf_poll_response"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1276,7 +1276,7 @@ final class XF2xExporter extends AbstractExporter $sql = "SELECT * FROM xf_poll_response ORDER BY poll_response_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1299,7 +1299,7 @@ final class XF2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM xf_poll_vote"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1317,7 +1317,7 @@ final class XF2xExporter extends AbstractExporter $sql = "SELECT * FROM xf_poll_vote ORDER BY poll_response_id, user_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1358,7 +1358,7 @@ final class XF2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM xf_forum_prefix"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1380,7 +1380,7 @@ final class XF2xExporter extends AbstractExporter FROM xf_forum_prefix forum LEFT JOIN xf_phrase phrase ON phrase.title = ('thread_prefix.' || forum.prefix_id)"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { // import label group @@ -1432,7 +1432,7 @@ final class XF2xExporter extends AbstractExporter WHERE permission_group_id = ? AND permission_value <> ? AND content_type = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['forum', 'use_int', 'node']); $row = $statement->fetchArray(); @@ -1475,7 +1475,7 @@ final class XF2xExporter extends AbstractExporter AND permission_value <> ? AND content_type = ? ORDER BY permission_entry_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['forum', 'use_int', 'node']); while ($row = $statement->fetchArray()) { if (!isset($mapping[$row['permission_id']])) { @@ -1509,7 +1509,7 @@ final class XF2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM xf_mg_category"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1527,7 +1527,7 @@ final class XF2xExporter extends AbstractExporter $sql = "SELECT * FROM xf_mg_category ORDER BY lft"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1569,7 +1569,7 @@ final class XF2xExporter extends AbstractExporter FROM xf_mg_album WHERE album_id BETWEEN ? AND ? ORDER BY album_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -1612,7 +1612,7 @@ final class XF2xExporter extends AbstractExporter WHERE media_id BETWEEN ? AND ? AND media_type = ? ORDER BY media_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit, 'image']); while ($row = $statement->fetchArray()) { $imageIDs[] = $row['media_id']; @@ -1636,7 +1636,7 @@ final class XF2xExporter extends AbstractExporter INNER JOIN xf_attachment_data ad ON ad.data_id = a.data_id " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(\array_merge(['xfmg_media'], $conditionBuilder->getParameters())); while ($row = $statement->fetchArray()) { $config = $this->getConfig(); @@ -1701,7 +1701,7 @@ final class XF2xExporter extends AbstractExporter AND comment_state = ? AND content_type = ? ORDER BY comment_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit, 'visible', 'xfmg_media']); while ($row = $statement->fetchArray()) { $data = [ @@ -1744,7 +1744,7 @@ final class XF2xExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM xf_rm_category"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -1762,7 +1762,7 @@ final class XF2xExporter extends AbstractExporter $sql = "SELECT * FROM xf_rm_category ORDER BY lft"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(); while ($row = $statement->fetchArray()) { $data = [ @@ -1804,7 +1804,7 @@ final class XF2xExporter extends AbstractExporter FROM xf_rm_resource WHERE resource_id BETWEEN ? AND ? ORDER BY resource_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); $fileIDs = $statement->fetchAll(\PDO::FETCH_COLUMN); @@ -1822,7 +1822,7 @@ final class XF2xExporter extends AbstractExporter LEFT JOIN xf_rm_resource_update u ON r.description_update_id = u.resource_update_id " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { $additionalData = [ @@ -1918,7 +1918,7 @@ final class XF2xExporter extends AbstractExporter ON a.data_id = d.data_id WHERE v.resource_version_id BETWEEN ? AND ? ORDER BY v.resource_version_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(['resource_version', $offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $additionalData = [ @@ -1986,7 +1986,7 @@ final class XF2xExporter extends AbstractExporter ON attachment.content_id = resource.description_update_id WHERE attachment.content_type = ? ORDER BY attachment.attachment_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute(['resource_update']); while ($row = $statement->fetchArray()) { // Skip attachment that don't belong to an update that is used as a @@ -2038,7 +2038,7 @@ final class XF2xExporter extends AbstractExporter ON user.user_id = r.user_id WHERE r.resource_rating_id BETWEEN ? AND ? ORDER BY r.resource_rating_id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -2071,7 +2071,7 @@ final class XF2xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM xf_attachment WHERE content_type = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$type]); $row = $statement->fetchArray(); @@ -2094,7 +2094,7 @@ final class XF2xExporter extends AbstractExporter ON attachment.data_id = data.data_id WHERE attachment.content_type = ? ORDER BY attachment.attachment_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([$type]); while ($row = $statement->fetchArray()) { $config = $this->getConfig(); @@ -2137,7 +2137,7 @@ final class XF2xExporter extends AbstractExporter INNER JOIN xf_tag USING (tag_id) " . $conditionBuilder; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute($conditionBuilder->getParameters()); while ($row = $statement->fetchArray()) { if (!isset($tags[$row['content_id']])) { @@ -2161,13 +2161,13 @@ final class XF2xExporter extends AbstractExporter $sql = "SELECT COUNT(*) AS count FROM xf_reaction_content WHERE content_type = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$objectType]); } catch (SystemException $e) { $sql = "SELECT COUNT(*) AS count FROM xf_liked_content WHERE content_type = ?"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$objectType]); } $row = $statement->fetchArray(); @@ -2192,14 +2192,14 @@ final class XF2xExporter extends AbstractExporter ON r.reaction_id = rc.reaction_id WHERE rc.content_type = ? ORDER BY rc.reaction_content_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([$objectType]); } catch (SystemException $e) { $sql = "SELECT * FROM xf_liked_content WHERE content_type = ? ORDER BY like_id"; - $statement = $this->database->prepareStatement($sql, $limit, $offset); + $statement = $this->database->prepareUnmanaged($sql, $limit, $offset); $statement->execute([$objectType]); } while ($row = $statement->fetchArray()) { diff --git a/files/lib/system/exporter/XoborExporter.class.php b/files/lib/system/exporter/XoborExporter.class.php index 2ee111f..dd9acb4 100644 --- a/files/lib/system/exporter/XoborExporter.class.php +++ b/files/lib/system/exporter/XoborExporter.class.php @@ -66,7 +66,7 @@ final class XoborExporter extends AbstractExporter $sql = "SELECT COUNT(*) FROM forum_user"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); } @@ -126,7 +126,7 @@ final class XoborExporter extends AbstractExporter FROM forum_user WHERE id BETWEEN ? AND ? ORDER BY id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -179,7 +179,7 @@ final class XoborExporter extends AbstractExporter { $sql = "SELECT COUNT(*) AS count FROM forum_foren"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); $row = $statement->fetchArray(); @@ -197,7 +197,7 @@ final class XoborExporter extends AbstractExporter $sql = "SELECT * FROM forum_foren ORDER BY zuid, sort, id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $this->boardCache[$row['zuid']][] = $row; @@ -256,7 +256,7 @@ final class XoborExporter extends AbstractExporter FROM forum_threads WHERE id BETWEEN ? AND ? ORDER BY id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -301,7 +301,7 @@ final class XoborExporter extends AbstractExporter FROM forum_posts WHERE id BETWEEN ? AND ? ORDER BY id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit]); while ($row = $statement->fetchArray()) { $data = [ @@ -345,7 +345,7 @@ final class XoborExporter extends AbstractExporter AND files <> ? AND files <> ? ORDER BY id"; - $statement = $this->database->prepareStatement($sql); + $statement = $this->database->prepareUnmanaged($sql); $statement->execute([$offset + 1, $offset + $limit, '', \serialize([])]); while ($row = $statement->fetchArray()) {