From dfa766f738959f0e857c26e7b8336e76db493c73 Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Sun, 8 Nov 2020 17:22:39 +0100 Subject: Remove unused functions/classes --- ratatoeskr/sys/db.php | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) diff --git a/ratatoeskr/sys/db.php b/ratatoeskr/sys/db.php index 9272256..9efa9ec 100644 --- a/ratatoeskr/sys/db.php +++ b/ratatoeskr/sys/db.php @@ -12,7 +12,6 @@ use r7r\cms\sys\Database; use r7r\cms\sys\Env; -use r7r\cms\sys\DbTransaction; if (!defined("SETUP")) { require_once(dirname(__FILE__) . "/../config.php"); @@ -20,18 +19,6 @@ if (!defined("SETUP")) { require_once(dirname(__FILE__) . "/utils.php"); -/** - * Substitutes "PREFIX_" in the input string with the prefix from the config. - * - * @param mixed|string $q - * @return string - * @deprecated Use {@see Database::subPrefix()} instead. - */ -function sub_prefix($q): string -{ - return Env::getGlobal()->database()->subPrefix((string)$q); -} - /** * Prepares statement (1st argument) like {@see Database::prepStmt()} and executes it with the remaining arguments. * @@ -48,38 +35,3 @@ function qdb(...$args): PDOStatement return Env::getGlobal()->database()->query((string)$args[0], ...array_slice($args, 1)); } - -/** - * Makes using transactions easier. - * - * @deprecated Use {@see DbTransaction} instead. - */ -class Transaction -{ - /** @var DbTransaction */ - private $tx; - - /** - * Start a new transaction. - */ - public function __construct() - { - $this->tx = new DbTransaction(Env::getGlobal()->database()); - } - - /** - * Commit the transaction. - */ - public function commit(): void - { - $this->tx->commit(); - } - - /** - * Roll the transaction back. - */ - public function rollback(): void - { - $this->tx->rollback(); - } -} -- cgit v1.2.3-54-g00ecf