- Timestamp:
- 12/14/12 14:30:35 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/plugins/icalcreator/iCalcreator.class.php
r5399 r7655 393 393 if( $propix != $xpropno ) 394 394 $reduced[$xpropkey] = $xpropvalue; 395 $xpropno++;395 ++$xpropno; 396 396 } 397 397 } … … 506 506 : array( $xpropkey, $this->xprop[$xpropkey]['value'] ); 507 507 else 508 $xpropno++;508 ++$xpropno; 509 509 } 510 510 unset( $this->propix[$propName] ); … … 829 829 return TRUE; 830 830 } 831 $cix1dC++;831 ++$cix1dC; 832 832 } 833 833 elseif( !$argType && ($arg1 == $component->getProperty( 'uid' ))) { … … 891 891 if( $index == $cix1gC ) 892 892 return $component->copy(); 893 $cix1gC++;893 ++$cix1gC; 894 894 } 895 895 elseif( is_array( $arg1 )) { // array( *[propertyName => propertyValue] ) … … 944 944 if( $index == $cix1gC ) 945 945 return $component->copy(); 946 $cix1gC++;946 ++$cix1gC; 947 947 } 948 948 } // end elseif( is_array( $arg1 )) { // array( *[propertyName => propertyValue] ) … … 950 950 if( $index == $cix1gC ) 951 951 return $component->copy(); 952 $cix1gC++;952 ++$cix1gC; 953 953 } 954 954 } // end foreach ( $this->components.. . … … 1436 1436 return TRUE; 1437 1437 } 1438 $cix1sC++;1438 ++$cix1sC; 1439 1439 } 1440 1440 elseif( !$argType && ( $arg1 == $component2->getProperty( 'uid' ))) { // UID insert/replace … … 1523 1523 elseif( 'vtimezone' == $b->objName ) return 1; 1524 1524 $sortkeys = array( 'year', 'month', 'day', 'hour', 'min', 'sec' ); 1525 for( $k = 0; $k < 4 ; $k++) {1525 for( $k = 0; $k < 4 ; ++$k ) { 1526 1526 if( empty( $a->srtk[$k] )) return -1; 1527 1527 elseif( empty( $b->srtk[$k] )) return 1; … … 1607 1607 continue; 1608 1608 if( 'BEGIN:VCALENDAR' == strtoupper( substr( $line, 0, 15 ))) { 1609 $calsync++;1609 ++$calsync; 1610 1610 continue; 1611 1611 } … … 1653 1653 if( $newProp ) { 1654 1654 $newProp = FALSE; 1655 $lastix++;1655 ++$lastix; 1656 1656 $proprows[$lastix] = $line; 1657 1657 } … … 1666 1666 /* get property name */ 1667 1667 $cix = $propname = null; 1668 for( $cix=0, $clen = strlen( $line ); $cix < $clen; $cix++) {1668 for( $cix=0, $clen = strlen( $line ); $cix < $clen; ++$cix ) { 1669 1669 if( in_array( $line[$cix], array( ':', ';' ))) 1670 1670 break; … … 1680 1680 $attrix = -1; 1681 1681 $strlen = strlen( $line ); 1682 for( $cix=0; $cix < $strlen; $cix++) {1682 for( $cix=0; $cix < $strlen; ++$cix ) { 1683 1683 if(( ':' == $line[$cix] ) && 1684 1684 ( '://' != substr( $line, $cix, 3 )) && … … 1720 1720 $content = explode( ',', $line ); 1721 1721 $clen = count( $content ); 1722 for( $cix = 0; $cix < $clen; $cix++) {1722 for( $cix = 0; $cix < $clen; ++$cix ) { 1723 1723 if( "\\" == substr( $content[$cix], -1 )) { 1724 1724 $content[$cix] .= ','.$content[$cix + 1]; 1725 1725 unset( $content[$cix + 1] ); 1726 $cix++; 1727 } 1726 ++$cix; } 1728 1727 } 1729 1728 if( 1 < count( $content )) { … … 2984 2983 if( $fno < $cnt ) 2985 2984 $content .= ','; 2986 $fno++;2985 ++$fno; 2987 2986 } 2988 2987 $output .= $this->_createElement( 'FREEBUSY', $attributes, $content ); … … 3368 3367 if( $rno < $cnt ) 3369 3368 $content .= ','; 3370 $rno++;3369 ++$rno; 3371 3370 } 3372 3371 $output .= $this->_createElement( 'RDATE', $attributes, $content ); … … 4593 4592 } 4594 4593 $content2 .= $content21.$content22; 4595 $bydaycnt++;4594 ++$bydaycnt; 4596 4595 } 4597 4596 else { … … 4601 4600 else { 4602 4601 $content22 .= $valuePart; 4603 $bydaycnt++;4602 ++$bydaycnt; 4604 4603 } 4605 4604 $content2 .= $content21.$content22; … … 5077 5076 if( $propix != $xpropno ) 5078 5077 $reduced[$xpropkey] = $xpropvalue; 5079 $xpropno++;5078 ++$xpropno; 5080 5079 } 5081 5080 } … … 5139 5138 $ak = ( is_array( $this->attach )) ? array_keys( $this->attach ) : array(); 5140 5139 while( is_array( $this->attach ) && !isset( $this->attach[$propix] ) && ( 0 < count( $this->attach )) && ( $propix < end( $ak ))) 5141 $propix++;5140 ++$propix; 5142 5141 if( !isset( $this->attach[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 5143 5142 return ( $inclParam ) ? $this->attach[$propix] : $this->attach[$propix]['value']; … … 5146 5145 $ak = ( is_array( $this->attendee )) ? array_keys( $this->attendee ) : array(); 5147 5146 while( is_array( $this->attendee ) && !isset( $this->attendee[$propix] ) && ( 0 < count( $this->attendee )) && ( $propix < end( $ak ))) 5148 $propix++;5147 ++$propix; 5149 5148 if( !isset( $this->attendee[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 5150 5149 return ( $inclParam ) ? $this->attendee[$propix] : $this->attendee[$propix]['value']; … … 5153 5152 $ak = ( is_array( $this->categories )) ? array_keys( $this->categories ) : array(); 5154 5153 while( is_array( $this->categories ) && !isset( $this->categories[$propix] ) && ( 0 < count( $this->categories )) && ( $propix < end( $ak ))) 5155 $propix++;5154 ++$propix; 5156 5155 if( !isset( $this->categories[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 5157 5156 return ( $inclParam ) ? $this->categories[$propix] : $this->categories[$propix]['value']; … … 5163 5162 $ak = ( is_array( $this->comment )) ? array_keys( $this->comment ) : array(); 5164 5163 while( is_array( $this->comment ) && !isset( $this->comment[$propix] ) && ( 0 < count( $this->comment )) && ( $propix < end( $ak ))) 5165 $propix++;5164 ++$propix; 5166 5165 if( !isset( $this->comment[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 5167 5166 return ( $inclParam ) ? $this->comment[$propix] : $this->comment[$propix]['value']; … … 5173 5172 $ak = ( is_array( $this->contact )) ? array_keys( $this->contact ) : array(); 5174 5173 while( is_array( $this->contact ) && !isset( $this->contact[$propix] ) && ( 0 < count( $this->contact )) && ( $propix < end( $ak ))) 5175 $propix++;5174 ++$propix; 5176 5175 if( !isset( $this->contact[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 5177 5176 return ( $inclParam ) ? $this->contact[$propix] : $this->contact[$propix]['value']; … … 5183 5182 $ak = ( is_array( $this->description )) ? array_keys( $this->description ) : array(); 5184 5183 while( is_array( $this->description ) && !isset( $this->description[$propix] ) && ( 0 < count( $this->description )) && ( $propix < end( $ak ))) 5185 $propix++;5184 ++$propix; 5186 5185 if( !isset( $this->description[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 5187 5186 return ( $inclParam ) ? $this->description[$propix] : $this->description[$propix]['value']; … … 5211 5210 $ak = ( is_array( $this->exdate )) ? array_keys( $this->exdate ) : array(); 5212 5211 while( is_array( $this->exdate ) && !isset( $this->exdate[$propix] ) && ( 0 < count( $this->exdate )) && ( $propix < end( $ak ))) 5213 $propix++;5212 ++$propix; 5214 5213 if( !isset( $this->exdate[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 5215 5214 return ( $inclParam ) ? $this->exdate[$propix] : $this->exdate[$propix]['value']; … … 5218 5217 $ak = ( is_array( $this->exrule )) ? array_keys( $this->exrule ) : array(); 5219 5218 while( is_array( $this->exrule ) && !isset( $this->exrule[$propix] ) && ( 0 < count( $this->exrule )) && ( $propix < end( $ak ))) 5220 $propix++;5219 ++$propix; 5221 5220 if( !isset( $this->exrule[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 5222 5221 return ( $inclParam ) ? $this->exrule[$propix] : $this->exrule[$propix]['value']; … … 5225 5224 $ak = ( is_array( $this->freebusy )) ? array_keys( $this->freebusy ) : array(); 5226 5225 while( is_array( $this->freebusy ) && !isset( $this->freebusy[$propix] ) && ( 0 < count( $this->freebusy )) && ( $propix < end( $ak ))) 5227 $propix++;5226 ++$propix; 5228 5227 if( !isset( $this->freebusy[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 5229 5228 return ( $inclParam ) ? $this->freebusy[$propix] : $this->freebusy[$propix]['value']; … … 5270 5269 $ak = ( is_array( $this->requeststatus )) ? array_keys( $this->requeststatus ) : array(); 5271 5270 while( is_array( $this->requeststatus ) && !isset( $this->requeststatus[$propix] ) && ( 0 < count( $this->requeststatus )) && ( $propix < end( $ak ))) 5272 $propix++;5271 ++$propix; 5273 5272 if( !isset( $this->requeststatus[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 5274 5273 return ( $inclParam ) ? $this->requeststatus[$propix] : $this->requeststatus[$propix]['value']; … … 5277 5276 $ak = ( is_array( $this->resources )) ? array_keys( $this->resources ) : array(); 5278 5277 while( is_array( $this->resources ) && !isset( $this->resources[$propix] ) && ( 0 < count( $this->resources )) && ( $propix < end( $ak ))) 5279 $propix++;5278 ++$propix; 5280 5279 if( !isset( $this->resources[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 5281 5280 return ( $inclParam ) ? $this->resources[$propix] : $this->resources[$propix]['value']; … … 5284 5283 $ak = ( is_array( $this->rrule )) ? array_keys( $this->rrule ) : array(); 5285 5284 while( is_array( $this->rrule ) && !isset( $this->rrule[$propix] ) && ( 0 < count( $this->rrule )) && ( $propix < end( $ak ))) 5286 $propix++;5285 ++$propix; 5287 5286 if( !isset( $this->rrule[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 5288 5287 return ( $inclParam ) ? $this->rrule[$propix] : $this->rrule[$propix]['value']; … … 5309 5308 $ak = ( is_array( $this->tzname )) ? array_keys( $this->tzname ) : array(); 5310 5309 while( is_array( $this->tzname ) && !isset( $this->tzname[$propix] ) && ( 0 < count( $this->tzname )) && ( $propix < end( $ak ))) 5311 $propix++;5310 ++$propix; 5312 5311 if( !isset( $this->tzname[$propix] )) { unset( $this->propix[$propName] ); return FALSE; } 5313 5312 return ( $inclParam ) ? $this->tzname[$propix] : $this->tzname[$propix]['value']; … … 5346 5345 : array( $xpropkey, $this->xprop[$xpropkey]['value'] ); 5347 5346 else 5348 $xpropno++;5347 ++$xpropno; 5349 5348 } 5350 5349 return FALSE; // not found ?? … … 5431 5430 return FALSE; 5432 5431 $arglist[0] = strtoupper( $arglist[0] ); 5433 for( $argix=$numargs; $argix < 12; $argix++) {5432 for( $argix=$numargs; $argix < 12; ++$argix ) { 5434 5433 if( !isset( $arglist[$argix] )) 5435 5434 $arglist[$argix] = null; … … 5613 5612 $proprows[$lastix] = $proprows[$lastix]; 5614 5613 $newProp = FALSE; 5615 $lastix++;5614 ++$lastix; 5616 5615 $proprows[$lastix] = $line; 5617 5616 } … … 5627 5626 /* get propname, (problem with x-properties, otherwise in previous loop) */ 5628 5627 $cix = $propname = null; 5629 for( $cix=0, $clen = strlen( $line ); $cix < $clen; $cix++) {5628 for( $cix=0, $clen = strlen( $line ); $cix < $clen; ++$cix ) { 5630 5629 if( in_array( $line[$cix], array( ':', ';' ))) 5631 5630 break; … … 5644 5643 $attrix = -1; 5645 5644 $clen = strlen( $line ); 5646 for( $cix=0; $cix < $clen; $cix++) {5645 for( $cix=0; $cix < $clen; ++$cix ) { 5647 5646 if(( ':' == $line[$cix] ) && 5648 5647 ( '://' != substr( $line, $cix, 3 )) && … … 5694 5693 $content = explode( ',', $line ); 5695 5694 $clen = count( $content ); 5696 for( $cix = 0; $cix < $clen; $cix++) {5695 for( $cix = 0; $cix < $clen; ++$cix ) { 5697 5696 if( "\\" == substr($content[$cix], -1)) { 5698 5697 $content[$cix] .= ','.$content[$cix + 1]; 5699 5698 unset($content[$cix + 1]); 5700 $cix++;5699 ++$cix; 5701 5700 } 5702 5701 } … … 5899 5898 return TRUE; 5900 5899 } 5901 $cix2dC++;5900 ++$cix2dC; 5902 5901 } 5903 5902 elseif( !$argType && ($arg1 == $component->getProperty( 'uid' ))) { … … 5950 5949 if( $index == $cix2gC ) 5951 5950 return $component->copy(); 5952 $cix2gC++;5951 ++$cix2gC; 5953 5952 } 5954 5953 elseif( !$argType && ( $arg1 == $component->getProperty( 'uid' ))) … … 6043 6042 return TRUE; 6044 6043 } 6045 $cix2sC++;6044 ++$cix2sC; 6046 6045 } 6047 6046 elseif( !$argType && ( $arg1 == $component2->getProperty( 'uid' ))) { // UID insert/replace … … 6130 6129 $bytecnt = strlen( $tmp ); 6131 6130 $charCnt = $ix = 0; 6132 for( $ix = 0; $ix < $bytecnt; $ix++) {6131 for( $ix = 0; $ix < $bytecnt; ++$ix ) { 6133 6132 if(( 73 < $charCnt ) && ( '\n' == substr( $tmp, $ix, $eolcharlen ))) { 6134 6133 $ix += $eolcharlen;
Note: See TracChangeset
for help on using the changeset viewer.