Skip to content

Commit

Permalink
cvsimport
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Sep 17, 2011
2 parents a90797a + 2c1b372 commit 059c0f7
Show file tree
Hide file tree
Showing 154 changed files with 430 additions and 393 deletions.
2 changes: 1 addition & 1 deletion htdocs/adherents/class/adherent.class.php
Expand Up @@ -339,7 +339,7 @@ function create($user,$notrigger=0)
// Fin appel triggers
}

if (sizeof($this->errors))
if (count($this->errors))
{
dol_syslog(get_class($this)."::create ".join(',',$this->errors), LOG_ERR);
$this->db->rollback();
Expand Down
2 changes: 1 addition & 1 deletion htdocs/adherents/document.php
Expand Up @@ -183,7 +183,7 @@
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$member->getLibStatut(4).'</td></tr>';

// Nbre fichiers
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.sizeof($filearray).'</td></tr>';
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';

//Total taille
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
Expand Down
12 changes: 6 additions & 6 deletions htdocs/adherents/fiche.php
Expand Up @@ -283,7 +283,7 @@
}

$result=$object->update($user,0,$nosyncuser,$nosyncuserpass);
if ($result >= 0 && ! sizeof($object->errors))
if ($result >= 0 && ! count($object->errors))
{
$dir= $conf->adherent->dir_output . '/' . get_exdir($object->id,2,0,1).'/photos';
$file_OK = is_uploaded_file($_FILES['photo']['tmp_name']);
Expand Down Expand Up @@ -514,7 +514,7 @@
$adht = new AdherentType($db);
$adht->fetch($object->typeid);

if ($result >= 0 && ! sizeof($object->errors))
if ($result >= 0 && ! count($object->errors))
{
// Send confirmation Email (selon param du type adherent sinon generique)
if ($object->email && $_POST["send_mail"])
Expand Down Expand Up @@ -548,7 +548,7 @@

$result=$object->resiliate($user);

if ($result >= 0 && ! sizeof($object->errors))
if ($result >= 0 && ! count($object->errors))
{
if ($object->email && $_POST["send_mail"])
{
Expand Down Expand Up @@ -576,7 +576,7 @@

if ($user->rights->adherent->supprimer && $_POST["action"] == 'confirm_del_spip' && $_POST["confirm"] == 'yes')
{
if (! sizeof($object->errors))
if (! count($object->errors))
{
if(!$object->del_to_spip()){
$errmsg.="Echec de la suppression de l'utilisateur dans spip: ".$object->error."<BR>\n";
Expand All @@ -586,7 +586,7 @@

if ($user->rights->adherent->creer && $_POST["action"] == 'confirm_add_spip' && $_POST["confirm"] == 'yes')
{
if (! sizeof($object->errors))
if (! count($object->errors))
{
if (!$object->add_to_spip())
{
Expand Down Expand Up @@ -683,7 +683,7 @@
// Type
print '<tr><td><span class="fieldrequired">'.$langs->trans("MemberType").'</span></td><td>';
$listetype=$adht->liste_array();
if (sizeof($listetype))
if (count($listetype))
{
print $html->selectarray("typeid", $listetype, isset($_POST["typeid"])?$_POST["typeid"]:$typeid, 1);
} else {
Expand Down
2 changes: 1 addition & 1 deletion htdocs/adherents/fiche_subscription.php
Expand Up @@ -91,7 +91,7 @@
//print 'datef='.$subscription->datef.' '.$_POST['datesubendday'];

$result=$subscription->update($user);
if ($result >= 0 && ! sizeof($subscription->errors))
if ($result >= 0 && ! count($subscription->errors))
{
$db->commit();

Expand Down
2 changes: 1 addition & 1 deletion htdocs/adherents/ldap.php
Expand Up @@ -199,7 +199,7 @@
//print_r($records);

// Affichage arbre
if (sizeof($records) && $records != false && (! isset($records['count']) || $records['count'] > 0))
if (count($records) && $records != false && (! isset($records['count']) || $records['count'] > 0))
{
if (! is_array($records))
{
Expand Down
2 changes: 1 addition & 1 deletion htdocs/cashdesk/class/Auth.class.php
Expand Up @@ -75,7 +75,7 @@ function verif ($aLogin, $aPasswd)
$authmode=explode(',',$dolibarr_main_authentication);

// No authentication mode
if (! sizeof($authmode) && empty($conf->login_method_modules))
if (! count($authmode) && empty($conf->login_method_modules))
{
$langs->load('main');
dol_print_error('',$langs->trans("ErrorConfigParameterNotDefined",'dolibarr_main_authentication'));
Expand Down
2 changes: 1 addition & 1 deletion htdocs/comm/action/class/actioncomm.class.php
Expand Up @@ -661,7 +661,7 @@ function build_exportfile($format,$type,$cachedelay,$filename,$filters)
require_once (DOL_DOCUMENT_ROOT ."/lib/xcal.lib.php");
require_once (DOL_DOCUMENT_ROOT ."/lib/date.lib.php");

dol_syslog("ActionComm::build_exportfile Build export file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".sizeof($filters), LOG_DEBUG);
dol_syslog("ActionComm::build_exportfile Build export file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".count($filters), LOG_DEBUG);

// Check parameters
if (empty($format)) return -1;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/comm/action/document.php
Expand Up @@ -208,7 +208,7 @@
}


print '<tr><td width="30%" nowrap>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.sizeof($filearray).'</td></tr>';
print '<tr><td width="30%" nowrap>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
print '</table>';

Expand Down
4 changes: 2 additions & 2 deletions htdocs/comm/action/index.php
Expand Up @@ -502,7 +502,7 @@
}
}

if (sizeof($listofextcals))
if (count($listofextcals))
{
require_once(DOL_DOCUMENT_ROOT."/comm/action/class/ical.class.php");
foreach($listofextcals as $extcal)
Expand Down Expand Up @@ -994,7 +994,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
print ($status?'&status='.$status:'').($filter?'&filter='.$filter:'');
print ($filtera?'&filtera='.$filtera:'').($filtert?'&filtert='.$filtert:'').($filterd?'&filterd='.$filterd:'');
print '">'.img_picto("all","1downarrow_selected.png").' ...';
print ' +'.(sizeof($eventarray[$daykey])-$maxPrint);
print ' +'.(count($eventarray[$daykey])-$maxPrint);
print '</a>';
break;
//$ok=false; // To avoid to show twice the link
Expand Down
8 changes: 4 additions & 4 deletions htdocs/comm/mailing/fiche.php
Expand Up @@ -199,7 +199,7 @@
$arr_css = array();

$listofpaths=dol_dir_list($upload_dir,'all',0,'','','name',SORT_ASC,0);
if (sizeof($listofpaths))
if (count($listofpaths))
{
foreach($listofpaths as $key => $val)
{
Expand Down Expand Up @@ -333,7 +333,7 @@

// Attached files
$listofpaths=dol_dir_list($upload_dir,'all',0,'','','name',SORT_ASC,0);
if (sizeof($listofpaths))
if (count($listofpaths))
{
foreach($listofpaths as $key => $val)
{
Expand Down Expand Up @@ -909,7 +909,7 @@
print '<tr><td>'.$langs->trans("MailFile").' '.$i.'</td><td colspan="3">';
// List of files
$listofpaths=dol_dir_list($upload_dir,'all',0,'','','name',SORT_ASC,0);
if (sizeof($listofpaths))
if (count($listofpaths))
{
foreach($listofpaths as $key => $val)
{
Expand Down Expand Up @@ -1001,7 +1001,7 @@
print '<td colspan="3">';
// List of files
$listofpaths=dol_dir_list($upload_dir,'all',0,'','','name',SORT_ASC,0);
if (sizeof($listofpaths))
if (count($listofpaths))
{
foreach($listofpaths as $key => $val)
{
Expand Down
4 changes: 2 additions & 2 deletions htdocs/comm/propal.php
Expand Up @@ -1531,7 +1531,7 @@
// Validate
if ($object->statut == 0 && $user->rights->propale->valider)
{
if (sizeof($object->lines) > 0) print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=validate">'.$langs->trans('Validate').'</a>';
if (count($object->lines) > 0) print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=validate">'.$langs->trans('Validate').'</a>';
else print '<a class="butActionRefused" href="#">'.$langs->trans('Validate').'</a>';
}

Expand Down Expand Up @@ -1574,7 +1574,7 @@
}

$arraypropal=$object->getInvoiceArrayList();
if (is_array($arraypropal) && sizeof($arraypropal) > 0)
if (is_array($arraypropal) && count($arraypropal) > 0)
{
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=classifybilled&amp;socid='.$object->socid.'">'.$langs->trans("ClassifyBilled").'</a>';
}
Expand Down
10 changes: 5 additions & 5 deletions htdocs/comm/propal/class/propal.class.php
Expand Up @@ -692,7 +692,7 @@ function create($user='', $notrigger=0)
if (! $error)
{
$fk_parent_line=0;
$num=sizeof($this->lines);
$num=count($this->lines);

for ($i=0;$i<$num;$i++)
{
Expand Down Expand Up @@ -1651,7 +1651,7 @@ function InvoiceArrayList($id)
$this->fetchObjectLinked($id,$this->element);
foreach($this->linkedObjectsIds as $objecttype => $objectid)
{
$numi=sizeof($objectid);
$numi=count($objectid);
for ($i=0;$i<$numi;$i++)
{
// Cas des factures liees directement
Expand All @@ -1665,7 +1665,7 @@ function InvoiceArrayList($id)
$this->fetchObjectLinked($objectid[$i],$objecttype);
foreach($this->linkedObjectsIds as $subobjecttype => $subobjectid)
{
$numj=sizeof($subobjectid);
$numj=count($subobjectid);
for ($j=0;$j<$numj;$j++)
{
$linkedInvoices[] = $subobjectid[$j];
Expand All @@ -1675,7 +1675,7 @@ function InvoiceArrayList($id)
}
}

if (sizeof($linkedInvoices) > 0)
if (count($linkedInvoices) > 0)
{
$sql= "SELECT rowid as facid, facnumber, total, datef as df, fk_user_author, fk_statut, paye";
$sql.= " FROM ".MAIN_DB_PREFIX."facture";
Expand Down Expand Up @@ -2115,7 +2115,7 @@ function load_board($user,$mode)
}
}
// TODO Definir regle des propales a facturer en retard
// if ($mode == 'signed' && ! sizeof($this->FactureListeArray($obj->rowid))) $this->nbtodolate++;
// if ($mode == 'signed' && ! count($this->FactureListeArray($obj->rowid))) $this->nbtodolate++;
}
return 1;
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/comm/propal/contact.php
Expand Up @@ -285,7 +285,7 @@
foreach(array('internal','external') as $source)
{
$tab = $propal->liste_contact(-1,$source);
$num=sizeof($tab);
$num=count($tab);

$i = 0;
while ($i < $num)
Expand Down
2 changes: 1 addition & 1 deletion htdocs/comm/propal/document.php
Expand Up @@ -167,7 +167,7 @@
print "<tr><td>".$langs->trans("Company")."</td>";
print '<td colspan="3">'.$object->thirdparty->getNomUrl(1).'</td></tr>';

print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.sizeof($filearray).'</td></tr>';
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';

print '</table>';
Expand Down
15 changes: 9 additions & 6 deletions htdocs/commande/class/commande.class.php
Expand Up @@ -241,7 +241,8 @@ function valid($user)
$langs->load("agenda");

// Loop on each line
for ($i = 0 ; $i < sizeof($this->lines) ; $i++)
$num=count($this->lines);
for ($i = 0; $i < $num; $i++)
{
if ($this->lines[$i]->fk_product > 0)
{
Expand Down Expand Up @@ -352,7 +353,8 @@ function set_draft($user)
require_once(DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php");
$langs->load("agenda");

for ($i = 0 ; $i < sizeof($this->lines) ; $i++)
$num=count($this->lines);
for ($i = 0; $i < $num; $i++)
{
if ($this->lines[$i]->fk_product > 0)
{
Expand Down Expand Up @@ -647,7 +649,7 @@ function create($user, $notrigger=0)
if ($this->id)
{
$fk_parent_line=0;
$num=sizeof($this->lines);
$num=count($this->lines);

/*
* Insertion du detail des produits dans la base
Expand Down Expand Up @@ -874,7 +876,8 @@ function createFromProposal($object,$hookmanager=false)
$this->date_commande = dol_now();
$this->source = 0;

for ($i = 0 ; $i < sizeof($object->lines) ; $i++)
$num=count($object->lines);
for ($i = 0; $i < $num; $i++)
{
$line = new OrderLine($this->db);

Expand Down Expand Up @@ -1161,7 +1164,7 @@ function add_product($idproduct, $qty, $remise_percent=0, $date_start='', $date_
$prod->fetch($idproduct);
$prod -> get_sousproduits_arbo ();
$prods_arbo = $prod->get_each_prod();
if(sizeof($prods_arbo) > 0)
if(count($prods_arbo) > 0)
{
foreach($prods_arbo as $key => $value)
{
Expand Down Expand Up @@ -1582,7 +1585,7 @@ function stock_array($filtre_statut=-1)


// Recherche total en stock pour chaque produit
if (sizeof($array_of_product))
if (count($array_of_product))
{
$sql = "SELECT fk_product, sum(ps.reel) as total";
$sql.= " FROM ".MAIN_DB_PREFIX."product_stock as ps";
Expand Down
2 changes: 1 addition & 1 deletion htdocs/commande/contact.php
Expand Up @@ -276,7 +276,7 @@
foreach(array('internal','external') as $source)
{
$tab = $commande->liste_contact(-1,$source);
$num=sizeof($tab);
$num=count($tab);

$i = 0;
while ($i < $num)
Expand Down
2 changes: 1 addition & 1 deletion htdocs/commande/document.php
Expand Up @@ -154,7 +154,7 @@
print '</td></tr>';

print '<tr><td>'.$langs->trans('Company').'</td><td colspan="3">'.$object->thirdparty->getNomUrl(1).'</td></tr>';
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.sizeof($filearray).'</td></tr>';
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
print "</table>\n";
print "</div>\n";
Expand Down
2 changes: 1 addition & 1 deletion htdocs/commande/fiche.php
Expand Up @@ -238,7 +238,7 @@
if (empty($lines) && method_exists($srcobject,'fetch_lines')) $lines = $srcobject->fetch_lines();

$fk_parent_line=0;
$num=sizeof($lines);
$num=count($lines);

for ($i=0;$i<$num;$i++)
{
Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/bank/annuel.php
Expand Up @@ -151,7 +151,7 @@
$bankaccount->fetch($id);
$bankaccount->label=$bankaccount->ref;
print $bankaccount->getNomUrl(1);
if ($key < (sizeof($listid)-1)) print ', ';
if ($key < (count($listid)-1)) print ', ';
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/bank/graph.php
Expand Up @@ -760,7 +760,7 @@
$bankaccount->fetch($id);
$bankaccount->label=$bankaccount->ref;
print $bankaccount->getNomUrl(1);
if ($key < (sizeof($listid)-1)) print ', ';
if ($key < (count($listid)-1)) print ', ';
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/bank/ligne.php
Expand Up @@ -274,7 +274,7 @@
print '</tr>';

// Show links of bank transactions
if (sizeof($links))
if (count($links))
{
print "<tr><td>".$langs->trans("Links")."</td>";
print '<td colspan="4">';
Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/facture.php
Expand Up @@ -2129,7 +2129,7 @@
}

$facidavoir=$object->getListIdAvoirFromInvoice();
if (sizeof($facidavoir) > 0)
if (count($facidavoir) > 0)
{
print ' ('.$langs->transnoentities("InvoiceHasAvoir");
$i=0;
Expand Down Expand Up @@ -2666,7 +2666,7 @@
}

// Validate
if ($object->statut == 0 && sizeof($object->lines) > 0 &&
if ($object->statut == 0 && count($object->lines) > 0 &&
(
(($object->type == 0 || $object->type == 1 || $object->type == 3 || $object->type == 4) && $object->total_ttc >= 0)
|| ($object->type == 2 && $object->total_ttc <= 0))
Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/facture/apercu.php
Expand Up @@ -109,7 +109,7 @@
}

$facidavoir=$object->getListIdAvoirFromInvoice();
if (sizeof($facidavoir) > 0)
if (count($facidavoir) > 0)
{
print ' ('.$langs->transnoentities("InvoiceHasAvoir");
$i=0;
Expand Down
3 changes: 2 additions & 1 deletion htdocs/compta/facture/class/facture-rec.class.php
Expand Up @@ -143,7 +143,8 @@ function create($user,$facid)
/*
* Lines
*/
for ($i = 0 ; $i < sizeof($facsrc->lines) ; $i++)
$num=count($facsrc->lines);
for ($i = 0; $i < $num; $i++)
{
$result_insert = $this->addline($this->id,
$facsrc->lines[$i]->desc,
Expand Down

0 comments on commit 059c0f7

Please sign in to comment.