Changeset 2940432
- Timestamp:
- 07/19/2023 02:57:18 PM (3 years ago)
- Location:
- wp-caldav2ics
- Files:
-
- 3 edited
- 4 copied
-
tags/1.3.4 (copied) (copied from wp-caldav2ics/trunk)
-
tags/1.3.4/Caldav2ics_Plugin.php (copied) (copied from wp-caldav2ics/trunk/Caldav2ics_Plugin.php) (4 diffs)
-
tags/1.3.4/readme.txt (copied) (copied from wp-caldav2ics/trunk/readme.txt) (1 diff)
-
tags/1.3.4/wp-caldav2ics.php (copied) (copied from wp-caldav2ics/trunk/wp-caldav2ics.php) (1 diff)
-
trunk/Caldav2ics_Plugin.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/wp-caldav2ics.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-caldav2ics/tags/1.3.4/Caldav2ics_Plugin.php
r2877722 r2940432 366 366 $l = 0; 367 367 $foundVCAL = false; 368 $handle = fopen($ICalFile, 'w') or die('Cannot open file: '.$ICalFile);368 // $handle = fopen($ICalFile, 'w') or die('Cannot open file: '.$ICalFile); // moved, avoid empty $ICalFile in case server does not respond 26.04.23 369 369 370 370 foreach ($text as $line) { … … 377 377 if (strpos($line,'BEGIN:VCALENDAR') !== false) { // NOT $this->startswith ! 09.03.23 378 378 // write VCALENDAR header only if valid VCALENDAR data found 379 $handle = fopen($ICalFile, 'w') or die('Cannot open file: '.$ICalFile); // moved here, JPGehrke 26.04.23 379 380 fwrite($handle, 'BEGIN:VCALENDAR'."\r\n"); 380 381 fwrite($handle, 'VERSION:2.0'."\r\n"); … … 396 397 fclose($loghandle); 397 398 } 398 fclose($handle);399 // fclose($handle); // $handle will now be invalid in this case 26.04.23 399 400 return; 400 401 } … … 427 428 $found_ical_data = false; 428 429 foreach ($text as $line) { 429 $line = trim($line,"\n"); //mod. by J-P. Gehrke, original code was $line = trim($line)430 // $line = trim($line,"\n"); //mod. by J-P. Gehrke, original code was $line = trim($line) - turns out to be prolematic, see below.. 430 431 /** This is important modification. The ics files from my CALDAV server contains info in long lines that are wrapped. By just "trimming" also leading spaces of the wrapped lines will 431 432 * be eliminated. This creates problems using https://icalfilter.com reading the *.ics file. Therefore it is proposed useing the command "trim($line, "\n"). 432 433 */ 433 // $invalidLine = false; //introduced by J-P. Gehrke, trigger for exclusion of X-TINE20-CONTAINER line in *.ics file, 17-NOV2022434 // $invalidLine is not really needed, use $skip as for other lines to discard WJ435 434 435 $line = trim($line,"\n\r\t\v\x00"); // mod. 17.07.23 WJ, see https://wordpress.org/support/topic/converted-openxchange-calendar-subscibe-to-google-didnt-work/ 436 436 437 if (strlen($line) > 0) { 437 438 $invalidLine = false; -
wp-caldav2ics/tags/1.3.4/readme.txt
r2877790 r2940432 80 80 81 81 == Changelog == 82 = 1.3.4 = 83 19.07.23: fix wrong (insufficient) trim() Modification 84 82 85 = 1.3.3 = 83 86 09.03.23: do not stop ics Creation when no VTIMEZONE Block present in Server Response, check for BEGIN:VCALENDAR instead -
wp-caldav2ics/tags/1.3.4/wp-caldav2ics.php
r2877722 r2940432 3 3 Plugin Name: WP-CalDav2ICS 4 4 Plugin URI: http://wordpress.org/extend/plugins/wp-caldav2ics/ 5 Version: 1.3. 35 Version: 1.3.4 6 6 Author: Werner Joss 7 7 Description: Create ICS File from CalDav Calendar -
wp-caldav2ics/trunk/Caldav2ics_Plugin.php
r2877722 r2940432 366 366 $l = 0; 367 367 $foundVCAL = false; 368 $handle = fopen($ICalFile, 'w') or die('Cannot open file: '.$ICalFile);368 // $handle = fopen($ICalFile, 'w') or die('Cannot open file: '.$ICalFile); // moved, avoid empty $ICalFile in case server does not respond 26.04.23 369 369 370 370 foreach ($text as $line) { … … 377 377 if (strpos($line,'BEGIN:VCALENDAR') !== false) { // NOT $this->startswith ! 09.03.23 378 378 // write VCALENDAR header only if valid VCALENDAR data found 379 $handle = fopen($ICalFile, 'w') or die('Cannot open file: '.$ICalFile); // moved here, JPGehrke 26.04.23 379 380 fwrite($handle, 'BEGIN:VCALENDAR'."\r\n"); 380 381 fwrite($handle, 'VERSION:2.0'."\r\n"); … … 396 397 fclose($loghandle); 397 398 } 398 fclose($handle);399 // fclose($handle); // $handle will now be invalid in this case 26.04.23 399 400 return; 400 401 } … … 427 428 $found_ical_data = false; 428 429 foreach ($text as $line) { 429 $line = trim($line,"\n"); //mod. by J-P. Gehrke, original code was $line = trim($line)430 // $line = trim($line,"\n"); //mod. by J-P. Gehrke, original code was $line = trim($line) - turns out to be prolematic, see below.. 430 431 /** This is important modification. The ics files from my CALDAV server contains info in long lines that are wrapped. By just "trimming" also leading spaces of the wrapped lines will 431 432 * be eliminated. This creates problems using https://icalfilter.com reading the *.ics file. Therefore it is proposed useing the command "trim($line, "\n"). 432 433 */ 433 // $invalidLine = false; //introduced by J-P. Gehrke, trigger for exclusion of X-TINE20-CONTAINER line in *.ics file, 17-NOV2022434 // $invalidLine is not really needed, use $skip as for other lines to discard WJ435 434 435 $line = trim($line,"\n\r\t\v\x00"); // mod. 17.07.23 WJ, see https://wordpress.org/support/topic/converted-openxchange-calendar-subscibe-to-google-didnt-work/ 436 436 437 if (strlen($line) > 0) { 437 438 $invalidLine = false; -
wp-caldav2ics/trunk/readme.txt
r2877790 r2940432 80 80 81 81 == Changelog == 82 = 1.3.4 = 83 19.07.23: fix wrong (insufficient) trim() Modification 84 82 85 = 1.3.3 = 83 86 09.03.23: do not stop ics Creation when no VTIMEZONE Block present in Server Response, check for BEGIN:VCALENDAR instead -
wp-caldav2ics/trunk/wp-caldav2ics.php
r2877722 r2940432 3 3 Plugin Name: WP-CalDav2ICS 4 4 Plugin URI: http://wordpress.org/extend/plugins/wp-caldav2ics/ 5 Version: 1.3. 35 Version: 1.3.4 6 6 Author: Werner Joss 7 7 Description: Create ICS File from CalDav Calendar
Note: See TracChangeset
for help on using the changeset viewer.