Index: /trunk/prototype/services/iCal.php
===================================================================
--- /trunk/prototype/services/iCal.php	(revision 5715)
+++ /trunk/prototype/services/iCal.php	(revision 5736)
@@ -1,3 +1,5 @@
 <?php
+
+
 
 require_once ROOTPATH.'/plugins/icalcreator/iCalUtilityFunctions.class.php';
@@ -9,5 +11,5 @@
 class iCal implements Formatter 
 {
-    static $timezonesMap = array ('(GMT-12.00) International Date Line West' => 'Etc/GMT+12', '(GMT-11.00) Midway Island / Samoa' => 'Pacific/Midway', '(GMT-10.00) Hawaii' => 'Pacific/Honolulu', '(GMT-09.00) Alaska' => 'America/Anchorage', '(GMT-08.00) Pacific Time (US & Canada) / Tijuana' => 'America/Los_Angeles', '(GMT-08.00) Tijuana / Baja California' => 'America/Tijuana', '(GMT-07.00) Arizona' => 'America/Phoenix', '(GMT-07.00) Chihuahua / La Paz / Mazatlan - Old' => 'America/Chihuahua', '(GMT-07.00) Mountain Time (US & Canada)' => 'America/Denver', '(GMT-06.00) Central America' => 'America/Guatemala', '(GMT-06.00) Central Time (US & Canada)' => 'America/Chicago', '(GMT-06.00) Guadalajara / Mexico City / Monterrey - Old' => 'America/Mexico_City', '(GMT-06.00) Saskatchewan' => 'America/Regina', '(GMT-05.00) Bogota / Lima / Quito' => 'America/Bogota', '(GMT-05.00) Eastern Time (US & Canada)' => 'America/New_York', '(GMT-05.00) Indiana (East)' => 'America/Indiana/Indianapolis', '(GMT-04.30) Caracas' => 'America/Caracas', '(GMT-04.00) Atlantic Time (Canada)' => 'America/Halifax', '(GMT-04.00) Georgetown' => 'America/Guyana', '(GMT-04.00) Caracas / La Paz' => 'America/La_Paz', '(GMT-04.00) Manaus' => 'America/Manaus', '(GMT-04.00) Santiago' => 'America/Santiago', '(GMT-03.30) Newfoundland' => 'America/St_Johns', '(GMT-03.00) Brasilia' => 'America/Sao_Paulo', '(GMT-03.00) Buenos Aires / Georgetown' => 'America/Argentina/Buenos_Aires', '(GMT-03.00) Greenland' => 'America/Godthab', '(GMT-03.00) Montevideo' => 'America/Montevideo', '(GMT-02.00) Mid-Atlantic' => 'Atlantic/South_Georgia', '(GMT-01.00) Azores' => 'Atlantic/Azores', '(GMT-01.00) Cape Verde Is.' => 'Atlantic/Cape_Verde', '(GMT) Casablanca' => 'Africa/Casablanca', '(GMT) Greenwich Mean Time - Dublin / Edinburgh / Lisbon / London' => 'Europe/London', '(GMT) Casablanca / Monrovia' => 'Africa/Monrovia', '(GMT+01.00) Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna' => 'Europe/Berlin', '(GMT+01.00) Belgrade / Bratislava / Budapest / Ljubljana / Prague' => 'Europe/Belgrade', '(GMT+01.00) Brussels / Copenhagen / Madrid / Paris' => 'Europe/Brussels', '(GMT+01.00) Sarajevo / Skopje / Warsaw / Zagreb' => 'Europe/Warsaw', '(GMT+01.00) West Central Africa' => 'Africa/Algiers', '(GMT+02.00) Windhoek' => 'Africa/Windhoek', '(GMT+02.00) Amman' => 'Asia/Amman', '(GMT+02.00) Bucharest' => 'Europe/Athens', '(GMT+02.00) Beirut' => 'Asia/Beirut', '(GMT+02.00) Cairo' => 'Africa/Cairo', '(GMT+02.00) Harare / Pretoria' => 'Africa/Harare', '(GMT+02.00) Helsinki / Kyiv / Riga / Sofia / Tallinn / Vilnius' => 'Europe/Helsinki', '(GMT+02.00) Jerusalem' => 'Asia/Jerusalem', '(GMT+02.00) Minsk' => 'Europe/Minsk', '(GMT+03.00) Baghdad' => 'Asia/Baghdad', '(GMT+03.00) Kuwait / Riyadh' => 'Asia/Kuwait', '(GMT+03.00) Moscow / St. Petersburg / Volgograd' => 'Europe/Moscow', '(GMT+03.00) Nairobi' => 'Africa/Nairobi', '(GMT+04.00) Caucasus Standard Time' => 'Asia/Tbilisi', '(GMT+03.30) Tehran' => 'Asia/Tehran', '(GMT+04.00) Abu Dhabi / Muscat' => 'Asia/Muscat', '(GMT+04.00) Baku / Tbilisi / Yerevan' => 'Asia/Baku', '(GMT+04.00) Yerevan' => 'Asia/Yerevan', '(GMT+04.30) Kabul' => 'Asia/Kabul', '(GMT+05.00) Ekaterinburg' => 'Asia/Yekaterinburg', '(GMT+05.00) Islamabad / Karachi / Tashkent' => 'Asia/Karachi', '(GMT+05.00) Tashkent' => 'Asia/Tashkent', '(GMT+05.30) Chennai / Kolkata / Mumbai / New Delhi' => 'Asia/Kolkata', '(GMT+06.00) Sri Jayawardenepura' => 'Asia/Colombo', '(GMT+05.45) Kathmandu' => 'Asia/Katmandu', '(GMT+06.00) Almaty / Novosibirsk' => 'Asia/Novosibirsk', '(GMT+06.00) Astana / Dhaka' => 'Asia/Dhaka', '(GMT+06.30) Rangoon' => 'Asia/Rangoon', '(GMT+07.00) Bangkok / Hanoi / Jakarta' => 'Asia/Bangkok', '(GMT+07.00) Krasnoyarsk' => 'Asia/Krasnoyarsk', '(GMT+08.00) Beijing / Chongqing / Hong Kong / Urumqi' => 'Asia/Hong_Kong', '(GMT+08.00) Irkutsk / Ulaan Bataar' => 'Asia/Irkutsk', '(GMT+08.00) Kuala Lumpur / Singapore' => 'Asia/Kuala_Lumpur', '(GMT+08.00) Perth' => 'Australia/Perth', '(GMT+08.00) Taipei' => 'Asia/Taipei', '(GMT+09.00) Osaka / Sapporo / Tokyo' => 'Asia/Tokyo', '(GMT+09.00) Seoul' => 'Asia/Seoul', '(GMT+09.00) Yakutsk' => 'Asia/Yakutsk', '(GMT+09.30) Adelaide' => 'Australia/Adelaide', '(GMT+09.30) Darwin' => 'Australia/Darwin', '(GMT+10.00) Brisbane' => 'Australia/Brisbane', '(GMT+10.00) Canberra / Melbourne / Sydney' => 'Australia/Sydney', '(GMT+10.00) Guam / Port Moresby' => 'Pacific/Guam', '(GMT+10.00) Hobart' => 'Australia/Hobart', '(GMT+10.00) Vladivostok' => 'Asia/Vladivostok', '(GMT+11.00) Magadan / Solomon Is. / New Caledonia' => 'Asia/Magadan', '(GMT+12.00) Auckland / Wellington' => 'Pacific/Auckland', '(GMT+12.00) Fiji / Kamchatka / Marshall Is.' => 'Pacific/Fiji', '(GMT+13.00) Nuku\'alofa' => 'Pacific/Tongatapu' );
+     static $timezonesMap = array ('(GMT-12.00) International Date Line West' => 'Etc/GMT+12', '(GMT-11.00) Midway Island / Samoa' => 'Pacific/Midway', '(GMT-10.00) Hawaii' => 'Pacific/Honolulu', '(GMT-09.00) Alaska' => 'America/Anchorage', '(GMT-08.00) Pacific Time (US & Canada) / Tijuana' => 'America/Los_Angeles', '(GMT-08.00) Tijuana / Baja California' => 'America/Tijuana', '(GMT-07.00) Arizona' => 'America/Phoenix', '(GMT-07.00) Chihuahua / La Paz / Mazatlan - Old' => 'America/Chihuahua', '(GMT-07.00) Mountain Time (US & Canada)' => 'America/Denver', '(GMT-06.00) Central America' => 'America/Guatemala', '(GMT-06.00) Central Time (US & Canada)' => 'America/Chicago', '(GMT-06.00) Guadalajara / Mexico City / Monterrey - Old' => 'America/Mexico_City', '(GMT-06.00) Saskatchewan' => 'America/Regina', '(GMT-05.00) Bogota / Lima / Quito' => 'America/Bogota', '(GMT-05.00) Eastern Time (US & Canada)' => 'America/New_York', '(GMT-05.00) Indiana (East)' => 'America/Indiana/Indianapolis', '(GMT-04.30) Caracas' => 'America/Caracas', '(GMT-04.00) Atlantic Time (Canada)' => 'America/Halifax', '(GMT-04.00) Georgetown' => 'America/Guyana', '(GMT-04.00) Caracas / La Paz' => 'America/La_Paz', '(GMT-04.00) Manaus' => 'America/Manaus', '(GMT-04.00) Santiago' => 'America/Santiago', '(GMT-03.30) Newfoundland' => 'America/St_Johns', '(GMT-03.00) Brasilia' => 'America/Sao_Paulo', '(GMT-03.00) Buenos Aires / Georgetown' => 'America/Argentina/Buenos_Aires', '(GMT-03.00) Greenland' => 'America/Godthab', '(GMT-03.00) Montevideo' => 'America/Montevideo', '(GMT-02.00) Mid-Atlantic' => 'Atlantic/South_Georgia', '(GMT-01.00) Azores' => 'Atlantic/Azores', '(GMT-01.00) Cape Verde Is.' => 'Atlantic/Cape_Verde', '(GMT) Casablanca' => 'Africa/Casablanca', '(GMT) Greenwich Mean Time - Dublin / Edinburgh / Lisbon / London' => 'Europe/London', '(GMT) Casablanca / Monrovia' => 'Africa/Monrovia', '(GMT+01.00) Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna' => 'Europe/Berlin', '(GMT+01.00) Belgrade / Bratislava / Budapest / Ljubljana / Prague' => 'Europe/Belgrade', '(GMT+01.00) Brussels / Copenhagen / Madrid / Paris' => 'Europe/Brussels', '(GMT+01.00) Sarajevo / Skopje / Warsaw / Zagreb' => 'Europe/Warsaw', '(GMT+01.00) West Central Africa' => 'Africa/Algiers', '(GMT+02.00) Windhoek' => 'Africa/Windhoek', '(GMT+02.00) Amman' => 'Asia/Amman', '(GMT+02.00) Bucharest' => 'Europe/Athens', '(GMT+02.00) Beirut' => 'Asia/Beirut', '(GMT+02.00) Cairo' => 'Africa/Cairo', '(GMT+02.00) Harare / Pretoria' => 'Africa/Harare', '(GMT+02.00) Helsinki / Kyiv / Riga / Sofia / Tallinn / Vilnius' => 'Europe/Helsinki', '(GMT+02.00) Jerusalem' => 'Asia/Jerusalem', '(GMT+02.00) Minsk' => 'Europe/Minsk', '(GMT+03.00) Baghdad' => 'Asia/Baghdad', '(GMT+03.00) Kuwait / Riyadh' => 'Asia/Kuwait', '(GMT+03.00) Moscow / St. Petersburg / Volgograd' => 'Europe/Moscow', '(GMT+03.00) Nairobi' => 'Africa/Nairobi', '(GMT+04.00) Caucasus Standard Time' => 'Asia/Tbilisi', '(GMT+03.30) Tehran' => 'Asia/Tehran', '(GMT+04.00) Abu Dhabi / Muscat' => 'Asia/Muscat', '(GMT+04.00) Baku / Tbilisi / Yerevan' => 'Asia/Baku', '(GMT+04.00) Yerevan' => 'Asia/Yerevan', '(GMT+04.30) Kabul' => 'Asia/Kabul', '(GMT+05.00) Ekaterinburg' => 'Asia/Yekaterinburg', '(GMT+05.00) Islamabad / Karachi / Tashkent' => 'Asia/Karachi', '(GMT+05.00) Tashkent' => 'Asia/Tashkent', '(GMT+05.30) Chennai / Kolkata / Mumbai / New Delhi' => 'Asia/Kolkata', '(GMT+06.00) Sri Jayawardenepura' => 'Asia/Colombo', '(GMT+05.45) Kathmandu' => 'Asia/Katmandu', '(GMT+06.00) Almaty / Novosibirsk' => 'Asia/Novosibirsk', '(GMT+06.00) Astana / Dhaka' => 'Asia/Dhaka', '(GMT+06.30) Rangoon' => 'Asia/Rangoon', '(GMT+07.00) Bangkok / Hanoi / Jakarta' => 'Asia/Bangkok', '(GMT+07.00) Krasnoyarsk' => 'Asia/Krasnoyarsk', '(GMT+08.00) Beijing / Chongqing / Hong Kong / Urumqi' => 'Asia/Hong_Kong', '(GMT+08.00) Irkutsk / Ulaan Bataar' => 'Asia/Irkutsk', '(GMT+08.00) Kuala Lumpur / Singapore' => 'Asia/Kuala_Lumpur', '(GMT+08.00) Perth' => 'Australia/Perth', '(GMT+08.00) Taipei' => 'Asia/Taipei', '(GMT+09.00) Osaka / Sapporo / Tokyo' => 'Asia/Tokyo', '(GMT+09.00) Seoul' => 'Asia/Seoul', '(GMT+09.00) Yakutsk' => 'Asia/Yakutsk', '(GMT+09.30) Adelaide' => 'Australia/Adelaide', '(GMT+09.30) Darwin' => 'Australia/Darwin', '(GMT+10.00) Brisbane' => 'Australia/Brisbane', '(GMT+10.00) Canberra / Melbourne / Sydney' => 'Australia/Sydney', '(GMT+10.00) Guam / Port Moresby' => 'Pacific/Guam', '(GMT+10.00) Hobart' => 'Australia/Hobart', '(GMT+10.00) Vladivostok' => 'Asia/Vladivostok', '(GMT+11.00) Magadan / Solomon Is. / New Caledonia' => 'Asia/Magadan', '(GMT+12.00) Auckland / Wellington' => 'Pacific/Auckland', '(GMT+12.00) Fiji / Kamchatka / Marshall Is.' => 'Pacific/Fiji', '(GMT+13.00) Nuku\'alofa' => 'Pacific/Tongatapu' ,'E. South America Standard Time' => 'America/Sao_Paulo' , 'E. South America' => 'America/Sao_Paulo'    );
 //    static $timezonesOutlookID = array('Europe/London' => '1' ,'Europe/Brussels' => '3' ,'Europe/Berlin' => '4' ,'America/New_York' => '5' ,'Europe/Belgrade' => '6' ,'Europe/Minsk' => '7' ,'America/Sao_Paulo' => '8' ,'America/Halifax' => '9' ,'America/New_York' => '10' ,'America/Chicago' => '11' ,'America/Denver' => '12' ,'America/Los_Angeles' => '13' ,'America/Anchorage' => '14' ,'Pacific/Honolulu' => '15' ,'Pacific/Midway' => '16' ,'Pacific/Auckland' => '17' ,'Australia/Brisbane' => '18' ,'Australia/Adelaide' => '19' ,'Asia/Tokyo' => '20' ,'Asia/Hong_Kong' => '21' ,'Asia/Bangkok' => '22' ,'Asia/Kolkata' => '23' ,'Asia/Muscat' => '24' ,'Asia/Tehran' => '25' ,'Asia/Baghdad' => '26' ,'Asia/Jerusalem' => '27' ,'America/St_Johns' => '28' ,'Atlantic/Azores' => '29' ,'Atlantic/South_Georgia' => '30' ,'Africa/Casablanca' => '31' ,'America/La_Paz' => '33' ,'America/Indiana/Indianapolis' => '34' ,'America/Bogota' => '35' ,'America/Regina' => '36' ,'America/Mexico_City' => '37' ,'America/Phoenix' => '38' ,'Etc/GMT+12' => '39' ,'Pacific/Fiji' => '40' ,'Asia/Magadan' => '41' ,'Australia/Hobart' => '42' ,'Pacific/Guam' => '43' ,'Australia/Darwin' => '44' ,'Asia/Hong_Kong' => '45' ,'Asia/Novosibirsk' => '46' ,'Asia/Kabul' => '48' ,'Africa/Cairo' => '49' ,'Africa/Harare' => '50' ,'Europe/Moscow' => '51' ,'Australia/Sydney' => '52' ,'Australia/Sydney' => '53' ,'Australia/Adelaide' => '54' ,'Australia/Hobart' => '55' ,'America/Santiago' => '56' ,'Australia/Pert' => '57' ,'America/Tijuana' => '59' ,'Asia/Tbilisi' => '60' ,'Australia/Sydney' => '61' ,'America/Caracas' => '62' ,'Asia/Amman' => '63' ,'Asia/Baku' => '64' ,'Asia/Yerevan' => '65' ,'Europe/Moscow' => '66' ,'America/Argentina/Buenos_Aires' => '67' ,'America/Montevideo' => '72');  
     static $suportedTimzones = array('Africa/Abidjan' ,'Africa/Accra' ,'Africa/Addis_Ababa' ,'Africa/Algiers' ,'Africa/Asmara' ,'Africa/Asmera' ,'Africa/Bamako' ,'Africa/Bangui' ,'Africa/Banjul' ,'Africa/Bissau' ,'Africa/Blantyre' ,'Africa/Brazzaville' ,'Africa/Bujumbura' ,'Africa/Cairo' ,'Africa/Casablanca' ,'Africa/Ceuta' ,'Africa/Conakry' ,'Africa/Dakar' ,'Africa/Dar_es_Salaam' ,'Africa/Djibouti' ,'Africa/Douala' ,'Africa/El_Aaiun' ,'Africa/Freetown' ,'Africa/Gaborone' ,'Africa/Harare' ,'Africa/Johannesburg' ,'Africa/Kampala' ,'Africa/Khartoum' ,'Africa/Kigali' ,'Africa/Kinshasa' ,'Africa/Lagos' ,'Africa/Libreville' ,'Africa/Lome' ,'Africa/Luanda' ,'Africa/Lubumbashi' ,'Africa/Lusaka' ,'Africa/Malabo' ,'Africa/Maputo' ,'Africa/Maseru' ,'Africa/Mbabane' ,'Africa/Mogadishu' ,'Africa/Monrovia' ,'Africa/Nairobi' ,'Africa/Ndjamena' ,'Africa/Niamey' ,'Africa/Nouakchott' ,'Africa/Ouagadougou' ,'Africa/Porto-Novo' ,'Africa/Sao_Tome' ,'Africa/Timbuktu' ,'Africa/Tripoli' ,'Africa/Tunis' ,'Africa/Windhoek' ,'America/Adak' ,'America/Anchorage' ,'America/Anguilla' ,'America/Antigua' ,'America/Araguaina' ,'America/Argentina/Buenos_Aires' ,'America/Argentina/Catamarca' ,'America/Argentina/ComodRivadavia' ,'America/Argentina/Cordoba' ,'America/Argentina/Jujuy' ,'America/Argentina/La_Rioja' ,'America/Argentina/Mendoza' ,'America/Argentina/Rio_Gallegos' ,'America/Argentina/Salta' ,'America/Argentina/San_Juan' ,'America/Argentina/San_Luis' ,'America/Argentina/Tucuman' ,'America/Argentina/Ushuaia' ,'America/Aruba' ,'America/Asuncion' ,'America/Atikokan' ,'America/Atka' ,'America/Bahia' ,'America/Barbados' ,'America/Belem' ,'America/Belize' ,'America/Blanc-Sablon' ,'America/Boa_Vista' ,'America/Bogota' ,'America/Boise' ,'America/Buenos_Aires' ,'America/Cambridge_Bay' ,'America/Campo_Grande' ,'America/Cancun' ,'America/Caracas' ,'America/Catamarca' ,'America/Cayenne' ,'America/Cayman' ,'America/Chicago' ,'America/Chihuahua' ,'America/Coral_Harbour' ,'America/Cordoba' ,'America/Costa_Rica' ,'America/Cuiaba' ,'America/Curacao' ,'America/Danmarkshavn' ,'America/Dawson_Creek' ,'America/Dawson' ,'America/Denver' ,'America/Detroit' ,'America/Dominica' ,'America/Edmonton' ,'America/Eirunepe' ,'America/El_Salvador' ,'America/Ensenada' ,'America/Fort_Wayne' ,'America/Fortaleza' ,'America/Glace_Bay' ,'America/Godthab' ,'America/Goose_Bay' ,'America/Grand_Turk' ,'America/Grenada' ,'America/Guadeloupe' ,'America/Guatemala' ,'America/Guayaquil' ,'America/Guyana' ,'America/Halifax' ,'America/Havana' ,'America/Hermosillo' ,'America/Indiana/Indianapolis' ,'America/Indiana/Knox' ,'America/Indiana/Marengo' ,'America/Indiana/Petersburg' ,'America/Indiana/Tell_City' ,'America/Indiana/Vevay' ,'America/Indiana/Vincennes' ,'America/Indiana/Winamac' ,'America/Indianapolis' ,'America/Inuvik' ,'America/Iqaluit' ,'America/Jamaica' ,'America/Jujuy' ,'America/Juneau' ,'America/Kentucky/Louisville' ,'America/Kentucky/Monticello' ,'America/Knox_IN' ,'America/La_Paz' ,'America/Lima' ,'America/Los_Angeles' ,'America/Louisville' ,'America/Maceio' ,'America/Managua' ,'America/Manaus' ,'America/Marigot' ,'America/Martinique' ,'America/Matamoros' ,'America/Mazatlan' ,'America/Mendoza' ,'America/Menominee' ,'America/Merida' ,'America/Mexico_City' ,'America/Miquelon' ,'America/Moncton' ,'America/Monterrey' ,'America/Montevideo' ,'America/Montreal' ,'America/Montserrat' ,'America/Nassau' ,'America/New_York' ,'America/Nipigon' ,'America/Nome' ,'America/Noronha' ,'America/North_Dakota/Center' ,'America/North_Dakota/New_Salem' ,'America/Ojinaga' ,'America/Panama' ,'America/Pangnirtung' ,'America/Paramaribo' ,'America/Phoenix' ,'America/Port_of_Spain' ,'America/Port-au-Prince' ,'America/Porto_Acre' ,'America/Porto_Velho' ,'America/Puerto_Rico' ,'America/Rainy_River' ,'America/Rankin_Inlet' ,'America/Recife' ,'America/Regina' ,'America/Resolute' ,'America/Rio_Branco' ,'America/Rosario' ,'America/Santa_Isabel' ,'America/Santarem' ,'America/Santiago' ,'America/Santo_Domingo' ,'America/Sao_Paulo' ,'America/Scoresbysund' ,'America/Shiprock' ,'America/St_Barthelemy' ,'America/St_Johns' ,'America/St_Kitts' ,'America/St_Lucia' ,'America/St_Thomas' ,'America/St_Vincent' ,'America/Swift_Current' ,'America/Tegucigalpa' ,'America/Thule' ,'America/Thunder_Bay' ,'America/Tijuana' ,'America/Toronto' ,'America/Tortola' ,'America/Vancouver' ,'America/Virgin' ,'America/Whitehorse' ,'America/Winnipeg' ,'America/Yakutat' ,'America/Yellowknife' ,'Antarctica/Casey' ,'Antarctica/Davis' ,'Antarctica/DumontDUrville' ,'Antarctica/Macquarie' ,'Antarctica/Mawson' ,'Antarctica/McMurdo' ,'Antarctica/Palmer' ,'Antarctica/Rothera' ,'Antarctica/South_Pole' ,'Antarctica/Syowa' ,'Antarctica/Vostok' ,'Arctic/Longyearbyen' ,'Asia/Aden' ,'Asia/Almaty' ,'Asia/Amman' ,'Asia/Anadyr' ,'Asia/Aqtau' ,'Asia/Aqtobe' ,'Asia/Ashgabat' ,'Asia/Ashkhabad' ,'Asia/Baghdad' ,'Asia/Bahrain' ,'Asia/Baku' ,'Asia/Bangkok' ,'Asia/Beirut' ,'Asia/Bishkek' ,'Asia/Brunei' ,'Asia/Calcutta' ,'Asia/Choibalsan' ,'Asia/Chongqing' ,'Asia/Chungking' ,'Asia/Colombo' ,'Asia/Dacca' ,'Asia/Damascus' ,'Asia/Dhaka' ,'Asia/Dili' ,'Asia/Dubai' ,'Asia/Dushanbe' ,'Asia/Gaza' ,'Asia/Harbin' ,'Asia/Ho_Chi_Minh' ,'Asia/Hong_Kong' ,'Asia/Hovd' ,'Asia/Irkutsk' ,'Asia/Istanbul' ,'Asia/Jakarta' ,'Asia/Jayapura' ,'Asia/Jerusalem' ,'Asia/Kabul' ,'Asia/Kamchatka' ,'Asia/Karachi' ,'Asia/Kashgar' ,'Asia/Kathmandu' ,'Asia/Katmandu' ,'Asia/Kolkata' ,'Asia/Krasnoyarsk' ,'Asia/Kuala_Lumpur' ,'Asia/Kuching' ,'Asia/Kuwait' ,'Asia/Macao' ,'Asia/Macau' ,'Asia/Magadan' ,'Asia/Makassar' ,'Asia/Manila' ,'Asia/Muscat' ,'Asia/Nicosia' ,'Asia/Novokuznetsk' ,'Asia/Novosibirsk' ,'Asia/Omsk' ,'Asia/Oral' ,'Asia/Phnom_Penh' ,'Asia/Pontianak' ,'Asia/Pyongyang' ,'Asia/Qatar' ,'Asia/Qyzylorda' ,'Asia/Rangoon' ,'Asia/Riyadh' ,'Asia/Saigon' ,'Asia/Sakhalin' ,'Asia/Samarkand' ,'Asia/Seoul' ,'Asia/Shanghai' ,'Asia/Singapore' ,'Asia/Taipei' ,'Asia/Tashkent' ,'Asia/Tbilisi' ,'Asia/Tehran' ,'Asia/Tel_Aviv' ,'Asia/Thimbu' ,'Asia/Thimphu' ,'Asia/Tokyo' ,'Asia/Ujung_Pandang' ,'Asia/Ulaanbaatar' ,'Asia/Ulan_Bator' ,'Asia/Urumqi' ,'Asia/Vientiane' ,'Asia/Vladivostok' ,'Asia/Yakutsk' ,'Asia/Yekaterinburg' ,'Asia/Yerevan' ,'Atlantic/Azores' ,'Atlantic/Bermuda' ,'Atlantic/Canary' ,'Atlantic/Cape_Verde' ,'Atlantic/Faeroe' ,'Atlantic/Faroe' ,'Atlantic/Jan_Mayen' ,'Atlantic/Madeira' ,'Atlantic/Reykjavik' ,'Atlantic/South_Georgia' ,'Atlantic/St_Helena' ,'Atlantic/Stanley' ,'Australia/ACT' ,'Australia/Adelaide' ,'Australia/Brisbane' ,'Australia/Broken_Hill' ,'Australia/Canberra' ,'Australia/Currie' ,'Australia/Darwin' ,'Australia/Eucla' ,'Australia/Hobart' ,'Australia/LHI' ,'Australia/Lindeman' ,'Australia/Lord_Howe' ,'Australia/Melbourne' ,'Australia/NSW' ,'Australia/North' ,'Australia/Perth' ,'Australia/Queensland' ,'Australia/South' ,'Australia/Sydney' ,'Australia/Tasmania' ,'Australia/Victoria' ,'Australia/West' ,'Australia/Yancowinna' ,'Europe/Amsterdam' ,'Europe/Andorra' ,'Europe/Athens' ,'Europe/Belfast' ,'Europe/Belgrade' ,'Europe/Berlin' ,'Europe/Bratislava' ,'Europe/Brussels' ,'Europe/Bucharest' ,'Europe/Budapest' ,'Europe/Chisinau' ,'Europe/Copenhagen' ,'Europe/Dublin' ,'Europe/Gibraltar' ,'Europe/Guernsey' ,'Europe/Helsinki' ,'Europe/Isle_of_Man' ,'Europe/Istanbul' ,'Europe/Jersey' ,'Europe/Kaliningrad' ,'Europe/Kiev' ,'Europe/Lisbon' ,'Europe/Ljubljana' ,'Europe/London' ,'Europe/Luxembourg' ,'Europe/Madrid' ,'Europe/Malta' ,'Europe/Mariehamn' ,'Europe/Minsk' ,'Europe/Monaco' ,'Europe/Moscow' ,'Europe/Nicosia' ,'Europe/Oslo' ,'Europe/Paris' ,'Europe/Podgorica' ,'Europe/Prague' ,'Europe/Riga' ,'Europe/Rome' ,'Europe/Samara' ,'Europe/San_Marino' ,'Europe/Sarajevo' ,'Europe/Simferopol' ,'Europe/Skopje' ,'Europe/Sofia' ,'Europe/Stockholm' ,'Europe/Tallinn' ,'Europe/Tirane' ,'Europe/Tiraspol' ,'Europe/Uzhgorod' ,'Europe/Vaduz' ,'Europe/Vatican' ,'Europe/Vienna' ,'Europe/Vilnius' ,'Europe/Volgograd' ,'Europe/Warsaw' ,'Europe/Zagreb' ,'Europe/Zaporozhye' ,'Europe/Zurich' ,'Indian/Antananarivo' ,'Indian/Chagos' ,'Indian/Christmas' ,'Indian/Cocos' ,'Indian/Comoro' ,'Indian/Kerguelen' ,'Indian/Mahe' ,'Indian/Maldives' ,'Indian/Mauritius' ,'Indian/Mayotte' ,'Indian/Reunion' ,'Pacific/Apia' ,'Pacific/Auckland' ,'Pacific/Chatham' ,'Pacific/Easter' ,'Pacific/Efate' ,'Pacific/Enderbury' ,'Pacific/Fakaofo' ,'Pacific/Fiji' ,'Pacific/Funafuti' ,'Pacific/Galapagos' ,'Pacific/Gambier' ,'Pacific/Guadalcanal' ,'Pacific/Guam' ,'Pacific/Honolulu' ,'Pacific/Johnston' ,'Pacific/Kiritimati' ,'Pacific/Kosrae' ,'Pacific/Kwajalein' ,'Pacific/Majuro' ,'Pacific/Marquesas' ,'Pacific/Midway' ,'Pacific/Nauru' ,'Pacific/Niue' ,'Pacific/Norfolk' ,'Pacific/Noumea' ,'Pacific/Pago_Pago' ,'Pacific/Palau' ,'Pacific/Pitcairn' ,'Pacific/Ponape' ,'Pacific/Port_Moresby' ,'Pacific/Rarotonga' ,'Pacific/Saipan' ,'Pacific/Samoa' ,'Pacific/Tahiti' ,'Pacific/Tarawa' ,'Pacific/Tongatapu' ,'Pacific/Truk' ,'Pacific/Wake' ,'Pacific/Wallis' ,'Pacific/Yap' ,'UTC');
@@ -39,5 +41,5 @@
                                         
                        $vevent->setProperty( 'summary' , $v['summary'] );
-                       $vevent->setProperty( 'description' , $v['description'] );
+                       $vevent->setProperty( 'description' , isset($v['description']) ?  $v['description'] : '');
                        $vevent->setProperty( 'location' , $v['location'] );
                        $vevent->setProperty( 'tranp' , (isset($v['tranparent']) && $v['tranparent'] == TRANSP_TRANSPARENT )? 'TRANSPARENT' : 'OPAQUE' );
@@ -125,5 +127,5 @@
 		$delegate = array();
 		foreach ($attendees as $di => $dv){
-			if($dv['delegatedFrom'] != 0){
+			if(isset($dv['delegatedFrom']) && $dv['delegatedFrom'] != 0){
 				$delegate[$dv['delegatedFrom']] = $dv;
 			}
@@ -132,5 +134,5 @@
 		foreach ($attendees as $pi => $pv){
 			$isResponseDelegated = false;
-			if($pv['delegatedFrom'] == 0){
+			if(isset($pv['delegatedFrom']) && $pv['delegatedFrom'] == 0){
 				if($pv['isOrganizer'] == 1)
 				   $vevent->setProperty( 'organizer' , $pv['user']['mail'], array( 'CN' => $pv['user']['name'] ));  
@@ -141,5 +143,5 @@
 					$pParams['PARTSTAT'] = self::_getStatus( $pv['status'] );
 					
-					if(isset($delegate[$pv['id']])){
+					if(isset($pv['id']) && isset($delegate[$pv['id']])){
 							$pParams['PARTSTAT'] = self::_getStatus( $delegate[$pv['id']]['status']);
 							$pParams['DELEGATED-TO'] = $delegate[$pv['id']]['user']['mail'];
@@ -226,7 +228,8 @@
     
                              }else // Importar evento
-                                $interation = self::_makeVEVENT( array() , $component , $params);
-                             
-								                                 if( strpos($params['prodid'], 'kigkonsult.se') !== false ) //envia notificação para fora
+                             {
+                                 $interation = self::_makeVEVENT( array() , $component , $params);
+                                                       
+				 if( strpos($params['prodid'], 'kigkonsult.se') !== false ) //envia notificação para fora
                                  {
                                                                        
@@ -242,5 +245,5 @@
                                                 $objTimezone =  new DateTimeZone($sc['timezone']);  
 
-                                                if($startTime['params']['VALUE'] === 'DATE' && isset($params['calendar_timezone']) )
+                                                if(isset($startTime['params']['VALUE']) && $startTime['params']['VALUE'] === 'DATE' && isset($params['calendar_timezone']) )
                                                 {
                                                     $sc['allDay'] = 1;
@@ -266,5 +269,5 @@
                                                 $endTime = $component->getProperty( 'dtend', false , true ); 
 
-                                                if($endTime['params']['VALUE'] === 'DATE')
+                                                if(isset($endTime['params']['VALUE']) && $endTime['params']['VALUE'] === 'DATE')
                                                     $sc['endTime'] = self::date2timestamp($endTime['value']) - self::_getTzOffset('UTC',$sc['timezone']) . '000';
                                                 else if(isset($endTime['params']['TZID']) && !isset($endTime['value']['tz'])) /* Caso não tenha um tz na data mais exista um parametro TZID deve ser aplicado o timezone do TZID a data */
@@ -307,5 +310,4 @@
                                             $participantID = mt_rand().'2(Formatter)';
 
-                                            $participant['schedulable'] = $eventID;
                                             $participant['isOrganizer'] = '1';
                                      
@@ -327,11 +329,11 @@
                                         }
                                         
-                                        $participant['schedulable'] = $eventID;
-                                        $participant['status'] = $params['status'] ? $params['status'] : STATUS_ACCEPTED;
+
+                                        $participant['status'] = isset($params['status']) ? $params['status'] : STATUS_ACCEPTED;
                                         $participant['isOrganizer'] = '0';
                                         $participant['isExternal']  = 0;
                                         $participant['user'] =  array('mail' => Config::me('mail') , 'name' => Config::me('cn'));
                                         $sc['participants'][] = $participant;
-                                        $sc['type'] = VEVENT;
+                                        $sc['type'] = EVENT_ID;
                          
             
@@ -355,9 +357,9 @@
 
                                             $data = array('startDate' =>  date_format( $sTime , 'd/m/Y') ,
-                                                            'startTime' =>  ($sc['allDay']) ? '' : date_format( $sTime , 'H:i') ,
+                                                            'startTime' =>  (isset($sc['allDay']) && $sc['allDay'] ) ? '' : date_format( $sTime , 'H:i') ,
                                                             'endDate' =>  date_format( $eTime , 'd/m/Y') ,
-                                                            'endTime' =>  ($sc['allDay']) ? '' :  date_format( $eTime , 'H:i') ,
+                                                            'endTime' =>  isset($sc['allDay']) ? '' :  date_format( $eTime , 'H:i') ,
                                                             'eventTitle' =>  $sc['summary'],
-                                                            'eventLocation' =>  $sc['location'],
+                                                            'eventLocation' =>  isset($sc['location']) ?  $sc['location'] : '',
                                                             'timezone' =>  ($sc['timezone']) ? $sc['timezone'] : 'UTC' ,
                                                             'participant' =>  (isset($part['user']['name']) ? $part['user']['name'] : $part['user']['mail']) );
@@ -370,6 +372,8 @@
                                             $subject['endTime'] = ($sc['allDay']) ? '' : date_format( $eTime , 'H:i');
                                             $subject['participant'] = Config::me('uid');
-
-                                        switch($param['status'])
+                                        
+                                       $params['status'] =  isset($params['status']) ? $params['status'] : STATUS_ACCEPTED;   
+                                            
+                                        switch($params['status'])
                                         {
                                                 case STATUS_ACCEPTED:
@@ -377,5 +381,5 @@
                                                     $subject['notificationType'] = 'Convite Aceito';
                                                 break;
-                                                case STATUS_TENATIVE:
+                                                case STATUS_TENTATIVE:
                                                     $tpl =   'notify_attempt_body';
                                                     $subject['notificationType'] = 'Convite  aceito provisoriamente';
@@ -402,5 +406,5 @@
                                         Controller::create( array( 'service' => 'SMTP' ), $mail );    
                                  }
-							 
+                             }			 
                              break;  
                            
@@ -739,5 +743,5 @@
                 $endTime = $component->getProperty( 'dtend', false , true ); 
 
-                if($endTime['params']['VALUE'] === 'DATE')
+                if(isset($endTime['params']['VALUE']) && $endTime['params']['VALUE'] === 'DATE')
                     $schedulable['endTime'] = self::date2timestamp($endTime['value']) - self::_getTzOffset('UTC',$schedulable['timezone'],'@'.self::date2timestamp($endTime['value'])) . '000';
                 else if(isset($endTime['params']['TZID']) && !isset($endTime['value']['tz'])) /* Caso não tenha um tz na data mais exista um parametro TZID deve ser aplicado o timezone do TZID a data */
@@ -910,5 +914,5 @@
       
             /* Definindo TRANSP */
-            if(($tranp = $component->getProperty( 'transp', false , true )) && $tranp && strtoupper($tranp) == 'OPAQUE')
+            if(($tranp = $component->getProperty( 'transp', false , true )) && $tranp && is_string($tranp) && strtoupper($tranp) == 'OPAQUE')
                 $schedulable['transparent'] = 1;
 
Index: /trunk/prototype/converter.php
===================================================================
--- /trunk/prototype/converter.php	(revision 5514)
+++ /trunk/prototype/converter.php	(revision 5736)
@@ -13,5 +13,5 @@
 			  $_REQUEST['params'] );
 
-if( !$_REQUEST['readable'])
+if( !isset($_REQUEST['readable']) || !$_REQUEST['readable'])
 	require_once 'Sync.php';
 else
