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->cookiearray = explode("|",$_COOKIE[$this->myCookie]);
|
||||||
$this->myValue = "" ;
|
$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));
|
$this->myValue .= strval(chr($this->cookiearray[$f]/$this->myKey));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -370,7 +370,8 @@ class Menubase
|
|||||||
$leftmenu = $myleftmenu;
|
$leftmenu = $myleftmenu;
|
||||||
|
|
||||||
//ballayage du tableau
|
//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
|
//si un element a pour pere : $pere
|
||||||
if ($tab[$x][1] == $pere)
|
if ($tab[$x][1] == $pere)
|
||||||
|
|||||||
@ -54,7 +54,9 @@ function dol_quoted_printable_encode($input, $line_max = 76)
|
|||||||
$escape = "=";
|
$escape = "=";
|
||||||
$output = "";
|
$output = "";
|
||||||
|
|
||||||
for ($j=0;$j<count($lines);$j++) {
|
$num = count($lines);
|
||||||
|
for ($j = 0; $j < $num; $j++)
|
||||||
|
{
|
||||||
$line = $lines[$j];
|
$line = $lines[$j];
|
||||||
$linlen = strlen($line);
|
$linlen = strlen($line);
|
||||||
$newline = "";
|
$newline = "";
|
||||||
|
|||||||
@ -390,7 +390,9 @@ class SimpleOpenID
|
|||||||
);
|
);
|
||||||
// Send only required parameters to confirm validity
|
// Send only required parameters to confirm validity
|
||||||
$arr_signed = explode(",",str_replace('sreg.','sreg_',$_GET['openid_signed']));
|
$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]);
|
$s = str_replace('sreg_','sreg.', $arr_signed[$i]);
|
||||||
$c = $_GET['openid_' . $arr_signed[$i]];
|
$c = $_GET['openid_' . $arr_signed[$i]];
|
||||||
// if ($c != ""){
|
// if ($c != ""){
|
||||||
|
|||||||
@ -47,7 +47,8 @@ function print_auguria_menu($db,$atarget,$type_user)
|
|||||||
|
|
||||||
print_start_menu_array_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)
|
if ($newTabMenu[$i]['enabled'] == true)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -442,7 +442,8 @@ function print_eldy_menu($db,$atarget,$type_user)
|
|||||||
|
|
||||||
$newTabMenu = $menuArbo->menuTopCharger($_SESSION['mainmenu'],'',$type_user,'eldy');
|
$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)
|
if ($newTabMenu[$i]['enabled'] == true)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -359,7 +359,8 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Header
|
// 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');
|
$pdf->Cell($w[$i],7,$header[$i],1,0,'C');
|
||||||
}
|
}
|
||||||
@ -384,7 +385,8 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
|
|
||||||
$pdf-> SetY(40);
|
$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');
|
$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))
|
if (is_array($objMod->depends) && !empty($objMod->depends))
|
||||||
{
|
{
|
||||||
// Activation des modules dont le module depend
|
// 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"))
|
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))
|
if (isset($objMod->conflictwith) && is_array($objMod->conflictwith))
|
||||||
{
|
{
|
||||||
// Desactivation des modules qui entrent en conflit
|
// 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"))
|
if (file_exists(DOL_DOCUMENT_ROOT."/includes/modules/".$objMod->conflictwith[$i].".class.php"))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -954,7 +954,8 @@ class Ldap
|
|||||||
$fulllist[$recordid][$useridentifier]=$recordid;
|
$fulllist[$recordid][$useridentifier]=$recordid;
|
||||||
|
|
||||||
// Add to the array for each attribute in my list
|
// 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]);
|
$keyattributelower=strtolower($attributeArray[$j]);
|
||||||
//print " Param ".$attributeArray[$j]."=".$info[$i][$keyattributelower][0]."<br>\n";
|
//print " Param ".$attributeArray[$j]."=".$info[$i][$keyattributelower][0]."<br>\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user