Menu

#74 Enabled CURL along with Fopen in ical_parser

open
nobody
5
2012-12-21
2006-10-30
Drew
No

In response to Feature Request 1477083: CURL instead of
fopen, I modified ical_parser.php from 2.22 to use it
and fopen. There is a setting that allows the change of
fopen to CURL for the config.inc.php file.

The patch was made against the ical_parser.php file
from the 2.22 release.

In order to set the setting in the config.inc.php, the
following line needs to be added (logically at the end
of the webcal section):

$enable_fopen = 'no'; // Set this to 'no' in order to
use CURL instead of fopen, default is yes

Discussion

  • Drew

    Drew - 2006-10-31

    Logged In: YES
    user_id=1447598

    I made a typo in the patch. It didn't properly add the
    continuation lines, but it is fixed now in this patch.

     
  • Drew

    Drew - 2006-10-31

    Updated patch.

     
  • Nobody/Anonymous

    Logged In: NO

    There is an error in the getiCalContents function. When a continuation line begins with a space between words (i.e., the line begins with 2 spaces), that space gets stripped, running the words together. Near the end of the function:

    if (substr($v, 0, 1) == " ")
    $d[count($d)-1] .= trim(substr($v, 1));
    else
    $d[] = trim($v);

    The second line should be

    $d[count($d)-1] .= rtrim(substr($v, 1));

    substr will strip off the first space (the one that indicates a continuation), but then we use rtrim instead of trim to preserve the second space.

     
  • Jim Hu

    Jim Hu - 2008-12-26

    This looks like it pulls the whole calendar file into memory, instead of reading it one line at a time. This strikes me as problematic for very large local ics files.

     
  • Nobody/Anonymous

    This shouldn't load in local files, only webcals. Local files will still use fopen.

    Also near the end of the array where it reads each line there is:

    $d[] = trim($v);

    I think that needs to be changed to:

    $d[] = ltrim($v);

    So that if a new line starts off with space word space it won't trim both sides but just the space at the beginning.

     
  • Nobody/Anonymous

    EFZhwy <a href="http://izdepynizfgo.com/">izdepynizfgo</a>, [url=http://usmpvnibnujp.com/]usmpvnibnujp[/url], [link=http://qwcrjkhhvxyv.com/]qwcrjkhhvxyv[/link], http://vzgnhmixrzfc.com/

     
  • Nobody/Anonymous

    SQ6fF9 <a href="http://ivdwsknkpyfn.com/">ivdwsknkpyfn</a>, [url=http://xnnbpwwlptwc.com/]xnnbpwwlptwc[/url], [link=http://eskbldkvgxxh.com/]eskbldkvgxxh[/link], http://jfpkmrthwfhz.com/

     
  • Nobody/Anonymous

    dRV1SJ <a href="http://uwjaklgkbrpp.com/">uwjaklgkbrpp</a>, [url=http://auytnsvlhakx.com/]auytnsvlhakx[/url], [link=http://guzdpbxawbfx.com/]guzdpbxawbfx[/link], http://sgpcjhdisqpe.com/

     
  • Nobody/Anonymous

    UQPyRK <a href="http://znwxyqmebkcg.com/">znwxyqmebkcg</a>, [url=http://jbuggqlrrutn.com/]jbuggqlrrutn[/url], [link=http://elxbbvydnext.com/]elxbbvydnext[/link], http://nbbcarcddqjd.com/

     
  • Nobody/Anonymous

    DPt8SI <a href="http://fjuqwwmzjxxf.com/">fjuqwwmzjxxf</a>, [url=http://jeiqlaylitrm.com/]jeiqlaylitrm[/url], [link=http://ebbhszxcueue.com/]ebbhszxcueue[/link], http://wnmmbegjordu.com/

     
  • Nobody/Anonymous

    eDGSZH <a href="http://cgcueqhsbcmu.com/">cgcueqhsbcmu</a>, [url=http://drmcrgkzneci.com/]drmcrgkzneci[/url], [link=http://cffnjrveeiwt.com/]cffnjrveeiwt[/link], http://pkhaevxatvth.com/