aboutsummaryrefslogtreecommitdiffstats
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/calendar_nav.php2
-rw-r--r--includes/login.php5
-rw-r--r--includes/sidebar.php2
3 files changed, 5 insertions, 4 deletions
diff --git a/includes/calendar_nav.php b/includes/calendar_nav.php
index fc82742..f4e7285 100644
--- a/includes/calendar_nav.php
+++ b/includes/calendar_nav.php
@@ -150,7 +150,7 @@
echo "<a class=\"psf\" href=\"print.php?cal=$cal&amp;getdate=$getdate&amp;printview=$current_view\">$goprint_lang</a><br>\n";
if ($allow_preferences != 'no') echo "<a class=\"psf\" href=\"preferences.php?cal=$cal&amp;getdate=$getdate\">$preferences_lang</a><br>\n";
if ($cal != $ALL_CALENDARS_COMBINED && $subscribe_path != '' && $download_filename != '') echo "<a class=\"psf\" href=\"$subscribe_path\">$subscribe_lang</a>&nbsp;|&nbsp;<a class=\"psf\" href=\"$download_filename\">$download_lang</a>\n";
- if (isset($username)) {
+ if ($username != '') {
$querys = preg_replace("/action=[^&]+/", "action=logout", $QUERY_STRING);
if ($querys == $QUERY_STRING) $querys .= "&action=logout";
$querys = preg_replace("/(username|password)=[^&]+/", "", $querys);
diff --git a/includes/login.php b/includes/login.php
index f374c31..06b7381 100644
--- a/includes/login.php
+++ b/includes/login.php
@@ -1,6 +1,7 @@
<?php
- // Hide the login block if logged in or there are no lock usernames.
- if (!isset($username) && $show_login == 'yes') {
+ // Hide the login block if logged in, there are no lock usernames,
+ // or if authenticated via HTTP.
+ if ($username == '' && $allow_login == 'yes' && !isset($_SERVER['PHP_AUTH_USER'])) {
// Set the login table width if not set.
if (!isset($login_width)) $login_width = "100%";
diff --git a/includes/sidebar.php b/includes/sidebar.php
index fbbf43f..82d5301 100644
--- a/includes/sidebar.php
+++ b/includes/sidebar.php
@@ -39,7 +39,7 @@ $search_box = '<form style="margin-bottom:0;" action="search.php" method="GET"><
echo "<a class=\"psf\" href=\"print.php?cal=$cal&amp;getdate=$getdate&amp;printview=$current_view\">$goprint_lang</a><br>\n";
if ($allow_preferences != 'no') echo "<a class=\"psf\" href=\"preferences.php?cal=$cal&amp;getdate=$getdate\">$preferences_lang</a><br>\n";
if ($cal != $ALL_CALENDARS_COMBINED && $subscribe_path != '' && $download_filename != '') echo "<a class=\"psf\" href=\"$subscribe_path\">$subscribe_lang</a>&nbsp;|&nbsp;<a class=\"psf\" href=\"$download_filename\">$download_lang</a>\n";
- if (isset($username)) {
+ if ($username != '') {
$querys = preg_replace("/action=[^&]+/", "action=logout", $QUERY_STRING);
if ($querys == $QUERY_STRING) $querys .= '&action=logout';
$querys = preg_replace("/(username|password)=[^&]+/", "", $querys);

© 2014-2024 Faster IT GmbH | imprint | privacy policy