From: <ji...@us...> - 2007-10-11 23:46:29
|
Update of /cvsroot/phpicalendar/phpicalendar3/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22591/phpicalendar3/functions Modified Files: class.Parser.php class.Vcalendar.php class.Vtimezone.php class.iCalObj.php Log Message: modify mont.php to set current view before parsing, and to remove some extraneous stuff duplicated in init.inc.php Index: class.Parser.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar3/functions/class.Parser.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** class.Parser.php 2 May 2007 13:41:52 -0000 1.3 --- class.Parser.php 11 Oct 2007 23:46:31 -0000 1.4 *************** *** 85,89 **** $obj = null; $obj_stack = array(); ! if (!$this->open_file($filename)) return "can't open file"; --- 85,89 ---- $obj = null; $obj_stack = array(); ! $tz_list = array(); if (!$this->open_file($filename)) return "can't open file"; *************** *** 100,105 **** # echo "key:$key\n"; ! switch ($key) ! { case 'BEGIN': $type = ucfirst(strtolower($tmp[1])); --- 100,104 ---- # echo "key:$key\n"; ! switch ($key){ case 'BEGIN': $type = ucfirst(strtolower($tmp[1])); *************** *** 124,128 **** case 'END': $obj = array_pop($obj_stack); ! if (is_object(end($obj_stack))) { $parent_obj = end($obj_stack); --- 123,132 ---- case 'END': $obj = array_pop($obj_stack); ! switch (get_class($obj)){ ! case 'Vtimezone': $this->tz_list[$obj->tzid] = $obj; break; ! case 'Vevent': $this->event_list[$obj->uid] = $obj; break; ! case 'Vtodo': $this->todo_list[] = $obj; break; ! case 'Vfreebusy': $this->freebusy_list[] = $obj; break; ! } if (is_object(end($obj_stack))) { $parent_obj = end($obj_stack); *************** *** 164,168 **** } ! print_r($this->cal); return true; --- 168,173 ---- } ! # print_r($this->cal); ! # print_r($tz_list); return true; Index: class.Vcalendar.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar3/functions/class.Vcalendar.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** class.Vcalendar.php 2 May 2007 13:41:52 -0000 1.3 --- class.Vcalendar.php 11 Oct 2007 23:46:31 -0000 1.4 *************** *** 26,28 **** --- 26,34 ---- function Vcalendar() {} + function process_child($obj) { + #echo "\t".get_class($this)." object processing child of type ".get_class($obj)."\n"; + + # $this->children[] = $obj; + } + } ?> \ No newline at end of file Index: class.Vtimezone.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar3/functions/class.Vtimezone.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** class.Vtimezone.php 4 May 2007 21:02:23 -0000 1.3 --- class.Vtimezone.php 11 Oct 2007 23:46:31 -0000 1.4 *************** *** 21,23 **** --- 21,29 ---- function Vtimezone() {} + function process_child($obj) { + #echo "\t".get_class($this)." object processing child of type ".get_class($obj)."\n"; + $this->{get_class($obj)} = $obj; + } + + } ?> \ No newline at end of file Index: class.iCalObj.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar3/functions/class.iCalObj.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** class.iCalObj.php 22 May 2007 01:02:45 -0000 1.4 --- class.iCalObj.php 11 Oct 2007 23:46:31 -0000 1.5 *************** *** 54,59 **** */ function process_line($key, $line) { ! echo "\tfeed key= $key line=$line to the object of type ". ! get_class($this)."\n"; switch ($key) --- 54,58 ---- */ function process_line($key, $line) { ! #echo "\tfeed key= $key line=$line to the object of type ". get_class($this)."\n"; switch ($key) *************** *** 73,78 **** */ function process_child($obj) { ! echo "\t".get_class($this)." object processing child of type ". ! get_class($obj)."\n"; $this->children[] = $obj; --- 72,76 ---- */ function process_child($obj) { ! #echo "\t".get_class($this)." object processing child of type ". get_class($obj)."\n"; $this->children[] = $obj; *************** *** 86,90 **** */ function finish() { ! echo "END:tell the ".get_class($this)." object to finish up, pop it off the stack.\n"; } --- 84,88 ---- */ function finish() { ! #echo "END:tell the ".get_class($this)." object to finish up, pop it off the stack.\n"; } |