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

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

Location:
trunk/expressoMail1_2/inc
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.ScriptS.inc.php

    r6057 r7655  
    297297                error_log( print_r($rule, true), 3, "/tmp/log" ); 
    298298 
    299                 $a++; 
     299                ++$a; 
    300300            } 
    301301 
  • trunk/expressoMail1_2/inc/class.db_functions.inc.php

    r6532 r7655  
    183183                $array_addrs_final = array();                            
    184184 
    185                 for($i = 0; $i < count($array_addrs); $i++){ 
     185                for($i = 0; $i < count($array_addrs); ++$i){ 
    186186                        $j = count($array_addrs_final); 
    187187 
     
    210210                                                                $array_addrs_final[$j] = $contact['connection_value']; 
    211211 
    212                                                         $j++; 
     212                                                        ++$j; 
    213213                                                } 
    214214                                        }else{ 
  • trunk/expressoMail1_2/inc/class.exporteml.inc.php

    r7414 r7655  
    123123                    if (is_array($files)) 
    124124                    { 
    125                         for ($i=0; $i < count($files); $i++) 
     125                        for ($i=0; $i < count($files); ++$i) 
    126126                        { 
    127127                            $files[$i] = escapeshellarg($files[$i]); 
     
    315315                         
    316316                        //cria um .zip com as mensagens selecionadas 
    317                         for($i = 0; $i < count($msg_number); $i++)  
     317                        for($i = 0; $i < count($msg_number); ++$i) 
    318318                        { 
    319319                                $header         = $this-> getHeader($msg_number[$i]);                                                                                    
     
    354354                        $array_names_keys = array_keys($sorted_msgs); 
    355355                         
    356                         for($i = 0; $i < count($array_names_keys); $i++){  
     356                        for($i = 0; $i < count($array_names_keys); ++$i){ 
    357357                                $this->folder = mb_convert_encoding($array_names_keys[$i], "UTF7-IMAP","UTF-8, ISO-8859-1, UTF7-IMAP"); 
    358358                                $msg_number = explode(',', $sorted_msgs[$array_names_keys[$i]]); 
     
    360360                                $this->connectImap(); 
    361361                                 
    362                                 for($j = 0; $j < count($msg_number); $j++)  
     362                                for($j = 0; $j < count($msg_number); ++$j) 
    363363                                { 
    364364                                        $header         = $this-> getHeader($msg_number[$j]);                                                                                    
     
    474474                        } 
    475475 
    476                         for($i = 0; $i < count($array_ids); $i++)  
     476                        for($i = 0; $i < count($array_ids); ++$i) 
    477477                        { 
    478478                                $header         = $this-> getHeader($array_ids[$i]);                                                                                    
     
    797797                $fileNames = Array(); 
    798798                         
    799                 for ($i = 0; $i < count($attachments); $i++) 
     799                for ($i = 0; $i < count($attachments); ++$i) 
    800800                { 
    801801                   $attachments[$i]['name'] = $this->remove_accents($attachments[$i]['name']); 
     
    803803                } 
    804804 
    805                 for ($i = 0; $i < count($attachments); $i++) 
     805                for ($i = 0; $i < count($attachments); ++$i) 
    806806                { 
    807807                        $fileName = $attachments[$i]['name']; 
     
    811811                        if (count($result) > 1) 
    812812                        { 
    813                             for ($j = 1; $j < count($result); $j++) 
     813                            for ($j = 1; $j < count($result); ++$j) 
    814814                            { 
    815815                                $replacement = '('.$j.')$0'; 
  • trunk/expressoMail1_2/inc/class.functions.inc.php

    r7500 r7655  
    127127                                // End Bug fixed. 
    128128                        }                                                                                                                
    129                         for($i = 0; $i < count($files); $i++) {                          
     129                        for($i = 0; $i < count($files); ++$i) { 
    130130                                if(count(explode('.js',$files[$i])) > 1) { 
    131131                                        if($includeFiles  && array_search(trim($files[$i]),$includeFiles)){      
  • trunk/expressoMail1_2/inc/class.imap_attachment.inc.php

    r6037 r7655  
    2121                if($contentParts > 1) 
    2222                { 
    23                         for($i=1; $i<$contentParts; $i++) 
     23                        for($i=1; $i<$contentParts; ++$i) 
    2424                        { 
    2525                                $msg_info['attachment'][$i]['part_in_msg']      = ($i+1); 
     
    7979                                //$array_parts_attachments['names'] .= $array_parts_attachments[$i]['name'] . ', '; 
    8080                                $array_parts_attachments[$i]['fsize'] = $msg->fsize[$msgno][$index]; 
    81                                 $i++; 
     81                                ++$i; 
    8282                        } 
    8383                } 
  • trunk/expressoMail1_2/inc/class.imap_functions.inc.php

    r7622 r7655  
    4646        function imap_functions (){ 
    4747                $this->init(); 
    48         }  
    49          
     48        } 
     49 
    5050        function init(){ 
    5151                $this->foldersLimit    = $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['imap_max_folders'] ?  $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['imap_max_folders'] : 20000; //Limit of folders (mailboxes) user can see 
     
    231231                                             
    232232                                    $return[$i] = $this->get_info_head_msg( $msg_number , $sample );                                     
    233                                     $i++; 
     233                                    ++$i; 
    234234                            } 
    235235                                                         
     
    245245                                                                array('filter' => $filter, 'criteria' => array('deepness' => '2')) 
    246246                                                        ); 
    247                                                         for($i=0; $i<count($sort_array_msg); $i++){ 
     247                                                        for($i=0; $i<count($sort_array_msg); ++$i){ 
    248248                                                                if(!isset($return[$i]['msg_number'])) 
    249249                                                                        continue; 
    250250                                                                         
    251251                                                                $numFlags = count($followupflagged); 
    252                                                                 for($ii=0; $ii<$numFlags; $ii++){ 
     252                                                                for($ii=0; $ii<$numFlags; ++$ii){ 
    253253                                                                        if($return[$i]['msg_number'] == $followupflagged[$ii]['messageNumber']){ 
    254254                                                                                $followupflag = Controller::read( array( 'concept' => 'followupflag', 'id' => $followupflagged[$ii]['followupflagId'] )); 
     
    259259                                                                } 
    260260                                                                $numLabels = count($labeleds); 
    261                                                                 for($ii=0; $ii<$numLabels; $ii++){ 
     261                                                                for($ii=0; $ii<$numLabels; ++$ii){ 
    262262                                                                        if($return[$i]['msg_number'] == $labeleds[$ii]['messageNumber']){ 
    263263                                                                                $labels = Controller::read( array( 'concept' => 'label', 'id' =>  $labeleds[$ii]['labelId']));  
     
    290290                                if($i <= ($msg_range_end-$msg_range_begin)) 
    291291                                    $return[$i] = $temp; 
    292                                 $i++; 
     292                                ++$i; 
    293293                            } 
    294294                        } 
     
    518518                        $elements = imap_mime_header_decode($string); 
    519519 
    520                         for($i = 0;$i < count($elements);$i++) 
     520                        for($i = 0;$i < count($elements);++$i) 
    521521                        { 
    522522                                $charset = strtolower($elements[$i]->charset); 
     
    743743                        if(!in_array($each_id,$messages_not_to_copy)) { 
    744744                                array_push($ids,$each_id); 
    745                                 $cont++; 
     745                                ++$cont; 
    746746                        } 
    747747                        if($cont>=100) 
     
    786786                        $array_names_keys = array_keys($sorted_msgs); 
    787787                         
    788                         for($i = 0; $i < count($sorted_msgs); $i++){ 
     788                        for($i = 0; $i < count($sorted_msgs); ++$i){ 
    789789                         
    790790                                $new_params = array(); 
     
    11321132                        $return['next_message'] = null; 
    11331133                }else{ 
    1134                         for($i = 0; $i < count($msg_ids); $i++){ 
     1134                        for($i = 0; $i < count($msg_ids); ++$i){ 
    11351135                                if($msg_ids[$i] == $msg_number){ 
    11361136                                        $return['prev_message'] = $msg_ids[$i-1]; 
     
    22562256                                        $return['new_msgs'] += 1; 
    22572257                                } 
    2258                                 $aux++; 
     2258                                ++$aux; 
    22592259                        } 
    22602260                }else if(count($msg_to_insert) > 0 && $msgs_in_the_server && $msgs_in_the_client[0] != "" && $return['new_msgs'] == 0){ 
     
    22642264                                        $return['new_msgs'] += 1; 
    22652265                                } 
    2266                                 $aux++; 
     2266                                ++$aux; 
    22672267                        } 
    22682268                }else if($num_msgs < $msg_range_end && $return['new_msgs'] == 0 && count($msg_to_insert) > 0 && $msg_range_end == $dif){ 
     
    22982298 
    22992299                    $return[$i]['msg_folder'] = $folder; 
    2300                     $i++; 
     2300                    ++$i; 
    23012301                } 
    23022302                $return['quota'] = $this->get_quota(array('folder_id' => $folder)); 
     
    23662366        { 
    23672367                $principals = array(); 
    2368                 for($x = 0; $x < 5 ; $x++) 
     2368                for($x = 0; $x < 5 ; ++$x) 
    23692369                { 
    23702370                        switch ($x) { 
     
    25592559                }else{ 
    25602560                        $child = $base_path.$this->imap_delimiter; 
    2561                         for($i =0; $i < count($test); $i++){ 
     2561                        for($i =0; $i < count($test); ++$i){ 
    25622562                                $child .= ($test[$i] ? $test[$i] : $this->functions->getLang("New Folder")); 
    25632563                                $namebox =  mb_convert_encoding($child, "UTF7-IMAP", "UTF-8"); 
     
    31183118            foreach ($size_rule_by_group as $i => $value) { 
    31193119                if (is_array($value[0])) { 
    3120                     $n_rule_groups++; 
     3120                    ++$n_rule_groups; 
    31213121                    if ($value[0]['email_max_recipient'] > $maior_valor_regra_grupo) 
    31223122                        $maior_valor_regra_grupo = $value[0]['email_max_recipient']; 
     
    36543654                        return $returns; 
    36553655                }else{ 
    3656                         for($i = 0; $i < count($array_names_keys); $i++){  
     3656                        for($i = 0; $i < count($array_names_keys); ++$i){ 
    36573657                                $param['folder'] = $array_names_keys[$i]; 
    36583658                                $param['msgs_to_set'] = $sorted_msgs[$array_names_keys[$i]]; 
     
    40884088                                $return[$j][$i]['attachment'] = $imap_attachment->get_attachment_headerinfo($mbox_stream, $msg_number); 
    40894089 
    4090                                 $i++; 
    4091                         } 
    4092                         $j++; 
     4090                                ++$i; 
     4091                        } 
     4092                        ++$j; 
    40934093                        if($mbox_stream) 
    40944094                                imap_close($mbox_stream); 
     
    41424142                                                $temp['msg_folder'] = $folder['folder_id']; 
    41434143                                                $return["msgs"][$num_msgs] = $temp; 
    4144                                                 $num_msgs++; 
     4144                                                ++$num_msgs; 
    41454145                                        } 
    41464146 
     
    45644564                                //$array_parts_attachments['names'] .= $array_parts_attachments[$i]['name'] . ', '; 
    45654565                                $array_parts_attachments[$i]['fsize'] = $msg->fsize[$msgno][$index]; 
    4566                                 $i++; 
     4566                                ++$i; 
    45674567                        } 
    45684568                } 
     
    50675067                                $return['msgs'][$i]['boxname'] = $folder; 
    50685068                                $return['msgs'][$i]['uid'] = $v; 
    5069                                 $i++; 
     5069                                ++$i; 
    50705070                        }        
    50715071                } 
     
    51045104                foreach ($return['msgs'] as $v) 
    51055105                {                
    5106                         $k++; 
     5106                        ++$k; 
    51075107                        if($k < $ini || $k >= $end ) continue;                   
    51085108                        $nMsgs[] = $v; 
     
    52895289//                      foreach ($rrr as $v) 
    52905290//                      {                
    5291 //                              $k++; 
     5291//                              ++$k; 
    52925292//                              if( $k < $ini || $k >= $end ) continue;                  
    52935293//                              $r[] = $v; 
     
    55625562        $arr_msg = explode(",", $msg_n); 
    55635563        
    5564         for($i=0; $i<count($arr_msg); $i++){ 
     5564        for($i=0; $i<count($arr_msg); ++$i){ 
    55655565                         
    55665566            if(!$this->mbox || !is_resource($this->mbox)) 
  • trunk/expressoMail1_2/inc/class.imapfp.inc.php

    r5773 r7655  
    150150                        while(1) 
    151151                        { 
    152                                 $i++; 
     152                                ++$i; 
    153153                                $response.="\r\n".$this->get_line(); 
    154154                                if(substr($response,strpos($response,$this->tag),strlen($this->tag))==$this->tag) 
  • trunk/expressoMail1_2/inc/class.ldap_functions.inc.php

    r7225 r7655  
    164164                { 
    165165                        $catalogsNum=count($this->external_srcs); 
    166                                 for ($i=0; $i<=$catalogsNum; $i++)      { 
     166                                for ($i=0; $i<=$catalogsNum; ++$i)      { 
    167167                                        if ($this->external_srcs[$i]["quicksearch"]) {  
    168168                                                $this->ldapConnect(true,$i); 
     
    177177                                                $count_entries = ldap_count_entries($this->ds,$sr); 
    178178                                                $search = ldap_get_entries($this->ds, $sr); 
    179                                                 for ($j=0; $j<$search["count"]; $j++) { 
     179                                                for ($j=0; $j<$search["count"]; ++$j) { 
    180180                                                        $info[] = $search[$j]; 
    181181                                                } 
     
    188188                $tmp_users_from_user_org = array(); 
    189189 
    190                 for ($i=0; $i<$info["count"]; $i++) 
     190                for ($i=0; $i<$info["count"]; ++$i) 
    191191                { 
    192192                        $key = $info[$i]["mail"][0] . '%' . $info[$i]["telephonenumber"][0] . '%'. $info[$i]["mobile"][0] . '%' . $info[$i]["uid"][0] . '%' . $info[$i]["jpegphoto"]['count'] . '%' . $info[$i]["employeenumber"][0] . '%' .    $info[$i]["ou"][0]; 
     
    216216                                        $contacts_result[$i]["cn"] = $cn; 
    217217                                        list ($contacts_result[$i]["mail"], $contacts_result[$i]["phone"], $contacts_result[$i]["mobile"], $contacts_result[$i]["uid"], $contacts_result[$i]["jpegphoto"], $contacts_result[$i]["employeenumber"], $contacts_result[$i]["ou"]) = preg_split('/%/', $info); 
    218                                         $i++; 
     218                                        ++$i; 
    219219                                } 
    220220                                $contacts_result['quickSearch_only_in_userSector'] = $quickSearch_only_in_userSector; 
     
    232232                                        $contacts_result[$i] = array(); 
    233233                                        $options_users_from_user_org .= $this->make_quicksearch_card($info, $cn); 
    234                                         $i++; 
     234                                        ++$i; 
    235235                                } 
    236236 
     
    240240                                        $contacts_result[$i] = array(); 
    241241                                        $options .= $this->make_quicksearch_card($info, $cn); 
    242                                         $i++; 
     242                                        ++$i; 
    243243                                } 
    244244 
     
    470470                        //Busca em Catalagos externos 
    471471                        $catalogsNum=count($this->external_srcs); 
    472                         for ($i=0; $i<=$catalogsNum; $i++)      { 
     472                        for ($i=0; $i<=$catalogsNum; ++$i)      { 
    473473                                if ($this->external_srcs[$i]["quicksearch"])  
    474474                                { 
     
    481481                                        $count_entries = ldap_count_entries($this->ds,$sr); 
    482482                                        $search = ldap_get_entries($this->ds, $sr); 
    483                                         for ($j=0; $j<$search["count"]; $j++) { 
     483                                        for ($j=0; $j<$search["count"]; ++$j) { 
    484484                                                $search[$j]['isExternal'] = true; 
    485485                        $info_return[] = $search[$j]; 
     
    617617                        } 
    618618 
    619                         for ($i=0; $i<$info["count"]; $i++) 
     619                        for ($i=0; $i<$info["count"]; ++$i) 
    620620                                $organizations[$i] = $info[$i]["ou"][0]; 
    621621 
     
    644644                        } 
    645645                        else{ 
    646                             for ($i=0; $i<$info["count"]; $i++) 
     646                            for ($i=0; $i<$info["count"]; ++$i) 
    647647                            { 
    648648                                    $organizations[$i]['ou'] = $info[$i]["ou"][0]; 
     
    732732                        $g_tmp = array(); 
    733733 
    734                         for ($i=0; $i<$info["count"]; $i++){ 
     734                        for ($i=0; $i<$info["count"]; ++$i){ 
    735735                                if((!$catalog==0)||(strtoupper($info[$i]["phpgwaccounttype"][0]) == 'U') && ($info[$i]["phpgwaccountvisible"][0] != '-1')) 
    736736                                        //aqui eh feita a concatenacao do departamento ao cn; 
     
    751751                                $name = $tmp[0]; //pega o primeiro item (cn) do vetor resultante do explode acima; 
    752752                                $department = $tmp[1]; //pega o segundo item (ou) do vetor resultanto do explode acima; 
    753                                 $users[$i++] = array("name" => $name, "email" => $mail, "department" => $department); 
     753                                $users[++$i] = array("name" => $name, "email" => $mail, "department" => $department); 
    754754 
    755755                        } 
     
    760760 
    761761                        foreach ($g_tmp as $mail => $cn){ 
    762                                 $groups[$i++] = array("name" => $cn, "email" => $mail); 
     762                                $groups[++$i] = array("name" => $cn, "email" => $mail); 
    763763                        } 
    764764                        unset($g_tmp); 
     
    782782                        ldap_close($this->ds); 
    783783 
    784                         for ($i=0; $i<$ent["count"]; $i++){ 
     784                        for ($i=0; $i<$ent["count"]; ++$i){ 
    785785                                $result['mail'][] = $ent[$i]["mail"][0]; 
    786786                                $result['mailalter'][] = $ent[$i]["mailalternateaddress"][0]; 
     
    808808                $sr=ldap_list($this->ds, $user_context, ("(&(cn=*)(phpgwaccounttype=g)(!(phpgwaccountvisible=-1)))"),$justthese); 
    809809            $info = ldap_get_entries($this->ds, $sr); 
    810             for ($i=0; $i<$info["count"]; $i++) 
     810            for ($i=0; $i<$info["count"]; ++$i) 
    811811                $groups[$uids=$info[$i]["gidnumber"][0]] = Array('name'    =>    $uids=$info[$i]["cn"][0], 'type'    =>    g); 
    812812            $justthese = array("phpgwaccountvisible","uidNumber","cn"); 
     
    817817 
    818818            $info = ldap_get_entries($this->ds, $sr); 
    819             for ($i=0; $i<$info["count"]; $i++) 
     819            for ($i=0; $i<$info["count"]; ++$i) 
    820820            { 
    821821                if ($info[$i]["phpgwaccountvisible"][0] == '-1') 
     
    914914                            $filter .= "(uid=$uid)";                                                     
    915915                            $acl_save_sent_in_shared[ $i ] =$uid; 
    916                             $i++; 
     916                            ++$i; 
    917917                                                                        
    918918                        }                                                        
     
    929929                                $info   =       ldap_get_entries($this->ds, $sr); 
    930930                                $var = print_r($acl_save_sent_in_shared, true);                          
    931                                 for ($i = 0;$i < $info["count"]; $i++){ 
     931                                for ($i = 0;$i < $info["count"]; ++$i){ 
    932932                                        $info[$i]['cn'][0] = utf8_decode($info[$i]['cn'][0]); 
    933933                                        //verify if user has permission to save sent messages in a shared folder 
     
    952952                                ldap_sort($this->ds,$sr,"cn"); 
    953953                                $result = ldap_get_entries($this->ds, $sr); 
    954                                 for ($j = 0;$j < $result["count"]; $j++){ 
     954                                for ($j = 0;$j < $result["count"]; ++$j){ 
    955955                                        $result[$j]['cn'][0] = utf8_decode($result[$j]['cn'][0]); 
    956956                                        $result[$j]['mail'][0] = $result[$j]['mail'][0]; 
     
    10481048 
    10491049 
    1050                 for ($i=0; $i<$entries['count']; $i++) 
     1050                for ($i=0; $i<$entries['count']; ++$i) 
    10511051                { 
    10521052                        $result[ $entries[$i]['gidnumber'][0] ] = $entries[$i]['cn'][0]; 
  • trunk/expressoMail1_2/inc/class.message_components.inc.php

    r5509 r7655  
    104104                { 
    105105                    $parts = $sub_part; 
    106                     $n++; 
    107                 } 
    108  
    109                 for($p = 0, $i = 1; $p < count($parts); $n++, $p++, $i++) 
     106                    ++$n; 
     107                } 
     108 
     109                for($p = 0, $i = 1; $p < count($parts); ++$n, ++$p, ++$i) 
    110110                { 
    111111                    // Skip the following... 
     
    255255                                                        break; 
    256256                                                } 
    257                                                 $n++; 
     257                                                ++$n; 
    258258                                        } 
    259259                                } 
     
    268268                                if($this->charset[$mid][$n] == '') 
    269269                                $this->charset[$mid][$n] = $param->value; 
    270                                                         $n++; 
     270                                                        ++$n; 
    271271                        } 
    272272                                        } 
  • trunk/expressoMail1_2/inc/class.phpmailer.php

    r5509 r7655  
    472472    function MailSend($header, $body) { 
    473473        $to = ""; 
    474         for($i = 0; $i < count($this->to); $i++) 
     474        for($i = 0; $i < count($this->to); ++$i) 
    475475        { 
    476476            if($i != 0) { $to .= ", "; } 
     
    533533 
    534534        // Attempt to send attach all recipients 
    535         for($i = 0; $i < count($this->to); $i++) 
     535        for($i = 0; $i < count($this->to); ++$i) 
    536536        { 
    537537                if(!$this->smtp->Recipient($this->to[$i][0])) 
    538538                        $bad_rcpt[] = $this->to[$i][0]; 
    539539        } 
    540         for($i = 0; $i < count($this->cc); $i++) 
     540        for($i = 0; $i < count($this->cc); ++$i) 
    541541        { 
    542542                if(!$this->smtp->Recipient($this->cc[$i][0])) 
    543543                        $bad_rcpt[] = $this->cc[$i][0]; 
    544544        } 
    545         for($i = 0; $i < count($this->bcc); $i++) 
     545        for($i = 0; $i < count($this->bcc); ++$i) 
    546546        { 
    547547                if(!$this->smtp->Recipient($this->bcc[$i][0])) 
     
    564564            $array_error = explode(":", $this->smtp->error['smtp_msg']); 
    565565             
    566             for($i = 0; $i < count($bad_rcpt); $i++) 
     566            for($i = 0; $i < count($bad_rcpt); ++$i) 
    567567            { 
    568568                if($i != 0) { $error .= ", "; } 
     
    765765                $connection = true; 
    766766            } 
    767             $index++; 
     767            ++$index; 
    768768        } 
    769769        if(!$connection) 
     
    826826        if(count($addr) > 1) 
    827827        { 
    828             for($i = 1; $i < count($addr); $i++) 
     828            for($i = 1; $i < count($addr); ++$i) 
    829829                $addr_str .= ", " . $this->AddrFormat($addr[$i]); 
    830830        } 
     
    867867        $line = explode($this->LE, $message); 
    868868        $message = ""; 
    869         for ($i=0 ;$i < count($line); $i++) 
     869        for ($i=0 ;$i < count($line); ++$i) 
    870870        { 
    871871          $line_part = explode(" ", $line[$i]); 
     
    10311031 
    10321032        // Add custom headers 
    1033         for($index = 0; $index < count($this->CustomHeader); $index++) 
     1033        for($index = 0; $index < count($this->CustomHeader); ++$index) 
    10341034        { 
    10351035            $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]),  
     
    12651265 
    12661266        // Add all attachments 
    1267         for($i = 0; $i < count($this->attachment); $i++) 
     1267        for($i = 0; $i < count($this->attachment); ++$i) 
    12681268        { 
    12691269            // Check for string attachment 
     
    15401540    function InlineImageExists() { 
    15411541        $result = false; 
    1542         for($i = 0; $i < count($this->attachment); $i++) 
     1542        for($i = 0; $i < count($this->attachment); ++$i) 
    15431543        { 
    15441544            if($this->attachment[$i][6] == "inline") 
  • trunk/expressoMail1_2/inc/gd_functions.php

    r5509 r7655  
    5353  $img=imagecreate($Width,$Height); 
    5454  $Colors=pow(2,$biBitCount); 
    55   for($p=0;$p<$Colors;$p++) 
     55  for($p=0;$p<$Colors;++$p) 
    5656   { 
    5757    $B=freadbyte($f); 
     
    7272    { 
    7373     $CurrentBit=0; 
    74      for($x=0;$x<$Width;$x++) 
     74     for($x=0;$x<$Width;++$x) 
    7575      { 
    7676         $C=freadbits($f,$biBitCount); 
     
    7878      }; 
    7979    if($CurrentBit!=0) {freadbyte($f);}; 
    80     for($g=0;$g<$Zbytek;$g++) 
     80    for($g=0;$g<$Zbytek;++$g) 
    8181     freadbyte($f); 
    8282     }; 
     
    112112   $Data.=fread($f,$pocet); 
    113113   $pocetb+=$pocet; 
    114    if($pocetb%2==1) {freadbyte($f); $pocetb++;}; 
     114   if($pocetb%2==1) {freadbyte($f); ++$pocetb;}; 
    115115  }; 
    116116 if($prefix>0) 
    117117  { 
    118118   $pocet=$prefix; 
    119    for($r=0;$r<$pocet;$r++) 
     119   for($r=0;$r<$pocet;++$r) 
    120120    $Data.=chr($suffix); 
    121121  }; 
     
    126126}; 
    127127 
    128 for($x=0;$x<strlen($Data);$x++) 
     128for($x=0;$x<strlen($Data);++$x) 
    129129 { 
    130130  imagesetpixel($img,$x,$y,$Palette[ord($Data[$x])]); 
     
    165165 
    166166   $CurrentBit=0; 
    167    for($h=0;$h<$pocet;$h++) 
     167   for($h=0;$h<$pocet;++$h) 
    168168    $Data.=chr(freadbits($f,4)); 
    169169   if($CurrentBit!=0) freadbits($f,4); 
    170170   $pocetb+=ceil(($pocet/2)); 
    171    if($pocetb%2==1) {freadbyte($f); $pocetb++;}; 
     171   if($pocetb%2==1) {freadbyte($f); ++$pocetb;}; 
    172172  }; 
    173173 if($prefix>0) 
     
    175175   $pocet=$prefix; 
    176176   $i=0; 
    177    for($r=0;$r<$pocet;$r++) 
     177   for($r=0;$r<$pocet;++$r) 
    178178    { 
    179179    if($i%2==0) 
     
    185185      $Data.=chr(floor($suffix/16)); 
    186186     }; 
    187     $i++; 
     187    ++$i; 
    188188    }; 
    189189  }; 
     
    194194}; 
    195195 
    196 for($x=0;$x<strlen($Data);$x++) 
     196for($x=0;$x<strlen($Data);++$x) 
    197197 { 
    198198  imagesetpixel($img,$x,$y,$Palette[ord($Data[$x])]); 
     
    212212   for($y=$Height-1;$y>=0;$y--) 
    213213    { 
    214      for($x=0;$x<$Width;$x++) 
     214     for($x=0;$x<$Width;++$x) 
    215215      { 
    216216       $B=freadbyte($f); 
     
    221221       imagesetpixel($img,$x,$y,$color); 
    222222      } 
    223     for($z=0;$z<$Zbytek;$z++) 
     223    for($z=0;$z<$Zbytek;++$z) 
    224224     freadbyte($f); 
    225225   }; 
     
    336336$bin=decbin($d); 
    337337$sbin=strlen($bin); 
    338 for($j=0;$j<$n-$sbin;$j++) 
     338for($j=0;$j<$n-$sbin;++$j) 
    339339 $bin="0$bin"; 
    340340return $bin; 
  • trunk/expressoMail1_2/inc/hook_settings.inc.php

    r7420 r7655  
    408408                        $level = count($folder_id); 
    409409                        $ident = ''; 
    410                         for($i = 2; $level > 2 && $i < $level;$i++) 
     410                        for($i = 2; $level > 2 && $i < $level;++$i) 
    411411                                $ident .= ' - '; 
    412412                         
Note: See TracChangeset for help on using the changeset viewer.