}
}
}
- $tagger = Kronolith::getTagger();
- $tagger->tag($event->getUID(), Util::getFormData('tags'), 'event');
}
}
var $private = false;
/**
+ * An array of this event's tags in the form of ('tag1', 'tag2', ...)
+ *
+ * @var array
+ */
+ var $tags = array();
+
+ /**
* All the attendees of this event.
*
* This is an associative array where the keys are the email addresses
if ($eventObject !== null) {
$this->fromDriver($eventObject);
+ $tagger = Kronolith::getTagger();
+ $this->tags = $tagger->getTags($this->getUID(), 'event');
}
}
}
}
+ // Tags.
+ $this->tags = Util::getFormData('tags');
+
$this->initialized = true;
}
return $result;
}
+ /* Deal with tags */
+ $tagger = Kronolith::getTagger();
+ if (!empty($edit)) {
+ $tagger->replaceTags($event->getUID(), $event->tags, 'event');
+ } else {
+ $tagger->tag($event->getUID(), $event->tags, 'event');
+ }
+
/* Notify about the changed event. */
$result = Kronolith::sendNotification($event, $edit ? 'edit' : 'add');
if (is_a($result, 'PEAR_Error')) {
$history->log('kronolith:' . $this->_calendar . ':' . $event->getUID(), array('action' => 'modify'), true);
}
+ /* Update tags */
+ $tagger = Kronolith::getTagger();
+ $tagger->replaceTags($event->getUID(), $event->tags, 'event');
+
/* Notify users about the changed event. */
$result = Kronolith::sendNotification($event, 'edit');
if (is_a($result, 'PEAR_Error')) {
$history = Horde_History::singleton();
$history->log('kronolith:' . $this->_calendar . ':' . $uid, array('action' => 'add'), true);
+ /* Deal with any tags */
+ $tagger = Kronolith::getTagger();
+ $tagger->tag($event->getUID(), $event->tags, 'event');
+
/* Notify users about the new event. */
$result = Kronolith::sendNotification($event, 'add');
if (is_a($result, 'PEAR_Error')) {
$timeFormat = $prefs->getValue('twentyFour') ? 'G:i' : 'g:ia';
// Tags
- $tagger = Kronolith::getTagger();
- $tags = $tagger->getTags($this->event->getUID(), 'event');
- $tags = implode(', ', array_values($tags));
+ $tags = implode(', ', $this->event->tags);
echo '<div id="Event"' . ($active ? '' : ' style="display:none"') . '>';