- Timestamp:
- 01/11/13 08:48:41 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/plugins/icalcreator/iCalcreator.class.php
r7660 r7730 1702 1702 foreach( $rows as $lix => $line ) { 1703 1703 if( 'BEGIN:VCALENDAR' == strtoupper( substr( $line, 0, 15 ))) { 1704 $calsync++;1704 ++$calsync; 1705 1705 continue; 1706 1706 } … … 1725 1725 elseif( 'BEGIN:VFREEBUSY' == strtoupper( substr( $line, 0, 15 ))) { 1726 1726 $comp = new vfreebusy( $config ); 1727 $compsync++;1727 ++$compsync; 1728 1728 } 1729 1729 elseif( 'BEGIN:VJOURNAL' == strtoupper( substr( $line, 0, 14 ))) { 1730 1730 $comp = new vjournal( $config ); 1731 $compsync++;1731 ++$compsync; 1732 1732 } 1733 1733 elseif( 'BEGIN:VTODO' == strtoupper( substr( $line, 0, 11 ))) { 1734 1734 $comp = new vtodo( $config ); 1735 $compsync++;1735 ++$compsync; 1736 1736 } 1737 1737 elseif( 'BEGIN:VTIMEZONE' == strtoupper( substr( $line, 0, 15 ))) { 1738 1738 $comp = new vtimezone( $config ); 1739 $compsync++;1739 ++$compsync; 1740 1740 } 1741 1741 else { /* update component with unparsed data */ … … 1769 1769 else 1770 1770 $propname .= $char; 1771 $cix++;1771 ++$cix; 1772 1772 } 1773 1773 /* skip non standard property names */ … … 1814 1814 else 1815 1815 $attr[$attrix] .= $line[$cix]; 1816 $cix++;1816 ++$cix; 1817 1817 } 1818 1818 /* make attributes in array format */ … … 1831 1831 while( FALSE !== substr( $line, $lix, 1 )) { 1832 1832 if(( 0 < $lix ) && ( ',' == $line[$lix] ) && ( "\\" != $line[( $lix - 1 )])) { 1833 $cix++;1833 ++$cix; 1834 1834 $content[$cix] = ''; 1835 1835 } 1836 1836 else 1837 1837 $content[$cix] .= $line[$lix]; 1838 $lix++;1838 ++$lix; 1839 1839 } 1840 1840 if( 1 < count( $content )) { … … 4372 4372 $length = 6; 4373 4373 $str = null; 4374 for( $p = 0; $p < $length; $p++)4374 for( $p = 0; $p < $length; ++$p ) 4375 4375 $unique .= $base{mt_rand( $start, $end )}; 4376 4376 $this->uid = array( 'params' => null ); … … 4789 4789 } 4790 4790 $content2 .= $content21.$content22; 4791 $bydaycnt++;4791 ++$bydaycnt; 4792 4792 } 4793 4793 else { … … 4797 4797 else { 4798 4798 $content22 .= $valuePart; 4799 $bydaycnt++;4799 ++$bydaycnt; 4800 4800 } 4801 4801 $content2 .= $content21.$content22; … … 5366 5366 $ak = ( is_array( $this->attach )) ? array_keys( $this->attach ) : array(); 5367 5367 while( is_array( $this->attach ) && !isset( $this->attach[$propix] ) && ( 0 < count( $this->attach )) && ( $propix < end( $ak ))) 5368 $propix++;5368 ++$propix; 5369 5369 $this->propix[$propName] = $propix; 5370 5370 if( !isset( $this->attach[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } … … 5374 5374 $ak = ( is_array( $this->attendee )) ? array_keys( $this->attendee ) : array(); 5375 5375 while( is_array( $this->attendee ) && !isset( $this->attendee[$propix] ) && ( 0 < count( $this->attendee )) && ( $propix < end( $ak ))) 5376 $propix++;5376 ++$propix; 5377 5377 $this->propix[$propName] = $propix; 5378 5378 if( !isset( $this->attendee[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } … … 5382 5382 $ak = ( is_array( $this->categories )) ? array_keys( $this->categories ) : array(); 5383 5383 while( is_array( $this->categories ) && !isset( $this->categories[$propix] ) && ( 0 < count( $this->categories )) && ( $propix < end( $ak ))) 5384 $propix++;5384 ++$propix; 5385 5385 $this->propix[$propName] = $propix; 5386 5386 if( !isset( $this->categories[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } … … 5393 5393 $ak = ( is_array( $this->comment )) ? array_keys( $this->comment ) : array(); 5394 5394 while( is_array( $this->comment ) && !isset( $this->comment[$propix] ) && ( 0 < count( $this->comment )) && ( $propix < end( $ak ))) 5395 $propix++;5395 ++$propix; 5396 5396 $this->propix[$propName] = $propix; 5397 5397 if( !isset( $this->comment[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } … … 5404 5404 $ak = ( is_array( $this->contact )) ? array_keys( $this->contact ) : array(); 5405 5405 while( is_array( $this->contact ) && !isset( $this->contact[$propix] ) && ( 0 < count( $this->contact )) && ( $propix < end( $ak ))) 5406 $propix++;5406 ++$propix; 5407 5407 $this->propix[$propName] = $propix; 5408 5408 if( !isset( $this->contact[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } … … 5415 5415 $ak = ( is_array( $this->description )) ? array_keys( $this->description ) : array(); 5416 5416 while( is_array( $this->description ) && !isset( $this->description[$propix] ) && ( 0 < count( $this->description )) && ( $propix < end( $ak ))) 5417 $propix++;5417 ++$propix; 5418 5418 $this->propix[$propName] = $propix; 5419 5419 if( !isset( $this->description[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } … … 5444 5444 $ak = ( is_array( $this->exdate )) ? array_keys( $this->exdate ) : array(); 5445 5445 while( is_array( $this->exdate ) && !isset( $this->exdate[$propix] ) && ( 0 < count( $this->exdate )) && ( $propix < end( $ak ))) 5446 $propix++;5446 ++$propix; 5447 5447 $this->propix[$propName] = $propix; 5448 5448 if( !isset( $this->exdate[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } … … 5452 5452 $ak = ( is_array( $this->exrule )) ? array_keys( $this->exrule ) : array(); 5453 5453 while( is_array( $this->exrule ) && !isset( $this->exrule[$propix] ) && ( 0 < count( $this->exrule )) && ( $propix < end( $ak ))) 5454 $propix++;5454 ++$propix; 5455 5455 $this->propix[$propName] = $propix; 5456 5456 if( !isset( $this->exrule[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } … … 5460 5460 $ak = ( is_array( $this->freebusy )) ? array_keys( $this->freebusy ) : array(); 5461 5461 while( is_array( $this->freebusy ) && !isset( $this->freebusy[$propix] ) && ( 0 < count( $this->freebusy )) && ( $propix < end( $ak ))) 5462 $propix++;5462 ++$propix; 5463 5463 $this->propix[$propName] = $propix; 5464 5464 if( !isset( $this->freebusy[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } … … 5486 5486 $ak = ( is_array( $this->rdate )) ? array_keys( $this->rdate ) : array(); 5487 5487 while( is_array( $this->rdate ) && !isset( $this->rdate[$propix] ) && ( 0 < count( $this->rdate )) && ( $propix < end( $ak ))) 5488 $propix++;5488 ++$propix; 5489 5489 $this->propix[$propName] = $propix; 5490 5490 if( !isset( $this->rdate[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } … … 5497 5497 $ak = ( is_array( $this->relatedto )) ? array_keys( $this->relatedto ) : array(); 5498 5498 while( is_array( $this->relatedto ) && !isset( $this->relatedto[$propix] ) && ( 0 < count( $this->relatedto )) && ( $propix < end( $ak ))) 5499 $propix++;5499 ++$propix; 5500 5500 $this->propix[$propName] = $propix; 5501 5501 if( !isset( $this->relatedto[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } … … 5508 5508 $ak = ( is_array( $this->requeststatus )) ? array_keys( $this->requeststatus ) : array(); 5509 5509 while( is_array( $this->requeststatus ) && !isset( $this->requeststatus[$propix] ) && ( 0 < count( $this->requeststatus )) && ( $propix < end( $ak ))) 5510 $propix++;5510 ++$propix; 5511 5511 $this->propix[$propName] = $propix; 5512 5512 if( !isset( $this->requeststatus[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } … … 5516 5516 $ak = ( is_array( $this->resources )) ? array_keys( $this->resources ) : array(); 5517 5517 while( is_array( $this->resources ) && !isset( $this->resources[$propix] ) && ( 0 < count( $this->resources )) && ( $propix < end( $ak ))) 5518 $propix++;5518 ++$propix; 5519 5519 $this->propix[$propName] = $propix; 5520 5520 if( !isset( $this->resources[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } … … 5524 5524 $ak = ( is_array( $this->rrule )) ? array_keys( $this->rrule ) : array(); 5525 5525 while( is_array( $this->rrule ) && !isset( $this->rrule[$propix] ) && ( 0 < count( $this->rrule )) && ( $propix < end( $ak ))) 5526 $propix++;5526 ++$propix; 5527 5527 $this->propix[$propName] = $propix; 5528 5528 if( !isset( $this->rrule[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } … … 5676 5676 return FALSE; 5677 5677 $arglist[0] = strtoupper( $arglist[0] ); 5678 for( $argix=$numargs; $argix < 12; $argix++) {5678 for( $argix=$numargs; $argix < 12; ++$argix ) { 5679 5679 if( !isset( $arglist[$argix] )) 5680 5680 $arglist[$argix] = null; … … 5830 5830 elseif( 'BEGIN:VALARM' == strtoupper( substr( $line, 0, 12 ))) { 5831 5831 $comp = new valarm( $config); 5832 $subsync++;5832 ++$subsync; 5833 5833 } 5834 5834 elseif( 'BEGIN:STANDARD' == strtoupper( substr( $line, 0, 14 ))) { 5835 5835 $comp = new vtimezone( 'standard', $config ); 5836 $subsync++;5836 ++$subsync; 5837 5837 } 5838 5838 elseif( 'BEGIN:DAYLIGHT' == strtoupper( substr( $line, 0, 14 ))) { 5839 5839 $comp = new vtimezone( 'daylight', $config ); 5840 $subsync++;5840 ++$subsync; 5841 5841 } 5842 5842 elseif( 'BEGIN:' == strtoupper( substr( $line, 0, 6 ))) // begin:<component> 5843 $compsync++;5843 ++$compsync; 5844 5844 else 5845 5845 $comp->unparsed[] = $line; … … 5918 5918 break; 5919 5919 } 5920 $cix++;5920 ++$cix; 5921 5921 } 5922 5922 if( '"' == $line[$cix] ) … … 5926 5926 else 5927 5927 $attr[$attrix] .= $line[$cix]; 5928 $cix++;5928 ++$cix; 5929 5929 } 5930 5930 /* make attributes in array format */ … … 5959 5959 while( FALSE !== substr( $line, $lix, 1 )) { 5960 5960 if(( ',' == $line[$lix] ) && ( "\\" != $line[( $lix - 1 )])) { 5961 $cix++;5961 ++$cix; 5962 5962 $content[$cix] = ''; 5963 5963 } 5964 5964 else 5965 5965 $content[$cix] .= $line[$lix]; 5966 $lix++;5966 ++$lix; 5967 5967 } 5968 5968 if( 1 < count( $content )) { … … 6159 6159 return TRUE; 6160 6160 } 6161 $cix2dC++;6161 ++$cix2dC; 6162 6162 } 6163 6163 elseif( !$argType && ($arg1 == $component->getProperty( 'uid' ))) { … … 6210 6210 if( $index == $cix2gC ) 6211 6211 return $component->copy(); 6212 $cix2gC++;6212 ++$cix2gC; 6213 6213 } 6214 6214 elseif( !$argType && ( $arg1 == $component->getProperty( 'uid' ))) … … 6303 6303 return TRUE; 6304 6304 } 6305 $cix2sC++;6305 ++$cix2sC; 6306 6306 } 6307 6307 elseif( !$argType && ( $arg1 == $component2->getProperty( 'uid' ))) { // UID insert/replace … … 9144 9144 } 9145 9145 $name[$k] .= $char; 9146 $x++;9146 ++$x; 9147 9147 } 9148 9148 }
Note: See TracChangeset
for help on using the changeset viewer.