Ignore:
Timestamp:
12/14/12 14:30:35 (11 years ago)
Author:
douglasz
Message:

Ticket #3236 - Melhorias de performance no codigo do Expresso.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/calendar/inc/class.boicalendar.inc.php

    r6057 r7655  
    14341434                        //$this->debug('parse_parameters array return_value: '._debug_array($return_value,False)); 
    14351435 
    1436                 for ($i = 0; $i < count($return_value); $i++) { 
     1436                for ($i = 0; $i < count($return_value); ++$i) { 
    14371437                                $name = strtolower($return_value[$i]['param']); 
    14381438                                $value = $this->strip_quotes($return_value[$i]['value']); 
     
    15911591                        if (!empty ($event['x_type'])) { 
    15921592                                        $c_x_type = count($event['x_type']); 
    1593                                 for ($j = 0; $j < $c_x_type; $j++) { 
     1593                                for ($j = 0; $j < $c_x_type; ++$j) { 
    15941594                                        $str .= ';' . $this->build_xtype($event['x_type'][$j], '='); 
    15951595                                        } 
     
    16371637                if (!empty ($event['x_type'])) { 
    16381638                                $c_x_type = count($event['x_type']); 
    1639                         for ($j = 0; $j < $c_x_type; $j++) { 
     1639                        for ($j = 0; $j < $c_x_type; ++$j) { 
    16401640                                $str .= ';' . $this->build_xtype($event['x_type'][$j], '='); 
    16411641                                } 
     
    16611661                                        if (!empty ($event[$value])) { 
    16621662                                                if ($multiples && $value != 'exdate') { 
    1663                                                         for ($i = 0; $i < count($event[$value]); $i++) { 
     1663                                                        for ($i = 0; $i < count($event[$value]); ++$i) { 
    16641664                                                                $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $value)); 
    16651665                                                                } 
     
    16741674                                case 'uri' : 
    16751675                                        if (!empty ($event[$value])) { 
    1676                                                 for ($i = 0; $i < count($event[$value]); $i++) { 
     1676                                                for ($i = 0; $i < count($event[$value]); ++$i) { 
    16771677                                                        $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $to_text)); 
    16781678                                                        } 
     
    16821682                                        if (!empty ($event[$value])) { 
    16831683                                                if ($multiples) { 
    1684                                                         for ($i = 0; $i < count($event[$value]); $i++) { 
     1684                                                        for ($i = 0; $i < count($event[$value]); ++$i) { 
    16851685                                                                $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $value)); 
    16861686                                                        } 
     
    17121712                                                if (@ $this->parameter[$key]['type'] != 'function') { 
    17131713                                                        if ($multiples && count($event[$value]) > 1) { 
    1714                                                                 for ($i = 0; $i < count($event[$value]); $i++) { 
     1714                                                                for ($i = 0; $i < count($event[$value]); ++$i) { 
    17151715                                                                        $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . $this->build_parameters($event[$value][$i], $value)); 
    17161716                                                                } 
     
    17211721                                                                $function = $this->parameter[$value]['function']; 
    17221722                                                        if ($multiples) { 
    1723                                                                 for ($i = 0; $i < count($event[$value]); $i++) { 
     1723                                                                for ($i = 0; $i < count($event[$value]); ++$i) { 
    17241724                                                                        $str .= $this->fold(strtoupper(str_replace('_', '-', $value)) . ':' . $this-> $function ($event[$value][$i])); 
    17251725                                                                } 
     
    17321732                                case 'cal-address' : 
    17331733                                        if (is_array($event[$value][0])) { 
    1734                                                 for ($j = 0; $j < count($event[$value]); $j++) { 
     1734                                                for ($j = 0; $j < count($event[$value]); ++$j) { 
    17351735                                                        $temp_output = $this->build_parameters($event[$value][$j], $value); 
    17361736                                                        if ($temp_output) { 
     
    17481748                        } 
    17491749                if (!empty ($event['x_type'])) { 
    1750                         for ($i = 0; $i < count($event['x_type']); $i++) { 
     1750                        for ($i = 0; $i < count($event['x_type']); ++$i) { 
    17511751                                $str .= $this->build_xtype($event['x_type'][$i], ':'); 
    17521752                                } 
     
    17551755                if ($ical_item == 'vtimezone') { 
    17561756                        if ($event['tzdata']) { 
    1757                                 for ($k = 0; $k < count($event['tzdata']); $k++) { 
     1757                                for ($k = 0; $k < count($event['tzdata']); ++$k) { 
    17581758                                        $str .= 'BEGIN:' . strtoupper($event['tzdata'][$k]['type']) . "\r\n"; 
    17591759                                        $str .= $this->build_card_internals(strtolower($event['tzdata'][$k]['type']), $event['tzdata'][$k]); 
     
    17631763                        } 
    17641764                elseif ($event['alarm']) { 
    1765                         for ($k = 0; $k < count($event['alarm']); $k++) { 
     1765                        for ($k = 0; $k < count($event['alarm']); ++$k) { 
    17661766                                $str .= 'BEGIN:VALARM' . "\r\n"; 
    17671767                                $str .= $this->build_card_internals('valarm', $event['alarm'][$k]); 
     
    26322632                                        $attendee_count = count($ical['attendee']); 
    26332633 
    2634                                 for ($j = 0; $j < $attendee_count; $j++) { 
     2634                                for ($j = 0; $j < $attendee_count; ++$j) { 
    26352635                                        if ($this->is_owner($ical['attendee'][$j])) { 
    26362636                                                $so_event->add_attribute('participants', $this->switch_to_phpgw_status($ical['attendee'][$j]['partstat']), (int) $GLOBALS['phpgw_info']['user']['account_id']); 
     
    27882788 
    27892789        $c_events = count($ical['event']); 
    2790         for ($i = 0; $i < $c_events; $i++) { 
     2790        for ($i = 0; $i < $c_events; ++$i) { 
    27912791                $ex_participants = new exParticipants(); 
    27922792 
     
    28322832                                                $c_attendees = count($ical['event'][$i]['attendee']); 
    28332833                                                $all_attendees = ''; 
    2834                         for ($a = 0; $a < $c_attendees; $a++) { 
     2834                        for ($a = 0; $a < $c_attendees; ++$a) { 
    28352835                                $cname = '"' . $ical['event'][$i]['attendee'][$a]['cn'] . '"'; 
    28362836                                                        $email = $ical['event'][$i]['attendee'][$a]['mailto']['user']; 
Note: See TracChangeset for help on using the changeset viewer.