From rick at emery.homelinux.net Mon May 12 10:28:23 2003 From: rick at emery.homelinux.net (Rick Emery) Date: Mon May 12 06:21:59 2003 Subject: [dev] horde & php_accelerator In-Reply-To: <1052503988.462de2da51164@my.oblo.com> References: <1052503988.462de2da51164@my.oblo.com> Message-ID: <1052746103.6705f092dce53@www.emery.homelinux.net> Quoting Marko Djukic : > anyone running phpa? any observations? > > anyone done any horde performance increase studies? > > marko I haven't done any studies, or even timed page loads, but I can tell you that there is a *very* noticeable difference with phpa (a difference between about 6 seconds without, and 1 second with when viewing mail messages). Rick From eric.rostetter at physics.utexas.edu Mon May 12 11:32:24 2003 From: eric.rostetter at physics.utexas.edu (Eric Rostetter) Date: Mon May 12 11:32:43 2003 Subject: [dev] Re: [cvs] commit: horde/config nls.php.dist In-Reply-To: <20030512001125.14D0814C@arkady.horde.org> References: <20030512001125.14D0814C@arkady.horde.org> Message-ID: <1052764344.f0059169df8cc@mail.ph.utexas.edu> Quoting Jan Schneider : > TIS-620 seems to be multibyte, no idea how much bytes though. TIS-620 should be single byte. -- Eric Rostetter The Department of Physics The University of Texas at Austin Why get even? Get odd! From jan at horde.org Mon May 12 15:16:49 2003 From: jan at horde.org (Jan Schneider) Date: Mon May 12 15:17:13 2003 Subject: [dev] Re: [cvs] commit: horde/config nls.php.dist In-Reply-To: <1052764344.f0059169df8cc@mail.ph.utexas.edu> References: <20030512001125.14D0814C@arkady.horde.org> <1052764344.f0059169df8cc@mail.ph.utexas.edu> Message-ID: <1052777809.e6022fb271cbf@jan.dip.ammma.net> Zitat von Eric Rostetter : > Quoting Jan Schneider : > > > TIS-620 seems to be multibyte, no idea how much bytes though. > > TIS-620 should be single byte. Thanks for clarifying this. What looks to me like one Thai character obviously are several ones. ;-) Jan. -- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft From jrust at rustyparts.com Mon May 12 16:40:08 2003 From: jrust at rustyparts.com (Jason Rust) Date: Mon May 12 16:35:19 2003 Subject: [dev] Patch for kronolith legends Message-ID: <20030512234007.GA22782@rustyparts.com> Attached is a patch that implements a category legend for the different calendars displayed. This allows the user to know what a color for a category means when viewing the month/day/week view (idea was taken from the imp legend) I also found that there is no way for a user to have more than 1 legend even if the user has created 2 different calendars. I'm thinking that the category editor in kronolith should dynamically load a different legend when the calendar is changed (via a select box). The functionality would be similar to the calendar editor. Does this sound like the correct way to go about implementing this functionality? -Jason -------------- next part -------------- Index: lib/Kronolith.php =================================================================== RCS file: /repository/kronolith/lib/Kronolith.php,v retrieving revision 1.136 diff -u -r1.136 Kronolith.php --- lib/Kronolith.php 20 Apr 2003 16:19:21 -0000 1.136 +++ lib/Kronolith.php 12 May 2003 23:26:31 -0000 @@ -852,6 +852,41 @@ } /** + * Builds the category legend for the displayed calendars + * + * @return string The html table for the legend + */ + function buildCategoryLegend() + { + if (count($GLOBALS['display_calendars']) == 0) { + return ''; + } + + $colors = Kronolith::categoryColors(); + $html = ''; + $html .= ''; + foreach (Kronolith::listCalendars() as $id => $cal) { + if (in_array($id, $GLOBALS['display_calendars'])) { + $categories = Kronolith::listCategories($id); + $html .= ''; + foreach ($categories as $catKey => $catName) { + $categoryColor = isset($colors[$id][$catKey]) ? $colors[$id][$catKey] : '#ccccff'; + $html .= ''; + $html .= '' . "\n"; + + } + $html .= '' . "\n"; + } + } + $html .= '
' . $cal->getShareName() . ':'; + $html .= ' ' . $catName . '
' . "\n"; + return $html; + } + + /** * List all calendars a user has access to. * * @param optional boolean $owneronly Only return calenders that this Index: templates/day/foot.inc =================================================================== RCS file: /repository/kronolith/templates/day/foot.inc,v retrieving revision 1.1 diff -u -r1.1 foot.inc --- templates/day/foot.inc 11 Aug 2000 22:18:08 -0000 1.1 +++ templates/day/foot.inc 12 May 2003 23:26:31 -0000 @@ -1 +1,7 @@ +'; +echo Kronolith::buildCategoryLegend(); +echo ''; +?> Index: month.php =================================================================== RCS file: /repository/kronolith/month.php,v retrieving revision 1.113 diff -u -r1.113 month.php --- month.php 3 Jan 2003 02:17:40 -0000 1.113 +++ month.php 12 May 2003 23:26:31 -0000 @@ -163,10 +163,9 @@ $dayofweek++; } } -?> - - - - +'; +echo Kronolith::buildCategoryLegend(); +echo ''; require KRONOLITH_TEMPLATES . '/common-footer.inc'; From abu at trabas.com Mon May 12 19:14:55 2003 From: abu at trabas.com (abu) Date: Mon May 12 20:04:43 2003 Subject: [dev] Typo in horde-2.2.2/lib/Cipher/BlockMode/ofb64.php Message-ID: <20030513021455.GA17927@trabas.com> class Horde_Cipher_BlockMode_ofb64 extends Horde_Cipher_BlockMode { function encrypt(&$cipher, $plaintext) { $encrypted = ''; $n = 0; $jMax = strlen($plaintext); for ($j = 0; $j < $jMax); $j++) { ^^^^ -- i think, no need ')' here.. if ($n == 0) { $this->_iv = $cipher->encryptBlock($this->_iv); } $c = $plaintext[$j] ^ $this->_iv[$n]; $encrypted .= $c; $n = (++$n) & 0x07; } return $encrypted; } -az From jan at horde.org Tue May 13 02:05:55 2003 From: jan at horde.org (Jan Schneider) Date: Tue May 13 02:34:16 2003 Subject: [dev] Typo in horde-2.2.2/lib/Cipher/BlockMode/ofb64.php In-Reply-To: <20030513021455.GA17927@trabas.com> References: <20030513021455.GA17927@trabas.com> Message-ID: <1052816755.c260c38ae721c@jan.dip.ammma.net> Zitat von abu : > class Horde_Cipher_BlockMode_ofb64 extends Horde_Cipher_BlockMode { > > function encrypt(&$cipher, $plaintext) > { > $encrypted = ''; > > $n = 0; > $jMax = strlen($plaintext); > > for ($j = 0; $j < $jMax); $j++) { > ^^^^ > > > -- i think, no need ')' here.. This has been fixed already in Horde 2.2.3. Jan. -- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft From marko at oblo.com Tue May 13 04:29:38 2003 From: marko at oblo.com (Marko Djukic) Date: Tue May 13 04:30:05 2003 Subject: [dev] gettext + Horde_Templates Message-ID: <1052825378.181f0798a49dc@my.oblo.com> the one problem with Horde_Templates is having text in templates that can be picked up for inclusion in .po and eventual translation. jan, you were saying that you want to stick with the native php gettext support which relies only on _() tags if i understood right. one thing that doesn't seem to make sense to me is how it could support something which is XML-like (and nothing to do with php) as is the case with Horde_Templates? does it seems a case of mixing apples and oranges? m. From SGrondin at csbf.qc.ca Tue May 13 06:25:13 2003 From: SGrondin at csbf.qc.ca (Serge Grondin) Date: Tue May 13 06:24:15 2003 Subject: [dev] Undefined variable: recips Message-ID: <3EC0F239.F5D035FF@csbf.qc.ca> Hi, I have the following error in my php log when people "bounce" message in IMP RELENG_3. PHP Notice: Undefined variable: recips in /.../horde/imp/compose.php on line 688 Here is the solution. [root@courriel imp]# cvs diff -u compose.php Index: compose.php =================================================================== RCS file: /repository/imp/compose.php,v retrieving revision 2.369.2.58 diff -u -r2.369.2.58 compose.php --- compose.php 27 Mar 2003 17:23:01 -0000 2.369.2.58 +++ compose.php 13 May 2003 12:58:29 -0000 @@ -685,7 +685,7 @@ $recipients = $f_to = format_addresses($f_to); /* Check for 8-bit characters in addresses. */ - foreach (IMP::bareAddress($recips, true) as $val) { + foreach (IMP::bareAddress($recipients, true) as $val) { if (MIME::is8bit($val)) { Horde::raiseMessage(_("Invalid character in e-mail address."), HORDE_ERROR); $get_sig = false; And there is a inconsistency in the name of that variable, In "BOUNCE_MESSAGE", it's called $recipients and in "SEND_MESSAGE", it's $recips. Thanks for the good work. -- Serge Grondin Technicien en Informatique Commission Scolaire des Bois-Francs Tel. bur.: (819) 758-6453, poste 2920 e-Mail bur.: SGrondin@csbf.qc.ca From chuck at horde.org Tue May 13 06:26:10 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Tue May 13 06:30:30 2003 Subject: [dev] Undefined variable: recips In-Reply-To: <3EC0F239.F5D035FF@csbf.qc.ca> References: <3EC0F239.F5D035FF@csbf.qc.ca> Message-ID: <1052832370.f5fb93f8b9708@marina.horde.org> Quoting Serge Grondin : > I have the following error in my php log when people "bounce" message in > IMP RELENG_3. > > PHP Notice: Undefined variable: recips in /.../horde/imp/compose.php > on line 688 > > Here is the solution. Committed, thanks. -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From mathieu.clabaut at free.fr Tue May 13 06:44:28 2003 From: mathieu.clabaut at free.fr (Mathieu CLABAUT) Date: Tue May 13 06:44:47 2003 Subject: [dev] hylafax web gateway with horde ? Message-ID: I've searched through marc, but found nothing... Did you ever heard of somebody working to an application aimed to be a web fax gateway under horde framework ? Thanks for any informations available... -mathieu -- ________________http://www.gnu.org/philosophy/no-word-attachments.fr.html Mathieu CLABAUT mailto:mathieu.clabaut@free.fr F2F5 442F F2AC E1D5 9D31 3EFC 842A BC4A 123B 9A65 From chuck at horde.org Tue May 13 06:41:17 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Tue May 13 06:45:46 2003 Subject: [dev] hylafax web gateway with horde ? In-Reply-To: References: Message-ID: <1052833277.1020b6749e6d2@marina.horde.org> Quoting Mathieu CLABAUT : > Did you ever heard of somebody working to an application aimed to be a > web fax gateway under horde framework ? I've heard interest and vague implications of work numerous times, but I haven't seen any code. -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From marko at oblo.com Tue May 13 06:50:25 2003 From: marko at oblo.com (Marko Djukic) Date: Tue May 13 06:50:50 2003 Subject: [dev] hylafax web gateway with horde ? In-Reply-To: <1052833277.1020b6749e6d2@marina.horde.org> References: <1052833277.1020b6749e6d2@marina.horde.org> Message-ID: <1052833825.c4652cc84f515@my.oblo.com> Quoting Chuck Hagenbuch : > Quoting Mathieu CLABAUT : > > > Did you ever heard of somebody working to an application aimed to be a > > web fax gateway under horde framework ? > > I've heard interest and vague implications of work numerous times, but I > haven't seen any code. > > -chuck did some tests months ago, but nothing concrete. would love to do some interface to hylafax. marko From mathieu.clabaut at free.fr Tue May 13 07:16:20 2003 From: mathieu.clabaut at free.fr (Mathieu CLABAUT) Date: Tue May 13 07:16:40 2003 Subject: [dev] hylafax web gateway with horde ? In-Reply-To: <1052833277.1020b6749e6d2@marina.horde.org> References: <1052833277.1020b6749e6d2@marina.horde.org> Message-ID: On Tue, 13 May 2003, Chuck Hagenbuch wrote: > Quoting Mathieu CLABAUT : > > Did you ever heard of somebody working to an application aimed to be a > > web fax gateway under horde framework ? > I've heard interest and vague implications of work numerous times, but I > haven't seen any code. Ahhh, yes.. this is the more common case (I myself have speak about a CD burning application... Got some code, but nothing usable... Still there for some days with more free time :-/ ) Here is one more interested person.... But you'll have to wait for some code ... Sorry :-( -mathieu -- ________________http://www.gnu.org/philosophy/no-word-attachments.fr.html Mathieu CLABAUT mailto:mathieu.clabaut@free.fr F2F5 442F F2AC E1D5 9D31 3EFC 842A BC4A 123B 9A65 From mathieu.clabaut at free.fr Tue May 13 07:18:05 2003 From: mathieu.clabaut at free.fr (Mathieu CLABAUT) Date: Tue May 13 07:18:26 2003 Subject: [dev] hylafax web gateway with horde ? In-Reply-To: <1052833825.c4652cc84f515@my.oblo.com> References: <1052833277.1020b6749e6d2@marina.horde.org> <1052833825.c4652cc84f515@my.oblo.com> Message-ID: On Tue, 13 May 2003, Marko Djukic wrote: > Quoting Chuck Hagenbuch : > > > Did you ever heard of somebody working to an application aimed to be a > > > web fax gateway under horde framework ? > > I've heard interest and vague implications of work numerous times, but I > > haven't seen any code. > did some tests months ago, but nothing concrete. would love to do some > interface to hylafax. Yes.. It would be nice... I dare to be beta tester :-) I'll keep you inform if something concrete appear on my side ... -mat -- ________________http://www.gnu.org/philosophy/no-word-attachments.fr.html Mathieu CLABAUT mailto:mathieu.clabaut@free.fr F2F5 442F F2AC E1D5 9D31 3EFC 842A BC4A 123B 9A65 From chuck at horde.org Tue May 13 12:07:24 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Tue May 13 12:11:55 2003 Subject: [dev] Fwd: Re: [kronolith] Re: Re: latest cvs adding calendars fail Message-ID: <1052852844.966a1be24e44d@marina.horde.org> ----- Forwarded message from jrust@rustyparts.com ----- Date: Tue, 13 May 2003 14:15:34 -0500 From: Jason Rust Reply-To: Jason Rust Subject: Re: [kronolith] Re: Re: latest cvs adding calendars fail To: Chuck Hagenbuch On 2003.05.13 14:34:52 +0000, Chuck Hagenbuch wrote: > Quoting Chuck Hagenbuch : > > > > ["message"]=> string(30) "Unsupported serialization type" > > ["userinfo"]=> > > > > Ah. Do you have an older Horde, by chance? > > Or, I think I remember Jan saying that either mbstring or iconv was required > for the categories stuff to work properly now... Jan? That sounds like the problem. From horde/lib/String.php: * Works only if either the iconv or the mbstring extension * are present and best if both are available. * The original string is returned if conversion failed or * none of the extensions were available. Maybe a fatal error should be thrown in neither are present to avoid confusion in the future? -Jason ----- End forwarded message ----- -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From SGrondin at csbf.qc.ca Tue May 13 13:08:44 2003 From: SGrondin at csbf.qc.ca (Serge Grondin) Date: Tue May 13 13:07:45 2003 Subject: [dev] Undefine property: host and mailbox Message-ID: <3EC150CC.50E2D970@csbf.qc.ca> Hi, In IMP RELENG_3 with Horde RELENG_2 and Turba RELENG_1, I have the following error in my php log when I send an email with a list ex: List name : My-buddy Content of list: "John Doe" "Jane Doe" PHP Notice: Undefined property: host in /..../horde/imp/lib/IMP.php on line 634 PHP Notice: Undefined property: mailbox in /..../horde/imp/lib/IMP.php on line 634 PHP Notice: Undefined property: host in /..../horde/imp/lib/IMP.php on line 634 However, the message got sent to all the recipients. If you can point me in the right direction to finding how to get rid of these, I will try to find a solution and send a patch to correct this. Thanks -- Serge Grondin Technicien en Informatique Commission Scolaire des Bois-Francs Tel. bur.: (819) 758-6453, poste 2920 e-Mail bur.: SGrondin@csbf.qc.ca From jrust at rustyparts.com Tue May 13 13:44:49 2003 From: jrust at rustyparts.com (Jason Rust) Date: Tue May 13 13:39:55 2003 Subject: [dev] Patch for hiding invite link Message-ID: <20030513204449.GA31792@rustyparts.com> Attached is a patch that hides the Invite link on the view event page if the user has no valid email addresses in their list of identities. Since the user would not be able to send an invite anyhow if they have no valid from_adresses it saves them the confusion and trouble of trying to invite someone to an event. -Jason -- http://www.rustyparts.com/ ferrous oxidation -------------- next part -------------- Index: viewevent.php =================================================================== RCS file: /repository/kronolith/viewevent.php,v retrieving revision 1.16 diff -u -r1.16 viewevent.php --- viewevent.php 17 Apr 2003 16:34:44 -0000 1.16 +++ viewevent.php 13 May 2003 20:32:23 -0000 @@ -87,7 +87,19 @@ $mylinks[] = Horde::link($editurl, sprintf(_("Edit '%s'"), $event->getTitle()), 'menuitem') . _("Edit") . ''; } -if (Auth::getAuth()) { +// Only show invite link if they are logged on and have an +// identity with a from_addr +require_once HORDE_BASE . '/lib/Identity.php'; +$ident = &new Identity(); +$tmp_emails = $ident->getAll('from_addr'); +$hasEmail = false; +foreach ($tmp_emails as $tmp_email) { + if (!empty($tmp_email)) { + $hasEmail = true; + break; + } +} +if ($hasEmail && Auth::getAuth()) { $inviteurl = Horde::addParameter('invite.php', 'calendar', Horde::getFormData('calendar')); $inviteurl = Horde::addParameter($inviteurl, 'url', Horde::selfURL(true)); if (Horde::getFormData('calendar') != '**remote') { From jrust at rustyparts.com Tue May 13 15:52:59 2003 From: jrust at rustyparts.com (Jason Rust) Date: Tue May 13 15:48:13 2003 Subject: [dev] Re: Patch for creator permissions in horde and kronolith In-Reply-To: <20030508183543.GC7728@rustyparts.com> References: <20030508183543.GC7728@rustyparts.com> Message-ID: <20030513225259.GA2003@rustyparts.com> > The attached patch implements what I have dubbed "creator permissions" > in horde and kronolith. In horde it adds the functionality of being able to > specify that the creator of an event or item can edit, delete, read, > etc. their event. I then implemented the features of this new > permission into kronolith by storing the user id of the person who > creates an event and passing that information to the hasPermission() > function. Other applications who don't want to take advantage of this > feature would not be affected since it is an optional argument that is > ignored if not passed in. Attached is version 2 of the creator permissions. Some bugs were found with the first patch and in addition I implemented a feature to show the name of the owner of an event in the view page. -Jason -------------- next part -------------- Index: admin/perms.php =================================================================== RCS file: /repository/horde/admin/perms.php,v retrieving revision 1.21 diff -u -r1.21 perms.php --- admin/perms.php 12 Nov 2002 20:21:24 -0000 1.21 +++ admin/perms.php 13 May 2003 21:24:58 -0000 @@ -168,6 +168,34 @@ } } + // Process creator permissions. + if (Horde::getFormData('creator_deny')) { + $permission->removeCreatorPermission(_PERMS_SHOW | _PERMS_READ | _PERMS_EDIT | _PERMS_DELETE, false); + $permission->addCreatorPermission(_PERMS_NONE, false); + } else { + $permission->removeCreatorPermission(_PERMS_NONE, false); + if (Horde::getFormData('creator_show')) { + $permission->addCreatorPermission(_PERMS_SHOW, false); + } else { + $permission->removeCreatorPermission(_PERMS_SHOW, false); + } + if (Horde::getFormData('creator_read')) { + $permission->addCreatorPermission(_PERMS_READ, false); + } else { + $permission->removeCreatorPermission(_PERMS_READ, false); + } + if (Horde::getFormData('creator_edit')) { + $permission->addCreatorPermission(_PERMS_EDIT, false); + } else { + $permission->removeCreatorPermission(_PERMS_EDIT, false); + } + if (Horde::getFormData('creator_delete')) { + $permission->addCreatorPermission(_PERMS_DELETE, false); + } else { + $permission->removeCreatorPermission(_PERMS_DELETE, false); + } + } + // Process user permissions. $u_names = Horde::getFormData('u_names'); $u_deny = Horde::getFormData('u_deny'); Index: kronolith/addeventaction.php =================================================================== RCS file: /repository/kronolith/addeventaction.php,v retrieving revision 1.36 diff -u -r1.36 addeventaction.php --- kronolith/addeventaction.php 8 May 2003 13:31:18 -0000 1.36 +++ kronolith/addeventaction.php 13 May 2003 21:24:58 -0000 @@ -14,13 +14,13 @@ if (!Horde::getFormData('cancel')) { $calendar_id = Horde::getFormData('targetcalendar', $prefs->getValue('default_share')); $share = &$shares->getShare($calendar_id); + $calendar->open($calendar_id); + $event = $calendar->getEventObject(); if (is_a($share, 'PEAR_Error')) { $notification->push(sprintf(_("There was an error accessing the calendar: %s"), $share->getMessage()), 'horde.error'); - } elseif (!$share->hasPermission(Auth::getAuth(), _PERMS_EDIT)) { + } elseif (!$share->hasPermission(Auth::getAuth(), _PERMS_EDIT, $event->getCreatorID())) { $notification->push(sprintf(_("You do not have permission to add events to %s."), $share->getShareName()), 'horde.warning'); } else { - $calendar->open($calendar_id); - $event = $calendar->getEventObject(); $event->readForm(); $event->save(); } Index: kronolith/deleventaction.php =================================================================== RCS file: /repository/kronolith/deleventaction.php,v retrieving revision 1.7 diff -u -r1.7 deleventaction.php --- kronolith/deleventaction.php 17 Apr 2003 16:34:44 -0000 1.7 +++ kronolith/deleventaction.php 13 May 2003 21:24:58 -0000 @@ -23,7 +23,7 @@ exit; } $share = &$shares->getShare($event->getCalendar()); - if (!$share->hasPermission(Auth::getAuth(), _PERMS_DELETE)) { + if (!$share->hasPermission(Auth::getAuth(), _PERMS_DELETE, $event->getCreatorID())) { $notification->push(_("You do not have permission to delete this event."), 'horde.warning'); } else { if ($event->hasRecurType(KRONOLITH_RECUR_NONE) || Horde::getFormData('all')) { Index: kronolith/editevent.php =================================================================== RCS file: /repository/kronolith/editevent.php,v retrieving revision 1.36 diff -u -r1.36 editevent.php --- kronolith/editevent.php 6 Jan 2003 23:20:21 -0000 1.36 +++ kronolith/editevent.php 13 May 2003 21:24:58 -0000 @@ -40,13 +40,13 @@ $buttons = array(); $share = &$GLOBALS['shares']->getShare(Horde::getFormData('calendar')); -if (Horde::getFormData('calendar') == '**remote' || !$share->hasPermission(Auth::getAuth(), _PERMS_EDIT)) { +if (Horde::getFormData('calendar') == '**remote' || !$share->hasPermission(Auth::getAuth(), _PERMS_EDIT, $event->getCreatorID())) { $buttons[] = ''; } else { $buttons[] = ''; if ($event->isInitialized()) { $buttons[] = ''; - if ($share->hasPermission(Auth::getAuth(), _PERMS_DELETE)) { + if ($share->hasPermission(Auth::getAuth(), _PERMS_DELETE, $event->getCreatorID())) { $delurl = Horde::addParameter('delevent.php', 'eventID=' . $event->getID()); $delurl = Horde::addParameter($delurl, 'calendar=' . $event->getCalendar()); $delurl = Horde::addParameter($delurl, 'month=' . $month); Index: kronolith/editeventaction.php =================================================================== RCS file: /repository/kronolith/editeventaction.php,v retrieving revision 1.43 diff -u -r1.43 editeventaction.php --- kronolith/editeventaction.php 10 May 2003 00:46:12 -0000 1.43 +++ kronolith/editeventaction.php 13 May 2003 21:24:58 -0000 @@ -33,8 +33,6 @@ if (is_a($share, 'PEAR_Error')) { $notification->push(sprintf(_("There was an error accessing the calendar: %s"), $share->getMessage()), 'horde.error'); - } elseif (!$share->hasPermission(Auth::getAuth(), _PERMS_EDIT)) { - $notification->push(_("You do not have permission to edit this event."), 'horde.warning'); } else { if (Horde::getFormData('saveAsNew')) { $calendar->open($target); @@ -61,8 +59,12 @@ $event = $calendar->getEventObject(Horde::getFormData('eventID')); } } - $event->readForm(); - $event->save(); + if (!$share->hasPermission(Auth::getAuth(), _PERMS_EDIT, $event->getCreatorID())) { + $notification->push(_("You do not have permission to edit this event."), 'horde.warning'); + } else { + $event->readForm(); + $event->save(); + } } } } Index: kronolith/lib/Event.php =================================================================== RCS file: /repository/kronolith/lib/Event.php,v retrieving revision 1.82 diff -u -r1.82 Event.php --- kronolith/lib/Event.php 7 May 2003 15:14:12 -0000 1.82 +++ kronolith/lib/Event.php 13 May 2003 21:24:59 -0000 @@ -25,6 +25,12 @@ var $eventID = null; /** + * The user id of the creator of the event + * @var string $creatorID + */ + var $creatorID = null; + + /** * The title of this event, * @var string $title */ @@ -198,6 +204,10 @@ */ function fromHash($hash) { + // see if it's a new event + if (is_null($this->getID())) { + $this->setCreatorID(Auth::getAuth()); + } if (!empty($hash['title'])) { $this->setTitle($hash['title']); } @@ -410,6 +420,26 @@ } /** + * Retrieve the id of the user who created the event + * + * @return string The creator id + */ + function getCreatorID() + { + return $this->creatorID; + } + + /** + * Set the id of the creator of the event + * + * @param string $creatorID The user id for who created the event + */ + function setCreatorID($creatorID) + { + $this->creatorID = $creatorID; + } + + /** * Retrieve the globally unique identifier for this event. * * @return integer The globally identifier for this event. @@ -435,7 +465,7 @@ } $share = &$GLOBALS['shares']->getShare($this->getCalendar()); - if (!is_a($share, 'PEAR_Error') && $share->hasPermission(Auth::getAuth(), _PERMS_READ)) { + if (!is_a($share, 'PEAR_Error') && $share->hasPermission(Auth::getAuth(), _PERMS_READ, $this->getCreatorID())) { return !empty($this->title) ? $this->title : _("[none]"); } else { global $prefs; @@ -649,6 +679,11 @@ { global $prefs; + // see if it's a new event + if (is_null($this->getID())) { + $this->setCreatorID(Auth::getAuth()); + } + // Basic fields. $this->setTitle(Horde::getFormData('title', $this->title)); $this->setDescription(Horde::getFormData('description', $this->description)); @@ -1039,7 +1074,7 @@ $share = &$GLOBALS['shares']->getShare($this->getCalendar()); $link = ''; - if (!is_a($share, 'PEAR_Error') && $share->hasPermission(Auth::getAuth(), _PERMS_READ)) { + if (!is_a($share, 'PEAR_Error') && $share->hasPermission(Auth::getAuth(), _PERMS_READ, $this->getCreatorID())) { if (isset($this->remoteCal)) { $url = Horde::addParameter('viewevent.php', 'eventID=' . $this->eventIndex); $url = Horde::addParameter($url, 'calendar=**remote'); @@ -1060,7 +1095,7 @@ $link .= @htmlspecialchars($this->getTitle(), ENT_QUOTES, NLS::getCharset()); - if (!is_a($share, 'PEAR_Error') && $share->hasPermission(Auth::getAuth(), _PERMS_READ) && + if (!is_a($share, 'PEAR_Error') && $share->hasPermission(Auth::getAuth(), _PERMS_READ, $this->getCreatorID()) && (isset($this->eventID) || isset($this->taskID) || isset($this->remoteCal))) { $link .= ''; } @@ -1070,7 +1105,7 @@ $link .= Horde::img('alarm_small.gif', sprintf(_("%s Minutes before"), $this->alarm)); } if (!$print_view) { - if (!is_a($share, 'PEAR_Error') && $share->hasPermission(Auth::getAuth(), _PERMS_DELETE)) { + if (!is_a($share, 'PEAR_Error') && $share->hasPermission(Auth::getAuth(), _PERMS_DELETE, $this->getCreatorID())) { if (isset($this->eventID)) { $url = Horde::addParameter('delevent.php', 'eventID=' . $this->eventID); $url = Horde::addParameter($url, 'calendar=' . $this->getCalendar()); Index: kronolith/lib/Driver/mcal.php =================================================================== RCS file: /repository/kronolith/lib/Driver/mcal.php,v retrieving revision 1.42 diff -u -r1.42 mcal.php --- kronolith/lib/Driver/mcal.php 27 Feb 2003 17:45:37 -0000 1.42 +++ kronolith/lib/Driver/mcal.php 13 May 2003 21:24:59 -0000 @@ -140,6 +140,7 @@ mcal_event_set_title($driver->_stream, $this->getTitle()); mcal_event_set_description($driver->_stream, $this->getDescription()); mcal_event_set_category($driver->_stream, $this->getCategory()); + mcal_event_add_attribute($driver->_stream, 'creator_id', $this->getCreatorID()); mcal_event_add_attribute($driver->_stream, 'location', $this->getLocation()); mcal_event_add_attribute($driver->_stream, 'keywords', implode(',', $this->getKeywords())); mcal_event_add_attribute($driver->_stream, 'exceptions', implode(',', $this->getExceptions())); @@ -220,6 +221,9 @@ } if (isset($mcalEvent->description)) { $this->description = $mcalEvent->description; + } + if (isset($mcalEvent->attrlist['creator_id'])) { + $this->creatorID = $mcalEvent->attrlist['creator_id']; } if (isset($mcalEvent->attrlist['location'])) { $this->location = $mcalEvent->attrlist['location']; Index: kronolith/lib/Driver/sql.php =================================================================== RCS file: /repository/kronolith/lib/Driver/sql.php,v retrieving revision 1.84 diff -u -r1.84 sql.php --- kronolith/lib/Driver/sql.php 8 May 2003 20:49:08 -0000 1.84 +++ kronolith/lib/Driver/sql.php 13 May 2003 21:24:59 -0000 @@ -131,7 +131,7 @@ ' event_keywords, event_title, event_category,' . ' event_recurtype, event_recurenddate, event_recurinterval,' . ' event_recurdays, event_start, event_end, event_alarm,' . - ' event_modified, event_exceptions' . + ' event_modified, event_exceptions, event_creator_id' . ' FROM ' . $this->_params['table'] . ' WHERE event_id = ' . (int)$eventID . ' AND calendar_id = ' . $this->_db->quote($this->_calendar), @@ -483,6 +483,7 @@ $this->title = String::convertCharset($SQLEvent['event_title'], $driver->_params['charset']); $this->eventID = $SQLEvent['event_id']; + $this->creatorID = $SQLEvent['event_creator_id']; $this->recurType = (int)$SQLEvent['event_recurtype']; $this->recurInterval = (int)$SQLEvent['event_recurinterval']; @@ -516,6 +517,7 @@ $driver = &$this->getDriver(); // Basic fields. + $this->_properties['event_creator_id'] = String::convertCharset($this->getCreatorID(), NLS::getCharset(), $driver->_params['charset']); $this->_properties['event_title'] = String::convertCharset($this->getTitle(), NLS::getCharset(), $driver->_params['charset']); $this->_properties['event_description'] = String::convertCharset($this->getDescription(), NLS::getCharset(), $driver->_params['charset']); $this->_properties['event_category'] = $this->getCategory(); Index: kronolith/scripts/drivers/kronolith.sql =================================================================== RCS file: /repository/kronolith/scripts/drivers/kronolith.sql,v retrieving revision 1.10 diff -u -r1.10 kronolith.sql --- kronolith/scripts/drivers/kronolith.sql 27 Feb 2003 17:34:23 -0000 1.10 +++ kronolith/scripts/drivers/kronolith.sql 13 May 2003 21:24:59 -0000 @@ -3,6 +3,7 @@ CREATE TABLE kronolith_events ( event_id BIGINT DEFAULT 0 NOT NULL, calendar_id VARCHAR(255) NOT NULL, + event_creator_id VARCHAR(255) NOT NULL, event_description TEXT, event_location TEXT, event_keywords TEXT, Index: kronolith/scripts/drivers/kronolith.oracle.sql =================================================================== RCS file: /repository/kronolith/scripts/drivers/kronolith.oracle.sql,v retrieving revision 1.2 diff -u -r1.2 kronolith.oracle.sql --- kronolith/scripts/drivers/kronolith.oracle.sql 31 Aug 2002 22:14:42 -0000 1.2 +++ kronolith/scripts/drivers/kronolith.oracle.sql 13 May 2003 21:24:59 -0000 @@ -3,6 +3,7 @@ CREATE TABLE kronolith_events ( event_id INT DEFAULT 0 NOT NULL, calendar_id VARCHAR2(255) NOT NULL, + event_creator_id VARCHAR2(255) NOT NULL, event_description VARCHAR2(4000), event_location VARCHAR2(4000), event_keywords VARCHAR2(4000), Index: kronolith/scripts/drivers/kronolith.postgres.sql =================================================================== RCS file: /repository/kronolith/scripts/drivers/kronolith.postgres.sql,v retrieving revision 1.1 diff -u -r1.1 kronolith.postgres.sql --- kronolith/scripts/drivers/kronolith.postgres.sql 21 Mar 2003 03:15:46 -0000 1.1 +++ kronolith/scripts/drivers/kronolith.postgres.sql 13 May 2003 21:24:59 -0000 @@ -3,6 +3,7 @@ CREATE TABLE kronolith_events ( event_id BIGINT DEFAULT 0 NOT NULL, calendar_id VARCHAR(255) NOT NULL, + event_creator_id VARCHAR(255) NOT NULL, event_description TEXT, event_location TEXT, event_keywords TEXT, Index: lib/Perms.php =================================================================== RCS file: /repository/horde/lib/Perms.php,v retrieving revision 1.36 diff -u -r1.36 Perms.php --- lib/Perms.php 19 Apr 2003 22:59:27 -0000 1.36 +++ lib/Perms.php 13 May 2003 21:25:00 -0000 @@ -194,11 +194,12 @@ * CategoryObject_Permission object. * @param string $user (optional) The user to check for. * Defaults to Auth::getAuth(). + * @param string $creator (optional) The user who created the event. * * @return integer Any permissions the user has, _PERMS_NONE if there * are none. */ - function getPermissions($permission, $user = null) + function getPermissions($permission, $user = null, $creator = null) { if (!is_a($permission, 'CategoryObject_Permission')) { $permission = &$this->getPermission($permission); @@ -245,6 +246,20 @@ return $perms; } + // if there is no creator, then assume the current + // user will be the creator (likely it's an add) + if (empty($creator)) { + $creator = Auth::getAuth(); + } + + // if the user is the creator of the event see if + // there are creator permissions + if (!empty($user) && $user == $creator && + ($perms = $permission->getCreatorPermissions()) !== null) { + return $perms; + } + + // If there are default permissions, return them. if (($perms = $permission->getDefaultPermissions()) !== null) { return $perms; @@ -272,13 +287,14 @@ * @param string $permission The permission to check. * @param string $user The user to check for. * @param int $perm The permission level that needs to be checked for. + * @param string $creator (optional) The creator of the event * * @return boolean True if the user has the specified permissions, and * false otherwise. */ - function hasPermission($permission, $user, $perm) + function hasPermission($permission, $user, $perm, $creator = null) { - return ($this->getPermissions($permission, $user) & $perm); + return ($this->getPermissions($permission, $user, $creator) & $perm); } /** @@ -403,6 +419,25 @@ } /** + * Grant creators additional permissions to this object. + * + * @param constant $permisson The permission (_PERMS_DELE, etc.) to add. + * @param boolean $update (optional) Whether to automatically update the + * backend. Defaults to true. + */ + function addCreatorPermission($permission, $update = true) + { + if (isset($this->data['creator'])) { + $this->data['creator'] |= $permission; + } else { + $this->data['creator'] = $permission; + } + if ($update) { + $this->_permsOb->updatePermission($this); + } + } + + /** * Grant additional default permissions to this object. * * @param constant $permisson The permission (_PERMS_DELE, etc.) to add. @@ -486,6 +521,23 @@ } /** + * Remove a permission that creators currently have on this object. + * + * @param constant $permisson The permission (_PERMS_DELE, etc.) to remove. + * @param boolean $update (optional) Whether to automatically update the + * backend. Defaults to true. + */ + function removeCreatorPermission($permission, $update = true) + { + if (isset($this->data['creator'])) { + $this->data['creator'] &= ~$permission; + if ($update) { + $this->_permsOb->updatePermission($this); + } + } + } + + /** * Remove a default permission on this object. * * @param constant $permisson The permission (_PERMS_DELE, etc.) to remove. @@ -555,6 +607,18 @@ { return !empty($this->data['guest']) ? $this->data['guest'] : + null; + } + + /** + * Get the creator permissions on this object. + * + * @return integer The creator permissions on this object. + */ + function getCreatorPermissions() + { + return !empty($this->data['creator']) ? + $this->data['creator'] : null; } Index: lib/Share.php =================================================================== RCS file: /repository/horde/lib/Share.php,v retrieving revision 1.35 diff -u -r1.35 Share.php --- lib/Share.php 26 Apr 2003 17:32:13 -0000 1.35 +++ lib/Share.php 13 May 2003 21:25:00 -0000 @@ -487,10 +487,11 @@ * * @param string $userid The userid of the user * @param constant $priv A _PERMS_* constant to test for + * @param string $creator (optional) The creator of the event * * @return boolean Whether or not $userid has $permission. */ - function hasPermission($userid, $permission) + function hasPermission($userid, $permission, $creator = null) { if ($userid == $this->getOwner()) { return true; @@ -500,7 +501,7 @@ return false; } - return $this->_perms->hasPermission($this->getPermission(), $userid, $permission); + return $this->_perms->hasPermission($this->getPermission(), $userid, $permission, $creator); } /** Index: shares/edit.php =================================================================== RCS file: /repository/horde/shares/edit.php,v retrieving revision 1.7 diff -u -r1.7 edit.php --- shares/edit.php 7 May 2003 17:45:33 -0000 1.7 +++ shares/edit.php 13 May 2003 21:25:00 -0000 @@ -148,6 +148,34 @@ } } + // Process creator permissions. + if (Horde::getFormData('creator_deny')) { + $perm->removeCreatorPermission(_PERMS_SHOW | _PERMS_READ | _PERMS_EDIT | _PERMS_DELETE, false); + $perm->addCreatorPermission(_PERMS_NONE, false); + } else { + $perm->removeCreatorPermission(_PERMS_NONE, false); + if (Horde::getFormData('creator_show')) { + $perm->addCreatorPermission(_PERMS_SHOW, false); + } else { + $perm->removeCreatorPermission(_PERMS_SHOW, false); + } + if (Horde::getFormData('creator_read')) { + $perm->addCreatorPermission(_PERMS_READ, false); + } else { + $perm->removeCreatorPermission(_PERMS_READ, false); + } + if (Horde::getFormData('creator_edit')) { + $perm->addCreatorPermission(_PERMS_EDIT, false); + } else { + $perm->removeCreatorPermission(_PERMS_EDIT, false); + } + if (Horde::getFormData('creator_delete')) { + $perm->addCreatorPermission(_PERMS_DELETE, false); + } else { + $perm->removeCreatorPermission(_PERMS_DELETE, false); + } + } + // Process user permissions. $u_names = Horde::getFormData('u_names'); $u_deny = Horde::getFormData('u_deny'); Index: templates/shares/edit.inc =================================================================== RCS file: /repository/horde/templates/shares/edit.inc,v retrieving revision 1.5 diff -u -r1.5 edit.inc --- templates/shares/edit.inc 22 Apr 2003 15:57:51 -0000 1.5 +++ templates/shares/edit.inc 13 May 2003 21:25:00 -0000 @@ -106,6 +106,31 @@   + + + + + + + + + + + + +getCreatorPermissions(); ?> + +   + /> + /> + /> + /> + /> + + + +  + Index: templates/admin/perms/edit.inc =================================================================== RCS file: /repository/horde/templates/admin/perms/edit.inc,v retrieving revision 1.10 diff -u -r1.10 edit.inc --- templates/admin/perms/edit.inc 10 Feb 2003 16:00:51 -0000 1.10 +++ templates/admin/perms/edit.inc 13 May 2003 21:25:00 -0000 @@ -60,6 +60,31 @@   + + + + + + + + + + + + +getCreatorPermissions(); ?> + +   + /> + /> + /> + /> + /> + + + +  + Index: kronolith/viewevent.php =================================================================== RCS file: /repository/kronolith/viewevent.php,v retrieving revision 1.16 diff -u -r1.16 viewevent.php --- kronolith/viewevent.php 17 Apr 2003 16:34:44 -0000 1.16 +++ kronolith/viewevent.php 13 May 2003 22:42:58 -0000 @@ -64,7 +64,8 @@ $mylinks = array(); $isRemote = Horde::getFormData('calendar') == '**remote'; -if (!$isRemote && $share->hasPermission(Auth::getAuth(), _PERMS_DELETE)) { + +if (!$isRemote && $share->hasPermission(Auth::getAuth(), _PERMS_DELETE, $event->getCreatorID())) { $delurl = Horde::addParameter('delevent.php', 'eventID', $event->getID()); $delurl = Horde::addParameter($delurl, 'calendar', $event->getCalendar()); $delurl = Horde::addParameter($delurl, 'timestamp', $timestamp); @@ -72,7 +73,7 @@ $mylinks[] = Horde::link($delurl, sprintf(_("Delete '%s'"), $event->getTitle()), 'menuitem') . _("Delete") . ''; } -if ($isRemote || $share->hasPermission(Auth::getAuth(), _PERMS_EDIT)) { +if ($isRemote || $share->hasPermission(Auth::getAuth(), _PERMS_EDIT, $event->getCreatorID())) { $editurl = 'editevent.php'; if (Horde::getFormData('calendar') != '**remote') { $editurl = Horde::addParameter($editurl, 'eventID', $event->getID()); @@ -99,6 +112,16 @@ $inviteurl = Horde::applicationUrl($inviteurl); $mylinks[] = Horde::link($inviteurl, sprintf(_("Invite people to '%s'"), $event->getTitle()), 'menuitem') . _("Invite") . ''; +} + +// Determine owner's name +require_once HORDE_BASE . '/lib/Identity.php'; +$owner = $event->getCreatorID(); +$ident = &new Identity($owner); +$ident->setDefault($ident->getDefault()); +$tmp_name = $ident->getValue('fullname'); +if (!empty($tmp_name)) { + $owner = $tmp_name; } require KRONOLITH_TEMPLATES . '/view/view.inc'; Index: kronolith/templates/view/view.inc =================================================================== RCS file: /repository/kronolith/templates/view/view.inc,v retrieving revision 1.20 diff -u -r1.20 view.inc --- kronolith/templates/view/view.inc 28 Apr 2003 15:09:40 -0000 1.20 +++ kronolith/templates/view/view.inc 13 May 2003 22:42:58 -0000 @@ -30,6 +30,14 @@ + + + +    + + + +    From jan at horde.org Tue May 13 16:32:52 2003 From: jan at horde.org (Jan Schneider) Date: Tue May 13 16:33:10 2003 Subject: [dev] gettext + Horde_Templates In-Reply-To: <1052825378.181f0798a49dc@my.oblo.com> References: <1052825378.181f0798a49dc@my.oblo.com> Message-ID: <1052868772.27cea9a62aec5@jan.dip.ammma.net> Zitat von Marko Djukic : > the one problem with Horde_Templates is having text in templates that can > be > picked up for inclusion in .po and eventual translation. > > jan, you were saying that you want to stick with the native php gettext > support > which relies only on _() tags if i understood right. one thing that > doesn't > seem to make sense to me is how it could support something which is > XML-like > (and nothing to do with php) as is the case with Horde_Templates? > > does it seems a case of mixing apples and oranges? Just to let the list know: We found a way to handle translateable strings in XML files and will probably use this for the templates. Jan. -- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft From marko at oblo.com Tue May 13 16:40:27 2003 From: marko at oblo.com (Marko Djukic) Date: Tue May 13 16:40:48 2003 Subject: [dev] gettext + Horde_Templates In-Reply-To: <1052868772.27cea9a62aec5@jan.dip.ammma.net> References: <1052825378.181f0798a49dc@my.oblo.com> <1052868772.27cea9a62aec5@jan.dip.ammma.net> Message-ID: <1052869227.9d855e09affda@my.oblo.com> Quoting Jan Schneider : > Zitat von Marko Djukic : > > > the one problem with Horde_Templates is having text in templates that can > > be > > picked up for inclusion in .po and eventual translation. > > > > jan, you were saying that you want to stick with the native php gettext > > support > > which relies only on _() tags if i understood right. one thing that > > doesn't > > seem to make sense to me is how it could support something which is > > XML-like > > (and nothing to do with php) as is the case with Horde_Templates? > > > > does it seems a case of mixing apples and oranges? > > Just to let the list know: We found a way to handle translateable strings in > XML files and will probably use this for the templates. > > Jan. go jan, our i18n man! m. From jrust at rustyparts.com Tue May 13 17:00:17 2003 From: jrust at rustyparts.com (Jason Rust) Date: Tue May 13 16:55:19 2003 Subject: [dev] Patch for correct time in kronolith Message-ID: <20030514000017.GC2003@rustyparts.com> Attached is a patch which makes it so the current time is selected when a user clicks on the add event link. Before it was defaulting to 12:00am or 8:00am in some very rare cases. This patch makes adding an event a bit more outlook in the sense that the current time is already selected for you. -Jason -- http://www.rustyparts.com/ ferrous oxidation -------------- next part -------------- Index: addevent.php =================================================================== RCS file: /repository/kronolith/addevent.php,v retrieving revision 1.39 diff -u -r1.39 addevent.php --- addevent.php 6 Jan 2003 23:20:21 -0000 1.39 +++ addevent.php 13 May 2003 23:51:25 -0000 @@ -19,7 +19,9 @@ $month = Horde::getFormData('month', date('n')); $day = Horde::getFormData('mday', date('j')); $year = Horde::getFormData('year', date('Y')); - $timestamp = mktime(8, 0, 0, $month, $day, $year); + $hour = date('H'); + $min = date('i'); + $timestamp = mktime($hour, $min - ($min % 5), 0, $month, $day, $year); } $url = Horde::getFormData('url'); Index: menu.php =================================================================== RCS file: /repository/kronolith/menu.php,v retrieving revision 1.24 diff -u -r1.24 menu.php --- menu.php 8 May 2003 22:52:44 -0000 1.24 +++ menu.php 13 May 2003 23:51:25 -0000 @@ -20,7 +20,9 @@ $month = 1; $day = Kronolith::firstDayOfWeek($week, $year); } - $timestamp = mktime(0, 0, 0, $month, $day, $year); + $hour = date('H'); + $min = date('i'); + $timestamp = mktime($hour, $min - ($min % 5), 0, $month, $day, $year); } $append = "?timestamp=$timestamp"; Index: month.php =================================================================== RCS file: /repository/kronolith/month.php,v retrieving revision 1.113 diff -u -r1.113 month.php --- month.php 3 Jan 2003 02:17:40 -0000 1.113 +++ month.php 13 May 2003 23:51:25 -0000 @@ -87,6 +87,8 @@ } else { $currentCalendars = array(true); } +$hour = date('H'); +$min = date('i'); foreach ($currentCalendars as $id => $cal) { if ($sidebyside) { echo ''; @@ -94,6 +96,7 @@ $dayofweek = $startday; for ($day = 1; $day <= $daysInMonth; $day++) { $dayStamp = mktime(0, 0, 0, $month, $day, $year); + $timestamp = mktime($hour, $min - ($min % 5), 0, $month, $day, $year); $week = Kronolith::weekOfYear($day, $month, $year); if (($dayofweek % 7 == 0) && ($dayofweek != 0)) { @@ -131,7 +134,7 @@ if (Auth::getAuth() && !$print_view) { $url = Horde::addParameter(Horde::applicationUrl('addevent.php'), - 'timestamp=' . $dayStamp); + 'timestamp=' . $timestamp); $url = Horde::addParameter($url, 'url', Horde::selfURL(true)); echo '' . Horde::link($url, _("Create a New Event")) . Horde::img('new.gif', _("Create a New Event"), 'align="right"') . ''; } @@ -163,10 +166,9 @@ $dayofweek++; } } -?> - - - - +'; +echo Kronolith::buildCategoryLegend(); +echo ''; require KRONOLITH_TEMPLATES . '/common-footer.inc'; From chuck at horde.org Tue May 13 16:56:01 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Tue May 13 17:00:21 2003 Subject: [dev] Patch for correct time in kronolith In-Reply-To: <20030514000017.GC2003@rustyparts.com> References: <20030514000017.GC2003@rustyparts.com> Message-ID: <1052870161.f621035106105@marina.horde.org> Quoting Jason Rust : > Attached is a patch which makes it so the current time is selected when > a user clicks on the add event link. Before it was defaulting to > 12:00am or 8:00am in some very rare cases. This patch makes adding an > event a bit more outlook in the sense that the current time is already > selected for you. Committed, thanks. -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From chuck at horde.org Tue May 13 16:58:38 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Tue May 13 17:02:57 2003 Subject: [dev] Patch for hiding invite link In-Reply-To: <20030513204449.GA31792@rustyparts.com> References: <20030513204449.GA31792@rustyparts.com> Message-ID: <1052870318.0ad32f4208e24@marina.horde.org> Quoting Jason Rust : > Attached is a patch that hides the Invite link on the view event page if > the user has no valid email addresses in their list of identities. > Since the user would not be able to send an invite anyhow if they have > no valid from_adresses it saves them the confusion and trouble of trying > to invite someone to an event. Committed, thanks. -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From chuck at horde.org Tue May 13 17:39:47 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Tue May 13 17:44:06 2003 Subject: [dev] Patch for kronolith legends In-Reply-To: <20030512234007.GA22782@rustyparts.com> References: <20030512234007.GA22782@rustyparts.com> Message-ID: <1052872787.a1e7f8884a9b5@marina.horde.org> Quoting Jason Rust : > Attached is a patch that implements a category legend for the different > calendars displayed. This allows the user to know what a color for a > category means when viewing the month/day/week view (idea was taken from > the imp legend) Committed, thanks. > I also found that there is no way for a user to have more than 1 legend > even if the user has created 2 different calendars. I'm thinking that > the category editor in kronolith should dynamically load a different > legend when the calendar is changed (via a select box). The > functionality would be similar to the calendar editor. Does this sound > like the correct way to go about implementing this functionality? Yes, that sounds right. -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From chuck at horde.org Tue May 13 20:14:32 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Tue May 13 20:18:51 2003 Subject: [dev] Fwd: [Bug 1246] New - session hijacking using referer URL Message-ID: <1052882072.964ed1c42499e@marina.horde.org> Any opinions on this? ----- Forwarded message from bugs@bugs.horde.org ----- Date: Tue, 13 May 2003 11:57:39 -0300 From: bugs@bugs.horde.org Reply-To: bugs@horde.org Subject: [Bug 1246] New - session hijacking using referer URL To: chuck@horde.org, Nils.Rennebarth@web.de, bugs@horde.org http://bugs.horde.org/show_bug.cgi?id=1246 *** shadow/1246 Tue May 13 11:57:39 2003 --- shadow/1246.tmp.8557 Tue May 13 11:57:39 2003 *************** *** 0 **** --- 1,39 ---- + Bug#: 1246 + Product: Horde + Version: 2.3 Unstable + Platform: Mozilla 5.x + OS/Version: Linux + Status: NEW + Resolution: + Severity: normal + Priority: P2 + Component: IMP + Area: BUILD + AssignedTo: chuck@horde.org + ReportedBy: Nils.Rennebarth@web.de + URL: + Summary: session hijacking using referer URL + + (The following description and proposed solution is from + christian.jaeger@ethlife.ethz.ch) + + Let the victim log into a non-ssl imp3 account. Let him read a mail + from you with an url to your server somewhere in it. Wait until he + clicks on the url, and whatch the referrer url including the sessionid + being written to the apache log. Copy it into your own browser window + (does not even need to be at the same ip), and enjoy reading the + victim's personal email. + + Solution: each external link is rewritten to something like + "http://your.imp.server/redirector.php?url=http://external.server/uri" + + + Note that the problem only occurs when cookies are disabled and only in + http sessions as Mozilla at least does not send referrer information when + using https. + + It should not be too difficult to implement as the current code does + rewrite links anyway. + + + ----- End forwarded message ----- -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From mike at graftonhall.co.nz Tue May 13 21:20:12 2003 From: mike at graftonhall.co.nz (Mike Cochrane) Date: Tue May 13 21:15:28 2003 Subject: [dev] Fwd: [Bug 1246] New - session hijacking using referer URL In-Reply-To: <1052882072.964ed1c42499e@marina.horde.org> References: <1052882072.964ed1c42499e@marina.horde.org> Message-ID: <1052886012.82ee4864782e6@clean.graftonhall.co.nz> > ----- Message from chuck@horde.org --------- > > + (The following description and proposed solution is from > + christian.jaeger@ethlife.ethz.ch) > + > + Let the victim log into a non-ssl imp3 account. Let him read a mail > + from you with an url to your server somewhere in it. Wait until he > + clicks on the url, and whatch the referrer url including the sessionid > + being written to the apache log. Copy it into your own browser window > + (does not even need to be at the same ip), and enjoy reading the > + victim's personal email. > + > + Solution: each external link is rewritten to something like > + "http://your.imp.server/redirector.php?url=http://external.server/uri" > + This has be discussed a number of times that I remember, may have been in #horde and not the list. But a 'de-referer' would definatly be useful for external links. - Mike :-) From me at salimvirani.com Tue May 13 21:43:56 2003 From: me at salimvirani.com (Salim Virani) Date: Tue May 13 21:44:16 2003 Subject: [dev] Fwd: [Bug 1246] New - session hijacking using referer URL In-Reply-To: <1052886012.82ee4864782e6@clean.graftonhall.co.nz> Message-ID: Rather than intercepting the attack by trying to obscure the referrer information, it might be worth considering strengthening the actual authentication method as well. Implementing some kind of digest authentication would mitigate this and other attacks because the authentication mechanism would be more sophisticated than the simple sessionid token used now. It would also be stronger than a solution bolstering the existing authentication method with IP or referrer detection because those can be spoofed. This method is already supported by later browsers at the HTTP layer but it could also be put together using a little javascript at the application layer. (An HTTP layer solution would be more secure as it wouldn't be prone to javascript sniffing and so on) (See http://www.ietf.org/rfc/rfc2617.txt for a description of HTTP Digest Auth) I'm humbly throwing this out there as a suggestion. I'm not familiar with IMP3 code or this scenario in detail. Is this a reasonable suggestion? On Tuesday, May 13, 2003, at 09:20 PM, Mike Cochrane wrote: >> ----- Message from chuck@horde.org --------- >> >> + (The following description and proposed solution is from >> + christian.jaeger@ethlife.ethz.ch) >> + >> + Let the victim log into a non-ssl imp3 account. Let him read a mail >> + from you with an url to your server somewhere in it. Wait until he >> + clicks on the url, and whatch the referrer url including the >> sessionid >> + being written to the apache log. Copy it into your own browser >> window >> + (does not even need to be at the same ip), and enjoy reading the >> + victim's personal email. >> + >> + Solution: each external link is rewritten to something like >> + >> "http://your.imp.server/redirector.php?url=http://external.server/>> uri" >> + > > This has be discussed a number of times that I remember, may have been > in #horde > and not the list. But a 'de-referer' would definatly be useful for > external > links. > > - Mike :-) > > > -- > Horde developers mailing list > Frequently Asked Questions: http://horde.org/faq/ > To unsubscribe, mail: dev-unsubscribe@lists.horde.org From eric.rostetter at physics.utexas.edu Tue May 13 22:11:31 2003 From: eric.rostetter at physics.utexas.edu (Eric Rostetter) Date: Tue May 13 22:11:53 2003 Subject: [dev] Fwd: [Bug 1246] New - session hijacking using referer URL In-Reply-To: References: Message-ID: <1052889091.3ab33461efea0@mail.ph.utexas.edu> Quoting Salim Virani : > Rather than intercepting the attack by trying to obscure the referrer > information, it might be worth considering strengthening the actual > authentication method as well. That is what https: and/or cookies do. ;) The attack only works when you don't provide either of those options. > Implementing some kind of digest authentication would mitigate this and > other attacks because the authentication mechanism would be more > sophisticated than the simple sessionid token used now. I'm not sure it would be any more sophisticated really. Just less static. > It would also > be stronger than a solution bolstering the existing authentication > method with IP or referrer detection because those can be spoofed. Can't use IP or referer because they can change (use behind a proxy, user with dhcp, etc) or remain static across users (multi-user system, etc). > This method is already supported by later browsers at the HTTP layer > but it could also be put together using a little javascript at the > application layer. (An HTTP layer solution would be more secure as it > wouldn't be prone to javascript sniffing and so on) > > (See http://www.ietf.org/rfc/rfc2617.txt for a description of HTTP > Digest Auth) Not a good solution as it provides no logout (other than closing the browser), only a login. > I'm humbly throwing this out there as a suggestion. I'm not familiar > with IMP3 code or this scenario in detail. Is this a reasonable > suggestion? I think a url director would be better in this case. It is easier to implement, solves the problem, and doesn't have any limitations. The only problem with a url redirector would to be to make sure it was used in all the correct places (e.g. that we don't miss some place that generates a url, and leave it vulnerable via that path). -- Eric Rostetter The Department of Physics The University of Texas at Austin Why get even? Get odd! From chuck at horde.org Wed May 14 05:49:44 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Wed May 14 05:54:10 2003 Subject: [dev] Fwd: [Bug 1246] New - session hijacking using referer URL In-Reply-To: References: Message-ID: <1052916584.c8bf35638185f@marina.horde.org> Quoting Salim Virani : > I'm humbly throwing this out there as a suggestion. I'm not familiar > with IMP3 code or this scenario in detail. Is this a reasonable > suggestion? Not really - we don't use HTTP authentication in the first place, and the password is only sent once when the user first logs in anyways... -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From chuck at horde.org Wed May 14 05:59:19 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Wed May 14 06:03:52 2003 Subject: [dev] Fwd: [Bug 1246] New - session hijacking using referer URL In-Reply-To: <1052886012.82ee4864782e6@clean.graftonhall.co.nz> References: <1052882072.964ed1c42499e@marina.horde.org> <1052886012.82ee4864782e6@clean.graftonhall.co.nz> Message-ID: <1052917159.ef788bb00e03d@marina.horde.org> Quoting Mike Cochrane : > This has be discussed a number of times that I remember, may have been in > #horde and not the list. But a 'de-referer' would definatly be useful for > external links. Okay - I don't see strong reasons not to go that way. What about protecting the dereferrer from abuse? Or is that not a concern (use from outside Horde)? -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From eculp at encontacto.net Wed May 14 06:28:38 2003 From: eculp at encontacto.net (eculp@encontacto.net) Date: Wed May 14 06:28:53 2003 Subject: [dev] Re: [cvs] commit: rakim/scripts archive.php In-Reply-To: <20030514031139.635B914C@arkady.horde.org> References: <20030514031139.635B914C@arkady.horde.org> Message-ID: <1052918918.69de9dc502f8c@mail.encontacto.net> Quoting Chuck Hagenbuch : | chuck 2003/05/13 20:11:38 PDT | | Modified files: | scripts archive.php | Log: | Was selecting on the wrong field - need to use guest_logoff_time here. | | Revision Changes Path | 1.9 +3 -3 rakim/scripts/archive.php | | Chora Links: | http://cvs.horde.org/diff.php/rakim/scripts/archive.php?r1=1.8&r2=1.9&ty=u | Thanks, Chuck. That fixed the chat reports issue for me. ed ------------------------------------------------- From marioy at upb.edu.co Wed May 14 07:43:25 2003 From: marioy at upb.edu.co (Mario Andres Yepes C) Date: Wed May 14 07:43:05 2003 Subject: [dev] DB.php question Message-ID: <200305140943.26072.marioy@upb.edu.co> Greetings. Im getting an error in serveral horde applications regarding pear's DB.php module. The error is: Warning: mysql_real_escape_string() expects parameter 1 to be string, object given in /usr/share/pear/DB/mysql.php on line 668 I get this eror in kronolith and Giapeto when I accessed both applications the first time. Then the error was gone. Im running the cvs (as of this morning) version of all the horde applications.in a Mandrake 9.1 box. I have no Idea why this error ocurs, but if someone can point me in the right direction maybe I can submit a patch. Regards Mario From rick at emery.homelinux.net Wed May 14 08:09:50 2003 From: rick at emery.homelinux.net (Rick Emery) Date: Wed May 14 08:04:49 2003 Subject: [dev] Re: [cvs] commit: klutz/lib/Driver file.php In-Reply-To: <20030513132852.5601C14E@arkady.horde.org> References: <20030513132852.5601C14E@arkady.horde.org> Message-ID: <1052924990.1e9a640bd5346@www.emery.homelinux.net> Quoting Chuck Hagenbuch : > chuck 2003/05/13 06:28:51 PDT > > Modified files: > lib/Driver file.php > Log: > Don't use trailing slashes in directory names; only add the slash when > necessary to make a full file path. > > Revision Changes Path > 1.20 +40 -35 klutz/lib/Driver/file.php > > Chora Links: > > http://cvs.horde.org/diff.php/klutz/lib/Driver/file.php?r1=1.19&r2=1.20&ty=u Would this require any configuration changes? My comics used to get downloaded into my file system into Comics/%date%, but since my latest cvs update they get downloaded directly into Comics/ (despite the existence of the correct %date% directory, which is empty). As a result, none of the comics are available when I try to display them through klutz. Thanks in advance, Rick From jan at horde.org Wed May 14 08:46:29 2003 From: jan at horde.org (Jan Schneider) Date: Wed May 14 08:47:01 2003 Subject: [dev] Fwd: [Bug 1246] New - session hijacking using referer URL In-Reply-To: <1052917159.ef788bb00e03d@marina.horde.org> References: <1052882072.964ed1c42499e@marina.horde.org> <1052886012.82ee4864782e6@clean.graftonhall.co.nz> <1052917159.ef788bb00e03d@marina.horde.org> Message-ID: <1052927189.3b869bec05d5a@jan.dip.ammma.net> Zitat von Chuck Hagenbuch : > Quoting Mike Cochrane : > > > This has be discussed a number of times that I remember, may have been > in > > #horde and not the list. But a 'de-referer' would definatly be useful > for > > external links. > > Okay - I don't see strong reasons not to go that way. What about > protecting > the dereferrer from abuse? Or is that not a concern (use from outside > Horde)? I don't think that would be a problem, and I can't see how to let the dereferer know that the user comes from Horde without tacking another hijackable information. Jan. -- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft From rick at emery.homelinux.net Wed May 14 11:42:39 2003 From: rick at emery.homelinux.net (Rick Emery) Date: Wed May 14 11:36:50 2003 Subject: [dev] Re: [cvs] commit: klutz/lib/Driver file.php In-Reply-To: <1052924990.1e9a640bd5346@www.emery.homelinux.net> References: <20030513132852.5601C14E@arkady.horde.org> <1052924990.1e9a640bd5346@www.emery.homelinux.net> Message-ID: <1052937759.30b0271e5a150@www.emery.homelinux.net> Quoting Rick Emery : > Quoting Chuck Hagenbuch : > > > chuck 2003/05/13 06:28:51 PDT > > > > Modified files: > > lib/Driver file.php > > Log: > > Don't use trailing slashes in directory names; only add the slash when > > necessary to make a full file path. > > > > Revision Changes Path > > 1.20 +40 -35 klutz/lib/Driver/file.php > > > > Chora Links: > > > > > http://cvs.horde.org/diff.php/klutz/lib/Driver/file.php?r1=1.19&r2=1.20&ty=u > > Would this require any configuration changes? My comics used to get > downloaded > into my file system into Comics/%date%, but since my latest cvs update they > get > downloaded directly into Comics/ (despite the existence of the correct %date% > directory, which is empty). As a result, none of the comics are available > when > I try to display them through klutz. Further looking at the files reveals that the date is prepended to each comic's file name, so the "/" that's supposed to be between the directory and the file name isn't being added. I don't really have time to troubleshoot it right now, so I've reverted to version 1.19 of klutz/lib/Driver/file.php (which is working for me now) until I can look at it. Rick From nuno at co.sapo.pt Wed May 14 12:08:22 2003 From: nuno at co.sapo.pt (Nuno Loureiro) Date: Wed May 14 12:09:03 2003 Subject: [dev] gettext + Horde_Templates In-Reply-To: <1052868772.27cea9a62aec5@jan.dip.ammma.net> References: <1052825378.181f0798a49dc@my.oblo.com> <1052868772.27cea9a62aec5@jan.dip.ammma.net> Message-ID: <1052939302.24100.21.camel@localhost> I just did a quick patch (completly untested). I do not have the time to test it now. Will do it tommorrow if nobody tries it first. Index: Template.php =================================================================== RCS file: /repository/horde/lib/Template.php,v retrieving revision 1.17 diff -u -u -r1.17 Template.php --- Template.php 23 Jan 2003 18:34:12 -0000 1.17 +++ Template.php 14 May 2003 19:05:33 -0000 @@ -217,6 +217,9 @@ $contents = $this->parseCloop($key, $array, $contents); } + // Parse GetText. + $contents = $this->parseGetText($contents); + // Reset template data unless we're supposed to keep it // around. if ($this->_resetVars) { @@ -227,6 +230,24 @@ return $contents; } + + /** + * Parse gettext tags. + * + * @param string $contents The unparsed content of the file. + * + * @return string The parsed contents of the gettext blocks. + */ + function parseGetText($contents) + { + // Get the tags & loop. + $t = $this->getTags('trans', 'i18n'); + while ($gtext = $this->getStatement($t, $contents)) { + $contents = str_replace($t['b'] . $gtext . $t['e'], _("$gtext"), $contents); + } + return $contents; + } + /** * Parse a given if statement. * On Wed, 2003-05-14 at 00:32, Jan Schneider wrote: > Zitat von Marko Djukic : > > > the one problem with Horde_Templates is having text in templates that can > > be > > picked up for inclusion in .po and eventual translation. > > > > jan, you were saying that you want to stick with the native php gettext > > support > > which relies only on _() tags if i understood right. one thing that > > doesn't > > seem to make sense to me is how it could support something which is > > XML-like > > (and nothing to do with php) as is the case with Horde_Templates? > > > > does it seems a case of mixing apples and oranges? > > Just to let the list know: We found a way to handle translateable strings in > XML files and will probably use this for the templates. > > Jan. > > -- > http://www.horde.org - The Horde Project > http://www.ammma.de - discover your knowledge > http://www.tip4all.de - Deine private Tippgemeinschaft -- Nuno Loureiro PTM.com - http://www.sapo.pt/ PGP fingerprint = 8A32 5174 E80C 2D40 9075 405E C107 6592 054A 4D05 From dda at ic.ru Wed May 14 12:46:34 2003 From: dda at ic.ru (Dmitry Diskin) Date: Wed May 14 12:53:31 2003 Subject: [dev] Future development of LDAP authentication driver Message-ID: Hello! I would like to use an LDAP backend for authentication, but regarding user administration I see that the current Auth_ldap driver does not implement the capabilities to update or remove a user. Are there any plans or work in progress on the LDAP Auth driver? Will it support updating, removing or disabling of users ? Will it support a custom LDAP schema? Regards, Dmitry. From chuck at horde.org Wed May 14 17:50:54 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Wed May 14 17:55:22 2003 Subject: [dev] gettext + Horde_Templates In-Reply-To: <1052939302.24100.21.camel@localhost> References: <1052825378.181f0798a49dc@my.oblo.com> <1052868772.27cea9a62aec5@jan.dip.ammma.net> <1052939302.24100.21.camel@localhost> Message-ID: <1052959854.95e9fefeda4b4@marina.horde.org> Quoting Nuno Loureiro : > I just did a quick patch (completly untested). > I do not have the time to test it now. Will do it tommorrow if nobody > tries it first. This isn't a feature that's going to be enabled by default; please modify the patch so that this parsing is optional and off by default. -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From chuck at horde.org Wed May 14 17:51:23 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Wed May 14 17:55:46 2003 Subject: [dev] Future development of LDAP authentication driver In-Reply-To: References: Message-ID: <1052959883.cc2d1b022d0de@marina.horde.org> Quoting Dmitry Diskin : > Are there any plans or work in progress on the LDAP Auth driver? > Will it support updating, removing or disabling of users ? > Will it support a custom LDAP schema? If you send the patches in for it, it definitely will. -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From chuck at horde.org Wed May 14 19:39:48 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Wed May 14 19:44:16 2003 Subject: [dev] Re: [cvs] commit: klutz/lib/Driver file.php In-Reply-To: <1052937759.30b0271e5a150@www.emery.homelinux.net> References: <20030513132852.5601C14E@arkady.horde.org> <1052924990.1e9a640bd5346@www.emery.homelinux.net> <1052937759.30b0271e5a150@www.emery.homelinux.net> Message-ID: <1052966388.cc4756bd7cb56@marina.horde.org> Quoting Rick Emery : > Further looking at the files reveals that the date is prepended to each > comic's file name, so the "/" that's supposed to be between the directory > and the file name isn't being added. I don't really have time to > troubleshoot it right now, so I've reverted to version 1.19 of > klutz/lib/Driver/file.php (which is working for me now) until I can look > at it. Should be fixed now. -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From eric.rostetter at physics.utexas.edu Thu May 15 05:54:53 2003 From: eric.rostetter at physics.utexas.edu (Eric Rostetter) Date: Thu May 15 05:55:31 2003 Subject: [dev] Fwd: [Bug 1246] New - session hijacking using referer URL In-Reply-To: <1052927189.3b869bec05d5a@jan.dip.ammma.net> References: <1052882072.964ed1c42499e@marina.horde.org> <1052886012.82ee4864782e6@clean.graftonhall.co.nz> <1052917159.ef788bb00e03d@marina.horde.org> <1052927189.3b869bec05d5a@jan.dip.ammma.net> Message-ID: <1053003293.2cbd3d0c56903@mail.ph.utexas.edu> Quoting Jan Schneider : > I don't think that would be a problem, and I can't see how to let the > dereferer know that the user comes from Horde without tacking another > hijackable information. Not reliably. That is, the point is to nuke the referer, and hence we would expect to be able to tell by the referer. However, the referer can be faked or omitted, so we can't depend on it being there. The concept of abuse worries me slightly, but the fact that sites like yahoo do this and don't seem to have problems makes me think it probably isn't a hugh problem in real life... > Jan. > > -- > http://www.horde.org - The Horde Project > http://www.ammma.de - discover your knowledge > http://www.tip4all.de - Deine private Tippgemeinschaft > > -- > Horde developers mailing list > Frequently Asked Questions: http://horde.org/faq/ > To unsubscribe, mail: dev-unsubscribe@lists.horde.org > -- Eric Rostetter The Department of Physics The University of Texas at Austin Why get even? Get odd! From rick at emery.homelinux.net Thu May 15 06:36:06 2003 From: rick at emery.homelinux.net (Rick Emery) Date: Thu May 15 06:30:28 2003 Subject: [dev] Re: [cvs] commit: klutz/lib/Driver file.php In-Reply-To: <1052966388.cc4756bd7cb56@marina.horde.org> References: <20030513132852.5601C14E@arkady.horde.org> <1052924990.1e9a640bd5346@www.emery.homelinux.net> <1052937759.30b0271e5a150@www.emery.homelinux.net> <1052966388.cc4756bd7cb56@marina.horde.org> Message-ID: <1053005766.9bee1987c8d06@www.emery.homelinux.net> Quoting Chuck Hagenbuch : > Quoting Rick Emery : > > > Further looking at the files reveals that the date is prepended to each > > comic's file name, so the "/" that's supposed to be between the directory > > and the file name isn't being added. I don't really have time to > > troubleshoot it right now, so I've reverted to version 1.19 of > > klutz/lib/Driver/file.php (which is working for me now) until I can look > > at it. > > Should be fixed now. > > -chuck It looks like that did it, thanks! Rick From nuno at co.sapo.pt Thu May 15 09:37:49 2003 From: nuno at co.sapo.pt (Nuno Loureiro) Date: Thu May 15 09:38:37 2003 Subject: [dev] gettext + Horde_Templates In-Reply-To: <1052959854.95e9fefeda4b4@marina.horde.org> References: <1052825378.181f0798a49dc@my.oblo.com> <1052868772.27cea9a62aec5@jan.dip.ammma.net> <1052939302.24100.21.camel@localhost> <1052959854.95e9fefeda4b4@marina.horde.org> Message-ID: <1053016669.21578.175.camel@localhost> On Thu, 2003-05-15 at 01:50, Chuck Hagenbuch wrote: > Quoting Nuno Loureiro : > > > I just did a quick patch (completly untested). > > I do not have the time to test it now. Will do it tommorrow if nobody > > tries it first. > > This isn't a feature that's going to be enabled by default; please modify > the patch so that this parsing is optional and off by default. Done.. Check attach. > -chuck > > -- > Charles Hagenbuch, > The alligators were there, too, in a bathtub inside the house. -- Nuno Loureiro PTM.com - http://www.sapo.pt/ PGP fingerprint = 8A32 5174 E80C 2D40 9075 405E C107 6592 054A 4D05 -------------- next part -------------- A non-text attachment was scrubbed... Name: tplgettext.diff Type: text/x-patch Size: 2242 bytes Desc: not available Url : http://lists.horde.org/archives/dev/attachments/20030515/ac249ef5/tplgettext.bin From m.sorcinelli at i-synapse.it Thu May 15 10:12:09 2003 From: m.sorcinelli at i-synapse.it (Massimiliano Sorcinelli) Date: Thu May 15 10:12:55 2003 Subject: [dev] Horde Reminder and Alert Addon Message-ID: <1053018729.3ec3ca69a9db7@www.i-synapse.it> This is a new feature for horde i would like if you publish it so it can enhance. I've adapted the phprojekt reminder for horde. This is for horde stable version 2.2.3 and kronolith 1.1 final. The reminder starts automatically as new windows from login.php you can edit kronolith events just cliking them up and open INBOX when new messages comes up. TODO (if someone wants :-)): Configuration integration (enable and disable this feature) Regards PS. I'm looking for SyncML (www.syncml.org) integration on Horde. Think to syncronize new SyncML enabled device like SonyEricsson P800 via GRPS connection, would be beautiful and would make Horde the best featureful web groupware. If someone is working on that or interesting in developing please contact. Massimiliano Sorcinelli m.sorcinelli@i-synapse.it www.i-synapse.it Arezzo - Italy. -------------- next part -------------- diff -u -r -N original/kronolith/lib/Driver/sql.php new/kronolith/lib/Driver/sql.php --- original/kronolith/lib/Driver/sql.php 2003-04-04 21:24:00.000000000 +0200 +++ new/kronolith/lib/Driver/sql.php 2003-05-14 11:27:02.000000000 +0200 @@ -34,7 +34,7 @@ function listAlarms($date) { - $allevents = $this->listEvents($date, $date, true); + $allevents = $this->listEvents(0, $date, true); $events = array(); foreach ($allevents as $eventid) { @@ -43,9 +43,9 @@ if ($event->getRecurType() == KRONOLITH_RECUR_NONE) { $diff = Kronolith::dateDiff($date, Kronolith::timestampToObject($event->startTimestamp)); - if ($diff->sec < $event->getAlarm() * 60) { + //if ($diff->sec < $event->getAlarm() * 60) { $events[] = $eventid; - } + //} } else { $next = $this->nextRecurrence($eventid, $date); if ($next) { @@ -72,7 +72,7 @@ $etime = sprintf('%04d-%02d-%02d 00:00:00', $endDate->year, $endDate->month, $endDate->mday); if (isset($startDate)) { - if ($startDate === 0) { + if ($startDate == 0) { $startDate = Kronolith::dateObject(array('mday' => 1, 'month' => 1, 'year' => 0000)); } if ($startDate->month == 0) { $startDate->month = 1; } @@ -104,7 +104,6 @@ /* Run the query. */ $qr = $this->_db->query($q); - if (!PEAR::isError($qr)) { $row = $qr->fetchRow(DB_FETCHMODE_ASSOC); while ($row && !PEAR::isError($row)) { diff -u -r -N original/kronolith/lib/Notification/kronolith.php new/kronolith/lib/Notification/kronolith.php --- original/kronolith/lib/Notification/kronolith.php 2003-01-03 15:23:36.000000000 +0100 +++ new/kronolith/lib/Notification/kronolith.php 2003-05-13 17:40:31.000000000 +0200 @@ -25,11 +25,11 @@ { switch ($message['type']) { case 'kronolith.alarm': - echo '' . Horde::img('alarm.gif') . '  ' . $message['message'] . ''; + echo '' . Horde::img('alarm.gif') . '  ' . $message['message'] . ''; break; case 'kronolith.event': - echo '' . Horde::img('event.gif') . '  ' . $message['message'] . ''; + echo '' . Horde::img('event.gif') . '  ' . $message['message'] . ''; break; default: diff -u -r -N original/kronolith/po/it_IT.po new/kronolith/po/it_IT.po --- original/kronolith/po/it_IT.po 2001-08-24 22:13:52.000000000 +0200 +++ new/kronolith/po/it_IT.po 2003-05-13 18:41:51.000000000 +0200 @@ -49,13 +49,28 @@ msgstr "%s ? in corso." #, c-format +msgid "%s is in progress." +msgstr "%s ? in corso." +#, c-format msgid "%s is starting now." msgstr "%s inizia ora." #, c-format +msgid "%s Is starting now.." +msgstr "%s Inizia ora.." + +#, c-format msgid "%s starts in %s" msgstr "%s inizia in %s" +#, c-format +msgid "%s starts in %s" +msgstr "%s Inizia in %s" + +#, c-format +msgid "%s is done " +msgstr "%s ? trascorso " + msgid "Description (optional)" msgstr "Descrizione (opzionale)" @@ -236,6 +251,9 @@ msgid "Options" msgstr "Opzioni" +msgid "Import/Export" +msgstr "Importa/Esporta" + msgid "Pattern" msgstr "Modello" @@ -361,6 +379,12 @@ msgid "Today" msgstr "Oggi" +msgid "Goto" +msgstr "Vai a" + +msgid "Print" +msgstr "Stampa" + msgid "Tu" msgstr "Mar" diff -u -r -N original/kronolith/reminder.php new/kronolith/reminder.php --- original/kronolith/reminder.php 1970-01-01 01:00:00.000000000 +0100 +++ new/kronolith/reminder.php 2003-05-15 17:58:12.000000000 +0200 @@ -0,0 +1,87 @@ +Avvisi\n"; +echo ""; +echo ""; + +//mail check +define('IMP_BASE', "../imp"); +require_once IMP_BASE . '/lib/base.php'; +IMP::checkAuthentication(); +$newmail_popup = (Horde::getFormData('newmail_popup') == 'no') ? false : true; +$newmsgs = 0; + $check = imap_check($imp['stream']); + $imp['msgcount'] = (is_object($check) && isset($check->Nmsgs)) ? $check->Nmsgs : 0; + $new = imap_search($imp['stream'], 'RECENT'); + $newmsgs = $new ? count($new) : 0; + $unseen = imap_search($imp['stream'], 'UNSEEN'); + $unseenmsgs = $unseen ? count($unseen) : 0; + echo ""; + echo "
Messaggi non letti: "; + $url = Horde::applicationUrl('mailbox.php?newmail_popup=no&mailbox=INBOX', true); + $unseenmsgs = Horde::link($url, sprintf(_("Edit '%s'"),"INBOX"), 'menuitem',"_blank") . $unseenmsgs . ""; + echo $unseenmsgs; + echo "
"; +if ($newmsgs > 0) { + include IMP_TEMPLATES . '/mailbox/alert.inc'; +} + + +//events check +define('KRONOLITH_BASE', dirname(__FILE__)); +$kronolith_configured = (@is_readable(KRONOLITH_BASE . '/config/conf.php') && + @is_readable(KRONOLITH_BASE . '/config/prefs.php') && + @is_readable(KRONOLITH_BASE . '/config/html.php')); + +if ($kronolith_configured) { + include_once KRONOLITH_BASE . '/lib/base.php'; + + $uri = $prefs->getValue('userID') . '.php'; + if ($uri == '.php') { + $uri = 'month.php'; + } + if (!empty($_SERVER['QUERY_STRING'])) { + $uri .= '?' . $_SERVER['QUERY_STRING']; + } + + $now = mktime(); + $current_date = Kronolith::timestampToObject($now); + $events = $calendar->listAlarms($current_date); + $messages = array(); + foreach ($events as $eventID) { + $thisEvent = $calendar->getEventObject($eventID); + $differential = $thisEvent->getStartTimestamp() - $now; + $key = $thisEvent->getStartTimestamp(); + while (isset($messages[$key])) { + $key++; + } + $editurl = Kronolith::addParameter('editevent.php', 'eventID', $thisEvent->getID()); + $editurl = Kronolith::addParameter($editurl, 'url', Horde::selfURL(true)); + $editurl = Horde::applicationUrl($editurl); + $strView = $thisEvent->getTitle() . " " . $thisEvent->getDescription(); + $Titolo = $thisEvent->getTitle(); + $strView = Horde::link($editurl, sprintf(_("Edit '%s'"), $Titolo), 'menuitem',"_blank") . $strView . ""; + $Descrizione = $thisEvent->getDescription(); + if ($differential > -16 && $differential < 15) { + echo "\n"; + $messages[$key] = array(sprintf(_("%s Is starting now.."), $strView), 'kronolith.alarm'); + } else if ($differential < 0 && $now <= $thisEvent->getEndTimestamp()) { + $messages[$key] = array(sprintf(_("%s is in progress."), $strView), 'kronolith.event'); + } else if ($differential > 15 && $differential < 7200) { + $messages[$key] = array(sprintf(_("%s starts in %s"), $strView, Kronolith::secondsToString($differential)), 'kronolith.alarm'); + } else { + $tStr= "
il " . date('d-m-Y', $thisEvent->getEndTimestamp()) . " dalle " . date('H:i', $thisEvent->getStartTimestamp()) . " alle " . date('H:i', $thisEvent->getEndTimestamp()); + $messages[$key] = array(sprintf(_("%s is done "), $strView ), 'kronolith.alarm'); + $messages[$key][0] = $messages[$key][0] . $tStr; + } + } + + ksort($messages); + foreach ($messages as $message) { + $notification->push($message[0], $message[1]); + } + $notification->notify(); +} else { + include KRONOLITH_BASE . '/templates/index/notconfigured.inc'; +} +?> diff -u -r -N original/login.php new/login.php --- original/login.php 2003-01-19 00:57:20.000000000 +0100 +++ new/login.php 2003-05-14 12:08:50.000000000 +0200 @@ -98,6 +98,12 @@ $js_onLoad = 'setFocus()'; $template = 'login.inc'; } +echo "\n"; + require HORDE_TEMPLATES . '/common-header.inc'; require HORDE_TEMPLATES . '/login/' . $template; require HORDE_TEMPLATES . '/common-footer.inc'; From jrust at rustyparts.com Thu May 15 11:17:11 2003 From: jrust at rustyparts.com (Jason Rust) Date: Thu May 15 11:12:47 2003 Subject: [dev] Patch for new event bug Message-ID: <20030515181711.GA20251@rustyparts.com> The following patch fixes a small bug where 12am was being selected as the time for the new event when an event was viewed from the month view. -Jason Index: month.php =================================================================== RCS file: /repository/kronolith/month.php,v retrieving revision 1.114 diff -u -r1.114 month.php --- month.php 13 May 2003 23:59:57 -0000 1.114 +++ month.php 15 May 2003 18:09:40 -0000 @@ -153,7 +153,7 @@ $cell .= 'onmouseover="javascript:style.backgroundColor=\'' . Horde_Image::modifyColor($categoryColor) . '\'" ' ; $cell .= 'onmouseout="javascript:style.backgroundColor=\'' . $categoryColor . '\'" ' ; $cell .= 'valign="top">'; - $cell .= $event->getLink($dayStamp); + $cell .= $event->getLink($timestamp); $cell .= ''; } } From jrust at rustyparts.com Thu May 15 11:23:53 2003 From: jrust at rustyparts.com (Jason Rust) Date: Thu May 15 11:18:55 2003 Subject: [dev] Patch for hooks in Prefs.php Message-ID: <20030515182353.GB20251@rustyparts.com> The patch below fixes a bug whereby having 'hook' => false in a pref was not turning off the hook. -Jason Index: Prefs.php =================================================================== RCS file: /repository/horde/lib/Prefs.php,v retrieving revision 1.106 diff -u -r1.106 Prefs.php --- Prefs.php 28 Apr 2003 19:31:17 -0000 1.106 +++ Prefs.php 15 May 2003 18:17:09 -0000 @@ -299,7 +299,7 @@ $mask |= _PREF_DEFAULT; $this->add($pref, $pvals['value'], $mask); - if (isset($pvals['hook'])) { + if (isset($pvals['hook']) && $pvals['hook']) { $this->_setHook($pref); } } From jrust at rustyparts.com Thu May 15 12:20:13 2003 From: jrust at rustyparts.com (Jason Rust) Date: Thu May 15 12:15:14 2003 Subject: [dev] Patch for import permissions in kronolith Message-ID: <20030515192013.GC20251@rustyparts.com> The attached patch changes the import page to be consistent with the edit page in terms of what calendars are displayed. Before all calendars were part of the select list, regardless of permissions or if default_share was locked. The patch fixes that. -Jason -- http://www.rustyparts.com/ ferrous oxidation -------------- next part -------------- Index: import.inc =================================================================== RCS file: /repository/kronolith/templates/data/import.inc,v retrieving revision 1.8 diff -u -r1.8 import.inc --- import.inc 15 Dec 2002 23:26:40 -0000 1.8 +++ import.inc 15 May 2003 18:54:04 -0000 @@ -23,12 +23,19 @@
+ isLocked('default_share') && count($calendars = Kronolith::listCalendars())): ?>


