Fix: Avoid function calls in a FOR loop test part
This commit is contained in:
parent
507aa3f52a
commit
e89806aa62
@ -83,7 +83,8 @@ class DolCookie
|
||||
{
|
||||
$this->cookiearray = explode("|",$_COOKIE[$this->myCookie]);
|
||||
$this->myValue = "" ;
|
||||
for ($f=0 ; $f<=count($this->cookiearray)-2; $f++)
|
||||
$num = (count($this->cookiearray) - 2);
|
||||
for ($f = 0; $f <= $num; $f++)
|
||||
{
|
||||
$this->myValue .= strval(chr($this->cookiearray[$f]/$this->myKey));
|
||||
}
|
||||
|
||||
@ -370,7 +370,8 @@ class Menubase
|
||||
$leftmenu = $myleftmenu;
|
||||
|
||||
//ballayage du tableau
|
||||
for ($x = 0; $x < count($tab); $x++)
|
||||
$num = count($tab);
|
||||
for ($x = 0; $x < $num; $x++)
|
||||
{
|
||||
//si un element a pour pere : $pere
|
||||
if ($tab[$x][1] == $pere)
|
||||
|
||||
@ -53,8 +53,10 @@ function dol_quoted_printable_encode($input, $line_max = 76)
|
||||
$linebreak = "=0D=0A";
|
||||
$escape = "=";
|
||||
$output = "";
|
||||
|
||||
for ($j=0;$j<count($lines);$j++) {
|
||||
|
||||
$num = count($lines);
|
||||
for ($j = 0; $j < $num; $j++)
|
||||
{
|
||||
$line = $lines[$j];
|
||||
$linlen = strlen($line);
|
||||
$newline = "";
|
||||
|
||||
@ -390,7 +390,9 @@ class SimpleOpenID
|
||||
);
|
||||
// Send only required parameters to confirm validity
|
||||
$arr_signed = explode(",",str_replace('sreg.','sreg_',$_GET['openid_signed']));
|
||||
for ($i=0; $i<count($arr_signed); $i++){
|
||||
$num = count($arr_signed);
|
||||
for ($i = 0; $i < $num; $i++)
|
||||
{
|
||||
$s = str_replace('sreg_','sreg.', $arr_signed[$i]);
|
||||
$c = $_GET['openid_' . $arr_signed[$i]];
|
||||
// if ($c != ""){
|
||||
|
||||
@ -46,8 +46,9 @@ function print_auguria_menu($db,$atarget,$type_user)
|
||||
$newTabMenu = $menuArbo->menuTopCharger($_SESSION['mainmenu'], '', $type_user, 'auguria');
|
||||
|
||||
print_start_menu_array_auguria();
|
||||
|
||||
for($i=0; $i<count($newTabMenu); $i++)
|
||||
|
||||
$num = count($newTabMenu);
|
||||
for($i = 0; $i < $num; $i++)
|
||||
{
|
||||
if ($newTabMenu[$i]['enabled'] == true)
|
||||
{
|
||||
|
||||
@ -441,8 +441,9 @@ function print_eldy_menu($db,$atarget,$type_user)
|
||||
$menuArbo = new Menubase($db,'eldy','top');
|
||||
|
||||
$newTabMenu = $menuArbo->menuTopCharger($_SESSION['mainmenu'],'',$type_user,'eldy');
|
||||
|
||||
for($i=0; $i<count($newTabMenu); $i++)
|
||||
|
||||
$num = count($newTabMenu);
|
||||
for($i = 0; $i < $num; $i++)
|
||||
{
|
||||
if ($newTabMenu[$i]['enabled'] == true)
|
||||
{
|
||||
|
||||
@ -359,7 +359,8 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
);
|
||||
|
||||
// Header
|
||||
for($i=0;$i<count($header);$i++)
|
||||
$num = count($header);
|
||||
for($i = 0; $i < $num; $i++)
|
||||
{
|
||||
$pdf->Cell($w[$i],7,$header[$i],1,0,'C');
|
||||
}
|
||||
@ -383,8 +384,9 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
|
||||
$pdf-> SetY(40);
|
||||
|
||||
for($i=0;$i<count($header);$i++)
|
||||
|
||||
$num = count($header);
|
||||
for($i = 0; $i < $num; $i++)
|
||||
{
|
||||
$pdf->Cell($w[$i],7,$header[$i],1,0,'C');
|
||||
}
|
||||
|
||||
@ -700,7 +700,8 @@ function Activate($value,$withdeps=1)
|
||||
if (is_array($objMod->depends) && !empty($objMod->depends))
|
||||
{
|
||||
// Activation des modules dont le module depend
|
||||
for ($i = 0; $i < count($objMod->depends); $i++)
|
||||
$num = count($objMod->depends);
|
||||
for ($i = 0; $i < $num; $i++)
|
||||
{
|
||||
if (file_exists(DOL_DOCUMENT_ROOT."/includes/modules/".$objMod->depends[$i].".class.php"))
|
||||
{
|
||||
@ -712,7 +713,8 @@ function Activate($value,$withdeps=1)
|
||||
if (isset($objMod->conflictwith) && is_array($objMod->conflictwith))
|
||||
{
|
||||
// Desactivation des modules qui entrent en conflit
|
||||
for ($i = 0; $i < count($objMod->conflictwith); $i++)
|
||||
$num = count($objMod->conflictwith);
|
||||
for ($i = 0; $i < $num; $i++)
|
||||
{
|
||||
if (file_exists(DOL_DOCUMENT_ROOT."/includes/modules/".$objMod->conflictwith[$i].".class.php"))
|
||||
{
|
||||
|
||||
@ -954,7 +954,8 @@ class Ldap
|
||||
$fulllist[$recordid][$useridentifier]=$recordid;
|
||||
|
||||
// Add to the array for each attribute in my list
|
||||
for ($j = 0; $j < count($attributeArray); $j++)
|
||||
$num = count($attributeArray);
|
||||
for ($j = 0; $j < $num; $j++)
|
||||
{
|
||||
$keyattributelower=strtolower($attributeArray[$j]);
|
||||
//print " Param ".$attributeArray[$j]."=".$info[$i][$keyattributelower][0]."<br>\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user