Skip to content

Commit

Permalink
Fix regression when exporting single tags to iCalendar CATEGORIES.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Sep 19, 2017
1 parent 1ffa3a0 commit 72560bf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
6 changes: 5 additions & 1 deletion kronolith/lib/Event.php
Expand Up @@ -795,7 +795,11 @@ public function toiCalendar($calendar)

// Tags
if ($this->tags) {
$vEvent->setAttribute('CATEGORIES', '', array(), true, $this->tags);
if (count($this->tags == 1)) {
$vEvent->setAttribute('CATEGORIES', $this->tags[0]);
} else {
$vEvent->setAttribute('CATEGORIES', '', array(), true, $this->tags);
}
}

// Location
Expand Down
1 change: 1 addition & 0 deletions nag/docs/CHANGES
Expand Up @@ -2,6 +2,7 @@
v4.2.17-git
-----------

[jan] Fix regression when exporting single tags to iCalendar CATEGORIES.
[jan] Officially support PHP 7.


Expand Down
6 changes: 5 additions & 1 deletion nag/lib/Task.php
Expand Up @@ -1298,7 +1298,11 @@ public function toiCalendar(Horde_Icalendar $calendar)
}

if ($this->tags) {
$vTodo->setAttribute('CATEGORIES', '', array(), true, $this->tags);
if (count($this->tags) == 1) {
$vTodo->setAttribute('CATEGORIES', $this->tags[0]);
} else {
$vTodo->setAttribute('CATEGORIES', '', array(), true, $this->tags);
}
}

/* Get the task's history. */
Expand Down
2 changes: 2 additions & 0 deletions nag/package.xml
Expand Up @@ -33,6 +33,7 @@
</stability>
<license uri="http://www.horde.org/licenses/gpl">GPL-2.0</license>
<notes>
* [jan] Fix regression when exporting single tags to iCalendar CATEGORIES.
* [jan] Officially support PHP 7.
</notes>
<contents>
Expand Down Expand Up @@ -1832,6 +1833,7 @@
<date>2017-08-15</date>
<license uri="http://www.horde.org/licenses/gpl">GPL-2.0</license>
<notes>
* [jan] Fix regression when exporting single tags to iCalendar CATEGORIES.
* [jan] Officially support PHP 7.
</notes>
</release>
Expand Down

0 comments on commit 72560bf

Please sign in to comment.