Skip to content

Commit

Permalink
Replace WCF_N with 1 and use WCF::getDB()->prepare() instead of…
Browse files Browse the repository at this point in the history
… `WCF::getDB()->prepareStatement()`.
  • Loading branch information
Cyperghost committed Oct 24, 2024
1 parent 486e97b commit 5d7129c
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 40 deletions.
4 changes: 2 additions & 2 deletions files/lib/system/exporter/IPB3xExporter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ 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 pfields_content.*, members.*, profile_portal.*
Expand Down
4 changes: 2 additions & 2 deletions files/lib/system/exporter/IPB4xExporter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,10 @@ 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 pfields_content.*, members.*
Expand Down
4 changes: 2 additions & 2 deletions files/lib/system/exporter/Kunena3xExporter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ public function countUsers()
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.*,
Expand Down
4 changes: 2 additions & 2 deletions files/lib/system/exporter/MyBB16xExporter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,10 @@ 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 userfields_table.*,
Expand Down
4 changes: 2 additions & 2 deletions files/lib/system/exporter/NodeBB0xRedisExporter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ public function countUsers()
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) {
Expand Down
4 changes: 2 additions & 2 deletions files/lib/system/exporter/PhpBB31xExporter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,10 @@ 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 fields_table.*, user_table.*, ban_table.ban_give_reason AS banReason,
Expand Down
4 changes: 2 additions & 2 deletions files/lib/system/exporter/PhpBB3xExporter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,10 @@ 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 fields_table.*, user_table.*, ban_table.ban_give_reason AS banReason,
Expand Down
4 changes: 2 additions & 2 deletions files/lib/system/exporter/SMF2xExporter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,10 @@ 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 userIDs
$userIDs = [];
Expand Down
4 changes: 2 additions & 2 deletions files/lib/system/exporter/VB3or4xExporter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,10 @@ 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 userfield.*, user_table.*, textfield.*,
Expand Down
4 changes: 2 additions & 2 deletions files/lib/system/exporter/VB5xExporter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,10 @@ 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 userfield.*, user_table.*, textfield.*,
Expand Down
4 changes: 2 additions & 2 deletions files/lib/system/exporter/WBB2xExporter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,10 @@ 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 userfields.*, user.*,
Expand Down
12 changes: 6 additions & 6 deletions files/lib/system/exporter/WBB3xExporter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,9 @@ public function exportUsers($offset, $limit)
// 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;
Expand All @@ -455,10 +455,10 @@ 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 password encryption
$encryption = 'wcf1';
Expand Down Expand Up @@ -3242,9 +3242,9 @@ private function getExistingUserOptions()
{
$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'];
Expand Down
12 changes: 6 additions & 6 deletions files/lib/system/exporter/WBB4xExporter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,9 @@ public function exportUsers($offset, $limit)
// 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;
Expand All @@ -603,10 +603,10 @@ 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_option_value.*, user_table.*,
Expand Down Expand Up @@ -4288,9 +4288,9 @@ private function getExistingUserOptions()
{
$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'];
Expand Down
4 changes: 2 additions & 2 deletions files/lib/system/exporter/WordPress3xExporter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ public function countUsers()
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 *
Expand Down
4 changes: 2 additions & 2 deletions files/lib/system/exporter/XF12xExporter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,10 @@ public function countUsers()
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,
Expand Down
4 changes: 2 additions & 2 deletions files/lib/system/exporter/XF2xExporter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,10 @@ public function countUsers()
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,
Expand Down

0 comments on commit 5d7129c

Please sign in to comment.