Fix: replace siezof by count
This commit is contained in:
parent
581a689869
commit
066b6146c0
@ -165,7 +165,7 @@ for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
|
|||||||
$com = new Commande($db);
|
$com = new Commande($db);
|
||||||
|
|
||||||
$com->socid = 4;
|
$com->socid = 4;
|
||||||
$com->date_commande = $dates[rand(1, sizeof($dates)-1)];
|
$com->date_commande = $dates[rand(1, count($dates)-1)];
|
||||||
$com->note = 'A comment';
|
$com->note = 'A comment';
|
||||||
$com->source = 1;
|
$com->source = 1;
|
||||||
$com->fk_project = 0;
|
$com->fk_project = 0;
|
||||||
|
|||||||
@ -90,7 +90,7 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
|
|||||||
print "Company $s\n";
|
print "Company $s\n";
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->nom = "Company num ".time()."$s";
|
$soc->nom = "Company num ".time()."$s";
|
||||||
$soc->ville = $villes[rand(0,sizeof($villes)-1)];
|
$soc->ville = $villes[rand(0, count($villes)-1)];
|
||||||
$soc->client = rand(1,2); // Une societe sur 2 est prospect, l'autre client
|
$soc->client = rand(1,2); // Une societe sur 2 est prospect, l'autre client
|
||||||
$soc->fournisseur = rand(0,1); // Une societe sur 2 est fournisseur
|
$soc->fournisseur = rand(0,1); // Une societe sur 2 est fournisseur
|
||||||
$soc->code_client='CU'.time()."$s";
|
$soc->code_client='CU'.time()."$s";
|
||||||
@ -113,7 +113,7 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
|
|||||||
$contact = new Contact($db);
|
$contact = new Contact($db);
|
||||||
$contact->socid = $soc->id;
|
$contact->socid = $soc->id;
|
||||||
$contact->name = "Lastname".$c;
|
$contact->name = "Lastname".$c;
|
||||||
$contact->firstname = $prenoms[rand(0,sizeof($prenoms)-1)];
|
$contact->firstname = $prenoms[rand(0, count($prenoms)-1)];
|
||||||
if ( $contact->create($user) )
|
if ( $contact->create($user) )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,7 @@ class langAutoParser {
|
|||||||
$fileContent = null;
|
$fileContent = null;
|
||||||
$refPath = $this->langDir.$this->refLang.self::DIR_SEPARATOR.$file;
|
$refPath = $this->langDir.$this->refLang.self::DIR_SEPARATOR.$file;
|
||||||
$fileContent = file($refPath,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
|
$fileContent = file($refPath,FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
|
||||||
print "Processing file " . $file . ", with ".sizeof($fileContent)." lines<br>\n";
|
print "Processing file " . $file . ", with ".count($fileContent)." lines<br>\n";
|
||||||
|
|
||||||
// Define target dirs
|
// Define target dirs
|
||||||
$targetlangs=array($this->destLang);
|
$targetlangs=array($this->destLang);
|
||||||
|
|||||||
@ -153,7 +153,7 @@ foreach ($argv as $key => $value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if an option and a filter has been provided
|
// Check if an option and a filter has been provided
|
||||||
if (empty($option) && sizeof($filter) <= 0)
|
if (empty($option) && count($filter) <= 0)
|
||||||
{
|
{
|
||||||
usage();
|
usage();
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user