Only in htdocs/imp/config: conf.bak.php
Only in htdocs/imp/config: conf.php
diff -ru imp-h3-4.3/config/conf.xml htdocs/imp/config/conf.xml
--- imp-h3-4.3/config/conf.xml 2008-09-03 14:56:45.000000000 -0400
+++ htdocs/imp/config/conf.xml 2008-10-14 10:25:26.000000000 -0400
@@ -486,6 +486,15 @@
</configsection>
<configheader>External Applications</configheader>
+ <configsection name="calendar">
+ <configboolean name="use_calendar" desc="If Kronolith is installed on the
+ local system, IMP can allow users to add the details of the mail messages
+ to a new task. If you do not want this functionality enabled (it will add
+ to server load because the list of available calendar categories must be
+ generated on every page load), you should disable this checkbox.">true
+ </configboolean>
+ </configsection>
+
<configsection name="tasklist">
<configboolean name="use_tasklist" desc="If Nag is installed on the local
system, IMP can allow users to add the details of mail messages to a new
Only in htdocs/imp/config: filter.txt
Only in htdocs/imp/config: header.php
Only in htdocs/imp/config: hooks.php
Only in htdocs/imp/config: menu.php
Only in htdocs/imp/config: mime_drivers.php
Only in htdocs/imp/config: motd.php
Only in htdocs/imp/config: prefs.php
Only in htdocs/imp/config: servers.php
Only in htdocs/imp/config: spelling.php
Only in htdocs/imp/config: trailer.txt
Only in htdocs/imp/lib: .Message.php.swp
Only in htdocs/imp/lib: .Session.php.swp
diff -ru imp-h3-4.3/lib/IMP.php htdocs/imp/lib/IMP.php
--- imp-h3-4.3/lib/IMP.php 2008-09-18 06:25:00.000000000 -0400
+++ htdocs/imp/lib/IMP.php 2008-10-14 09:48:25.000000000 -0400
@@ -463,7 +463,7 @@
function flistSelect($heading = '', $abbrev = true, $filter = array(),
$selected = null, $new_folder = false,
$inc_tasklists = false, $inc_vfolder = false,
- $inc_notepads = false)
+ $inc_notepads = false, $inc_calendars = false)
{
require_once 'Horde/Text.php';
require_once IMP_BASE . '/lib/Folder.php';
@@ -516,6 +516,23 @@
}
}
+ /* Add the list of editable calendars to the list. */
+ if ($inc_calendars && $_SESSION['imp']['calendaravail']) {
+ $calendarlist = $GLOBALS['registry']->call('calendar/listCalendars',
+ array(false, PERMS_EDIT));
+
+ if (!is_a($calendarlist, 'PEAR_Error') && count($calendarlist)) {
+ $text .= '<option value="" disabled="disabled"> </option><option value="" disabled="disabled">- - ' . _("Calendars") . ' - -</option>' . "\n";
+
+ foreach ($calendarlist as $id => $calendars) {
+ $text .= sprintf('<option value="%s">%s</option>%s',
+ '_calendar_' . $id,
+ Text::htmlSpaces($calendars->get('name')),
+ "\n");
+ }
+ }
+ }
+
/* Add the list of editable tasklists to the list. */
if ($inc_tasklists && $_SESSION['imp']['tasklistavail']) {
$tasklists = $GLOBALS['registry']->call('tasks/listTasklists',
diff -ru imp-h3-4.3/lib/Message.php htdocs/imp/lib/Message.php
--- imp-h3-4.3/lib/Message.php 2008-08-04 23:50:39.000000000 -0400
+++ htdocs/imp/lib/Message.php 2008-10-14 09:50:38.000000000 -0400
@@ -98,6 +98,11 @@
{
global $conf, $notification, $prefs;
+ if (strpos($targetMbox, '_calendar_') === 0) {
+ $calendar = str_replace('_calendar_', '', $targetMbox);
+ return $this->createTasksOrNotes($calendar, $action, $indices, 'cal');
+ }
+
if ($conf['tasklist']['use_tasklist'] &&
(strpos($targetMbox, '_tasklist_') === 0)) {
/* If the target is a tasklist, handle the move/copy specially. */
@@ -401,6 +406,29 @@
$vCal->setAttribute('METHOD', 'PUBLISH');
switch ($type) {
+ case 'cal':
+ /* Create a new vEvent object using this message's
+ * contents. */
+ $vEvent = &Horde_iCalendar::newComponent('vevent', $vCal);
+ $vEvent->setAttribute('SUMMARY', $subject);
+ $vEvent->setAttribute('DESCRIPTION', $body);
+ $vEvent->setAttribute('DTSTART', new Horde_Date(time()),
+ array('VALUE' => 'DATE'));
+
+ $vEvent->setAttribute('DTEND', new Horde_Date(time()),
+ array('VALUE' => 'DATE'));
+
+
+ $lists = $registry->call('calendar/listCalendars',
+ array(false, PERMS_EDIT));
+
+
+ $res = $registry->call('calendar/import',
+ array($vEvent, 'text/calendar', $list));
+
+
+ break;
+
case 'task':
/* Create a new vTodo object using this message's
* contents. */
@@ -460,6 +488,10 @@
$link = false;
}
break;
+ case 'cal':
+ $link = $registry->link('calendar/show',
+ array('uid' => $res));
+ break;
}
if ($link && !is_a($link, 'PEAR_Error')) {
$name = sprintf('<a href="%s">%s</a>',
diff -ru imp-h3-4.3/lib/Session.php htdocs/imp/lib/Session.php
--- imp-h3-4.3/lib/Session.php 2008-06-30 16:11:36.000000000 -0400
+++ htdocs/imp/lib/Session.php 2008-10-14 10:17:00.000000000 -0400
@@ -225,6 +225,9 @@
$_SESSION['imp']['filteravail'] = false;
}
+ /* Is the 'calendar/listCalendars' call available? */
+ $_SESSION['imp']['calendaravail'] = ($conf['calendar']['use_calendar'] && $registry->hasMethod('calendar/listCalendars'));
+
/* Is the 'tasks/listTasklists' call available? */
$_SESSION['imp']['tasklistavail'] = ($conf['tasklist']['use_tasklist'] && $registry->hasMethod('tasks/listTasklists'));
diff -ru imp-h3-4.3/mailbox.php htdocs/imp/mailbox.php
--- imp-h3-4.3/mailbox.php 2008-09-22 13:28:35.000000000 -0400
+++ htdocs/imp/mailbox.php 2008-10-13 13:08:31.000000000 -0400
@@ -222,7 +222,7 @@
/* Generate folder options list. */
if ($conf['user']['allow_folders']) {
- $folder_options = IMP::flistSelect(_("Messages to"), true, array(), null, true, true, false, true);
+ $folder_options = IMP::flistSelect(_("Messages to"), true, array(), null, true, true, false, true, true);
}
/* Build the list of messages in the mailbox. */
diff -ru imp-h3-4.3/message.php htdocs/imp/message.php
--- imp-h3-4.3/message.php 2008-05-19 15:25:03.000000000 -0400
+++ htdocs/imp/message.php 2008-10-13 13:08:39.000000000 -0400
@@ -517,7 +517,7 @@
if ($conf['user']['allow_folders']) {
$n_template->set('move', Horde::widget('#', _("Move to folder"), 'widget', '', "transfer('move_message', 1); return false;", _("Move"), true));
$n_template->set('copy', Horde::widget('#', _("Copy to folder"), 'widget', '', "transfer('copy_message', 1); return false;", _("Copy"), true));
- $n_template->set('options', IMP::flistSelect(_("This message to"), true, array(), null, true, true, false, true));
+ $n_template->set('options', IMP::flistSelect(_("This message to"), true, array(), null, true, true, false, true, true));
}
$n_template->set('back_to', Horde::widget($mailbox_url, sprintf(_("Back to %s"), $h_page_label), 'widget', '', '', sprintf(_("Bac_k to %s"), $h_page_label), true));
--- kronolith-h3-2.3/lib/api.php 2008-08-18 18:40:33.000000000 -0400
+++ htdocs/kronolith/lib/api.php 2008-10-14 09:48:08.000000000 -0400
@@ -644,7 +644,7 @@
if (is_null($permission)) {
$permission = PERMS_SHOW;
}
- return array_keys(Kronolith::listCalendars($owneronly, $permission));
+ return Kronolith::listCalendars($owneronly, $permission);
}
/**