From cf2ab50b8239b75af5df60ee143f41fedb044dc8 Mon Sep 17 00:00:00 2001 From: canyonknight Date: Sun, 3 Feb 2013 16:26:31 +0000 Subject: 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 Signed-off-by: Lukas Fleischer --- web/html/logout.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'web/html/logout.php') diff --git a/web/html/logout.php b/web/html/logout.php index 6c982904..3958c251 100644 --- a/web/html/logout.php +++ b/web/html/logout.php @@ -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); -- cgit v1.2.3-24-g4f1b