Hello community,
here is the log from the commit of package horde3-kronolith for openSUSE:Factory
checked in at Mon Jan 24 16:16:42 CET 2011.
--------
New Changes file:
--- /dev/null 2010-08-26 16:28:41.000000000 +0200
+++ /mounts/work_src_done/STABLE/horde3-kronolith/horde3-kronolith.changes 2010-12-09 12:01:52.000000000 +0100
@@ -0,0 +1,39 @@
+-------------------------------------------------------------------
+Thu Dec 9 10:29:19 UTC 2010 - lang@b1-systems.de
+
+- Prepared packaging for 11.4 factory
+
+* old changelog here
+
+* Wed Oct 13 2010 Ralf Lang upstream 2.3.5
+- removed RC2.2 patches
+- updated to upstream 2.3.5
+* Mon Dec 10 2007 Marcus Hüwe
+- added new Requires: php5-pear-date_holiday
+* Sat Dec 08 2007 Marcus Hüwe
+- updated to 2.2-rc1
+- renamed package to horde-kronolith
+- disabled the following patches:
+ Patch1: HK-GW-Fix_create_new_event.patch
+ Patch2: HK-GW-Fix_share_right_editing.patch
+ Patch3: HK-UV-Fix_list_events.patch
+- added the following patches (from kolab-cvs):
+ Patch4: HK-GW-kronolith_2.2_RC1-Fbview_relevance.patch (slightly modified to apply flawlessly)
+ Patch5: HK-GW-kronolith_2.2_RC1-Fbview_xfb_access.patch
+ Patch6: HK-SB-kronolith_2.2_RC1-Fbview_extra_params.patch
+ Patch7: HK-SB-kronolith_2.2_RC1-Fbview_save_attendees.patch
+* Wed Nov 07 2007 Marcus Hüwe
+- updated to 2.2-alpha
+- added Patch0 (kronolith-h3-2.2-alpha-php5_exec.diff)
+- fixed Requires
+- added kolab specific patches from kolab-cvs:
+ Patch1: HK-GW-Fix_create_new_event.patch
+ Patch2: HK-GW-Fix_share_right_editing.patch
+ Patch3: HK-UV-Fix_list_events.patch
+* Sat Nov 04 2006 Marcus Hüwe
+- new upstream version 2.1.3
+* Wed Jun 21 2006 Marcus Hüwe
+- initial build
+
+
+
calling whatdependson for head-i586
New:
----
HK-GW-kronolith_2.2_RC1-Fbview_relevance.patch
HK-GW-kronolith_2.2_RC1-Fbview_xfb_access.patch
HK-SB-kronolith_2.2_RC1-Fbview_extra_params.patch
HK-SB-kronolith_2.2_RC1-Fbview_save_attendees.patch
horde3-kronolith.changes
horde3-kronolith.spec
kronolith-h3-2.3.5-php5_exec.diff
kronolith-h3-2.3.5.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ horde3-kronolith.spec ++++++
#
# spec file for package horde3-kronolith
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
%define _hordedir %(%{_sbindir}/apxs2 -q datadir)/htdocs/horde/
%define _kronolithdir %{_hordedir}/kronolith
%define _pversion 2.3.5
Name: horde3-kronolith
Version: 2.3.5
Release: 1
Summary: The Horde calendar application
License: GPL
Group: Productivity/Networking/Other
Url: http://www.horde.org/kronolith
Source0: kronolith-h3-%{_pversion}.tar.bz2
Patch0: kronolith-h3-2.3.5-php5_exec.diff
#Patch1: HK-GW-Fix_create_new_event.patch
#Patch2: HK-GW-Fix_share_right_editing.patch
#Patch3: HK-UV-Fix_list_events.patch
#Patch4: HK-GW-kronolith_2.2_RC1-Fbview_relevance.patch
#Patch5: HK-GW-kronolith_2.2_RC1-Fbview_xfb_access.patch
#Patch6: HK-SB-kronolith_2.2_RC1-Fbview_extra_params.patch
#Patch7: HK-SB-kronolith_2.2_RC1-Fbview_save_attendees.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: kronolith = %{version}
Obsoletes: kronolith <= 2.3.4
Requires: horde3 >= 3.3.0
Requires: php5
Requires: php5-pear-http_request
Requires: php5-pear-date, php5-pear-date_holidays
Requires: php5-pear-db, php5-pear-mail
BuildRequires: apache2-devel
%description
Kronolith is the Horde calendar application. It provides a stable
and featureful individual calendar system for every Horde user, with
integrated collaboration/scheduling features. It makes extensive use
of the Horde Framework to provide integration with other
applications.
Right now, Kronolith implements a solid, stand-alone calendar system,
allowing repeating events, all-day events, custom fields, keywords,
shared calendars, iCalendar support, generation of free/busy
information, and managing multiple users through Horde
Authentication. The calendar API that Kronolith uses is abstracted
such that it could work with any backend, but right now we provide
SQL (abstracted to support most databases, including MySQL,
PostgreSQL, Oracle, and MSSQL via PEAR DB), and Kolab backend
libraries.
Authors:
--------
The Kronolith Team
%prep
%setup -qn kronolith-h3-%{_pversion}
%patch0
#%patch1 -p2
#%patch2 -p2
#%patch3 -p2
#%patch4 -p2
#%patch5 -p2
#%patch6 -p2
#%patch7 -p2
%build
pushd config/
for i in *.dist; do %__mv $i ${i%.dist}; done
popd
%install
%__mkdir_p %{buildroot}%{_kronolithdir}
%__cp -r ./* %{buildroot}%{_kronolithdir}
%__rm -rf %{buildroot}%{_kronolithdir}/{docs,README,COPYING}
%clean
%__rm -rf %{buildroot}
%files
%defattr(-, root, root)
%doc docs README COPYING
%dir %{_hordedir}
%dir %{_kronolithdir}
%{_kronolithdir}/*.php
%{_kronolithdir}/calendars
%{_kronolithdir}/feed
%{_kronolithdir}/js
%{_kronolithdir}/lib
%{_kronolithdir}/locale
%{_kronolithdir}/po
%{_kronolithdir}/scripts
%{_kronolithdir}/templates
%{_kronolithdir}/themes
%attr(0750, wwwrun, www) %dir %{_kronolithdir}/config
%attr(0640, wwwrun, www) %config(noreplace) %{_kronolithdir}/config/*
%attr(0640, wwwrun, www) %config(noreplace) %{_kronolithdir}/config/.htaccess
%changelog
++++++ HK-GW-kronolith_2.2_RC1-Fbview_relevance.patch ++++++
Allows to set the free/busy relevance on a calendar.
diff -r e7fdad8797ac kronolith/templates/calendars/calendars.inc
--- a/kronolith/templates/calendars/calendars.inc Thu Nov 29 14:36:50 2007 +0100
+++ b/kronolith/templates/calendars/calendars.inc Thu Nov 29 14:43:24 2007 +0100
@@ -8,7 +8,8 @@ var fields = [];
<?php foreach ($my_calendars as $id => $cal): ?>
fields['<?php echo htmlspecialchars($id) ?>'] = [
"<?php echo rawurlencode(String::convertCharset($cal->get('name'), NLS::getCharset(), 'UTF-8')) ?>",
- "<?php echo rawurlencode(String::convertCharset($cal->get('desc'), NLS::getCharset(), 'UTF-8')) ?>"];
+ "<?php echo rawurlencode(String::convertCharset($cal->get('desc'), NLS::getCharset(), 'UTF-8')) ?>",
+ "<?php echo $fbrelevance[$id] ?>"];
<?php endforeach; ?>
function newChoice()
@@ -25,6 +26,7 @@ function newChoice()
document.shares.edit_share.value = share;
document.shares.id.value = decodeURIComponent(fields[share][0]);
document.shares.description.value = decodeURIComponent(fields[share][1]);
+ document.shares.fbrelevance[fields[share][2]].checked = true;
urlObj.innerHTML = "<?php echo Util::addParameter(Horde::applicationUrl('month.php', true, -1), 'display_cal', '') ?>" + share;
subscriptionUrlObj.innerHTML = "<?php echo $webdav ? (Horde::url($registry->get('webroot', 'horde'), true, -1) . '/rpc.php/kronolith/" + share + ".ics"') : Util::addParameter(Horde::applicationUrl('ics.php', true, -1), 'c', '') . '" + share' ?>;
}
@@ -126,11 +128,55 @@ function checkSubmit()
<textarea id="description" name="description" rows="4" cols="60"></textarea>
</td>
</tr>
- <tr>
- <td valign="top" class="nowrap rightAlign">
+</table>
+
+<div class="control">
+ <?php echo _("Free/Busy relevance") ?>
+</div>
+
+<table width="100%" cellspacing="0">
+ <tr>
+ <td colspan="2">
+ <?php echo _("This calendar is only included into the free/busy data for ...") ?>
+ </td>
+ </tr>
+ <tr>
+ <td width="15%" class="nowrap rightAlign">
+ <strong><?php echo _("owners/administrators") ?></strong>
+ </td>
+ <td width="85%">
+ <input id="admins" name="fbrelevance" type="radio" class="checkbox" value="0"/><br />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" class="nowrap rightAlign">
+ <strong><?php echo _("readers") ?></strong>
+ </td>
+ <td>
+ <input id="readers" name="fbrelevance" type="radio" class="checkbox" value="1"/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" class="nowrap rightAlign">
+ <strong><?php echo _("no one") ?></strong>
+ </td>
+ <td>
+ <input id="none" name="fbrelevance" type="radio" class="checkbox" value="2"/><br />
+ </td>
+ </tr>
+ <td>
+</table>
+
+<div class="control">
+ <?php echo _("Calendar links:") ?>
+</div>
+
+<table width="100%" cellspacing="0">
+ <tr>
+ <td width="15%" class="nowrap rightAlign">
<strong><?php echo _("URL") ?></strong>
</td>
- <td>
+ <td width="85%">
<span id="calendar_url"><em><?php echo _("Select a calendar above to display the URL") ?></em></span>
</td>
</tr>
--- a/kronolith/calendars.php 2007-12-08 14:11:26.000000000 +0100
+++ b/kronolith/calendars.php 2007-12-08 14:11:35.000000000 +0100
@@ -37,6 +37,7 @@
$cal = $kronolith_shares->newShare(md5(microtime()));
$cal->set('name', $id);
$cal->set('desc', Util::getFormData('description', ''));
+ $cal->set('params', serialize(array('fbrelevance' => (int) Util::getFormData('fbrelevance', 0))));
$result = $kronolith_shares->addShare($cal);
if (is_a($result, 'PEAR_Error')) {
$notification->push($result, 'horde.error');
@@ -48,6 +49,7 @@
$original_name = $cal->get('name');
$cal->set('name', $id);
$cal->set('desc', Util::getFormData('description', ''));
+ $cal->set('params', serialize(array('fbrelevance' => (int) Util::getFormData('fbrelevance', 0))));
if ($original_name != $id) {
$result = $kronolith_driver->rename($original_name, $id);
@@ -123,9 +125,16 @@
$remote_calendars = unserialize($prefs->getValue('remote_cals'));
$current_user = Auth::getAuth();
$my_calendars = array();
+$fbrelevance = array();
foreach (Kronolith::listCalendars() as $id => $cal) {
if ($cal->get('owner') == $current_user) {
$my_calendars[$id] = $cal;
+ $params = @unserialize($cal->get('params'));
+ if (isset($params['fbrelevance'])) {
+ $fbrelevance[$id] = $params['fbrelevance'];
+ } else {
+ $fbrelevance[$id] = 0;
+ }
}
}
++++++ HK-GW-kronolith_2.2_RC1-Fbview_xfb_access.patch ++++++
diff -r 14457cf2ea2c kronolith/perms.php
--- a/kronolith/perms.php Thu Nov 29 15:20:49 2007 +0100
+++ b/kronolith/perms.php Thu Nov 29 15:25:36 2007 +0100
@@ -15,6 +15,34 @@ require_once KRONOLITH_BASE . '/lib/base
require_once KRONOLITH_BASE . '/lib/base.php';
require_once 'Horde/Group.php';
+function &getFbperms($share)
+{
+ $fbperms = array();
+ $params = $share->get('params');
+ if (!is_a($params, 'PEAR_Error')) {
+ $params = @unserialize($params);
+ if (isset($params['xfbaccess'])) {
+ $xfbusers = $params['xfbaccess'];
+ foreach ($xfbusers as $user) {
+ $fbperms[$user] = PERMS_READ;
+ }
+ }
+ }
+ return $fbperms;
+}
+
+function setFbperms($share, $xfbusers)
+{
+ $fbperms = array();
+ $params = $share->get('params');
+ if (!is_a($params, 'PEAR_Error')) {
+ $params = @unserialize($params);
+ $params['xfbaccess'] = $xfbusers;
+ $params = serialize($params);
+ $share->set('params', $params);
+ }
+}
+
$shares = &Horde_Share::singleton('kronolith');
$groups = &Group::singleton();
$auth = &Auth::singleton($conf['auth']['driver']);
@@ -36,6 +64,8 @@ case 'edit':
$notification->push($share, 'horde.error');
} elseif (isset($share) && Auth::getAuth() != $share->get('owner')) {
exit('permission denied');
+ } else {
+ $fbperms = getFbperms($share);
}
break;
@@ -251,6 +281,24 @@ case 'editform':
}
}
+ // Process free/busy permissions.
+ $fb_names = Util::getFormData('fb_names');
+ $fb_read = Util::getFormData('fb_read');
+
+ $fbperms = getFbperms($share);
+ foreach ($fb_names as $key => $user) {
+ if (empty($user)) {
+ continue;
+ }
+
+ if (!empty($fb_read[$key])) {
+ $fbperms[$user] = PERMS_READ;
+ } else {
+ unset($fbperms[$user]);
+ }
+ }
+ setFbperms($share, array_keys($fbperms));
+
$share->setPermission($perm, false);
$share->save();
$notification->push(sprintf(_("Updated \"%s\"."), $share->get('name')), 'horde.success');
diff -r 14457cf2ea2c kronolith/templates/perms/perms.inc
--- a/kronolith/templates/perms/perms.inc Thu Nov 29 15:20:49 2007 +0100
+++ b/kronolith/templates/perms/perms.inc Thu Nov 29 15:25:36 2007 +0100
@@ -355,6 +355,61 @@
<td> </td>
</tr>
+<!-- Extended free/busy Permissions -->
+<tr valign="middle">
+ <td class="header leftAlign">
+ <?php echo Horde::img('user.png', '', '', $registry->getImageDir('horde')) . ' ' . _("Extended free/busy access") ?>
+ </td>
+ <td class="header" align="center"> </td>
+ <td class="header" align="center"><?php echo _("Read") ?></td>
+ <td class="header" align="center"> </td>
+ <td class="header" align="center"> </td>
+ <td class="header" align="center"> </td>
+ <td class="header"> </td>
+</tr>
+<?php foreach ($fbperms as $user => $fbperm) { if ($user != $owner) { ?>
+<tr>
+ <td class="light"><?php echo htmlspecialchars(Auth::removeHook($user)) ?><input type="hidden" name="fb_names[<?php echo htmlspecialchars($user) ?>]" value="<?php echo htmlspecialchars($user) ?>" /></td>
+ <td align="center"> </td>
+ <td align="center">
+
+ <label for="fb_read_<?php echo str_replace('@', '_', htmlspecialchars($user)) ?>" class="hidden"><?php echo _("Read") ?></label>
+ </td>
+ <td align="center"> </td>
+ <td align="center"> </td>
+ <td align="center"> </td>
+ <td> </td>
+</tr>
+<?php } } ?>
+<!-- New extended free/busy row -->
+<tr>
+<?php if ($auth->hasCapability('list')): ?>
+ <td class="light">
+ <label for="fb_names_new" class="hidden"><?php echo _("Select a user to add:") ?></label>
+ <select id="fb_names_new" name="fb_names[||new]">
+ <option value=""><?php echo _("Select a user to add:") ?></option>
+ <?php foreach ($userList as $user) { if (!isset($userperms[$user])) { ?>
+ <option value="<?php echo htmlspecialchars($user) ?>"><?php echo htmlspecialchars(Auth::removeHook($user)) ?></option>
+ <?php } } ?>
+ </select>
+ </td>
+<?php else: ?>
+ <td class="light">
+ <label for="fb_names_new" class="hidden"><?php echo _("User to add:") ?></label>
+ <input type="text" id="fb_names_new" name="fb_names[||new]" />
+ </td>
+<?php endif; ?>
+ <td align="center"> </td>
+ <td align="center">
+ <input type="checkbox" id="fb_read_new" name="fb_read[||new]" />
+ <label for="fb_read_new" class="hidden"><?php echo _("Read") ?></label>
+ </td>
+ <td align="center"> </td>
+ <td align="center"> </td>
+ <td align="center"> </td>
+ <td> </td>
+</tr>
+
<tr>
<td colspan="7"> </td>
</tr>
++++++ HK-SB-kronolith_2.2_RC1-Fbview_extra_params.patch ++++++
This includes extra parameters into the free/busy view. The params are hardcoded so this patch won't make it upstream.
diff -r 735b35f9f866 kronolith/lib/FBView.php
--- a/kronolith/lib/FBView.php Thu Nov 29 11:32:43 2007 +0100
+++ b/kronolith/lib/FBView.php Thu Nov 29 11:35:20 2007 +0100
@@ -86,8 +86,8 @@ class Kronolith_FreeBusy_View {
$template = new Horde_Template();
$rows = '';
foreach ($this->_requiredMembers as $member) {
- $blocks = $this->_getBlocks($member, $member->getBusyPeriods(), 'busyblock.tpl', _("Busy"));
- $template = new Horde_Template();
+ $blocks = $this->_getBlocks($member, $member->getBusyPeriods(), 'busyblock.tpl', _("Busy"), $member->getExtraParams());
+ $template = &new Horde_Template();
$template->set('blocks', $blocks);
$template->set('name', $member->getName());
$rows .= $template->fetch(KRONOLITH_TEMPLATES . '/fbview/row.tpl');
@@ -107,8 +107,8 @@ class Kronolith_FreeBusy_View {
$template = new Horde_Template();
$rows = '';
foreach ($this->_optionalMembers as $member) {
- $blocks = $this->_getBlocks($member, $member->getBusyPeriods(), 'busyblock.tpl', _("Busy"));
- $template = new Horde_Template();
+ $blocks = $this->_getBlocks($member, $member->getBusyPeriods(), 'busyblock.tpl', _("Busy"), $member->getExtraParams());
+ $template = &new Horde_Template();
$template->set('blocks', $blocks);
$template->set('name', $member->getName());
$rows .= $template->fetch(KRONOLITH_TEMPLATES . '/fbview/row.tpl');
@@ -122,6 +122,9 @@ class Kronolith_FreeBusy_View {
$template->set('legend', '');
$html .= $template->fetch(KRONOLITH_TEMPLATES . '/fbview/section.tpl');
}
+
+ //**********
+ //This has been disabled in kolab-fbview. Make this optional?
// Possible meeting times.
$optimal->setAttribute('ORGANIZER', _("All Attendees"));
@@ -144,6 +147,9 @@ class Kronolith_FreeBusy_View {
$template->set('name', _("Required Attendees"));
$template->set('blocks', $blocks);
$rows .= $template->fetch(KRONOLITH_TEMPLATES . '/fbview/row.tpl');
+
+ //This has been disabled in kolab-fbview. Make this optional?
+ //**********
// Reset locale.
setlocale(LC_NUMERIC, $lc);
@@ -217,7 +223,7 @@ class Kronolith_FreeBusy_View {
return $instances[$view];
}
- function _getBlocks($member, $periods, $blockfile, $label)
+ function _getBlocks($member, $periods, $blockfile, $label, $extra = array())
{
$template = new Horde_Template();
$template->set('label', $label);
@@ -250,6 +256,21 @@ class Kronolith_FreeBusy_View {
$template->set('left', $left . '%');
$template->set('width', $width . '%');
+ $template->set('evclick', '');
+
+ if (isset($extra[$periodStart])) {
+ if (!empty($extra[$periodStart]['X-UID'])) {
+ $link = "javascript:performAction('viewaction', '"
+ . addslashes($member->getName() . "#"
+ . String::convertCharset(base64_decode($extra[$periodStart]['X-UID']),
+ 'UTF-8',NLS::getCharset())) . "')";
+ $template->set('evclick', $link);
+ }
+ if (!empty($extra[$periodStart]['X-SUMMARY'])) {
+ $template->set('label', String::convertCharset(base64_decode($extra[$periodStart]['X-SUMMARY']),'UTF-8',
+ NLS::getCharset()));
+ }
+ }
$blocks .= $template->fetch(KRONOLITH_TEMPLATES . '/fbview/' . $blockfile);
} else {
diff -r 735b35f9f866 kronolith/templates/fbview/busyblock.tpl
--- a/kronolith/templates/fbview/busyblock.tpl Thu Nov 29 11:32:43 2007 +0100
+++ b/kronolith/templates/fbview/busyblock.tpl Thu Nov 29 11:35:20 2007 +0100
@@ -1,1 +1,1 @@
-<td><div class="busy" style="left:<tag:left />;width:<tag:width />;"> </div></td>
+<td><div class="busy" onclick="<tag:evclick />" style="cursor:pointer;left:<tag:left />;width:<tag:width />;" title="<tag:label />"> </div></td>
++++++ HK-SB-kronolith_2.2_RC1-Fbview_save_attendees.patch ++++++
Provides a patch to store the list of attendees in the user preferences. This is a broken patch that has been rejected upstream (http://bugs.horde.org/ticket/?id=4788). This should be solved using Horde::Groups.
diff -r 848f241f83e0 kronolith/attendees.php
--- a/kronolith/attendees.php Thu Nov 29 10:56:04 2007 +0100
+++ b/kronolith/attendees.php Thu Nov 29 11:32:43 2007 +0100
@@ -155,6 +155,16 @@ case 'clear':
$attendees = array();
$_SESSION['kronolith']['attendees'] = $attendees;
break;
+
+case 'save':
+ if (empty($attendees)) {
+ break;
+ }
+ $savedattlist = unserialize($prefs->getValue('saved_attendee_list'));
+ $savedattlist[] = array_keys($attendees);
+ $prefs->setValue('saved_attendee_list', serialize($savedattlist));
+ $notification->push(_('Successfully saved attendee list'), 'horde.success');
+ break;
}
// Get the current Free/Busy view; default to the 'day' view if none specified.
@@ -226,6 +236,14 @@ Imple::factory('ContactAutoCompleter', a
$title = _("Edit attendees");
require KRONOLITH_TEMPLATES . '/common-header.inc';
+
+if ($browser->hasFeature('javascript')) {
+ Horde::addScriptFile('open_savedattlist_win.js');
+ $savedattlist_url = 'javascript:open_savedattlist_win();';
+} else {
+ $savedattlist_url = Horde::applicationUrl('savedattlist.php');
+}
+
$notification->notify(array('status'));
require KRONOLITH_TEMPLATES . '/attendees/attendees.inc';
require $registry->get('templates', 'horde') . '/common-footer.inc';
diff -r 848f241f83e0 kronolith/config/prefs.php.dist
--- a/kronolith/config/prefs.php.dist Thu Nov 29 10:56:04 2007 +0100
+++ b/kronolith/config/prefs.php.dist Thu Nov 29 11:32:43 2007 +0100
@@ -465,3 +465,11 @@ if ($GLOBALS['registry']->hasMethod('con
'shared' => false,
'type' => 'implicit'
);
+
+$_prefs['saved_attendee_list'] = array(
+ 'value' => 'a:0:{}',
+ 'locked' => false,
+ 'shared' => false,
+ 'type' => 'implicit',
+ 'desc' => _("A saved list of attendees")
+);
diff -r 848f241f83e0 kronolith/savedattlist.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/kronolith/savedattlist.php Thu Nov 29 11:32:43 2007 +0100
@@ -0,0 +1,77 @@
+<?php
+/**
+ * $Horde: kronolith/attendeeshandler.php,v 1.1 2004/05/25 08:34:21 stuart Exp $
+ *
+ * Copyright 2004 Code Fusion <http://www.codefusion.co.za/>
+ * Stuart Binge <s.binge@codefusion.co.za>
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ */
+
+@define('KRONOLITH_BASE', dirname(__FILE__));
+require_once KRONOLITH_BASE . '/lib/base.php';
+require_once KRONOLITH_BASE . '/lib/FBView.php';
+
+$title = _('Load Attendee List');
+
+Horde::addScriptFile('tooltip.js', 'horde');
+require KRONOLITH_TEMPLATES . '/common-header.inc';
+
+// Get our list of saved attendees
+$savedattlist = unserialize($prefs->getValue('saved_attendee_list'));
+
+// Preformat our image urls
+$delimg = Horde::img('delete.png', _("Remove List"), null, $GLOBALS['registry']->getImageDir('horde'));
+$loadimg = Horde::img('tree/folder.png', _("Load List"), null, $GLOBALS['registry']->getImageDir('horde'));
+
+// Get our Action ID & Value. This specifies what action the user initiated.
+$actionID = Util::getFormData('actionID', false);
+$actionValue = Util::getFormData('actionValue', false);
+if (!$actionID) {
+ $actionID = (Util::getFormData('addNew', false) ? 'add' : false);
+ $actionValue = Util::getFormData('newAttendees', '');
+}
+
+// Perform the specified action, if there is one.
+switch ($actionID) {
+case 'remove':
+ // Remove the specified attendee
+ if (array_key_exists($actionValue, $savedattlist)) {
+ unset($savedattlist[$actionValue]);
+ $prefs->setValue('saved_attendee_list', serialize($savedattlist));
+ }
+
+ break;
+
+case 'dismiss':
+ // Make sure we're actually allowed to dismiss
+ if (!$allow_dismiss) break;
+
+ // Close the attendee window
+ global $browser;
+
+ if ($browser->hasFeature('javascript')) {
+ Util::closeWindowJS();
+ } else {
+ $url = Util::getFormData('url');
+
+ if (!empty($url)) {
+ $location = Horde::applicationUrl($url, true);
+ } else {
+ $url = Util::addParameter($prefs->getValue('defaultview') . '.php', 'month', Util::getFormData('month'));
+ $url = Util::addParameter($url, 'year', Util::getFormData('year'));
+ $location = Horde::applicationUrl($url, true);
+ }
+
+ // Make sure URL is unique.
+ $location = Util::addParameter($location, 'unique', md5(microtime()));
+
+ header('Location: ' . $location);
+ }
+ break;
+}
+
+$form_handler = Horde::applicationUrl('savedattlist.php');
+require KRONOLITH_TEMPLATES . '/savedattlist/savedattlist.inc';
+require $GLOBALS['registry']->get('templates', 'horde') . '/common-footer.inc';
diff -r 848f241f83e0 kronolith/templates/attendees/attendees.inc
--- a/kronolith/templates/attendees/attendees.inc Thu Nov 29 10:56:04 2007 +0100
+++ b/kronolith/templates/attendees/attendees.inc Thu Nov 29 11:32:43 2007 +0100
@@ -92,6 +92,8 @@ function switchDateView(view, timestamp)
<div>
<input type="submit" class="button" name="addNew" value="<?php echo htmlspecialchars(_("Save Attendees")) ?>" />
+
+ <?php if (!empty($attendees)): ?><?php endif; ?>
<?php if (!empty($attendees)): ?><?php endif; ?>
</div>
diff -r 848f241f83e0 kronolith/templates/javascript/open_savedattlist_win.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/kronolith/templates/javascript/open_savedattlist_win.js Thu Nov 29 11:32:43 2007 +0100
@@ -0,0 +1,36 @@
+<?php if (!strstr($_SERVER['PHP_SELF'], 'javascript.php')): ?><script language="JavaScript" type="text/javascript">
+<!--
+<?php endif; ?>
+function open_savedattlist_win(args)
+{
+ var url = "<?php echo Horde::url($GLOBALS['registry']->applicationWebPath('%application%/savedattlist.php', 'kronolith')) ?>";
+ if (url.indexOf('?') == -1) glue = '?';
+ else glue = '<?php echo ini_get('arg_separator.output') ?>';
+ var now = new Date();
+ var name = "savedattlist_window_" + now.getTime();
+ if (args != "") {
+ url = url + glue + args + '<?php echo ini_get('arg_separator.output') ?>' + "uniq=" + now.getTime();
+ } else {
+ url = url + glue + "uniq=" + now.getTime();
+ }
+ var Width = screen.width;
+ if (Width > 775) {
+ Width = 700;
+ } else {
+ Width -= 75;
+ }
+ var Height = screen.height;
+ if (Height > 725) {
+ Height = 650;
+ } else {
+ Height -= 75;
+ }
+ param = "toolbar=no,location=no,status=yes,scrollbars=yes,resizable=yes,width=" + Width + ",height=" + Height + ",left=0,top=0";
+ name = window.open(url, name, param);
+ if (!eval("name.opener")) {
+ name.opener = self;
+ }
+}
+<?php if (!strstr($_SERVER['PHP_SELF'], 'javascript.php')): ?>// -->
+</script>
+<?php endif; ?>
diff -r 848f241f83e0 kronolith/templates/savedattlist/savedattlist.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/kronolith/templates/savedattlist/savedattlist.inc Thu Nov 29 11:32:43 2007 +0100
@@ -0,0 +1,68 @@
+<!-- javascript action handling -->
+<script language="JavaScript" type="text/javascript">
+<!--
+function performAction(id, value)
+{
+ document.savedattlistForm.actionID.value = id;
+ document.savedattlistForm.actionValue.value = value;
+ document.savedattlistForm.submit();
+ return false;
+}
+
+function updateMessage(list)
+{
+ if (parent.opener.closed) {
+ alert('<?php echo addslashes(_("The Edit Attendees screen is no longer present. Exiting.")) ?>');
+ this.close();
+ return;
+ }
+
+ if (!parent.opener.document.attendeesForm) {
+ alert('<?php echo addslashes(_("You can only use this form from the Edit Attendees screen.")) ?>');
+ this.close();
+ return;
+ }
+
+ parent.opener.document.attendeesForm.newAttendees.value = list;
+ this.close();
+}
+// -->
+</script>
+
+<form method="post" action="<?php echo $form_handler; ?>" name="savedattlistForm">
+<?php Util::pformInput(); ?>
+<input type="hidden" name="actionID" value="" />
+<input type="hidden" name="actionValue" value="" />
+
+<div align="center">
+
+<table border="0" width="500" cellspacing="0" cellpadding="2">
+
+<!-- header -->
+<tr><td colspan="4" class="header"><b><?php echo $title ?></b></td></tr>
+
+<!-- attendee list header -->
+<tr class="item">
+ <td nowrap="nowrap" width="2%" align="center"><?php echo $loadimg ?></td>
+ <td nowrap="nowrap" width="2%" align="center"><?php echo $delimg ?></td>
+ <td nowrap="nowrap" width="96%"><b><?php echo htmlspecialchars(_("Attendees")) ?></b></td>
+</tr>
+
+<!-- attendees -->
+<?php $i = 0 ?>
+<?php if (empty($savedattlist)): ?>
+ <tr class="item<?php echo ($i++ % 2) ?>"><td align="center" colspan="3"><i><?php echo htmlspecialchars('-- ' . _("No saved attendee lists are available") . ' --') ?></i></td></tr>
+<?php else: foreach ($savedattlist as $index => $list): ?>
+ <tr class="item<?php echo ($i++ % 2) ?>">
+ <?php
+ echo '<td align="center">', Horde::link("javascript:updateMessage('" . addslashes(implode(', ', $list)) . "')", _("Load this list")), $loadimg, "</a></td>";
+ ?>
+ <?php
+ echo '<td align="center">', Horde::link("javascript:performAction('remove', '" . $index . "')", _("Remove this list")), $delimg, "</a></td>";
+ ?>
+ <td><?php echo implode(', ', $list); ?></td>
+ </tr>
+<?php endforeach; endif; ?>
+</table>
+</div>
+</form>
++++++ kronolith-h3-2.3.5-php5_exec.diff ++++++
Index: scripts/import_icals.php
===================================================================
--- scripts/import_icals.php.orig
+++ scripts/import_icals.php
@@ -1,4 +1,4 @@
-#!/usr/bin/php
+#!/usr/bin/php5