Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: Agent86 on October 06, 2009, 01:10:51 AM

Title: Apply Horde Patch to allow vbooks editing
Post by: Agent86 on October 06, 2009, 01:10:51 AM
Hi

I've chatted in #horde via IRC about the ability to edit horde virtual address books; and a programmer who worked on this project indicated that he thought that it could already do that, and indicated it's a bug.

So he instantly submitted the bug and created the patch;and gave me a link, however I'm too ignorant to apply the patch unfortunately.

Anyhow, here is the patch link he gave me if anyone is interested:
http://lists.horde.org/archives/cvs/Week-of-Mon-20091005/089452.html

And his short instruction from the chatter/programmer was to:
download the second link, and use your "patch" program

Anyhow, according to the IRC chat this should enable the editing of contacts in virtual address books

I have no idea how to use the patch or if it would simply get over written if any updates of the server would occur.

But anyhow here it is.
I would love to know if it's something I could patch or would it be best to submit a bug and wait for the outcome ?

Bug submitted
http://bugs.contribs.org/show_bug.cgi?id=5500

Happy Posting

Title: Re: Apply Horde Patch to allow vbooks editing
Post by: johnp on October 06, 2009, 07:57:28 AM
Did you look at the vbook.php change file in a text editor? I tells you what needs to be changed. From a quick look, it seems line 3 needs to be changed and about 5 lines near the bottom need to be deleted and one added.

I assume the file in question is located at /home/httpd/html/horde/turba/lib/Driver

I would back it up before any changes though.
Title: Re: Apply Horde Patch to allow vbooks editing
Post by: Agent86 on October 06, 2009, 02:46:46 PM
Hi,
Thanks for the repsonse.

Did you look at the vbook.php change file in a text editor? I tells you what needs to be changed. From a quick look, it seems line 3 needs to be changed and about 5 lines near the bottom need to be deleted and one added.

I assume the file in question is located at /home/httpd/html/horde/turba/lib/Driver

I would back it up before any changes though.

I did look at the .php in editor, but it appears the the lib/Driver/vbook.php is much longer then the patch, I'm not sure how to apply the patch or to use a patch program as this programmer indicated.

I see another post about patching, but not related to vbooks, however I'm sure I could use the same method to patch

http://forums.contribs.org/index.php/topic,34545.0.html

Regarding the post above:
I see that this cp command copies the source to .original which is I guess a backup of the original.

Then the patch command applies the .diff to the original.

Sounds simple enough, but what about the templating issue ?

Would the above posted thread apply here ?
I guess it couldn't hurt anything to try it, as long as my vbook.php is backed up.

Thanks again.



Title: Re: Apply Horde Patch to allow vbooks editing
Post by: johnp on October 06, 2009, 09:48:10 PM
The file you got from horde shows the changes that need to be made to your existing file. The minus sign at the start of the line indicates a delete, while a plus sign means to add the line.
Title: Re: Apply Horde Patch to allow vbooks editing
Post by: Agent86 on October 06, 2009, 10:24:45 PM
The file you got from horde shows the changes that need to be made to your existing file. The minus sign at the start of the line indicates a delete, while a plus sign means to add the line.

OOHHH !
Thanks

Thanks for help I really appreciate the time and response I made the changes and works perfectly.

I can now edit contacts on the virtual address books.

Title: Re: Apply Horde Patch to allow vbooks editing
Post by: Agent86 on October 07, 2009, 03:38:15 AM
I may have jumped the gun.

After changing the file the edit contacts feature is there, and the edit screen comes up when clicking the button, however I cannot save any changes.
I get the following error:

Quote
There was an error saving the contact. Contact your system administrator for further help.
Title: Re: Apply Horde Patch to allow vbooks editing
Post by: Agent86 on October 07, 2009, 03:54:22 PM
Talked to mrubinsk again in #horde chat.

He indicated he will look into the save topic,

It works fine as admin, but not as user.
FYI
Title: Re: Apply Horde Patch to allow vbooks editing
Post by: Agent86 on October 07, 2009, 05:15:37 PM
From: mrubinsk

Quote
http://cvs.horde.org/diff.php/turba/lib/Driver/vbook.php?r1=1.8.2.6&r2=1.8.2.8

Indicates this info should solve the save contact edits. but I'm not sure what to do with this info, I'll have to research some more because of my ignorance.

Thanks for any help

Title: Re: Apply Horde Patch to allow vbooks editing
Post by: Agent86 on October 07, 2009, 07:37:40 PM
OK it works and saves now, I guess I should have confirmed this before saying it worked, but I was excited about seeing the edit icon i the virtual books, so I assumed it was working.

Anyhow using the vbook.php Revision 1.8.2.8 as directed by mrubinsk

I simply applied the new revisions to the vbook.php file as before and now the saving of and editing contacts for virtual books works well.

Cannot add contacts to virtual books because of the nature of the dynamic searches, but you can edit and delete them just FYI

Makes things easy when you want to call someone from the virtual book, and then add notes or something.

Before you had to go to the main address book or search, then open and edit not a very efficient way to manage contact.

I hope this info is useful to someone.
Thanks for all the help understanding what the + and - means this was a big help.