mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 09:43:03 +00:00
Add database wrapper class and new connection method
Uses the Singleton pattern to ensure all queries use the same database connection that is released upon script completion. All database connections should now be called with DB::connect() and not db_connect(). Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
b3a2b6c4a5
commit
8e03e68d68
10 changed files with 112 additions and 102 deletions
|
@ -20,7 +20,7 @@ $action = in_request("Action");
|
|||
if (isset($_COOKIE["AURSID"])) {
|
||||
# visitor is logged in
|
||||
#
|
||||
$dbh = db_connect();
|
||||
$dbh = DB::connect();
|
||||
$atype = account_from_sid($_COOKIE["AURSID"]);
|
||||
|
||||
if ($action == "SearchAccounts") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue