From 89ecaaa6c7f9b147109492b482ffa0db0660aa80 Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Mon, 3 Aug 2026 14:16:16 -0500 Subject: [PATCH] Remove dead prepareCheckStatement/prepareInsertStatement helpers These helpers were no longer called after the v2 migration rewrote processLogEntries and fetchAndStoreLogPage (the latter now prepares its own idempotent INSERT inline). Rendered unused by the v2 migration. --- includes/utilities.php | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/includes/utilities.php b/includes/utilities.php index 7a846a4..52cca2b 100644 --- a/includes/utilities.php +++ b/includes/utilities.php @@ -104,30 +104,6 @@ function validateApiResponse($responseData) { } } -/** - * Prepare a PDO statement for checking if a given vault transaction already exists in the database. - * - * @param PDO $pdo The PDO instance to prepare the statement with - * - * @return PDOStatement The prepared statement - */ -function prepareCheckStatement($pdo) { - $checkQuery = "SELECT COUNT(*) FROM vault WHERE user = :user AND timestamp = :timestamp AND amount = :amount"; - return $pdo->prepare($checkQuery); -} - -/** - * Prepare a PDO statement for inserting a new vault transaction into the database. - * - * @param PDO $pdo The PDO instance to prepare the statement with - * - * @return PDOStatement The prepared statement - */ -function prepareInsertStatement($pdo) { - $insertQuery = "INSERT INTO vault (ID, user, timestamp, description, amount) VALUES (:id, :user, :timestamp, :description, :amount)"; - return $pdo->prepare($insertQuery); -} - /** * Process an array of log entries retrieved from the Torn v2 API. *