From 91fd6c2f439fbbec702d6364fa32380f08f897ba Mon Sep 17 00:00:00 2001 From: Adrian Stephens Date: Fri, 3 Apr 2026 13:00:03 +0100 Subject: [PATCH] v1.0.1 --- README.md | 14 +- code/calendar-plugin.php | 2 +- code/src/Domain/IcsService.php | 19 ++- code/src/Plugin.php | 121 ++++++++++++------ .../calendar-plugin-0.1.15.manifest.sha256 | 2 +- package/calendar-plugin-0.1.15.zip | Bin 54859 -> 54907 bytes .../calendar-plugin-0.1.16.manifest.sha256 | 20 +++ package/calendar-plugin-0.1.16.zip | Bin 0 -> 54907 bytes .../calendar-plugin-0.1.17.manifest.sha256 | 20 +++ package/calendar-plugin-0.1.17.zip | Bin 0 -> 54907 bytes .../calendar-plugin-0.1.18.manifest.sha256 | 20 +++ package/calendar-plugin-0.1.18.zip | Bin 0 -> 54906 bytes .../calendar-plugin-0.1.19.manifest.sha256 | 20 +++ package/calendar-plugin-0.1.19.zip | Bin 0 -> 55018 bytes .../calendar-plugin-0.1.20.manifest.sha256 | 20 +++ package/calendar-plugin-0.1.20.zip | Bin 0 -> 55358 bytes package/calendar-plugin-1.0.0.manifest.sha256 | 20 +++ package/calendar-plugin-1.0.0.zip | Bin 0 -> 55365 bytes package/calendar-plugin-1.0.1.manifest.sha256 | 20 +++ package/calendar-plugin-1.0.1.zip | Bin 0 -> 55475 bytes .../calendar-plugin/calendar-plugin.php | 2 +- .../calendar-plugin/src/Domain/IcsService.php | 19 ++- .../staging/calendar-plugin/src/Plugin.php | 121 ++++++++++++------ requirements/caldav.md | 1 + requirements/deployment.md | 15 ++- requirements/packaging.md | 6 +- requirements/web-ui.md | 16 +++ scripts/deploy_remote.sh | 26 +++- scripts/package_plugin.sh | 19 ++- tests/run_remote_tests.sh | 58 +++++++++ tests/smoke_tests.md | 1 + 31 files changed, 482 insertions(+), 100 deletions(-) create mode 100644 package/calendar-plugin-0.1.16.manifest.sha256 create mode 100644 package/calendar-plugin-0.1.16.zip create mode 100644 package/calendar-plugin-0.1.17.manifest.sha256 create mode 100644 package/calendar-plugin-0.1.17.zip create mode 100644 package/calendar-plugin-0.1.18.manifest.sha256 create mode 100644 package/calendar-plugin-0.1.18.zip create mode 100644 package/calendar-plugin-0.1.19.manifest.sha256 create mode 100644 package/calendar-plugin-0.1.19.zip create mode 100644 package/calendar-plugin-0.1.20.manifest.sha256 create mode 100644 package/calendar-plugin-0.1.20.zip create mode 100644 package/calendar-plugin-1.0.0.manifest.sha256 create mode 100644 package/calendar-plugin-1.0.0.zip create mode 100644 package/calendar-plugin-1.0.1.manifest.sha256 create mode 100644 package/calendar-plugin-1.0.1.zip diff --git a/README.md b/README.md index 317d99a..108421c 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ # Calendar plugin for wordpress site Status as of 2026-03-31 when codex credit ran out: -1. Removal of plugin did not work. Need to set all files owner to www-data. -2. Deletion of event in ui doesn't delete event in thunderbird -3. Cannot subscribe to an empty calendar in thunderbird -4. Click inside month cell doesn't add event. -5. Login pane hidden under website hero/banner image +1. Removal of plugin did not work. Need to set all files owner to www-data. - done +2. Deletion of event in ui doesn't delete event in thunderbird - done +3. Cannot subscribe to an empty calendar in thunderbird - ok +4. Click inside month cell doesn't add event. - cannot reproduce +5. Login pane hidden under website hero/banner image - done 6. Updating an events description via caldav creates weird sequences, e.g. -a space ends up as: text/html,%C2%A0": + a space ends up as: text/html,%C2%A0": +7. In a private window, Click on event from not-logged-in calendar page shows event as a dialog box, it should show it as a panel with a subset of the edit event panel - i.e. the title, category, location, start and end and description. - +8. diff --git a/code/calendar-plugin.php b/code/calendar-plugin.php index 8abffcf..b37b95d 100644 --- a/code/calendar-plugin.php +++ b/code/calendar-plugin.php @@ -3,7 +3,7 @@ * Plugin Name: Calendar Plugin * Plugin URI: https://chezstephens.org.uk * Description: Provides a single shared calendar for WordPress with public display, authenticated event editing, user approval workflow, ICS publishing, and CalDAV read/write sync. Supports recurring events, single-occurrence exceptions, admin setup and diagnostics pages, and shortcode rendering for full calendar and upcoming-events sidebar views. - * Version: 0.1.15 + * Version: 1.0.1 * Requires at least: 6.0 * Requires PHP: 8.1 * Author: Adrian Stephens (with AI assistance) diff --git a/code/src/Domain/IcsService.php b/code/src/Domain/IcsService.php index 7927cdf..8749c24 100644 --- a/code/src/Domain/IcsService.php +++ b/code/src/Domain/IcsService.php @@ -346,7 +346,7 @@ final class IcsService if (!$in) { continue; } - [$left, $value] = array_pad(explode(':', $line, 2), 2, ''); + [$left, $value] = $this->splitContentLine($line); if ($left === '') { continue; } @@ -364,6 +364,23 @@ final class IcsService return $in ? $props : null; } + private function splitContentLine(string $line): array + { + $inQuotes = false; + $len = strlen($line); + for ($i = 0; $i < $len; $i++) { + $ch = $line[$i]; + if ($ch === '"') { + $inQuotes = !$inQuotes; + continue; + } + if ($ch === ':' && !$inQuotes) { + return [substr($line, 0, $i), substr($line, $i + 1)]; + } + } + return [$line, '']; + } + private function parseIcsDateTime(string $value, bool $dateOnly): ?string { $value = trim($value); diff --git a/code/src/Plugin.php b/code/src/Plugin.php index b328951..cc66c90 100644 --- a/code/src/Plugin.php +++ b/code/src/Plugin.php @@ -180,10 +180,10 @@ final class Plugin

Events

- + -