summaryrefslogtreecommitdiffstats
path: root/web/html/logout.php
diff options
context:
space:
mode:
authorcanyonknight <canyonknight@gmail.com>2013-02-03 17:26:31 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2013-02-10 12:10:38 +0100
commitcf2ab50b8239b75af5df60ee143f41fedb044dc8 (patch)
tree8a78697b539a12dfd99843cc2f325a740d863833 /web/html/logout.php
parent4235d24039258c80ef102e8a52550add5117f2e5 (diff)
downloadaur-cf2ab50b8239b75af5df60ee143f41fedb044dc8.tar.gz
aur-cf2ab50b8239b75af5df60ee143f41fedb044dc8.tar.xz
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>
Diffstat (limited to 'web/html/logout.php')
-rw-r--r--web/html/logout.php4
1 files changed, 1 insertions, 3 deletions
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);