Migration script for keywords and categories -> tags still to come.
'description' => _("Description"),
'category' => _("Category"),
'location' => _("Location"),
- 'keywords' => _("Keywords"),
'recur_type' => _("Recurrence Type"),
'recur_end_date' => _("Recurrence End Date"),
'recur_interval' => _("Recurrence Interval"),
$row['category'] = $event->category;
$row['location'] = $event->location;
$row['description'] = $event->description;
- $row['keywords'] = implode(',', $event->keywords);
$row['start_date'] = sprintf('%d-%02d-%02d', $event->start->year, $event->start->month, $event->start->mday);
$row['start_time'] = sprintf('%02d:%02d:%02d', $event->start->hour, $event->start->min, $event->start->sec);
$row['end_date'] = sprintf('%d-%02d-%02d', $event->end->year, $event->end->month, $event->end->mday);
var $attendees = array();
/**
- * All the key words associtated with this event.
- *
- * @var array
- */
- var $keywords = array();
-
- /**
* The start time of the event.
*
* @var Horde_Date
if (!empty($hash['location'])) {
$this->setLocation($hash['location']);
}
- if (!empty($hash['keywords'])) {
- $this->setKeywords(explode(',', $hash['keywords']));
- }
if (!empty($hash['start_date'])) {
$date = explode('-', $hash['start_date']);
if (empty($hash['start_time'])) {
}
}
- function getKeywords()
- {
- return $this->keywords;
- }
-
- function hasKeyword($keyword)
- {
- return in_array($keyword, $this->keywords);
- }
-
- function setKeywords($keywords)
- {
- $this->keywords = $keywords;
- }
-
function isAllDay()
{
return $this->allday ||
$this->setDescription(Util::getFormData('description', $this->description));
$this->setLocation(Util::getFormData('location', $this->location));
$this->setPrivate(Util::getFormData('private'));
- $this->setKeywords(Util::getFormData('keywords', $this->keywords));
// Category.
if ($new_category = Util::getFormData('new_category')) {
{
$q = 'SELECT event_id, event_uid, event_description, event_location,' .
' event_private, event_status, event_attendees,' .
- ' event_keywords, event_title, event_category, event_recurcount,' .
+ ' event_title, event_category, event_recurcount,' .
' event_recurtype, event_recurenddate, event_recurinterval,' .
' event_recurdays, event_start, event_end, event_allday,' .
' event_alarm, event_alarm_methods, event_modified,' .
$query = 'SELECT event_id, event_uid, event_description,' .
' event_location, event_private, event_status, event_attendees,' .
- ' event_keywords, event_title, event_category, event_recurcount,' .
+ ' event_title, event_category, event_recurcount,' .
' event_recurtype, event_recurenddate, event_recurinterval,' .
' event_recurdays, event_start, event_end, event_allday,' .
' event_alarm, event_alarm_methods, event_modified,' .
{
$query = 'SELECT event_id, event_uid, calendar_id, event_description,' .
' event_location, event_private, event_status, event_attendees,' .
- ' event_keywords, event_title, event_category, event_recurcount,' .
+ ' event_title, event_category, event_recurcount,' .
' event_recurtype, event_recurenddate, event_recurinterval,' .
' event_recurdays, event_start, event_end, event_allday,' .
' event_alarm, event_alarm_methods, event_modified,' .
if (isset($SQLEvent['event_attendees'])) {
$this->attendees = array_change_key_case($driver->convertFromDriver(unserialize($SQLEvent['event_attendees'])));
}
- if (isset($SQLEvent['event_keywords'])) {
- $this->keywords = explode(',', $driver->convertFromDriver($SQLEvent['event_keywords']));
- }
if (isset($SQLEvent['event_description'])) {
$this->description = $driver->convertFromDriver($SQLEvent['event_description']);
}
$this->_properties['event_private'] = (int)$this->isPrivate();
$this->_properties['event_status'] = $this->getStatus();
$this->_properties['event_attendees'] = serialize($driver->convertToDriver($this->getAttendees()));
- $this->_properties['event_keywords'] = $driver->convertToDriver(implode(',', $this->getKeywords()));
$this->_properties['event_modified'] = $_SERVER['REQUEST_TIME'];
if ($this->isAllDay()) {
event_location VARCHAR(MAX),
event_status INT DEFAULT 0,
event_attendees VARCHAR(MAX),
- event_keywords VARCHAR(MAX),
event_exceptions VARCHAR(MAX),
event_title VARCHAR(255),
event_category VARCHAR(80),
event_location TEXT,
event_status INT DEFAULT 0,
event_attendees TEXT,
- event_keywords TEXT,
event_exceptions TEXT,
event_title VARCHAR(255),
event_category VARCHAR(80),
event_location VARCHAR2(4000),
event_status INT DEFAULT 0,
event_attendees VARCHAR2(4000),
- event_keywords VARCHAR2(4000),
event_exceptions VARCHAR2(4000),
event_title VARCHAR2(255),
event_category VARCHAR2(80),
event_location TEXT,
event_status INT DEFAULT 0,
event_attendees TEXT,
- event_keywords TEXT,
event_exceptions TEXT,
event_title VARCHAR(255),
event_category VARCHAR(80),
event_location TEXT,
event_status INT DEFAULT 0,
event_attendees TEXT,
- event_keywords TEXT,
event_exceptions TEXT,
event_title VARCHAR(255),
event_category VARCHAR(80),
</field>
<field>
- <name>event_keywords</name>
- <type>clob</type>
- </field>
-
- <field>
<name>event_exceptions</name>
<type>clob</type>
</field>
toggleSection('attendees');
toggleSection('recurrence');
toggleSection('tags');
-<?php if ($GLOBALS['conf']['metadata']['keywords']): ?>
- toggleSection('keywords');
-<?php endif; ?>
});
</script>
</tr>
<?php endif; endif; ?>
-<?php if ($conf['metadata']['keywords'] && count($keyword_list)): ?>
-<!-- keywords -->
-<tr>
- <td colspan="2" class="control"><strong><?php echo _("Keywords") ?></strong></td>
-</tr>
-<?php foreach ($keyword_list as $cat => $list): ?>
-<tr>
- <td class="rightAlign" valign="top"><?php echo htmlspecialchars($cat) ?></td>
- <td>
-<?php foreach ($list as $entry): ?>
- <?php echo htmlspecialchars($entry) ?><br />
-<?php endforeach; ?>
- </td>
-</tr>
-<?php endforeach; ?>
-<?php endif; ?>
-
<!-- tags -->
<?php if (!empty($tags)):?>
<tr>