From ff1aa0c968c745ec980f56bc0164c42e9ec49fb6 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Thu, 22 Jul 2004 02:25:41 +0000 Subject: Changes. --- functions/ical_parser.php | 7 +++---- functions/userauth_functions.php | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'functions') diff --git a/functions/ical_parser.php b/functions/ical_parser.php index 3a85726..d12ee38 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -283,7 +283,7 @@ foreach ($cal_filelist as $filename) { $end = strtotime('+1 day', $start); } // Changed for 1.0, basically write out the entire event if it starts while the array is written. - if ($start < $mArray_end) { + if (($start < $mArray_end) && ($start < $end)) { while (($start != $end) && ($start < $mArray_end)) { $start_date2 = date('Ymd', $start); $master_array[($start_date2)][('-1')][$uid]= array ('event_text' => $summary, 'description' => $description, 'location' => $location, 'organizer' => serialize($organizer), 'attendee' => serialize($attendee), 'calnumber' => $calnumber, 'calname' => $actual_calname, 'url' => $url, 'status' => $status, 'class' => $class ); @@ -572,8 +572,7 @@ foreach ($cal_filelist as $filename) { } break; case 'YEARLY': - - if (!isset($bymonth)) { + if ((!isset($bymonth)) || (sizeof($bymonth) == 0)) { $m = date('m', $start_date_time); $bymonth = array("$m"); } @@ -606,7 +605,7 @@ foreach ($cal_filelist as $filename) { } else { $day = date('d', $start_date_time); $next_date_time = mktime(0,0,0,$month,$day,$year); - //echo date('Ymd',$next_range_time).$summary.'
'; + //echo date('Ymd',$next_date_time).$summary.'
'; } $recur_data[] = $next_date_time; } diff --git a/functions/userauth_functions.php b/functions/userauth_functions.php index 403076d..4fe04fb 100644 --- a/functions/userauth_functions.php +++ b/functions/userauth_functions.php @@ -96,7 +96,7 @@ function user_login() { } // Check to make sure the username and password is valid. - if (!key_exists("$username:$password", $locked_map)) { + if (!array_key_exists("$username:$password", $locked_map)) { // Remember the invalid login, because we may want to display // a message elsewhere or check validity. return array($username, $password, true); -- cgit v1.2.3