6.0.0-beta1
7/16/25

[#7436] API _replace method doesn't work
Summary API _replace method doesn't work
Queue Mnemo
Queue Version 2.2.1
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester almarin (at) um (dot) es
Created 10/06/2008 (6127 days ago)
Due
Updated 10/24/2008 (6109 days ago)
Assigned 10/07/2008 (6126 days ago)
Resolved 10/24/2008 (6109 days ago)
Github Issue Link
Github Pull Request
Milestone 2.3.1
Patch No

History
10/24/2008 10:54:25 AM Jan Schneider Comment #5
State ⇒ Resolved
Reply to this comment
Committed, thanks.
10/24/2008 10:53:00 AM CVS Commit Comment #4 Reply to this comment
Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/mnemo/lib/api.php?r1=1.91&r2=1.92&ty=u
10/07/2008 07:07:07 PM almarin (at) um (dot) es Comment #3 Reply to this comment
The patch is for mnemo's api.php file(HEAD CVS version), and as soon 
as I know, mnemo-h3-2.2.1 is the last version.
10/07/2008 01:39:18 PM Jan Schneider Comment #2 Reply to this comment
Are you sure this is against version 2.2.1? Does the patch apply 
against 2.3 too?
10/07/2008 01:38:34 PM Jan Schneider State ⇒ Assigned
Milestone ⇒ 2.3.1
Priority ⇒ 2. Medium
Assigned to Jan Schneider
 
10/06/2008 08:52:09 AM almarin (at) um (dot) es Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
New Attachment: api.php.patch Download
Patch ⇒ No
Milestone ⇒
Queue ⇒ Mnemo
Summary ⇒ API _replace method doesn't work
Type ⇒ Bug
Reply to this comment
I've noticed that _replace method doesn't work properly. The steps it 
follows are:

- It creates an Horde_iCalendar object

- It creates an Horde_iCalendar_vNote component with 
Horde_iCalendar::newComponent, with the previous Horde_iCalendar 
object as container

- Then, it parse the "content" string



Result:



- Horde_iCalendar object creates an new component vNote, ignoring the 
previous vNote creates, so you have an vNote empty object with a 
cantainer that has another vNote (this one with the correct data).

- In Driver fromiCalendar method, it extracts the empty vNote



I'm not sure if it is a bug of Horde_iCalendar class. Any way, i think 
that _replace in mnemo should follow the same steps as _replace nag's 
method, or even _import mnemo's method, i mean:



- Creating Horde_iCalendar object

- Parse directly the "content" string

- Extracts the component with Horde_iCalendar::getComponents()



I attach a patch. The modification has been extracted from _replace 
nag's method.


Saved Queries