diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index bd456a57094..83c6091e53b 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -289,7 +289,7 @@ if ($resql) $box=new $boxname($db,$obj->note); $enabled=true; - if ($box->depends && sizeof($box->depends) > 0) + if ($box->depends && count($box->depends) > 0) { foreach($box->depends as $module) { @@ -446,7 +446,7 @@ if ($resql) print '
'; -# Other parameters +// Other parameters print_titre($langs->trans("Other")); print ''; diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index 91363cff292..af9f54ee7dc 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -63,7 +63,7 @@ if ($action == 'update' || $action == 'add') $consttype = GETPOST("consttype"); $constnote = GETPOST("constnote"); - $res = dolibarr_set_const($db, $constname, $constvalue, $consttype, 0, $constnote ,$conf->entity); + $res = dolibarr_set_const($db, $constname, $constvalue, $consttype, 0, $constnote, $conf->entity); if (! $res > 0) $error++; @@ -157,8 +157,7 @@ if ($result) } }*/ -$num=sizeof($list); - +$num=count($list); if ($num) { print '
'; diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index 00604e177a9..38ed35e425b 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -185,7 +185,7 @@ print "\n"; print ''; print ''; -# Affiche lignes des constantes +// Show constants $sql = "SELECT"; $sql.= " rowid"; $sql.= ", ".$db->decrypt('name')." as name"; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 173e2be91e9..d92ace207b0 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -693,7 +693,7 @@ if ($_GET["id"]) // There is several pages if ($num > $listlimit) { - print ''; } @@ -899,9 +899,11 @@ llxFooter(); /** - * \brief Show field - * \param fieldlist Array of fields - * \param obj If we show a particular record, obj is filled with record fields + * Show field + * + * @param array $fieldlist Array of fields + * @param Object $obj If we show a particular record, obj is filled with record fields + * @return void */ function fieldList($fieldlist,$obj='') { diff --git a/htdocs/admin/dons.php b/htdocs/admin/dons.php index 10b8211a462..51326c51072 100644 --- a/htdocs/admin/dons.php +++ b/htdocs/admin/dons.php @@ -110,10 +110,7 @@ if ($_GET["action"] == 'set') $sql.= ($_GET["label"]?"'".$db->escape($_GET["label"])."'":'null').", "; $sql.= (! empty($_GET["scandir"])?"'".$db->escape($_GET["scandir"])."'":"null"); $sql.= ")"; - if ($db->query($sql)) - { - - } + $resql=$db->query($sql); } if ($_GET["action"] == 'del') @@ -121,10 +118,7 @@ if ($_GET["action"] == 'del') $type='donation'; $sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model"; $sql .= " WHERE nom = '".$_GET["value"]."' AND type = '".$type."'"; - if ($db->query($sql)) - { - - } + $resql=$db->query($sql); } diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index e93456cc95f..8dafcfd9218 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -208,9 +208,9 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'sendhtml') $body=make_substitutions($body,$substitutionarrayfortest); require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php"); - $mailfile = new CMailFile($subject,$sendto,$email_from,$body, - $filepath,$mimetype,$filename, - $sendtocc, $sendtoccc, $deliveryreceipt, $msgishtml,$errors_to); + $mailfile = new CMailFile($subject, $sendto, $email_from, $body, + $filepath, $mimetype, $filename, + $sendtocc, $sendtoccc, $deliveryreceipt, $msgishtml, $errors_to); $result=$mailfile->sendfile(); diff --git a/htdocs/admin/societe.php b/htdocs/admin/societe.php index 278cb00238b..83d008eb63a 100644 --- a/htdocs/admin/societe.php +++ b/htdocs/admin/societe.php @@ -123,11 +123,9 @@ if ($action == 'set') $sql.= ($label?"'".$db->escape($label)."'":'null').", "; $sql.= (! empty($scandir)?"'".$db->escape($scandir)."'":"null"); $sql.= ")"; - if ($db->query($sql)) - { - - } - else dol_print_error($db); + + $resql=$db->query($sql); + if (! $resql) dol_print_error($db); } // Disable a document generator module @@ -505,13 +503,13 @@ print ''; print "\n"; $profid[0][0]=$langs->trans("ProfId1"); -$profid[0][1]=$langs->transcountry('ProfId1' ,$mysoc->pays_code); +$profid[0][1]=$langs->transcountry('ProfId1', $mysoc->pays_code); $profid[1][0]=$langs->trans("ProfId2"); -$profid[1][1]=$langs->transcountry('ProfId2' ,$mysoc->pays_code); +$profid[1][1]=$langs->transcountry('ProfId2', $mysoc->pays_code); $profid[2][0]=$langs->trans("ProfId3"); -$profid[2][1]=$langs->transcountry('ProfId3' ,$mysoc->pays_code); +$profid[2][1]=$langs->transcountry('ProfId3', $mysoc->pays_code); $profid[3][0]=$langs->trans("ProfId4"); -$profid[3][1]=$langs->transcountry('ProfId4' ,$mysoc->pays_code); +$profid[3][1]=$langs->transcountry('ProfId4', $mysoc->pays_code); $var = true; $i=0;
'; + print '
'; print_fleche_navigation($page,$_SERVER["PHP_SELF"],'&id='.GETPOST('id'),($num > $listlimit),$langs->trans("Page").' '.($page+1)); print '
'.$langs->trans("MustBeUnique").'