gunnar: server/kolab-webclient ChangeLog, 1.10.2.21, 1.10.2.22 Makefile, 1.6.2.3, 1.6.2.4 activesync_conf.patch, 1.1.2.2, 1.1.2.3 kolab-webclient.spec, 1.23.2.23, 1.23.2.24
cvs at kolab.org
cvs at kolab.org
Tue Jun 8 21:17:13 CEST 2010
Author: gunnar
Update of /kolabrepository/server/kolab-webclient
In directory doto:/tmp/cvs-serv20720
Modified Files:
Tag: kolab_2_2_branch
ChangeLog Makefile activesync_conf.patch kolab-webclient.spec
Log Message:
Added alternatepackageversionthat provides an activesync
configuration frontend.
Index: ChangeLog
===================================================================
RCS file: /kolabrepository/server/kolab-webclient/Attic/ChangeLog,v
retrieving revision 1.10.2.21
retrieving revision 1.10.2.22
diff -u -d -r1.10.2.21 -r1.10.2.22
--- ChangeLog 3 Dec 2009 09:52:25 -0000 1.10.2.21
+++ ChangeLog 8 Jun 2010 19:17:10 -0000 1.10.2.22
@@ -1,3 +1,10 @@
+2010-06-08 Gunnar Wrobel <p at rdus.de>
+
+ * kolab-webclient.spec:
+
+ Added alternate package version that provides an activesync
+ configuration frontend.
+
2009-12-03 Gunnar Wrobel <p at rdus.de>
* kolab-webclient.spec: kolab/issue3846 (fix recurring events that
Index: Makefile
===================================================================
RCS file: /kolabrepository/server/kolab-webclient/Attic/Makefile,v
retrieving revision 1.6.2.3
retrieving revision 1.6.2.4
diff -u -d -r1.6.2.3 -r1.6.2.4
--- Makefile 2 Jun 2010 19:06:32 -0000 1.6.2.3
+++ Makefile 8 Jun 2010 19:17:10 -0000 1.6.2.4
@@ -68,15 +68,15 @@
$(RPM) -Uhv --force $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).$(PLATTAG).rpm
.PHONY: all-activesync
-all-activesync: $(PACKAGE)-$(VERSION)-$(RELEASE)+activesync1.src.rpm
+all-activesync: $(PACKAGE)-$(VERSION)-$(RELEASE)+activesync3.src.rpm
.PHONY: dist-activesync
dist-activesync: all-activesync
- cp $(PACKAGE)-$(VERSION)-$(RELEASE)+activesync1.src.rpm ../stage/
+ cp $(PACKAGE)-$(VERSION)-$(RELEASE)+activesync3.src.rpm ../stage/
-$(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE)+activesync1.$(PLATTAG).rpm $(PACKAGE)-$(VERSION)-$(RELEASE)+activesync1.src.rpm: Makefile $(PACKAGE).spec $(TEMPLATES) $(CONFIGS) ChangeLog
+$(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE)+activesync3.$(PLATTAG).rpm $(PACKAGE)-$(VERSION)-$(RELEASE)+activesync3.src.rpm: Makefile $(PACKAGE).spec $(TEMPLATES) $(CONFIGS) ChangeLog
test -d $(KOLABRPMSRC)/$(PACKAGE) || mkdir $(KOLABRPMSRC)/$(PACKAGE)
- cd $(KOLABRPMSRC)/$(PACKAGE) && wget -c "$(SOURCE_0)" && wget -c "$(SOURCE_1)"
+ cd $(KOLABRPMSRC)/$(PACKAGE) #&& wget -c "$(SOURCE_0)" && wget -c "$(SOURCE_1)"
for PATCH in $(PATCHES); do \
cp "$$PATCH" $(KOLABRPMSRC)/$(PACKAGE); done
@@ -99,4 +99,4 @@
cd $(KOLABRPMSRC)/$(PACKAGE) && $(RPM) -ba $(PACKAGE).spec --define 'with_activesync yes'
- cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE)+activesync1.src.rpm .
+ cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE)+activesync3.src.rpm .
Index: activesync_conf.patch
===================================================================
RCS file: /kolabrepository/server/kolab-webclient/Attic/activesync_conf.patch,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -d -r1.1.2.2 -r1.1.2.3
--- activesync_conf.patch 6 Jun 2010 08:50:51 -0000 1.1.2.2
+++ activesync_conf.patch 8 Jun 2010 19:17:10 -0000 1.1.2.3
@@ -158,15 +158,18 @@
diff -Naur a/calendars/edit.php b/calendars/edit.php
--- a/kronolith/calendars/edit.php 2010-05-04 22:00:35.670897983 +0200
+++ b/kronolith/calendars/edit.php 2010-05-06 07:45:36.406431213 +0200
-@@ -46,7 +46,6 @@
- $notification->push(sprintf(_("The calendar \"%s\" has been saved."), $original_name), 'horde.success');
- }
- }
--
+@@ -26,10 +26,6 @@
+ $notification->push($calendar, 'horde.error');
header('Location: ' . Horde::applicationUrl('calendars/', true));
exit;
+-} elseif ($calendar->get('owner') != Auth::getAuth()) {
+- $notification->push(_("You are not allowed to change this calendar."), 'horde.error');
+- header('Location: ' . Horde::applicationUrl('calendars/', true));
+- exit;
}
-@@ -57,6 +56,26 @@
+ $form = new Kronolith_EditCalendarForm($vars, $calendar);
+
+@@ -57,6 +56,25 @@
if (isset($params['fbrelevance'])) {
$vars->set('fbrelevance', $params['fbrelevance']);
}
@@ -184,10 +187,9 @@
+ $folders = $params['activesync']['FOLDER'];
+ $vars->set('activesync_devices', implode('|', array_keys($devices)));
+ foreach ($devices as $id => $config) {
-+ $vars->set('activesync_' . $id . '_sync', isset($folders[$id]['SYNC']) ? $folders[$id]['SYNC'] : $default);
-+ $vars->set('activesync_' . $id . '_alarm', isset($folders[$id]['ALARM']) ? $folders[$id]['ALARM'] : $default);
++ $vars->set('activesync_' . $id, isset($folders[$id]['S']) ? $folders[$id]['S'] : $default);
+ }
-+ $form->activeSyncSegment($devices, $default);
++ $form->activeSyncSegment($devices);
+ }
+}
$title = $form->getTitle();
@@ -196,41 +198,66 @@
diff -Naur a/lib/Forms/EditCalendar.php b/lib/Forms/EditCalendar.php
--- a/kronolith/lib/Forms/EditCalendar.php 2010-05-04 22:00:36.210910903 +0200
+++ b/kronolith/lib/Forms/EditCalendar.php 2010-05-05 10:30:48.073386331 +0200
-@@ -49,13 +49,40 @@
+@@ -40,22 +40,57 @@
+ parent::Horde_Form($vars, sprintf(_("Edit %s"), $calendar->get('name')));
+
+ $this->addHidden('', 'c', 'text', true);
+- $this->addVariable(_("Name"), 'name', 'text', true);
++ if ($this->_calendar->get('owner') != Auth::getAuth()) {
++ $this->addVariable(_("Name"), 'name', 'text', false, true);
++ $this->addVariable(_("Description"), 'description', 'longtext', false, true);
++ } else {
++ $this->addVariable(_("Name"), 'name', 'text', true);
++ $this->addVariable(_("Description"), 'description', 'longtext', false, false, null, array(4, 60));
++ }
+- $this->addVariable(_("Description"), 'description', 'longtext', false, false, null, array(4, 60));
+- $this->addVariable(_("Relevance"), 'fbrelevance', 'radio', false, false, null,
+- array(array('owners/administrators', 'readers', 'no one'),
+- 'This calendar is only included into the free/busy data for ...'));
++ if ($this->_calendar->get('owner') == Auth::getAuth()) {
++ $this->addVariable(_("Relevance"), 'fbrelevance', 'radio', false, false, null,
++ array(array(_("owners/administrators"), _("readers"), _("no one")),
++ 'This calendar is only included into the free/busy data for ...'));
++ }
+
$this->setButtons(array(_("Save")));
}
-+ function activeSyncSegment($devices, $default)
++ function activeSyncSegment($devices)
+ {
+ $this->addHidden('', 'activesync_devices', 'text');
+ $this->addVariable('', '', 'spacer');
-+ $this->addVariable(_("Synchronize this calendar with the following ActiveSync devices"), '', 'header');
-+ foreach ($devices as $id => $config) {
-+ $this->addVariable($id, 'activesync_' . $id . '_sync', 'boolean', false);
-+ }
-+ $this->addVariable('', '', 'spacer');
-+ $this->addVariable(_("Activate alarms for this calendar on the following ActiveSync devices"), '', 'header');
++ $this->addVariable(_("Synchronization options for ActiveSync devices"), '', 'header');
+ foreach ($devices as $id => $config) {
-+ $this->addVariable($id, 'activesync_' . $id . '_alarm', 'boolean', false);
++ $this->addVariable(sprintf("Device \"%s\"", $id), 'activesync_' . $id, 'radio', false, false, null,
++ array(array(_("does not synchronize with this calendar"), _("synchronizes with this calendar but ignores alarms"), _("synchronizes with this calendar including alarms"))));
+ }
+ }
+
function execute()
{
- $original_name = $this->_calendar->get('name');
- $new_name = $this->_vars->get('name');
- $this->_calendar->set('name', $new_name);
+- $original_name = $this->_calendar->get('name');
+- $new_name = $this->_vars->get('name');
+- $this->_calendar->set('name', $new_name);
$this->_calendar->set('desc', $this->_vars->get('description'));
- $this->_calendar->set('params', serialize(array('fbrelevance' => (int) $this->_vars->get('fbrelevance', 0))));
-+ $params = array('fbrelevance' => (int) $this->_vars->get('fbrelevance', 0));
++
++ $original_name = $this->_calendar->get('name');
++ if ($this->_calendar->get('owner') == Auth::getAuth()) {
++ $new_name = $this->_vars->get('name');
++ $this->_calendar->set('name', $new_name);
++ $params = array('fbrelevance' => (int) $this->_vars->get('fbrelevance', 0));
++ } else {
++ $new_name = $original_name;
++ }
+
+ if ($this->_vars->get('activesync_devices', '')) {
+ $ids = explode('|', $this->_vars->get('activesync_devices', ''));
+ foreach ($ids as $id) {
-+ $sync = $this->_vars->get('activesync_' . $id . '_sync');
-+ $alarm = $this->_vars->get('activesync_' . $id . '_alarm');
-+ $params['activesync']['FOLDER'][$id]['SYNC'] = empty($sync) ? 0 : 1;
-+ $params['activesync']['FOLDER'][$id]['ALARM'] = empty($alarm) ? 0 : 1;
++ $sync = (int) $this->_vars->get('activesync_' . $id, 0);
++ if ($sync === 0 || $sync === 1 || $sync === 2) {
++ $params['activesync']['FOLDER'][$id]['S'] = $sync;
++ }
+ }
+ }
+
@@ -241,38 +268,50 @@
diff -Naur a/lib/Forms/EditNotepad.php b/lib/Forms/EditNotepad.php
--- a/mnemo/lib/Forms/EditNotepad.php 2010-05-10 08:25:30.000000000 +0200
+++ b/mnemo/lib/Forms/EditNotepad.php 2010-05-10 08:28:09.000000000 +0200
-@@ -46,10 +46,38 @@
+@@ -40,16 +40,47 @@
+ parent::Horde_Form($vars, sprintf(_("Edit %s"), $notepad->get('name')));
+
+ $this->addHidden('', 'n', 'text', true);
+- $this->addVariable(_("Name"), 'name', 'text', true);
++ if ($this->_notepad->get('owner') != Auth::getAuth()) {
++ $this->addVariable(_("Name"), 'name', 'text', false, true);
++ $this->addVariable(_("Description"), 'description', 'longtext', false, true);
++ } else {
++ $this->addVariable(_("Name"), 'name', 'text', true);
++ $this->addVariable(_("Description"), 'description', 'longtext', false, false, null, array(4, 60));
++ }
+- $this->addVariable(_("Description"), 'description', 'longtext', false, false, null, array(4, 60));
+
$this->setButtons(array(_("Save")));
}
-+ function activeSyncSegment($devices, $default)
++ function activeSyncSegment($devices)
+ {
+ $this->addHidden('', 'activesync_devices', 'text');
+ $this->addVariable('', '', 'spacer');
-+ $this->addVariable(_("Synchronize this calendar with the following ActiveSync devices"), '', 'header');
-+ foreach ($devices as $id => $config) {
-+ $this->addVariable($id, 'activesync_' . $id . '_sync', 'boolean', false);
-+ }
-+ $this->addVariable('', '', 'spacer');
-+ $this->addVariable(_("Activate alarms for this calendar on the following ActiveSync devices"), '', 'header');
++ $this->addVariable(_("Synchronization options for ActiveSync devices"), '', 'header');
+ foreach ($devices as $id => $config) {
-+ $this->addVariable($id, 'activesync_' . $id . '_alarm', 'boolean', false);
++ $this->addVariable(sprintf("Device \"%s\"", $id), 'activesync_' . $id, 'radio', false, false, null,
++ array(array(_("does not synchronize with this notepad"), _("synchronizes with this notepad"))));
+ }
+ }
+
function execute()
{
- $this->_notepad->set('name', $this->_vars->get('name'));
+- $this->_notepad->set('name', $this->_vars->get('name'));
++ if ($this->_notepad->get('owner') == Auth::getAuth()) {
++ $this->_notepad->set('name', $this->_vars->get('name'));
++ }
$this->_notepad->set('desc', $this->_vars->get('description'));
+
+ if ($this->_vars->get('activesync_devices', '')) {
+ $params = array();
+ $ids = explode('|', $this->_vars->get('activesync_devices', ''));
+ foreach ($ids as $id) {
-+ $sync = $this->_vars->get('activesync_' . $id . '_sync');
-+ $alarm = $this->_vars->get('activesync_' . $id . '_alarm');
-+ $params['activesync']['FOLDER'][$id]['SYNC'] = empty($sync) ? 0 : 1;
-+ $params['activesync']['FOLDER'][$id]['ALARM'] = empty($alarm) ? 0 : 1;
++ $sync = (int) $this->_vars->get('activesync_' . $id, 0);
++ if ($sync === 0 || $sync === 1 || $sync === 2) {
++ $params['activesync']['FOLDER'][$id]['S'] = $sync;
++ }
+ }
+ $this->_notepad->set('params', serialize($params));
+ }
@@ -283,7 +322,18 @@
diff -Naur a/notepads/edit.php b/notepads/edit.php
--- a/mnemo/notepads/edit.php 2010-05-10 08:25:30.000000000 +0200
+++ b/mnemo/notepads/edit.php 2010-05-10 08:28:19.000000000 +0200
-@@ -51,6 +51,29 @@
+@@ -24,10 +24,6 @@
+ $notification->push($notepad, 'horde.error');
+ header('Location: ' . Horde::applicationUrl('notepads/', true));
+ exit;
+-} elseif ($notepad->get('owner') != Auth::getAuth()) {
+- $notification->push(_("You are not allowed to change this notepad."), 'horde.error');
+- header('Location: ' . Horde::applicationUrl('notepads/', true));
+- exit;
+ }
+ $form = new Mnemo_EditNotepadForm($vars, $notepad);
+
+@@ -51,6 +51,28 @@
$vars->set('name', $notepad->get('name'));
$vars->set('description', $notepad->get('desc'));
@@ -303,10 +353,9 @@
+ $folders = $params['activesync']['FOLDER'];
+ $vars->set('activesync_devices', implode('|', array_keys($devices)));
+ foreach ($devices as $id => $config) {
-+ $vars->set('activesync_' . $id . '_sync', isset($folders[$id]['SYNC']) ? $folders[$id]['SYNC'] : $default);
-+ $vars->set('activesync_' . $id . '_alarm', isset($folders[$id]['ALARM']) ? $folders[$id]['ALARM'] : $default);
++ $vars->set('activesync_' . $id, isset($folders[$id]['S']) ? $folders[$id]['S'] : $default);
+ }
-+ $form->activeSyncSegment($devices, $default);
++ $form->activeSyncSegment($devices);
+ }
+}
+
@@ -316,7 +365,18 @@
diff -Naur a/addressbooks/edit.php b/addressbooks/edit.php
--- a/turba/addressbooks/edit.php 2010-05-10 08:30:03.000000000 +0200
+++ b/turba/addressbooks/edit.php 2010-05-10 08:31:19.000000000 +0200
-@@ -53,6 +53,29 @@
+@@ -24,10 +24,6 @@
+ $notification->push($addressbook, 'horde.error');
+ header('Location: ' . Horde::applicationUrl('addressbooks/', true));
+ exit;
+-} elseif ($addressbook->get('owner') != Auth::getAuth()) {
+- $notification->push(_("You are not allowed to change this addressbook."), 'horde.error');
+- header('Location: ' . Horde::applicationUrl('addressbooks/', true));
+- exit;
+ }
+ $form = new Mnemo_EditAddressbookForm($vars, $addressbook);
+
+@@ -53,6 +53,28 @@
$vars->set('name', $addressbook->get('name'));
$vars->set('description', $addressbook->get('desc'));
@@ -336,10 +396,9 @@
+ $folders = $params['activesync']['FOLDER'];
+ $vars->set('activesync_devices', implode('|', array_keys($devices)));
+ foreach ($devices as $id => $config) {
-+ $vars->set('activesync_' . $id . '_sync', isset($folders[$id]['SYNC']) ? $folders[$id]['SYNC'] : $default);
-+ $vars->set('activesync_' . $id . '_alarm', isset($folders[$id]['ALARM']) ? $folders[$id]['ALARM'] : $default);
++ $vars->set('activesync_' . $id, isset($folders[$id]['S']) ? $folders[$id]['S'] : $default);
+ }
-+ $form->activeSyncSegment($devices, $default);
++ $form->activeSyncSegment($devices);
+ }
+}
+
@@ -349,38 +408,53 @@
diff -Naur a/lib/Forms/EditAddressBook.php b/lib/Forms/EditAddressBook.php
--- a/turba/lib/Forms/EditAddressBook.php 2010-05-10 08:30:05.000000000 +0200
+++ b/turba/lib/Forms/EditAddressBook.php 2010-05-10 08:32:28.000000000 +0200
-@@ -46,10 +46,38 @@
+@@ -40,16 +40,50 @@
+ parent::Horde_Form($vars, sprintf(_("Edit %s"), $addressbook->get('name')));
+
+ $this->addHidden('', 'a', 'text', true);
+- $this->addVariable(_("Name"), 'name', 'text', true);
++ if ($this->_addressbook->get('owner') != Auth::getAuth()) {
++ $this->addVariable(_("Name"), 'name', 'text', false, true);
++ $this->addVariable(_("Description"), 'description', 'longtext', false, true);
++ } else {
++ $this->addVariable(_("Name"), 'name', 'text', true);
++ $this->addVariable(_("Description"), 'description', 'longtext', false, false, null, array(4, 60));
++ }
+- $this->addVariable(_("Description"), 'description', 'longtext', false, false, null, array(4, 60));
+
$this->setButtons(array(_("Save")));
}
-+ function activeSyncSegment($devices, $default)
++ function activeSyncSegment($devices)
+ {
+ $this->addHidden('', 'activesync_devices', 'text');
+ $this->addVariable('', '', 'spacer');
-+ $this->addVariable(_("Synchronize this calendar with the following ActiveSync devices"), '', 'header');
-+ foreach ($devices as $id => $config) {
-+ $this->addVariable($id, 'activesync_' . $id . '_sync', 'boolean', false);
-+ }
-+ $this->addVariable('', '', 'spacer');
-+ $this->addVariable(_("Activate alarms for this calendar on the following ActiveSync devices"), '', 'header');
++ $this->addVariable(_("Synchronization options for ActiveSync devices"), '', 'header');
+ foreach ($devices as $id => $config) {
-+ $this->addVariable($id, 'activesync_' . $id . '_alarm', 'boolean', false);
++ $this->addVariable(sprintf("Device \"%s\"", $id), 'activesync_' . $id, 'radio', false, false, null,
++ array(array(_("does not synchronize with this addressbook"), _("synchronizes with this addressbook"))));
+ }
+ }
+
function execute()
{
- $this->_addressbook->set('name', $this->_vars->get('name'));
+- $this->_addressbook->set('name', $this->_vars->get('name'));
++ if ($this->_addressbook->get('owner') == Auth::getAuth()) {
++ $this->_addressbook->set('name', $this->_vars->get('name'));
++ }
$this->_addressbook->set('desc', $this->_vars->get('description'));
+
+ if ($this->_vars->get('activesync_devices', '')) {
-+ $params = array();
++ $params = @unserialize($this->_addressbook->get('params'));
++ if ($params === false) {
++ $params = array();
++ }
+ $ids = explode('|', $this->_vars->get('activesync_devices', ''));
+ foreach ($ids as $id) {
-+ $sync = $this->_vars->get('activesync_' . $id . '_sync');
-+ $alarm = $this->_vars->get('activesync_' . $id . '_alarm');
-+ $params['activesync']['FOLDER'][$id]['SYNC'] = empty($sync) ? 0 : 1;
-+ $params['activesync']['FOLDER'][$id]['ALARM'] = empty($alarm) ? 0 : 1;
++ $sync = (int) $this->_vars->get('activesync_' . $id, 0);
++ if ($sync === 0 || $sync === 1 || $sync === 2) {
++ $params['activesync']['FOLDER'][$id]['S'] = $sync;
++ }
+ }
+ $this->_addressbook->set('params', serialize($params));
+ }
@@ -391,38 +465,50 @@
diff -Naur a/lib/Forms/EditTaskList.php b/lib/Forms/EditTaskList.php
--- a/nag/lib/Forms/EditTaskList.php 2010-05-10 08:10:16.000000000 +0200
+++ b/nag/lib/Forms/EditTaskList.php 2010-05-10 08:18:34.000000000 +0200
-@@ -46,10 +46,38 @@
+@@ -40,16 +40,47 @@
+ parent::Horde_Form($vars, sprintf(_("Edit %s"), $tasklist->get('name')));
+
+ $this->addHidden('', 't', 'text', true);
+- $this->addVariable(_("Task List Name"), 'name', 'text', true);
++ if ($this->_tasklist->get('owner') != Auth::getAuth()) {
++ $this->addVariable(_("Task List Name"), 'name', 'text', false, true);
++ $this->addVariable(_("Task List Description"), 'description', 'longtext', false, true);
++ } else {
++ $this->addVariable(_("Task List Name"), 'name', 'text', true);
++ $this->addVariable(_("Task List Description"), 'description', 'longtext', false, false, null, array(4, 60));
++ }
+- $this->addVariable(_("Task List Description"), 'description', 'longtext', false, false, null, array(4, 60));
+
$this->setButtons(array(_("Save")));
}
-+ function activeSyncSegment($devices, $default)
++ function activeSyncSegment($devices)
+ {
+ $this->addHidden('', 'activesync_devices', 'text');
+ $this->addVariable('', '', 'spacer');
+ $this->addVariable(_("Synchronize this calendar with the following ActiveSync devices"), '', 'header');
+ foreach ($devices as $id => $config) {
-+ $this->addVariable($id, 'activesync_' . $id . '_sync', 'boolean', false);
-+ }
-+ $this->addVariable('', '', 'spacer');
-+ $this->addVariable(_("Activate alarms for this calendar on the following ActiveSync devices"), '', 'header');
-+ foreach ($devices as $id => $config) {
-+ $this->addVariable($id, 'activesync_' . $id . '_alarm', 'boolean', false);
++ $this->addVariable(sprintf("Device \"%s\"", $id), 'activesync_' . $id, 'radio', false, false, null,
++ array(array(_("does not synchronize with this tasklist"), _("synchronizes with this tasklist but ignores alarms"), _("synchronizes with this tasklist including alarms"))));
+ }
+ }
+
function execute()
{
- $this->_tasklist->set('name', $this->_vars->get('name'));
+- $this->_tasklist->set('name', $this->_vars->get('name'));
++ if ($this->_tasklist->get('owner') == Auth::getAuth()) {
++ $this->_tasklist->set('name', $this->_vars->get('name'));
++ }
$this->_tasklist->set('desc', $this->_vars->get('description'));
+
+ if ($this->_vars->get('activesync_devices', '')) {
+ $params = array();
+ $ids = explode('|', $this->_vars->get('activesync_devices', ''));
+ foreach ($ids as $id) {
-+ $sync = $this->_vars->get('activesync_' . $id . '_sync');
-+ $alarm = $this->_vars->get('activesync_' . $id . '_alarm');
-+ $params['activesync']['FOLDER'][$id]['SYNC'] = empty($sync) ? 0 : 1;
-+ $params['activesync']['FOLDER'][$id]['ALARM'] = empty($alarm) ? 0 : 1;
++ $sync = (int) $this->_vars->get('activesync_' . $id, 0);
++ if ($sync === 0 || $sync === 1 || $sync === 2) {
++ $params['activesync']['FOLDER'][$id]['S'] = $sync;
++ }
+ }
+ $this->_tasklist->set('params', serialize($params));
+ }
@@ -433,7 +519,18 @@
diff -Naur a/tasklists/edit.php b/tasklists/edit.php
--- a/nag/tasklists/edit.php 2010-05-10 08:10:16.000000000 +0200
+++ b/nag/tasklists/edit.php 2010-05-10 08:22:49.000000000 +0200
-@@ -51,6 +51,29 @@
+@@ -24,10 +24,6 @@
+ $notification->push($tasklist, 'horde.error');
+ header('Location: ' . Horde::applicationUrl('tasklists/', true));
+ exit;
+-} elseif ($tasklist->get('owner') != Auth::getAuth()) {
+- $notification->push(_("You are not allowed to change this task list."), 'horde.error');
+- header('Location: ' . Horde::applicationUrl('tasklists/', true));
+- exit;
+ }
+ $form = new Nag_EditTaskListForm($vars, $tasklist);
+
+@@ -51,6 +51,28 @@
$vars->set('name', $tasklist->get('name'));
$vars->set('description', $tasklist->get('desc'));
@@ -453,10 +550,9 @@
+ $folders = $params['activesync']['FOLDER'];
+ $vars->set('activesync_devices', implode('|', array_keys($devices)));
+ foreach ($devices as $id => $config) {
-+ $vars->set('activesync_' . $id . '_sync', isset($folders[$id]['SYNC']) ? $folders[$id]['SYNC'] : $default);
-+ $vars->set('activesync_' . $id . '_alarm', isset($folders[$id]['ALARM']) ? $folders[$id]['ALARM'] : $default);
++ $vars->set('activesync_' . $id, isset($folders[$id]['S']) ? $folders[$id]['S'] : $default);
+ }
-+ $form->activeSyncSegment($devices, $default);
++ $form->activeSyncSegment($devices);
+ }
+}
+
@@ -479,7 +575,16 @@
diff -Naur a/framework/Kolab_Storage/lib/Horde/Kolab/Storage.orig/Folder.php b/framework/Kolab_Storage/lib/Horde/Kolab/Storage/Folder.php
--- a/lib/Horde/Kolab/Storage/Folder.php 2010-05-04 23:44:49.522328256 +0200
+++ b/lib/Horde/Kolab/Storage/Folder.php 2010-05-06 07:46:01.507036608 +0200
-@@ -412,13 +412,23 @@
+@@ -390,7 +390,7 @@
+
+ /** Handle the folder type */
+ $folder_type = $this->_type . ($this->_default ? '.default' : '');
+- if ($this->_type_annotation != $folder_type) {
++ if ($this->_owner == Auth::getAuth() && $this->_type_annotation != $folder_type) {
+ $result = $this->_setAnnotation(KOLAB_ANNOT_FOLDER_TYPE, $folder_type);
+ if (is_a($result, 'PEAR_Error')) {
+ $this->_type = null;
+@@ -412,19 +412,38 @@
if (is_a($result, 'PEAR_Error')) {
return $result;
}
@@ -499,10 +604,35 @@
+ }
+ unset($params['activesync']);
+ }
++ if (empty($params)) {
++ continue;
++ }
+ $value = serialize($params);
}
// setAnnotation apparently does not suppoort UTF-8 nor any special characters
+ $store = base64_encode($value);
+ if ($key == 'desc') {
+- $entry = '/comment';
++ if ($this->_owner == Auth::getAuth()) {
++ $entry = '/comment';
++ } else {
++ continue;
++ }
++ } else if ($key == 'params' && $this->_owner != Auth::getAuth()) {
++ continue;
+ } else {
+ $entry = HORDE_ANNOT_SHARE_ATTR . $key;
+ }
+@@ -447,7 +450,7 @@
+ }
+
+ /** Now save the folder permissions */
+- if (isset($this->_perms)) {
++ if ($this->_owner == Auth::getAuth() && isset($this->_perms)) {
+ $result = $this->_perms->save();
+ if (is_a($result, 'PEAR_Error')) {
+ return $result;
@@ -1645,6 +1655,132 @@
return $this->_setAnnotation(KOLAB_ANNOT_ROOT . 'pxfb-readable-for',
$value);
Index: kolab-webclient.spec
===================================================================
RCS file: /kolabrepository/server/kolab-webclient/Attic/kolab-webclient.spec,v
retrieving revision 1.23.2.23
retrieving revision 1.23.2.24
diff -u -d -r1.23.2.23 -r1.23.2.24
--- kolab-webclient.spec 6 Jun 2010 08:50:51 -0000 1.23.2.23
+++ kolab-webclient.spec 8 Jun 2010 19:17:10 -0000 1.23.2.24
@@ -8,14 +8,19 @@
%define V_source_version 1.2
%define V_passwd_version 3.0.1
%define V_date %{V_year}-%{V_month}-%{V_day}
+
+# Package Information
+Name: %{V_package}
+
+# package options
+%option with_activesync no
+
%if "%{with_activesync}" == "no"
%define V_release %{V_year}%{V_month}%{V_day}
%else
-%define V_release %{V_year}%{V_month}%{V_day}+activesync2
+%define V_release %{V_year}%{V_month}%{V_day}+activesync3
%endif
-# Package Information
-Name: %{V_package}
Summary: The Kolab Groupware web client (based on horde)
URL: http://www.kolab.org/
Packager: Gunnar Wrobel <wrobel at pardus.de> (p at rdus)
@@ -24,9 +29,6 @@
License: GPL
Group: MAIL
Distribution: OpenPKG
-
-# package options
-%option with_activesync no
# List of Sources
Source0: http://ftp.horde.org/pub/%{V_horde_name}/%{V_horde_name}-%{V_source_version}.tar.gz
More information about the commits
mailing list