$row['recur_interval'] = null;
$row['recur_data'] = null;
}
- $tags = $event->getTags();
- $row['tags'] = $tags ? implode(', ', $tags) : '';
+ $row['tags'] = implode(', ', $event->tags);
$data[] = $row;
}
}
foreach ($events as $id) {
$event = $this->getEvent($id);
if (isset($tags) && !empty($tags[$event->uid])) {
- $event->setTags($tags[$event->uid]);
+ $event->tags = $tags[$event->uid];
}
Kronolith::addEvents($results, $event, $startDate, $endDate,
$showRecurrence, $json, $coverDates);
case 'span':
case 'rowspan':
case 'geoLocation':
+ case 'tags':
$this->{'_' . $name} = $value;
return;
}
case 'rowspan':
return $this->{'_' . $name};
case 'tags':
- return $this->getTags();
+ if (!isset($this->_tags)) {
+ $this->_tags = Kronolith::getTagger()->getTags($this->uid, 'event');
+ }
+ return $this->_tags;
case 'geoLocation':
return $this->getGeolocation();
}
}
// Tags
- $tags = $this->tags;
- if (is_array($tags)) {
- $tags = implode(', ', $tags);
- }
+ $tags = implode(', ', $this->tags);
if (!empty($tags)) {
$vEvent->setAttribute('CATEGORIES', $tags);
}
}
/* Categories (Tags) */
- $tags = $message->getCategories();
- foreach ($tags as $tag) {
- $this->tags[] = $tag;
- }
+ $this->_tags = $message->getCategories();
/* Flag that we are initialized */
$this->initialized = true;
}
/**
- * Setter for tags
- *
- * @param array $tags An array of tag_names
- */
- public function setTags($tags)
- {
- $this->_tags = $tags;
- }
-
- /**
- * Getter for tags
- *
- * @return mixed An array of tag_names, or false if tags were never set.
- */
- public function getTags()
- {
- if (!isset($this->_tags)) {
- $this->_tags = Kronolith::getTagger()->getTags($this->uid, 'event');
- }
-
- return $this->_tags;
- }
-
- /**
* Setter for geo data
*
* @param array $data An array of lat/lng data.
$this->alarm = $alarm;
parent::__construct($driver, $eventObject);
- $this->_tags = Kronolith::getTagger()->getTags($this->uid, 'event');
}
/**
$to->status = $from->status;
$to->description = $from->description;
$to->url = $from->url;
- $to->setTags($from->tags);
+ $to->tags = $from->tags;
$to->setGeoLocation($from->geoLocation);
$to->first = $from ->first;
$to->last = $from->last;
}
$event = &$this->event;
-
- // Tags
- $tagger = Kronolith::getTagger();
- $tags = $tagger->getTags($event->uid, 'event');
- $tags = implode(',', array_values($tags));
+ $tags = implode(',', array_values($event->tags));
Horde_Core_Ui_JsCalendar::init(array(
'full_weekdays' => true