mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Remove checks before calling connection method
Large amount of boilerplate code that checks if a database connection exists is useless now that the new connection method automatically does the same check. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
4235d24039
commit
cf2ab50b82
4 changed files with 76 additions and 229 deletions
|
@ -10,9 +10,7 @@ include_once("acctfuncs.inc.php"); # access AUR common functions
|
|||
# sending any HTML output.
|
||||
#
|
||||
if (isset($_COOKIE["AURSID"])) {
|
||||
if (!isset($dbh)) {
|
||||
$dbh = DB::connect();
|
||||
}
|
||||
$dbh = DB::connect();
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue