I was getting no returns from $events = gcal_find_events('2010-11-11T00:00:00', '2010-12-11T00:00:00'). I traced this into gcal.module and eventually added var_dump($content) at lines 836 and 841. It seems the preg_match code which is attempting to fix a newline problem is destroying the $content stiring.

Before 836 it dumps as ...

string(54919) "<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:app='http://www.w3.org/2007/app' .... (rest removed)

After 840 it just shows as NULL.

CommentFileSizeAuthor
#4 gcal-newline-fix.patch2.23 KBcoderintherye

Comments

magpie5212’s picture

I have been able to make an update that appears to fix the initial problem. Not sure how to create a patch - but if someone wants my source file to do that...

coderintherye’s picture

Magpie, yes please send me your source and I will create a patch and see about testing it.

Or you can check out: http://drupal.org/patch
It will tell you how to create a patch. If you are already using SVN, I like to just create patches by doing an svn commit, then making the change, then do:

svn diff gcal.module > gcal.patch

Cheers.

coderintherye’s picture

Assigned: Unassigned » coderintherye

Ok, got the code, patch coming up tomorrow sometime. Thanks magpie! :)

coderintherye’s picture

Status: Active » Needs review
StatusFileSize
new2.23 KB

Actually the patch is pretty straightforward. I'm going to go ahead an put it up here with the setting that it needs review, until I can review. To others, try at your own risk until then.

betz’s picture

Status: Needs review » Reviewed & tested by the community

Yep, your patch did the trick, thanks for that!

coderintherye’s picture

Excellent, I think I have commit access, though not sure, so Ill try later and see if I can add this in.

aacraig’s picture

You do have write access, so commit away if the patch has been tested.