mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Remove unnecessary database connection parameter from all functions
All functions now have a database connection method that will use the same database connection. This imitates the functionality of passing a database connection as an argument and makes it redundant. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
8e03e68d68
commit
8d6c872297
8 changed files with 132 additions and 131 deletions
|
@ -13,11 +13,11 @@ if (isset($_COOKIE["AURSID"])) {
|
|||
if (!isset($dbh)) {
|
||||
$dbh = DB::connect();
|
||||
}
|
||||
delete_session_id($_COOKIE["AURSID"], $dbh);
|
||||
delete_session_id($_COOKIE["AURSID"]);
|
||||
# setting expiration to 1 means '1 second after midnight January 1, 1970'
|
||||
setcookie("AURSID", "", 1, "/", null, !empty($_SERVER['HTTPS']), true);
|
||||
unset($_COOKIE['AURSID']);
|
||||
clear_expired_sessions($dbh);
|
||||
clear_expired_sessions();
|
||||
}
|
||||
|
||||
header('Location: /');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue