summaryrefslogtreecommitdiff
path: root/web/html
diff options
context:
space:
mode:
authorcanyonknight <canyonknight@gmail.com>2013-02-03 16:26:31 +0000
committerLukas Fleischer <archlinux@cryptocrack.de>2013-02-10 12:10:38 +0100
commitcf2ab50b8239b75af5df60ee143f41fedb044dc8 (patch)
tree8a78697b539a12dfd99843cc2f325a740d863833 /web/html
parent4235d24039258c80ef102e8a52550add5117f2e5 (diff)
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')
-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 6c98290..3958c25 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);