From 9c2080e8bc15acebacac8ba8c724a904c935f6b8 Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Wed, 31 Dec 2008 11:16:33 +0000 Subject: bump version to 2.31rc2 --- calendars/test.ics | 11 +++++++++++ config.inc.php | 13 ++++++------- default_config.php | 2 +- functions/calendar_functions.php | 8 +++----- functions/init/configs.php | 1 - functions/userauth_functions.php | 42 ++++++++++++++++------------------------ 6 files changed, 38 insertions(+), 39 deletions(-) diff --git a/calendars/test.ics b/calendars/test.ics index 4f525b4..30e6720 100644 --- a/calendars/test.ics +++ b/calendars/test.ics @@ -108,4 +108,15 @@ DTSTART;TZID=US/Eastern:20081207 URL:http://google.com END:VEVENT +BEGIN:VTODO +UID:5e852d2a-f45f-11d8-943c-856dabf76260 +SUMMARY:Check into salary deductions for union dues +STATUS:NEEDS-ACTION +CLASS:PRIVATE +X-MOZILLA-ALARM-DEFAULT-LENGTH:0 +DTSTART:20011130T000000 +DUE:20101130T000000 +DTSTAMP:20040822T171851Z +END:VTODO + END:VCALENDAR diff --git a/config.inc.php b/config.inc.php index 01e12dc..4cfa7b1 100644 --- a/config.inc.php +++ b/config.inc.php @@ -56,11 +56,11 @@ phpicalendar currently supports about 30 language variants. For a list of suppo # 'gridLength' => 10, // Grid size in day and week views. Allowed values are 1,2,3,4,10,12,15,20,30,60. Default is 15 # 'minical_view' => 'current', // Where do the mini-calendars go when clicked?' => 'day', 'week', 'month', 'current' # 'allow_preferences' => 'no', - 'month_locations' => 'no', +# 'month_locations' => 'no', # 'show_search' => 'yes', # 'show_todos' => 'no', # 'show_completed' => 'no', -# 'allow_login' => 'yes', // Set to yes to prompt for login to unlock calendars. + 'allow_login' => 'yes', // Set to yes to prompt for login to unlock calendars. # 'week_start_day' => 'Monday', // Day of the week your week starts on # 'week_length' => '5', // Number of days to display in the week view # 'day_start' => '0600', // Start time for day grid @@ -76,7 +76,6 @@ these arrays provide extra calendar options. */ $blacklisted_cals = array( -'' ); /* ========= SPECIAL CALENDARS ========= @@ -84,24 +83,24 @@ these arrays provide extra calendar options. */ $list_webcals = array( - 'webcal://dimer.tamu.edu/calendars/seminars/Biochem.ics' +# 'webcal://dimer.tamu.edu/calendars/seminars/Biochem.ics' ); $more_webcals['recur_tests'] = array(); $locked_cals = array( - + 'Cindy','nuug' ); /* ========= SPECIAL CALENDARS ========= these arrays provide extra calendar options. */ -$locked_map['user1:pass'] = array(''); // Map username:password accounts to locked calendars that should be +$locked_map['jimhu:lambda'] = array('Cindy', 'nuug'); // Map username:password accounts to locked calendars that should be $locked_map['user2:pass'] = array(''); // unlocked if logged in. Calendar names should be the same as what is $locked_map['user3:pass'] = array(''); // listed in the $locked_cals, again without the .ics suffix. $locked_map['user4:pass'] = array(''); // Example: $locked_map['username:password'] = array('Locked1', 'Locked2'); // add more lines as necessary -$apache_map['user1'] = array(''); // Map HTTP authenticated users to specific calendars. Users listed here and +$apache_map['jimhu'] = array('Home'); // Map HTTP authenticated users to specific calendars. Users listed here and $apache_map['user2'] = array(''); // authenticated via HTTP will not see the public calendars, and will not be $apache_map['user3'] = array(''); // given any login/logout options. Calendar names not include the .ics suffix. $apache_map['user4'] = array(''); // Example: $apache_map['username'] = array('Calendar1', 'Calendar2'); diff --git a/default_config.php b/default_config.php index 374879e..18c44bd 100644 --- a/default_config.php +++ b/default_config.php @@ -2,7 +2,7 @@ class Configs{ private static $instance; private function __construct(){ - $this->phpicalendar_version = '2.31rc1'; + $this->phpicalendar_version = '2.31rc2'; // Configuration file for PHP iCalendar 2.25rc1 // // To set values, change the text between the single quotes diff --git a/functions/calendar_functions.php b/functions/calendar_functions.php index 020396f..2362686 100644 --- a/functions/calendar_functions.php +++ b/functions/calendar_functions.php @@ -14,7 +14,6 @@ function availableCalendars($username, $password, $cal_filename, $admin = false) { // Import globals. global $list_webcals, $blacklisted_cals, $locked_cals, $locked_map, $apache_map, $lang, $_SERVER, $phpiCal_config; - // Create the list of available calendars. $calendars = array(); @@ -29,7 +28,6 @@ function availableCalendars($username, $password, $cal_filename, $admin = false) if (isset($locked_map["$username:$password"])) { $unlocked_cals = $locked_map["$username:$password"]; } - // Make a local copy of the requested calendars. if (!is_array($cal_filename)) $cal_filename_local = array($cal_filename); @@ -101,10 +99,10 @@ function availableCalendars($username, $password, $cal_filename, $admin = false) } // Make sure the file is real. if (!is_file($file)) continue; - // Make sure the file ends in .ics. - if (!preg_match("/^.*\.ics$/i", $file)) continue; + // Remove any php files. + if (preg_match("/^.*\.php$/i", $file)) continue; // Make sure this is not a blacklisted calendar. - $cal_name = getCalendarName($file); + $cal_name = getCalendarName($file); if (in_array($cal_name, $blacklisted_cals)) continue; // If HTTP authenticated, make sure this calendar is available // to the user. diff --git a/functions/init/configs.php b/functions/init/configs.php index d47f367..1a553af 100644 --- a/functions/init/configs.php +++ b/functions/init/configs.php @@ -56,7 +56,6 @@ if (is_file($lang_file)) { if (isset($phpicalendar['cookie_timeformat']) && $phpicalendar['cookie_timeformat'] !=''){ $timeFormat = $phpicalendar['cookie_timeformat']; -echo "here $timeFormat
";print_r($phpicalendar);
 	switch($timeFormat){
 		case 'h:i':
 		case 'h:i A':
diff --git a/functions/userauth_functions.php b/functions/userauth_functions.php
index 2875fd4..abe2b5a 100644
--- a/functions/userauth_functions.php
+++ b/functions/userauth_functions.php
@@ -43,8 +43,7 @@ function logout_querys() {
 // if no valid login is found. Returns a boolean invalid_login to
 // indicate that the login is invalid.
 function user_login() {
-	global $_COOKIE, $_GET, $_POST, $_SERVER, $phpiCal_config;
-	global $login_cookies, $cookie_uri, $locked_map;
+	global $phpiCal_config, $locked_map;
 	
 	// Initialize return values.
 	$invalid_login = false;
@@ -56,41 +55,34 @@ function user_login() {
 	}
 
 	// Look for a login cookie.
-	if ($login_cookies == 'yes' &&
-		isset($_COOKIE['phpicalendar_login']))
-	{
+	if ($phpiCal_config->login_cookies == 'yes' && isset($_COOKIE['phpicalendar_login'])){
 		$login_cookie = unserialize(stripslashes($_COOKIE['phpicalendar_login']));
-		if (isset($login_cookie['username']) &&
-			isset($login_cookie['password']))
-		{
+		if (isset($login_cookie['username']) &&	isset($login_cookie['password'])){
 			$username = $login_cookie['username'];
 			$password = $login_cookie['password'];
 		}
 	}
 	
 	// Look for session authentication.
-	if ($login_cookies != 'yes') {
+	if ($phpiCal_config->login_cookies != 'yes') {
 		if (!session_id()) {
 			session_start();
-			setcookie(session_name(), session_id(), time()+(60*60*24*7*12*10), '/', $cookie_uri, 0);
+			setcookie(session_name(), session_id(), time()+(60*60*24*7*12*10), '/', $phpiCal_config->cookie_uri, 0);
 		}
-		if (isset($_SESSION['username']) &&
-			isset($_SESSION['password']))
-		{
+		if (isset($_SESSION['username'], $_SESSION['password'])){
 			$username = $_SESSION['username'];
 			$password = $_SESSION['password'];
 		}
 	}
 	
 	// Look for a new username and password.
-	if (isset($_GET['username']) &&
-		isset($_GET['password']))
-	{
-		$username = $_GET['username'];
-		$password = $_GET['password'];
-	} else if (isset($_POST['username']) &&
-			   isset($_POST['password']))
-	{
+# Should only take these from post?	
+#	if (isset($_GET['username'], $_GET['password'])){
+#		$username = $_GET['username'];
+#		$password = $_GET['password'];
+#	} else 
+	
+	if (isset($_POST['username'], $_POST['password'])){
 		$username = $_POST['username'];
 		$password = $_POST['password'];
 	}
@@ -120,16 +112,16 @@ function user_login() {
 //
 // Returns an empty username and password.
 function user_logout() {
-	global $login_cookies, $cookie_uri, $phpiCal_config;
+	global $phpiCal_config;
 	
 	// Clear the login cookie or session authentication values.
-	if ($login_cookies == 'yes') {
-		setcookie('phpicalendar_login', '', time()-(60*60*24*7), '/', $cookie_uri, 0);
+	if ($phpiCal_config->login_cookies == 'yes') {
+		setcookie('phpicalendar_login', '', time()-(60*60*24*7), '/', $phpiCal_config->cookie_uri, 0);
 	} else {
 		// Check if the session has already been started.
 		if (!session_id()) {
 			session_start();
-			setcookie(session_name(), session_id(), time()+(60*60*24*7*12*10), '/', $cookie_uri, 0);
+			setcookie(session_name(), session_id(), time()+(60*60*24*7*12*10), '/', $phpiCal_config->cookie_uri, 0);
 		}
 	
 		// Clear the session authentication values.
-- 
cgit v1.2.3