From 5d7129c68c064f8a1c1f27690fb1011ee415c947 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Thu, 24 Oct 2024 11:46:36 +0200 Subject: [PATCH] Replace `WCF_N` with `1` and use `WCF::getDB()->prepare()` instead of `WCF::getDB()->prepareStatement()`. --- files/lib/system/exporter/IPB3xExporter.class.php | 4 ++-- files/lib/system/exporter/IPB4xExporter.class.php | 4 ++-- files/lib/system/exporter/Kunena3xExporter.class.php | 4 ++-- files/lib/system/exporter/MyBB16xExporter.class.php | 4 ++-- .../system/exporter/NodeBB0xRedisExporter.class.php | 4 ++-- files/lib/system/exporter/PhpBB31xExporter.class.php | 4 ++-- files/lib/system/exporter/PhpBB3xExporter.class.php | 4 ++-- files/lib/system/exporter/SMF2xExporter.class.php | 4 ++-- files/lib/system/exporter/VB3or4xExporter.class.php | 4 ++-- files/lib/system/exporter/VB5xExporter.class.php | 4 ++-- files/lib/system/exporter/WBB2xExporter.class.php | 4 ++-- files/lib/system/exporter/WBB3xExporter.class.php | 12 ++++++------ files/lib/system/exporter/WBB4xExporter.class.php | 12 ++++++------ .../system/exporter/WordPress3xExporter.class.php | 4 ++-- files/lib/system/exporter/XF12xExporter.class.php | 4 ++-- files/lib/system/exporter/XF2xExporter.class.php | 4 ++-- 16 files changed, 40 insertions(+), 40 deletions(-) diff --git a/files/lib/system/exporter/IPB3xExporter.class.php b/files/lib/system/exporter/IPB3xExporter.class.php index b036b5c..33ffe14 100644 --- a/files/lib/system/exporter/IPB3xExporter.class.php +++ b/files/lib/system/exporter/IPB3xExporter.class.php @@ -225,10 +225,10 @@ final class IPB3xExporter extends AbstractExporter } // prepare password update - $sql = "UPDATE wcf" . WCF_N . "_user + $sql = "UPDATE wcf1_user SET password = ? WHERE userID = ?"; - $passwordUpdateStatement = WCF::getDB()->prepareStatement($sql); + $passwordUpdateStatement = WCF::getDB()->prepare($sql); // get users $sql = "SELECT pfields_content.*, members.*, profile_portal.* diff --git a/files/lib/system/exporter/IPB4xExporter.class.php b/files/lib/system/exporter/IPB4xExporter.class.php index 61c87b9..8d291f6 100644 --- a/files/lib/system/exporter/IPB4xExporter.class.php +++ b/files/lib/system/exporter/IPB4xExporter.class.php @@ -283,10 +283,10 @@ final class IPB4xExporter extends AbstractExporter } // prepare password update - $sql = "UPDATE wcf" . WCF_N . "_user + $sql = "UPDATE wcf1_user SET password = ? WHERE userID = ?"; - $passwordUpdateStatement = WCF::getDB()->prepareStatement($sql); + $passwordUpdateStatement = WCF::getDB()->prepare($sql); // get users $sql = "SELECT pfields_content.*, members.* diff --git a/files/lib/system/exporter/Kunena3xExporter.class.php b/files/lib/system/exporter/Kunena3xExporter.class.php index 3e06b38..3774eb1 100644 --- a/files/lib/system/exporter/Kunena3xExporter.class.php +++ b/files/lib/system/exporter/Kunena3xExporter.class.php @@ -206,10 +206,10 @@ final class Kunena3xExporter extends AbstractExporter public function exportUsers($offset, $limit) { // prepare password update - $sql = "UPDATE wcf" . WCF_N . "_user + $sql = "UPDATE wcf1_user SET password = ? WHERE userID = ?"; - $passwordUpdateStatement = WCF::getDB()->prepareStatement($sql); + $passwordUpdateStatement = WCF::getDB()->prepare($sql); // get users $sql = "SELECT kunena_users.*, users.*, diff --git a/files/lib/system/exporter/MyBB16xExporter.class.php b/files/lib/system/exporter/MyBB16xExporter.class.php index 502ef83..5dce9de 100644 --- a/files/lib/system/exporter/MyBB16xExporter.class.php +++ b/files/lib/system/exporter/MyBB16xExporter.class.php @@ -304,10 +304,10 @@ final class MyBB16xExporter extends AbstractExporter } // prepare password update - $sql = "UPDATE wcf" . WCF_N . "_user + $sql = "UPDATE wcf1_user SET password = ? WHERE userID = ?"; - $passwordUpdateStatement = WCF::getDB()->prepareStatement($sql); + $passwordUpdateStatement = WCF::getDB()->prepare($sql); // get users $sql = "SELECT userfields_table.*, diff --git a/files/lib/system/exporter/NodeBB0xRedisExporter.class.php b/files/lib/system/exporter/NodeBB0xRedisExporter.class.php index 5d49625..85078f7 100644 --- a/files/lib/system/exporter/NodeBB0xRedisExporter.class.php +++ b/files/lib/system/exporter/NodeBB0xRedisExporter.class.php @@ -167,10 +167,10 @@ final class NodeBB0xRedisExporter extends AbstractExporter public function exportUsers($offset, $limit) { // prepare password update - $sql = "UPDATE wcf" . WCF_N . "_user + $sql = "UPDATE wcf1_user SET password = ? WHERE userID = ?"; - $passwordUpdateStatement = WCF::getDB()->prepareStatement($sql); + $passwordUpdateStatement = WCF::getDB()->prepare($sql); $userIDs = $this->database->zrange('users:joindate', $offset, $offset + $limit); if (!$userIDs) { diff --git a/files/lib/system/exporter/PhpBB31xExporter.class.php b/files/lib/system/exporter/PhpBB31xExporter.class.php index 60d524b..856a95b 100644 --- a/files/lib/system/exporter/PhpBB31xExporter.class.php +++ b/files/lib/system/exporter/PhpBB31xExporter.class.php @@ -349,10 +349,10 @@ final class PhpBB31xExporter extends AbstractExporter } // prepare password update - $sql = "UPDATE wcf" . WCF_N . "_user + $sql = "UPDATE wcf1_user SET password = ? WHERE userID = ?"; - $passwordUpdateStatement = WCF::getDB()->prepareStatement($sql); + $passwordUpdateStatement = WCF::getDB()->prepare($sql); // get users $sql = "SELECT fields_table.*, user_table.*, ban_table.ban_give_reason AS banReason, diff --git a/files/lib/system/exporter/PhpBB3xExporter.class.php b/files/lib/system/exporter/PhpBB3xExporter.class.php index 57b69ed..5f3048f 100644 --- a/files/lib/system/exporter/PhpBB3xExporter.class.php +++ b/files/lib/system/exporter/PhpBB3xExporter.class.php @@ -334,10 +334,10 @@ final class PhpBB3xExporter extends AbstractExporter } // prepare password update - $sql = "UPDATE wcf" . WCF_N . "_user + $sql = "UPDATE wcf1_user SET password = ? WHERE userID = ?"; - $passwordUpdateStatement = WCF::getDB()->prepareStatement($sql); + $passwordUpdateStatement = WCF::getDB()->prepare($sql); // get users $sql = "SELECT fields_table.*, user_table.*, ban_table.ban_give_reason AS banReason, diff --git a/files/lib/system/exporter/SMF2xExporter.class.php b/files/lib/system/exporter/SMF2xExporter.class.php index 4833828..bcd0472 100644 --- a/files/lib/system/exporter/SMF2xExporter.class.php +++ b/files/lib/system/exporter/SMF2xExporter.class.php @@ -298,10 +298,10 @@ final class SMF2xExporter extends AbstractExporter } // prepare password update - $sql = "UPDATE wcf" . WCF_N . "_user + $sql = "UPDATE wcf1_user SET password = ? WHERE userID = ?"; - $passwordUpdateStatement = WCF::getDB()->prepareStatement($sql); + $passwordUpdateStatement = WCF::getDB()->prepare($sql); // get userIDs $userIDs = []; diff --git a/files/lib/system/exporter/VB3or4xExporter.class.php b/files/lib/system/exporter/VB3or4xExporter.class.php index 30fb3ae..c7ad38e 100644 --- a/files/lib/system/exporter/VB3or4xExporter.class.php +++ b/files/lib/system/exporter/VB3or4xExporter.class.php @@ -493,10 +493,10 @@ final class VB3or4xExporter extends AbstractExporter } // prepare password update - $sql = "UPDATE wcf" . WCF_N . "_user + $sql = "UPDATE wcf1_user SET password = ? WHERE userID = ?"; - $passwordUpdateStatement = WCF::getDB()->prepareStatement($sql); + $passwordUpdateStatement = WCF::getDB()->prepare($sql); // get users $sql = "SELECT userfield.*, user_table.*, textfield.*, diff --git a/files/lib/system/exporter/VB5xExporter.class.php b/files/lib/system/exporter/VB5xExporter.class.php index ff9dc26..0849724 100644 --- a/files/lib/system/exporter/VB5xExporter.class.php +++ b/files/lib/system/exporter/VB5xExporter.class.php @@ -353,10 +353,10 @@ final class VB5xExporter extends AbstractExporter } // prepare password update - $sql = "UPDATE wcf" . WCF_N . "_user + $sql = "UPDATE wcf1_user SET password = ? WHERE userID = ?"; - $passwordUpdateStatement = WCF::getDB()->prepareStatement($sql); + $passwordUpdateStatement = WCF::getDB()->prepare($sql); // get users $sql = "SELECT userfield.*, user_table.*, textfield.*, diff --git a/files/lib/system/exporter/WBB2xExporter.class.php b/files/lib/system/exporter/WBB2xExporter.class.php index c13d774..1e406ae 100644 --- a/files/lib/system/exporter/WBB2xExporter.class.php +++ b/files/lib/system/exporter/WBB2xExporter.class.php @@ -300,10 +300,10 @@ final class WBB2xExporter extends AbstractExporter } // prepare password update - $sql = "UPDATE wcf" . WCF_N . "_user + $sql = "UPDATE wcf1_user SET password = ? WHERE userID = ?"; - $passwordUpdateStatement = WCF::getDB()->prepareStatement($sql); + $passwordUpdateStatement = WCF::getDB()->prepare($sql); // get users $sql = "SELECT userfields.*, user.*, diff --git a/files/lib/system/exporter/WBB3xExporter.class.php b/files/lib/system/exporter/WBB3xExporter.class.php index e2f5d3f..958489e 100644 --- a/files/lib/system/exporter/WBB3xExporter.class.php +++ b/files/lib/system/exporter/WBB3xExporter.class.php @@ -436,9 +436,9 @@ final class WBB3xExporter extends AbstractExporter // cache existing user options $existingUserOptions = []; $sql = "SELECT optionName, optionID - FROM wcf" . WCF_N . "_user_option + FROM wcf1_user_option WHERE optionName NOT LIKE 'option%'"; - $statement = WCF::getDB()->prepareStatement($sql); + $statement = WCF::getDB()->prepare($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $existingUserOptions[$row['optionName']] = true; @@ -455,10 +455,10 @@ final class WBB3xExporter extends AbstractExporter } // prepare password update - $sql = "UPDATE wcf" . WCF_N . "_user + $sql = "UPDATE wcf1_user SET password = ? WHERE userID = ?"; - $passwordUpdateStatement = WCF::getDB()->prepareStatement($sql); + $passwordUpdateStatement = WCF::getDB()->prepare($sql); // get password encryption $encryption = 'wcf1'; @@ -3242,9 +3242,9 @@ final class WBB3xExporter extends AbstractExporter { $optionsNames = []; $sql = "SELECT optionName - FROM wcf" . WCF_N . "_user_option + FROM wcf1_user_option WHERE optionName NOT LIKE ?"; - $statement = WCF::getDB()->prepareStatement($sql); + $statement = WCF::getDB()->prepare($sql); $statement->execute(['option%']); while ($row = $statement->fetchArray()) { $optionsNames[] = $row['optionName']; diff --git a/files/lib/system/exporter/WBB4xExporter.class.php b/files/lib/system/exporter/WBB4xExporter.class.php index cb7bfa2..115407f 100644 --- a/files/lib/system/exporter/WBB4xExporter.class.php +++ b/files/lib/system/exporter/WBB4xExporter.class.php @@ -584,9 +584,9 @@ final class WBB4xExporter extends AbstractExporter // cache existing user options $existingUserOptions = []; $sql = "SELECT optionName, optionID - FROM wcf" . WCF_N . "_user_option + FROM wcf1_user_option WHERE optionName NOT LIKE 'option%'"; - $statement = WCF::getDB()->prepareStatement($sql); + $statement = WCF::getDB()->prepare($sql); $statement->execute(); while ($row = $statement->fetchArray()) { $existingUserOptions[$row['optionName']] = true; @@ -603,10 +603,10 @@ final class WBB4xExporter extends AbstractExporter } // prepare password update - $sql = "UPDATE wcf" . WCF_N . "_user + $sql = "UPDATE wcf1_user SET password = ? WHERE userID = ?"; - $passwordUpdateStatement = WCF::getDB()->prepareStatement($sql); + $passwordUpdateStatement = WCF::getDB()->prepare($sql); // get users $sql = "SELECT user_option_value.*, user_table.*, @@ -4288,9 +4288,9 @@ final class WBB4xExporter extends AbstractExporter { $optionsNames = []; $sql = "SELECT optionName - FROM wcf" . WCF_N . "_user_option + FROM wcf1_user_option WHERE optionName NOT LIKE ?"; - $statement = WCF::getDB()->prepareStatement($sql); + $statement = WCF::getDB()->prepare($sql); $statement->execute(['option%']); while ($row = $statement->fetchArray()) { $optionsNames[] = $row['optionName']; diff --git a/files/lib/system/exporter/WordPress3xExporter.class.php b/files/lib/system/exporter/WordPress3xExporter.class.php index 1aa4014..ca22086 100644 --- a/files/lib/system/exporter/WordPress3xExporter.class.php +++ b/files/lib/system/exporter/WordPress3xExporter.class.php @@ -147,10 +147,10 @@ final class WordPress3xExporter extends AbstractExporter public function exportUsers($offset, $limit) { // prepare password update - $sql = "UPDATE wcf" . WCF_N . "_user + $sql = "UPDATE wcf1_user SET password = ? WHERE userID = ?"; - $passwordUpdateStatement = WCF::getDB()->prepareStatement($sql); + $passwordUpdateStatement = WCF::getDB()->prepare($sql); // get users $sql = "SELECT * diff --git a/files/lib/system/exporter/XF12xExporter.class.php b/files/lib/system/exporter/XF12xExporter.class.php index 39748cc..f1ae300 100644 --- a/files/lib/system/exporter/XF12xExporter.class.php +++ b/files/lib/system/exporter/XF12xExporter.class.php @@ -308,10 +308,10 @@ final class XF12xExporter extends AbstractExporter public function exportUsers($offset, $limit) { // prepare password update - $sql = "UPDATE wcf" . WCF_N . "_user + $sql = "UPDATE wcf1_user SET password = ? WHERE userID = ?"; - $passwordUpdateStatement = WCF::getDB()->prepareStatement($sql); + $passwordUpdateStatement = WCF::getDB()->prepare($sql); // get users $sql = "SELECT user_table.*, user_profile_table.*, INET_NTOA(ip_table.ip) AS ip, diff --git a/files/lib/system/exporter/XF2xExporter.class.php b/files/lib/system/exporter/XF2xExporter.class.php index ca6ed17..ba2f4ee 100644 --- a/files/lib/system/exporter/XF2xExporter.class.php +++ b/files/lib/system/exporter/XF2xExporter.class.php @@ -344,10 +344,10 @@ final class XF2xExporter extends AbstractExporter public function exportUsers($offset, $limit) { // prepare password update - $sql = "UPDATE wcf" . WCF_N . "_user + $sql = "UPDATE wcf1_user SET password = ? WHERE userID = ?"; - $passwordUpdateStatement = WCF::getDB()->prepareStatement($sql); + $passwordUpdateStatement = WCF::getDB()->prepare($sql); // get users $sql = "SELECT user_table.*, user_profile_table.*, INET_NTOA(ip_table.ip) AS ip, -- 2.20.1