+ + +
" class="button" /> From jan at horde.org Thu May 15 12:32:47 2003 From: jan at horde.org (Jan Schneider) Date: Thu May 15 12:33:12 2003 Subject: [dev] Patch for import permissions in kronolith In-Reply-To: <20030515192013.GC20251@rustyparts.com> References: <20030515192013.GC20251@rustyparts.com> Message-ID: <1053027167.f83b5063d3161@jan.dip.ammma.net> Zitat von Jason Rust : > The attached patch changes the import page to be consistent with the > edit page in terms of what calendars are displayed. Before all > calendars were part of the select list, regardless of permissions or if > default_share was locked. The patch fixes that. Cool, I just discovered this two hours ago. ;-) Committed, thanks! Jan. -- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft From jan at horde.org Thu May 15 12:34:47 2003 From: jan at horde.org (Jan Schneider) Date: Thu May 15 12:35:20 2003 Subject: [dev] Patch for hooks in Prefs.php In-Reply-To: <20030515182353.GB20251@rustyparts.com> References: <20030515182353.GB20251@rustyparts.com> Message-ID: <1053027287.88ac1a5f1e09d@jan.dip.ammma.net> Zitat von Jason Rust : > The patch below fixes a bug whereby having 'hook' => false in a pref > was not turning off the hook. Committed, thanks. Jan. -- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft From jrust at rustyparts.com Thu May 15 13:27:37 2003 From: jrust at rustyparts.com (Jason Rust) Date: Thu May 15 13:22:37 2003 Subject: [dev] Patch for side_by_side view in kronolith Message-ID: <20030515202737.GA25595@rustyparts.com> The attached patch fixes a bug whereby having display shared calendars side by side set to true, but having only 1 calendar selected to display would result in no events showing up in either the day or week view. -Jason -------------- next part -------------- Index: DayView.php =================================================================== RCS file: /repository/kronolith/lib/DayView.php,v retrieving revision 1.117 diff -u -r1.117 DayView.php --- DayView.php 9 Jan 2003 09:47:22 -0000 1.117 +++ DayView.php 15 May 2003 20:21:16 -0000 @@ -217,6 +217,10 @@ $tmp = array(); global $prefs; $include_all_events = !$prefs->getValue('show_shared_side_by_side'); + if (!$include_all_events && count($GLOBALS['display_calendars']) == 1) { + $include_all_events = true; + } + $this->_all_day_maxrowspan = 0; // Separate out all day events and do some initialization/prep // for parsing. From chuck at horde.org Thu May 15 13:33:02 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Thu May 15 13:37:30 2003 Subject: [dev] Patch for new event bug In-Reply-To: <20030515181711.GA20251@rustyparts.com> References: <20030515181711.GA20251@rustyparts.com> Message-ID: <1053030782.04cae563939e5@marina.horde.org> Quoting Jason Rust : > The following patch fixes a small bug where 12am was being selected as > the time for the new event when an event was viewed from the month view. Committed, thanks. -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From chuck at horde.org Thu May 15 13:34:34 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Thu May 15 13:38:59 2003 Subject: [dev] Patch for side_by_side view in kronolith In-Reply-To: <20030515202737.GA25595@rustyparts.com> References: <20030515202737.GA25595@rustyparts.com> Message-ID: <1053030874.0b9f8cec10113@marina.horde.org> Quoting Jason Rust : > The attached patch fixes a bug whereby having display shared calendars side > by side set to true, but having only 1 calendar selected to display > would result in no events showing up in either the day or week view. Committed, thanks. -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From chuck at horde.org Thu May 15 13:53:45 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Thu May 15 13:58:10 2003 Subject: [dev] gettext + Horde_Templates In-Reply-To: <1053016669.21578.175.camel@localhost> References: <1052825378.181f0798a49dc@my.oblo.com> <1052868772.27cea9a62aec5@jan.dip.ammma.net> <1052939302.24100.21.camel@localhost> <1052959854.95e9fefeda4b4@marina.horde.org> <1053016669.21578.175.camel@localhost> Message-ID: <1053032025.6112070e132c6@marina.horde.org> Quoting Nuno Loureiro : > Done.. Check attach. Committed, thanks. I did change it to look for , though, instead of . -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From marko at oblo.com Thu May 15 14:31:29 2003 From: marko at oblo.com (Marko Djukic) Date: Thu May 15 14:31:59 2003 Subject: [dev] callHook() function Message-ID: <1053034289.88346676adf1b@my.oblo.com> creates a standardised function to call hooks with some error checking returning a PEAR Error if failed... and the optional second parameter if a different hook file is required for example under a /config directory of an app. thoughts? m. -------------- next part -------------- A non-text attachment was scrubbed... Name: Horde.php.patch Type: text/diff Size: 1405 bytes Desc: not available Url : http://lists.horde.org/archives/dev/attachments/20030515/ab24a39d/Horde.php.bin From chuck at horde.org Thu May 15 14:27:50 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Thu May 15 14:32:27 2003 Subject: [dev] Horde Reminder and Alert Addon In-Reply-To: <1053018729.3ec3ca69a9db7@www.i-synapse.it> References: <1053018729.3ec3ca69a9db7@www.i-synapse.it> Message-ID: <1053034070.3c0a10705d717@marina.horde.org> Quoting Massimiliano Sorcinelli : > PS. I'm looking for SyncML (www.syncml.org) integration on Horde. Think > to syncronize new SyncML enabled device like SonyEricsson P800 via GRPS > connection, would be beautiful and would make Horde the best featureful > web groupware. If someone is working on that or interesting in developing > please contact. There are several people interested in it; however, no one has had time to start on it so far. -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From jon at horde.org Thu May 15 16:18:02 2003 From: jon at horde.org (Jon Parise) Date: Thu May 15 16:18:28 2003 Subject: [dev] Patch for hooks in Prefs.php In-Reply-To: <20030515182353.GB20251@rustyparts.com> References: <20030515182353.GB20251@rustyparts.com> Message-ID: <20030515231802.GA15252@csh.rit.edu> On Thu, May 15, 2003 at 01:23:53PM -0500, Jason Rust wrote: > The patch below fixes a bug whereby having 'hook' => false in a pref > was not turning off the hook. [snip] > - if (isset($pvals['hook'])) { > + if (isset($pvals['hook']) && $pvals['hook']) { Or better: if (!empty($pvals['hook'])) { -- Jon Parise (jon@horde.org) :: The Horde Project (http://horde.org/) From chuck at horde.org Thu May 15 17:17:54 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Thu May 15 17:22:26 2003 Subject: [dev] Patch for hooks in Prefs.php In-Reply-To: <20030515231802.GA15252@csh.rit.edu> References: <20030515182353.GB20251@rustyparts.com> <20030515231802.GA15252@csh.rit.edu> Message-ID: <1053044274.484158a50cb9c@marina.horde.org> Quoting Jon Parise : > Or better: > > if (!empty($pvals['hook'])) { Already committed that... -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From chuck at horde.org Thu May 15 19:04:39 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Thu May 15 19:09:08 2003 Subject: [dev] callHook() function In-Reply-To: <1053034289.88346676adf1b@my.oblo.com> References: <1053034289.88346676adf1b@my.oblo.com> Message-ID: <1053050679.0e219daf7e39f@marina.horde.org> Quoting Marko Djukic : > creates a standardised function to call hooks with some error checking > returning a PEAR Error if failed... and the optional second parameter if a > different hook file is required for example under a /config directory of an > app. You should probably modify this to use @include_once and check the return value so that you don't die on a bad (parse error) hooks file. -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From mgf at iota-online.com Fri May 16 03:14:55 2003 From: mgf at iota-online.com (Matthieu Foillard) Date: Fri May 16 03:14:47 2003 Subject: [dev] [patch] sizelimit in turba sql driver. Message-ID: <200305161214.55163.mgf@iota-online.com> This patch add sizelimit just like the ldap driver do. It maybe needs some corrections since i'm still not very familiar w/ horde dev. This patch will allow me to begin the work on the turba paging. Regards, mgf Index: lib/Driver/sql.php =================================================================== RCS file: /repository/turba/lib/Driver/sql.php,v retrieving revision 1.32 diff -u -3 -p -r1.32 sql.php --- lib/Driver/sql.php 25 Apr 2003 03:13:44 -0000 1.32 +++ lib/Driver/sql.php 16 May 2003 10:11:49 -0000 @@ -117,6 +117,13 @@ class Turba_Driver_sql extends Turba_Dri $query .= 'FROM ' . $this->_table; $query .= $where; + /* Add a sizelimit, if specified. Default is 0, which means no limit. */ + $sizelimit = 0; + if (!empty($this->params['sizelimit'])) { + $sizelimit = $this->params['sizelimit']; + $query = $this->_db->modifyLimitQuery($query, 0, $sizelimit); + } + /* Log the query at a DEBUG log level. */ Horde::logMessage(sprintf('SQL search by %s: table = %s; query = "%s"', Auth::getAuth(), $this->_table, $query), From chuck at horde.org Fri May 16 06:17:34 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Fri May 16 06:22:05 2003 Subject: [dev] Re: [cvs] commit: jonah/scripts/drivers jonah_news.sql In-Reply-To: <20030516131841.7A8F1B7@arkady.horde.org> References: <20030516131841.7A8F1B7@arkady.horde.org> Message-ID: <1053091054.75bf7691c7d53@marina.horde.org> Quoting Marko Djukic : > Log: > seems like postgres doesn't like when a NOT NULL field is not specified > during an INSERT That would actually be the entire meaning of marking the field NOT NULL. :) Also, no need to put the NULL there - it's redundant, and some dbs (I think postgres, actually) don't parse it. -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From SGrondin at csbf.qc.ca Fri May 16 10:57:26 2003 From: SGrondin at csbf.qc.ca (Serge Grondin) Date: Fri May 16 10:57:27 2003 Subject: [dev] Undefine property: host and mailbox References: <3EC150CC.50E2D970@csbf.qc.ca> Message-ID: <3EC52686.11EF3E86@csbf.qc.ca> Serge Grondin a ?crit : > Hi, > > In IMP RELENG_3 with Horde RELENG_2 and Turba RELENG_1, I have the > following error in my php log when I send an email with a list ex: > List name : My-buddy > Content of list: "John Doe" > "Jane Doe" > > PHP Notice: Undefined property: host in /..../horde/imp/lib/IMP.php on > line 634 > PHP Notice: Undefined property: mailbox in /..../horde/imp/lib/IMP.php > on line 634 > PHP Notice: Undefined property: host in /..../horde/imp/lib/IMP.php on > line 634 > > However, the message got sent to all the recipients. > > If you can point me in the right direction to finding how to get rid of > these, I will try to find a solution and send a patch to correct this. > > Thanks Hi, It's bad manner to reply to self but I think I found a solution. Here is the patch. [root@webmail lib]# cvs diff -u IMP.php Index: IMP.php =================================================================== RCS file: /repository/imp/lib/IMP.php,v retrieving revision 1.198.2.54 diff -u -r1.198.2.54 IMP.php --- IMP.php 15 May 2003 22:41:39 -0000 1.198.2.54 +++ IMP.php 16 May 2003 17:46:21 -0000 @@ -631,7 +631,9 @@ $from = imap_rfc822_parse_adrlist($address, $_SESSION['imp']['maildomain']); foreach ($from as $entry) { - $addressList[] = $entry->mailbox . '@' . $entry->host; + if (array_key_exists("mailbox",$entry) && array_key_exists("host",$entry)) { + $addressList[] = $entry->mailbox . '@' . $entry->host; + } } if ($multiple) { I hope it's the right way to correct these PHP notice. -- Serge Grondin Technicien en Informatique Commission Scolaire des Bois-Francs Tel. bur.: (819) 758-6453, poste 2920 e-Mail bur.: SGrondin@csbf.qc.ca e-Mail per.: sergegro@sympatico.ca From jrust at rustyparts.com Fri May 16 11:31:28 2003 From: jrust at rustyparts.com (Jason Rust) Date: Fri May 16 11:26:22 2003 Subject: [dev] Patch for error handling in kronolith Message-ID: <20030516183128.GA7137@rustyparts.com> The attached patch adds a bit of error handling for when there is an error in saving an event (which can esp. happen if sequences can't be created.). -Jason -- http://www.rustyparts.com/ puttin' some rust into it! -------------- next part -------------- Index: addeventaction.php =================================================================== RCS file: /repository/kronolith/addeventaction.php,v retrieving revision 1.36 diff -u -r1.36 addeventaction.php --- addeventaction.php 8 May 2003 13:31:18 -0000 1.36 +++ addeventaction.php 16 May 2003 18:25:37 -0000 @@ -22,7 +22,10 @@ $calendar->open($calendar_id); $event = $calendar->getEventObject(); $event->readForm(); - $event->save(); + $res = $event->save(); + if (is_a($res, 'PEAR_Error')) { + $notification->push(sprintf(_("There was an error in adding the event. The server said: %s"), $res->getMessage()), 'horde.error'); + } } } Index: editeventaction.php =================================================================== RCS file: /repository/kronolith/editeventaction.php,v retrieving revision 1.43 diff -u -r1.43 editeventaction.php --- editeventaction.php 10 May 2003 00:46:12 -0000 1.43 +++ editeventaction.php 16 May 2003 18:25:37 -0000 @@ -62,7 +62,10 @@ } } $event->readForm(); - $event->save(); + $res = $event->save(); + if (is_a($res, 'PEAR_Error')) { + $notification->push(sprintf(_("There was an error in editing the event. The server said: %s"), $res->getMessage()), 'horde.error'); + } } } } From chuck at horde.org Fri May 16 12:55:44 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Fri May 16 13:00:23 2003 Subject: [dev] Patch for error handling in kronolith In-Reply-To: <20030516183128.GA7137@rustyparts.com> References: <20030516183128.GA7137@rustyparts.com> Message-ID: <1053114944.c6aec80b819fe@marina.horde.org> Quoting Jason Rust : > The attached patch adds a bit of error handling for when there is an > error in saving an event (which can esp. happen if sequences can't be > created.). Committed, thanks. -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From jrust at rustyparts.com Fri May 16 14:45:02 2003 From: jrust at rustyparts.com (Jason Rust) Date: Fri May 16 14:40:17 2003 Subject: [dev] Patch for ie6 scrollbar bug Message-ID: <20030516214502.GB13655@rustyparts.com> The attached patch fixes a bug where the menu bar in the left and right frames have a gap between them. The gap is due to a margin-right property that is added because of ie6's scrollbar_in_way bug. This patch for the left hand menu uses javascript to determine if the scrollbar is present and if not it takes off the extra margin. Tested it in ie6 with a menu that resulted in a scrollbar and one that did not. -Jason -- http://www.rustyparts.com/ puttin' some rust into it! -------------- next part -------------- Index: menu.php =================================================================== RCS file: /repository/horde/menu.php,v retrieving revision 2.38 diff -u -r2.38 menu.php --- menu.php 18 Mar 2003 16:33:44 -0000 2.38 +++ menu.php 16 May 2003 21:25:00 -0000 @@ -70,6 +70,26 @@ $last_group = -1; // To track groups of menus to make
s. $last_parent = 0; // Track the last parent we used. +require_once HORDE_BASE . '/lib/Browser.php'; +$browser = &Browser::singleton(); +if ($browser->hasQuirk('scrollbar_in_way')) { + $menutext .= ' + '; +} + foreach ($registry->applications as $app => $params) { $params['name'] = gettext($params['name']); if ($params['status'] == 'active' || $params['status'] == 'heading') { From chuck at horde.org Fri May 16 18:57:29 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Fri May 16 19:02:08 2003 Subject: [dev] Patch for ie6 scrollbar bug In-Reply-To: <20030516214502.GB13655@rustyparts.com> References: <20030516214502.GB13655@rustyparts.com> Message-ID: <1053136649.d6bbf5fbe8a9e@marina.horde.org> Quoting Jason Rust : > The attached patch fixes a bug where the menu bar in the left and right > frames have a gap between them. The gap is due to a margin-right > property that is added because of ie6's scrollbar_in_way bug. This > patch for the left hand menu uses javascript to determine if the > scrollbar is present and if not it takes off the extra margin. Tested > it in ie6 with a menu that resulted in a scrollbar and one that did not. Committed, thanks. -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From marko at oblo.com Sat May 17 06:52:28 2003 From: marko at oblo.com (Marko Djukic) Date: Sat May 17 06:52:57 2003 Subject: [dev] jonah stories Message-ID: <1053179548.b3c63b664b7bf@my.oblo.com> does it make sense to invert the relationship between channels/stories and have a story belong to one or more channels? ie, compose a story then select to which channel it belongs (defaulting to one specific channel if clicked through a channel for example) marko From zialist at mzrahman.com Sat May 17 08:02:23 2003 From: zialist at mzrahman.com (zialist@mzrahman.com) Date: Sat May 17 08:02:57 2003 Subject: [dev] Theme Lavender Message-ID: <1053183743.d388d697de84b@my.mzrahman.com> Hi Guys, I just got together a new theme for Horde/IMP. Looks good to me. :) You can get a snapshot of the theme at: http://mzrahman.com/snaps/lavender-snapshot.jpg I have attached the theme with this email. And, here's the patch for the prefs.php file: ===== patch starts here ==================== --- prefs.php 2003-05-14 10:38:05.000000000 +0800 +++ prefs.php 2003-05-17 22:57:26.000000000 +0800 @@ -45,6 +45,7 @@ 'gennevilliers' => _("Gennevilliers"), 'green' => _("Green"), 'grey' => _("Grey"), + 'lavender' => _("Lavender"), 'lightblue' => _("Light Blue"), 'mozilla' => _("Mozilla"), 'NeXTgrey' => _("NeXT"), ===== patch ends here ==================== The lavender-bg.gif file should be in the directory: "//graphics/" Regards, Ziaur Rahman email: zia@qalacom.com -------------- next part -------------- A non-text attachment was scrubbed... Name: lavender.zip Type: application/x-zip-compressed Size: 984 bytes Desc: not available Url : http://lists.horde.org/archives/dev/attachments/20030517/e256acfe/lavender.bin From dda at ic.ru Sun May 18 09:45:17 2003 From: dda at ic.ru (Dmitry Diskin) Date: Sun May 18 09:45:38 2003 Subject: [dev] is_a(), PEAR_Error and error mesages (newbie) Message-ID: Hello, I'm trying to modify ldap auth driver to make it possible to delete users from LDAP database. First of all, I set 'remove' capability to 'true' in horde/lib/Auth/ldap.php. Next, I created function removeUser: function removeUser($userID) { $ldap = @ldap_connect($this->_params['hostspec']); $binddn = $this->_params['uid'] . '=' . $this->_params['username'] . ',' . $this->_params['basedn']; $bind = @ldap_bind($ldap, $binddn, $this->_params['password']); $dn = $this->_params['uid'] . '=' . $userID . ',' . $this->_params['basedn']; if (@ldap_delete($ldap, $dn)) { return AUTH_OK; } else { Horde::logMessage('removeUser: ' . @ldap_error($ldap), __FILE__, __LINE__, LOG_DEBUG); $this->_setAuthError(_("Remove failed.")); return false; } } And I'm keeping to receive "Successfully removed 'xxx' from the system.", while actually remove does not work and in horde.log I can see this: May 18 20:26:57 HORDE [debug] [horde] removeUser: Insufficient access [on line 176 of "/home/dda/horde/lib/Auth/ldap.php"] According to the following code in horde/admin/user.php: if (is_a($auth->removeUser($f_user_name), 'PEAR_Error')) { $notification->push(sprintf(_("There was a problem removing '%s' from the system."), $f_user_name), 'horde.error'); } else { $notification->push(sprintf(_("Successfully removed '%s' from the system."), $f_user_name), 'horde.success'); } I should receive '..was a problem..' message if removeUser() returns value of 'PEAR_Error' class. I used as an example function _authenticate($userID, $credentials) - comments to this function say: "@return boolean True on success or a PEAR_Error object on failure." Please explain the following piece of code: $ldap = @ldap_connect($this->_params['hostspec']); if (!$ldap) { $this->_setAuthError(_("Failed to connect to LDAP server.")); return false; } I'm new to PHP, and I can't understand, first of all, how "return false;" can represent a PEAR_Error object. Thank you for your help. Dmitry. From dda at ic.ru Sun May 18 10:52:02 2003 From: dda at ic.ru (Dmitry Diskin) Date: Sun May 18 10:52:29 2003 Subject: [dev] Re: is_a(), PEAR_Error and error mesages (newbie) In-Reply-To: References: Message-ID: While browsing through Horde source code I noticed that "return PEAR::raiseError(...)" instead of "return false" solves my problem. So I assume that ldap.php should be fixed? Regards, Dmitry. Dmitry Diskin wrote: > Hello, > > I'm trying to modify ldap auth driver to make it possible to delete > users from LDAP database. First of all, I set 'remove' capability to > 'true' in horde/lib/Auth/ldap.php. Next, I created function removeUser: > > function removeUser($userID) > { > $ldap = @ldap_connect($this->_params['hostspec']); > > $binddn = $this->_params['uid'] . '=' . > $this->_params['username'] . ',' . $this->_params['basedn']; > $bind = @ldap_bind($ldap, $binddn, $this->_params['password']); > > $dn = $this->_params['uid'] . '=' . $userID . ',' . > $this->_params['basedn']; > > if (@ldap_delete($ldap, $dn)) { > return AUTH_OK; > } else { > Horde::logMessage('removeUser: ' . @ldap_error($ldap), > __FILE__, __LINE__, LOG_DEBUG); > $this->_setAuthError(_("Remove failed.")); > return false; > } > } > > And I'm keeping to receive "Successfully removed 'xxx' from the > system.", while actually remove does not work and in horde.log I can see > this: > > May 18 20:26:57 HORDE [debug] [horde] removeUser: Insufficient access > [on line 176 of "/home/dda/horde/lib/Auth/ldap.php"] > > According to the following code in horde/admin/user.php: > > if (is_a($auth->removeUser($f_user_name), 'PEAR_Error')) { > $notification->push(sprintf(_("There was a problem removing > '%s' from the system."), $f_user_name), 'horde.error'); > } else { > $notification->push(sprintf(_("Successfully removed '%s' > from the system."), $f_user_name), 'horde.success'); > } > > I should receive '..was a problem..' message if removeUser() returns > value of 'PEAR_Error' class. I used as an example function > _authenticate($userID, $credentials) - comments to this function say: > "@return boolean True on success or a PEAR_Error object on failure." > Please explain the following piece of code: > > $ldap = @ldap_connect($this->_params['hostspec']); > if (!$ldap) { > $this->_setAuthError(_("Failed to connect to LDAP server.")); > return false; > } > > > I'm new to PHP, and I can't understand, first of all, how "return > false;" can represent a PEAR_Error object. > > Thank you for your help. > Dmitry. > > > From chuck at horde.org Sun May 18 10:48:11 2003 From: chuck at horde.org (Chuck Hagenbuch) Date: Sun May 18 10:52:45 2003 Subject: [dev] jonah stories In-Reply-To: <1053179548.b3c63b664b7bf@my.oblo.com> References: <1053179548.b3c63b664b7bf@my.oblo.com> Message-ID: <1053280091.8065e297969d9@marina.horde.org> Quoting Marko Djukic : > does it make sense to invert the relationship between channels/stories > and have a story belong to one or more channels? > > ie, compose a story then select to which channel it belongs (defaulting > to one specific channel if clicked through a channel for example) Yes, that makes a lot of sense to me. -chuck -- Charles Hagenbuch, The alligators were there, too, in a bathtub inside the house. From jan at horde.org Sun May 18 15:36:31 2003 From: jan at horde.org (Jan Schneider) Date: Sun May 18 15:37:09 2003 Subject: [dev] Re: is_a(), PEAR_Error and error mesages (newbie) In-Reply-To: References: Message-ID: <1053297391.8ae615558e17f@jan.dip.ammma.net> Zitat von Dmitry Diskin : > While browsing through Horde source code I noticed that "return > PEAR::raiseError(...)" instead of "return false" solves my problem. So I > assume that ldap.php should be fixed? Yes, that sounds like the correct solution. > Dmitry Diskin wrote: > > Hello, > > > > I'm trying to modify ldap auth driver to make it possible to delete > > users from LDAP database. First of all, I set 'remove' capability to > > 'true' in horde/lib/Auth/ldap.php. Next, I created function removeUser: > > > > function removeUser($userID) > > { > > $ldap = @ldap_connect($this->_params['hostspec']); > > > > $binddn = $this->_params['uid'] . '=' . > > $this->_params['username'] . ',' . $this->_params['basedn']; > > $bind = @ldap_bind($ldap, $binddn, $this->_params['password']); > > > > $dn = $this->_params['uid'] . '=' . $userID . ',' . > > $this->_params['basedn']; > > > > if (@ldap_delete($ldap, $dn)) { > > return AUTH_OK; > > } else { > > Horde::logMessage('removeUser: ' . @ldap_error($ldap), > > __FILE__, __LINE__, LOG_DEBUG); > > $this->_setAuthError(_("Remove failed.")); > > return false; > > } > > } > > > > And I'm keeping to receive "Successfully removed 'xxx' from the > > system.", while actually remove does not work and in horde.log I can > see > > this: > > > > May 18 20:26:57 HORDE [debug] [horde] removeUser: Insufficient access > > [on line 176 of "/home/dda/horde/lib/Auth/ldap.php"] > > > > According to the following code in horde/admin/user.php: > > > > if (is_a($auth->removeUser($f_user_name), 'PEAR_Error')) { > > $notification->push(sprintf(_("There was a problem removing > > '%s' from the system."), $f_user_name), 'horde.error'); > > } else { > > $notification->push(sprintf(_("Successfully removed '%s' > > from the system."), $f_user_name), 'horde.success'); > > } > > > > I should receive '..was a problem..' message if removeUser() returns > > value of 'PEAR_Error' class. I used as an example function > > _authenticate($userID, $credentials) - comments to this function say: > > "@return boolean True on success or a PEAR_Error object on failure." > > Please explain the following piece of code: > > > > $ldap = @ldap_connect($this->_params['hostspec']); > > if (!$ldap) { > > $this->_setAuthError(_("Failed to connect to LDAP > server.")); > > return false; > > } > > > > > > I'm new to PHP, and I can't understand, first of all, how "return > > false;" can represent a PEAR_Error object. Jan. -- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft