Update of /cvsroot/phpicalendar/phpicalendar/includes
In directory sc8-pr-cvs1:/tmp/cvs-serv30895/includes
Modified Files:
calendar_nav.php login.php sidebar.php
Log Message:
Added HTTP authentication support. Modifications to non-HTTP
authentication login so that the two are mutually exclusive.
Moved calendar <option> listing into calendar_functions.php so it can
be shared by the navigation (via list_icals.php) and also by the
preferences.php file.
Fixed typo of $show_login to $allow_login.
Added E_ERROR to the debug error level, so fatal errors are logged.
Index: calendar_nav.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/includes/calendar_nav.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** calendar_nav.php 22 Nov 2003 21:26:03 -0000 1.16
--- calendar_nav.php 24 Nov 2003 04:05:38 -0000 1.17
***************
*** 151,155 ****
if ($allow_preferences != 'no') echo "<a class=\"psf\" href=\"preferences.php?cal=$cal&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> | <a class=\"psf\" href=\"$download_filename\">$download_lang</a>\n";
! if (isset($username)) {
$querys = preg_replace("/action=[^&]+/", "action=logout", $QUERY_STRING);
if ($querys == $QUERY_STRING) $querys .= "&action=logout";
--- 151,155 ----
if ($allow_preferences != 'no') echo "<a class=\"psf\" href=\"preferences.php?cal=$cal&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> | <a class=\"psf\" href=\"$download_filename\">$download_lang</a>\n";
! if ($username != '') {
$querys = preg_replace("/action=[^&]+/", "action=logout", $QUERY_STRING);
if ($querys == $QUERY_STRING) $querys .= "&action=logout";
Index: login.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/includes/login.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** login.php 24 Nov 2003 01:29:17 -0000 1.4
--- login.php 24 Nov 2003 04:05:38 -0000 1.5
***************
*** 1,5 ****
<?php
! // Hide the login block if logged in or there are no lock usernames.
! if (!isset($username) && $show_login == 'yes') {
// Set the login table width if not set.
if (!isset($login_width)) $login_width = "100%";
--- 1,6 ----
<?php
! // 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%";
Index: sidebar.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/includes/sidebar.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** sidebar.php 22 Nov 2003 21:16:10 -0000 1.29
--- sidebar.php 24 Nov 2003 04:05:38 -0000 1.30
***************
*** 40,44 ****
if ($allow_preferences != 'no') echo "<a class=\"psf\" href=\"preferences.php?cal=$cal&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> | <a class=\"psf\" href=\"$download_filename\">$download_lang</a>\n";
! if (isset($username)) {
$querys = preg_replace("/action=[^&]+/", "action=logout", $QUERY_STRING);
if ($querys == $QUERY_STRING) $querys .= '&action=logout';
--- 40,44 ----
if ($allow_preferences != 'no') echo "<a class=\"psf\" href=\"preferences.php?cal=$cal&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> | <a class=\"psf\" href=\"$download_filename\">$download_lang</a>\n";
! if ($username != '') {
$querys = preg_replace("/action=[^&]+/", "action=logout", $QUERY_STRING);
if ($querys == $QUERY_STRING) $querys .= '&action=logout';
|