Changeset 7673 for trunk/phpgwapi


Ignore:
Timestamp:
12/18/12 16:15:29 (11 years ago)
Author:
douglasz
Message:

Ticket #3236 - Correcoes para Performance: Function Within Loop Declaration.

Location:
trunk/phpgwapi
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/inc/adodb/session/adodb-session.php

    r6057 r7673  
    4848        $variables = array( ); 
    4949        $a = preg_split( '/(\w+)\|/', $serialized_string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE ); 
    50         for( $i = 0; $i < count( $a ); $i = $i+2 ) { 
     50    $a_count = count( $a ); 
     51        for( $i = 0; $i < $a_count; $i = $i+2 ) { 
    5152                $variables[$a[$i]] = unserialize( $a[$i+1] ); 
    5253        } 
  • trunk/phpgwapi/inc/adodb/session/adodb-session2.php

    r6057 r7673  
    7878        $variables = array( ); 
    7979        $a = preg_split( '/(\w+)\|/', $serialized_string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE ); 
    80         for( $i = 0; $i < count( $a ); $i = $i+2 ) { 
     80    $a_count = count( $a ); 
     81        for( $i = 0; $i < $a_count; $i = $i+2 ) { 
    8182                $variables[$a[$i]] = unserialize( $a[$i+1] ); 
    8283        } 
  • trunk/phpgwapi/inc/class.accounts.inc.php

    r7655 r7673  
    436436                        $this->memberships = Array(); 
    437437 
    438                         for ($idx=0; $idx<count($security_equals); ++$idx) 
     438            $security_equals_count = count($security_equals); 
     439                        for ($idx=0; $idx<$security_equals_count; ++$idx) 
    439440                        { 
    440441                                $groups = (int)$security_equals[$idx]; 
     
    463464                        } 
    464465 
    465                         for ($idx=0; $idx<count($security_equals); ++$idx) 
     466            $security_equals_count = count($security_equals); 
     467                        for ($idx=0; $idx<$security_equals_count; ++$idx) 
    466468                        { 
    467469                                $name = $this->id2name((int)$security_equals[$idx]); 
  • trunk/phpgwapi/inc/class.accounts_contacts.inc.php

    r7655 r7673  
    172172 
    173173                        /* get user information for each user/group */ 
    174                         for($i=0;$i<count($allValues);++$i) 
     174            $allValues_count = count($allValues); 
     175                        for($i=0;$i<$allValues_count;++$i) 
    175176                        { 
    176177                                $accounts[] = Array( 
  • trunk/phpgwapi/inc/class.accounts_ldap.inc.php

    r7655 r7673  
    277277                                        $members = $this->member($this->account_id); 
    278278                                        $newData['memberuid'] = array(); 
    279                                         for($i=0;$i<count($members);++$i) 
     279                    $members_count = count($members); 
     280                                        for($i=0;$i<$members_count;++$i) 
    280281                                        { 
    281282                                                $currname = $this->id2name($members[$i]['account_id']); 
     
    308309                                        #_debug_array($members); 
    309310                                        $newData['memberuid'] = array(); 
    310                                         for($i=0;$i<count($members);++$i) 
     311                    $members_count = count($members); 
     312                                        for($i=0;$i<$members_count;++$i) 
    311313                                        { 
    312314                                                $currname = $this->id2name($members[$i]['account_id']); 
  • trunk/phpgwapi/inc/class.categories.inc.php

    r7655 r7673  
    422422                        if($self) 
    423423                        { 
    424                                 for ($i=0;$i<count($cats);++$i) 
     424                $cats_count = count($cats); 
     425                                for ($i=0;$i<$cats_count;++$i) 
    425426                                { 
    426427                                        if ($cats[$i]['id'] == $self) 
     
    467468                                if ($this->total_records > 0) 
    468469                                { 
    469                                         for ($i=0;$i<count($cats);++$i) 
     470                    $cats_count = count($cats); 
     471                                        for ($i=0;$i<$cats_count;++$i) 
    470472                                        { 
    471473                                                $image_set = '&nbsp;'; 
     
    576578                                $new_parent = $this->id2name($cat_id,'parent'); 
    577579 
    578                                 for ($i=0;$i<count($cats);++$i) 
     580                $cats_count = count($cats); 
     581                                for ($i=0;$i<$cats_count;++$i) 
    579582                                { 
    580583                                        if ($cats[$i]['level'] == 1) 
  • trunk/phpgwapi/inc/class.common.inc.php

    r7655 r7673  
    435435                        $html_error = '<table border="0" width="100%"><tr><td align="right"><b>' . lang($text) 
    436436                                . '</b>: </td><td align="left">' . $errors[0] . '</td></tr>'; 
    437                         for ($i=1; $i<count($errors); ++$i) 
     437            $errors_count = count($errors); 
     438                        for ($i=1; $i<$errors_count; ++$i) 
    438439                        { 
    439440                                $html_error .= '<tr><td>&nbsp;</td><td align="left">' . $errors[$i] . '</td></tr>'; 
  • trunk/phpgwapi/inc/class.contacts_ldap.inc.php

    r7655 r7673  
    328328                                { 
    329329                                        $i=0; 
    330                                         for($i=0;$i<count($filterarray);++$i) 
     330                    $filterarray_count = count($filterarray); 
     331                                        for($i=0;$i<$filterarray_count;++$i) 
    331332                                        { 
    332333                                                list($name,$value) = preg_split('/=/',$filterarray[$i]); 
  • trunk/phpgwapi/inc/class.errorlog.inc.php

    r7655 r7673  
    124124 
    125125                        $errorstack = $this->errorstack; 
    126                         for ($i = 0; $i < count($errorstack); ++$i) 
     126            $errorstack_count = count($errorstack); 
     127                        for ($i = 0; $i < $errorstack_count; ++$i) 
    127128                        { 
    128129                                $err = $errorstack[$i]; 
     
    153154                        $new = array(); 
    154155                        reset($this->errorstack); 
    155                         for ($i = 0; $i < count($this->errorstack); ++$i) 
     156            $errorstack_count = count($this->errorstack); 
     157                        for ($i = 0; $i < $errorstack_count; ++$i) 
    156158                        { 
    157159                                $err = $this->errorstack[$i]; 
     
    182184 
    183185                        $errorstack = $this->errorstack; 
    184                         for ($i = 0; $i < count($errorstack); ++$i) 
     186            $errorstack_count = count($errorstack); 
     187                        for ($i = 0; $i < $errorstack_count; ++$i) 
    185188                        { 
    186189                                $err = $errorstack[$i]; 
  • trunk/phpgwapi/inc/class.gdgraph.inc.php

    r7655 r7673  
    274274                        $linespace = ($this->graph_height - $this->margin_top - $this->margin_bottom) / ($this->num_lines_y - 1); 
    275275                        $space = 1; 
    276                         for ($i = 0;$i<count($this->data);++$i) 
     276            $data_count = count($this->data); 
     277                        for ($i = 0;$i<$data_count;++$i) 
    277278                        { 
    278279                                $y = $this->graph_height - $this->margin_bottom - ($space * $linespace) - 7; 
  • trunk/phpgwapi/inc/class.http.inc.php

    r5912 r7673  
    265265                                                return('5 it was not specified a valid POST method values array'); 
    266266                                        } 
    267                                         for($request_body = '',Reset($values),$value=0;$value<count($values);Next($values),$value++) 
     267                    $values_count = count($values); 
     268                                        for($request_body = '',Reset($values),$value=0;$value<$values_count;Next($values),$value++) 
    268269                                        { 
    269270                                                if($value>0) 
     
    296297                                        if(@is_array($header_value)) 
    297298                                        { 
    298                                                 for(Reset($header_value),$value=0;$value<count($header_value);Next($header_value),$value++) 
     299                        $header_value_count = count($header_value); 
     300                                                for(Reset($header_value),$value=0;$value<$header_value_count;Next($header_value),$value++) 
    299301                                                { 
    300302                                                        if(!$success = $this->PutLine("$header_name: ".$header_value[Key($header_value)])) 
     
    327329                                        { 
    328330                                                $now = gmdate('Y-m-d H-i-s'); 
    329                                                 for($cookies = array(),$domain=0,Reset($this->cookies[0]);$domain<count($this->cookies[0]);Next($this->cookies[0]),$domain++) 
     331                        $cookies_count = count($this->cookies[0]); 
     332                                                for($cookies = array(),$domain=0,Reset($this->cookies[0]);$domain<$cookies_count;Next($this->cookies[0]),$domain++) 
    330333                                                { 
    331334                                                        $domain_pattern = Key($this->cookies[0]); 
     
    335338                                                                ($match == 0 || $domain_pattern[0] == '.' || $this->request_host[$match-1] == '.')) 
    336339                                                        { 
    337                                                                 for(Reset($this->cookies[0][$domain_pattern]),$path_part=0;$path_part<count($this->cookies[0][$domain_pattern]);Next($this->cookies[0][$domain_pattern]),$path_part++) 
     340                                $cookies_count = count($this->cookies[0][$domain_pattern]); 
     341                                                                for(Reset($this->cookies[0][$domain_pattern]),$path_part=0;$path_part<$cookies_count;Next($this->cookies[0][$domain_pattern]),$path_part++) 
    338342                                                                { 
    339343                                                                        $path = Key($this->cookies[0][$domain_pattern]); 
    340344                                                                        if(strlen($this->request_uri) >= strlen($path) && substr($this->request_uri,0,strlen($path)) == $path) 
    341345                                                                        { 
    342                                                                                 for(Reset($this->cookies[0][$domain_pattern][$path]),$cookie = 0;$cookie<count($this->cookies[0][$domain_pattern][$path]);Next($this->cookies[0][$domain_pattern][$path]),$cookie++) 
     346                                        $cookies_count = count($this->cookies[0][$domain_pattern][$path]); 
     347                                                                                for(Reset($this->cookies[0][$domain_pattern][$path]),$cookie = 0;$cookie<$cookies_count;Next($this->cookies[0][$domain_pattern][$path]),$cookie++) 
    343348                                                                                { 
    344349                                                                                        $cookie_name = Key($this->cookies[0][$domain_pattern][$path]); 
     
    353358                                                        } 
    354359                                                } 
    355                                                 for(Reset($cookies),$cookie=0;$cookie<count($cookies);Next($cookies),$cookie++) 
     360                        $cookies_count = count($cookies); 
     361                                                for(Reset($cookies),$cookie=0;$cookie<$cookies_count;Next($cookies),$cookie++) 
    356362                                                { 
    357363                                                        $cookie_name = Key($cookies); 
     
    525531                        { 
    526532                                $secure = Key($this->cookies); 
    527                                 for($domain = 0,Reset($this->cookies[$secure]);$domain<count($this->cookies[$secure]);Next($this->cookies[$secure]),$domain++) 
     533                $cookies_count = count($this->cookies[$secure]); 
     534                                for($domain = 0,Reset($this->cookies[$secure]);$domain<$cookies_count;Next($this->cookies[$secure]),$domain++) 
    528535                                { 
    529536                                        $domain_pattern = Key($this->cookies[$secure]); 
    530                                         for(Reset($this->cookies[$secure][$domain_pattern]),$path_part=0;$path_part<count($this->cookies[$secure][$domain_pattern]);Next($this->cookies[$secure][$domain_pattern]),$path_part++) 
     537                    $cookies_count = count($this->cookies[$secure][$domain_pattern]); 
     538                                        for(Reset($this->cookies[$secure][$domain_pattern]),$path_part=0;$path_part<$cookies_count;Next($this->cookies[$secure][$domain_pattern]),$path_part++) 
    531539                                        { 
    532540                                                $path=Key($this->cookies[$secure][$domain_pattern]); 
    533                                                 for(Reset($this->cookies[$secure][$domain_pattern][$path]),$cookie=0;$cookie<count($this->cookies[$secure][$domain_pattern][$path]);Next($this->cookies[$secure][$domain_pattern][$path]),$cookie++) 
     541                        $cookies_count = count($this->cookies[$secure][$domain_pattern][$path]); 
     542                                                for(Reset($this->cookies[$secure][$domain_pattern][$path]),$cookie=0;$cookie<$cookies_count;Next($this->cookies[$secure][$domain_pattern][$path]),$cookie++) 
    534543                                                { 
    535544                                                        $cookie_name = Key($this->cookies[$secure][$domain_pattern][$path]); 
  • trunk/phpgwapi/inc/class.listbox.inc.php

    r7655 r7673  
    7272                                $this->p->parse('row','portal_listbox_header',True); 
    7373 
    74                                 for ($x = 0; $x < count($this->data); ++$x) 
     74                $data_count = count($this->data); 
     75                                for ($x = 0; $x < $data_count; ++$x) 
    7576                                { 
    7677                                        $var = Array( 
  • trunk/phpgwapi/inc/class.log.inc.php

    r7655 r7673  
    9292 
    9393                        $errorstack = $this->errorstack; 
    94                         for ($i = 0; $i < count($errorstack); ++$i) 
     94            $errorstack_count = count($errorstack); 
     95                        for ($i = 0; $i < $errorstack_count; ++$i) 
    9596                        { 
    9697                                $err = $errorstack[$i]; 
     
    115116                        $new = array(); 
    116117                        reset($this->errorstack); 
    117                         for ($i = 0; $i < count($this->errorstack); ++$i) 
     118            $errorstack_count = count($this->errorstack); 
     119                        for ($i = 0; $i < $errorstack_count; ++$i) 
    118120                        { 
    119121                                $err = $this->errorstack[$i]; 
     
    141143 
    142144                        $errorstack = $this->errorstack; 
    143                         for ($i = 0; $i < count($errorstack); ++$i) 
     145            $errorstack_count = count($errorstack); 
     146                        for ($i = 0; $i < $errorstack_count; ++$i) 
    144147                        { 
    145148                                $err = $errorstack[$i]; 
  • trunk/phpgwapi/inc/class.phpmailer.inc.php

    r7655 r7673  
    443443    function MailSend($header, $body) { 
    444444        $to = ""; 
    445         for($i = 0; $i < count($this->to); ++$i) 
     445        $to_count = count($this->to); 
     446        for($i = 0; $i < $to_count; ++$i) 
    446447        { 
    447448            if($i != 0) { $to .= ", "; } 
     
    497498 
    498499        // Attempt to send attach all recipients 
    499         for($i = 0; $i < count($this->to); ++$i) 
     500        $to_count = count($this->to); 
     501        for($i = 0; $i < $to_count; ++$i) 
    500502        { 
    501503            if(!$this->smtp->Recipient($this->to[$i][0])) 
    502504                $bad_rcpt[] = $this->to[$i][0]; 
    503505        } 
    504         for($i = 0; $i < count($this->cc); ++$i) 
     506        $cc_count = count($this->cc); 
     507        for($i = 0; $i < $cc_count; ++$i) 
    505508        { 
    506509            if(!$this->smtp->Recipient($this->cc[$i][0])) 
    507510                $bad_rcpt[] = $this->cc[$i][0]; 
    508511        } 
    509         for($i = 0; $i < count($this->bcc); ++$i) 
     512        $bcc_count = count($this->bcc); 
     513        for($i = 0; $i < $bcc_count; ++$i) 
    510514        { 
    511515            if(!$this->smtp->Recipient($this->bcc[$i][0])) 
     
    515519        if(count($bad_rcpt) > 0) // Create error message 
    516520        { 
    517             for($i = 0; $i < count($bad_rcpt); ++$i) 
     521            $bad_rcpt_count = count($bad_rcpt); 
     522            for($i = 0; $i < $bad_rcpt_count; ++$i) 
    518523            { 
    519524                if($i != 0) { $error .= ", "; } 
     
    645650        if(count($addr) > 1) 
    646651        { 
    647             for($i = 1; $i < count($addr); ++$i) 
     652            $addr_count = count($addr); 
     653            for($i = 1; $i < $addr_count; ++$i) 
    648654                $addr_str .= ", " . $this->AddrFormat($addr[$i]); 
    649655        } 
     
    686692        $line = explode($this->LE, $message); 
    687693        $message = ""; 
    688         for ($i=0 ;$i < count($line); ++$i) 
     694        $line_count = count($line); 
     695        for ($i=0 ;$i < $line_count; ++$i) 
    689696        { 
    690697          $line_part = explode(" ", $line[$i]); 
    691698          $buf = ""; 
    692           for ($e = 0; $e<count($line_part); ++$e) 
     699          $line_part_count = count($line_part); 
     700          for ($e = 0; $e<$line_part_count; ++$e) 
    693701          { 
    694702              $word = $line_part[$e]; 
     
    830838 
    831839        // Add custom headers 
    832         for($index = 0; $index < count($this->CustomHeader); ++$index) 
     840        $CustomHeader_count = count($this->CustomHeader); 
     841        for($index = 0; $index < $CustomHeader_count; ++$index) 
    833842        { 
    834843            $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]),  
     
    10531062 
    10541063        // Add all attachments 
    1055         for($i = 0; $i < count($this->attachment); ++$i) 
     1064        $attachment_count = count($this->attachment); 
     1065        for($i = 0; $i < $attachment_count; ++$i) 
    10561066        { 
    10571067            // Check for string attachment 
     
    13261336    function InlineImageExists() { 
    13271337        $result = false; 
    1328         for($i = 0; $i < count($this->attachment); ++$i) 
     1338        $attachment_count = count($this->attachment); 
     1339        for($i = 0; $i < $attachment_count; ++$i) 
    13291340        { 
    13301341            if($this->attachment[$i][6] == "inline") 
  • trunk/phpgwapi/inc/class.resultbox.inc.php

    r7655 r7673  
    5454                        echo '<table border="0" cellpadding="0" cellspacing="0" width="'.$this->getvar('innerwidth') 
    5555                                . '" bgcolor="' . $this->getvar('innerbgcolor') . '">'; 
    56                         for ($x = 0; $x < count($this->data); ++$x) 
     56            $data_count = count($this->data); 
     57                        for ($x = 0; $x < $data_count; ++$x) 
    5758                        { 
    5859                                echo '<tr>'; 
  • trunk/phpgwapi/inc/class.sbox.inc.php

    r7655 r7673  
    139139                { 
    140140                        $out = ''; 
    141                         for($i=0;$i<count($this->weekdays);++$i) 
     141            $weekdays_count = count($this->weekdays); 
     142                        for($i=0;$i<$weekdays_count;++$i) 
    142143                        { 
    143144                                $out .= '<option value="'.$i.'"'.($selected!=$i?'':' selected').'>'.($this->weekdays[$i]!=''?lang($this->weekdays[$i]):'').'</option>'."\n"; 
     
    148149                function nr2weekday($selected = 0) 
    149150                { 
    150                         for($i=0;$i<count($this->weekdays);++$i) 
     151            $weekdays_count = count($this->weekdays); 
     152                        for($i=0;$i<$weekdays_count;++$i) 
    151153                        { 
    152154                                if ($selected > 0 && $selected == $i) 
     
    251253                        $out = '<select name="' . $name . '">'; 
    252254 
    253                         for($i=1;$i<count($arr);++$i) 
     255            $arr_count = count($arr); 
     256                        for($i=1;$i<$arr_count;++$i) 
    254257                        { 
    255258                                $out .= "<option value=\""; 
     
    304307                                if(@is_array($selected)) 
    305308                                { 
    306                                         for($i=0;$i<count($selected);++$i) 
     309                    $selected_count = count($selected); 
     310                                        for($i=0;$i<$selected_count;++$i) 
    307311                                        { 
    308312                                                if ($group['account_id'] == $selected[$i]) 
  • trunk/phpgwapi/inc/class.setup.inc.php

    r7655 r7673  
    302302                                } 
    303303                                $values = explode('.',$value); 
    304                                 for($i = 0; $i < count($values); ++$i) 
     304                $values_count = count($values); 
     305                                for($i = 0; $i < $values_count; ++$i) 
    305306                                { 
    306307                                        if ((int) $values[$i] != (int) $remotes[$i]) 
     
    710711                        $less = 0; 
    711712 
    712                         for($i=0;$i<count($testa);++$i) 
     713            $testa_count = count($testa); 
     714                        for($i=0;$i<$testa_count;++$i) 
    713715                        { 
    714716                                if($DEBUG) { echo'<br>Checking if '. (int)$testa[$i] . ' is less than ' . (int)$testb[$i] . ' ...'; } 
     
    792794                        $less = 0; 
    793795 
    794                         for($i=0;$i<count($testa);++$i) 
     796            $testa_count = count($testa); 
     797                        for($i=0;$i<$testa_count;++$i) 
    795798                        { 
    796799                                if($DEBUG) { echo'<br>Checking if '. (int)$testa[$i] . ' is more than ' . (int)$testb[$i] . ' ...'; } 
  • trunk/phpgwapi/inc/class.soap_server.inc.php

    r7655 r7673  
    359359                                                } 
    360360                                                // validate each param's type 
    361                                                 for($i=0; $i < count($p); ++$i) 
     361                        $p_count = count($p); 
     362                                                for($i=0; $i < $p_count; ++$i) 
    362363                                                { 
    363364                                                        // type not match 
  • trunk/phpgwapi/inc/class.vcard.inc.php

    r7655 r7673  
    624624                // Takes an array of contacts class fields/values, turns it into a vcard string: 
    625625                // 
    626                 // for($i=0;$i<count($buffer);++$i) 
     626        // $buffer_count = count($buffer); 
     627                // for($i=0;$i<$buffer_count;++$i) 
    627628                // { 
    628629                //     $vcards .= $this->vcard->out($buffer[$i]); 
  • trunk/phpgwapi/inc/common_functions.inc.php

    r7655 r7673  
    10831083                $less = 0; 
    10841084 
    1085                 for ($i=0;$i<count($testa);++$i) 
     1085        $testa_count = count($testa); 
     1086                for ($i=0;$i<$testa_count;++$i) 
    10861087                { 
    10871088                        if ($DEBUG) { echo'<br>Checking if '. (int)$testa[$i] . ' is less than ' . (int)$testb[$i] . ' ...'; } 
     
    11631164                $less = 0; 
    11641165 
    1165                 for ($i=0;$i<count($testa);++$i) 
     1166        $testa_count = count($testa); 
     1167                for ($i=0;$i<$testa_count;++$i) 
    11661168                { 
    11671169                        if ($DEBUG) { echo'<br>Checking if '. (int)$testa[$i] . ' is more than ' . (int)$testb[$i] . ' ...'; } 
  • trunk/phpgwapi/inc/csstidy/class.csstidy.php

    r7655 r7673  
    419419        $template = explode('|',$content); 
    420420 
    421         for ($i = 0; $i < count($template); ++$i ) 
     421    $template_count = count($template); 
     422        for ($i = 0; $i < $template_count; ++$i ) 
    422423        { 
    423424                $this->template[$i] = $template[$i]; 
  • trunk/phpgwapi/inc/csstidy/class.csstidy_optimise.php

    r7655 r7673  
    302302            $color_tmp = substr($color,4,strlen($color)-5); 
    303303            $color_tmp = explode(',',$color_tmp); 
    304             for ( $i = 0; $i < count($color_tmp); ++$i ) 
     304            $color_tmp_count = count($color_tmp); 
     305            for ( $i = 0; $i < $color_tmp_count; ++$i ) 
    305306            { 
    306307                $color_tmp[$i] = trim ($color_tmp[$i]); 
     
    383384            $temp = array($subvalue); 
    384385        } 
    385         for ($l = 0; $l < count($temp);++$l) 
     386        $temp_count = count($temp); 
     387        for ($l = 0; $l < $temp_count;++$l) 
    386388        { 
    387389            // continue if no numeric value 
     
    665667 
    666668        $str_value = csstidy_optimise::explode_ws(',',$str_value); 
    667         for($i = 0; $i < count($str_value); ++$i) 
     669        $str_value_count = count($str_value); 
     670        for($i = 0; $i < $str_value_count; ++$i) 
    668671        { 
    669672            $have['clip'] = FALSE; $have['pos'] = FALSE; 
     
    672675            $str_value[$i] = csstidy_optimise::explode_ws(' ',trim($str_value[$i])); 
    673676 
    674             for($j = 0; $j < count($str_value[$i]); ++$j) 
     677            $str_value_count = count($str_value[$i]); 
     678            for($j = 0; $j < $str_value_count; ++$j) 
    675679            { 
    676680                if($have['bg'] === FALSE && (substr($str_value[$i][$j],0,4) == 'url(' || $str_value[$i][$j] === 'none')) 
  • trunk/phpgwapi/inc/fpdf/fpdf.php

    r7655 r7673  
    12831283                { 
    12841284                        $trns=''; 
    1285                         for($i=0;$i<count($info['trns']);++$i) 
     1285            $info_trns_count = count($info['trns']); 
     1286                        for($i=0;$i<$info_trns_count;++$i) 
    12861287                                $trns.=$info['trns'][$i].' '.$info['trns'][$i].' '; 
    12871288                        $this->_out('/Mask ['.$trns.']'); 
  • trunk/phpgwapi/inc/fpdf/tutorial/tuto5.php

    r7655 r7673  
    3838        $w=array(40,35,40,45); 
    3939        //Header 
    40         for($i=0;$i<count($header);++$i) 
     40    $header_count = count($header); 
     41        for($i=0;$i<$header_count;++$i) 
    4142                $this->Cell($w[$i],7,$header[$i],1,0,'C'); 
    4243        $this->Ln(); 
     
    6566        //Header 
    6667        $w=array(40,35,40,45); 
    67         for($i=0;$i<count($header);++$i) 
     68    $header_count = count($header); 
     69        for($i=0;$i<$header_count;++$i) 
    6870                $this->Cell($w[$i],7,$header[$i],1,0,'C',1); 
    6971        $this->Ln(); 
  • trunk/phpgwapi/templates/classic/login_classic.php

    r7655 r7673  
    238238                $obj_organization = CreateObject('phpgwapi.sector_search_ldap'); 
    239239                $organizations = $obj_organization->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']); 
    240                  
    241                 for ($i=0; $i<count($organizations); ++$i) 
     240 
     241        $organizations_count = count($organizations); 
     242                for ($i=0; $i<$organizations_count; ++$i) 
    242243                { 
    243244                        $tmp_array[strtolower($organizations[$i])] = $organizations[$i];         
  • trunk/phpgwapi/templates/default/login_default.php

    r7655 r7673  
    350350                $obj_organization = CreateObject('phpgwapi.sector_search_ldap'); 
    351351                $organizations = $obj_organization->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']); 
    352                  
    353                 for ($i=0; $i<count($organizations); ++$i) 
     352 
     353        $organizations_count = count($organizations); 
     354                for ($i=0; $i<$organizations_count; ++$i) 
    354355                { 
    355356                        $tmp_array[strtolower($organizations[$i])] = $organizations[$i];         
  • trunk/phpgwapi/templates/news/login_news.php

    r7655 r7673  
    286286                $obj_organization = CreateObject('phpgwapi.sector_search_ldap'); 
    287287                $organizations = $obj_organization->organization_search($GLOBALS['phpgw_info']['server']['ldap_context']); 
    288                  
    289                 for ($i=0; $i<count($organizations); ++$i) 
     288 
     289        $organizations_count = count($organizations); 
     290                for ($i=0; $i<$organizations_count; ++$i) 
    290291                { 
    291292                        $tmp_array[strtolower($organizations[$i])] = $organizations[$i];         
Note: See TracChangeset for help on using the changeset viewer.