diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index bae180df4cf..1603270c4d8 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -259,7 +259,7 @@ if ($db->query($sql)) if ($facture_rib_number_var == $row[0]) { - print ''; + print ''; } else { @@ -297,7 +297,7 @@ if ($db->query($sql)) if ($facture_chq_number_var == $row[0]) { - print ''; + print ''; } else { diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index f3dd5bb7d23..5856f29b85f 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -107,7 +107,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') $filelib=eregi_replace('\.php$','',$file); if ($file == $conf->global->MAIN_MENU_BARRETOP) { - print ''; + print ''; } else { @@ -130,7 +130,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') $filelib=eregi_replace('\.php$','',$file); if ($file == $conf->global->MAIN_MENU_BARRELEFT) { - print ''; + print ''; } else { diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php index efcb1dde463..2e54ac4f9fa 100644 --- a/htdocs/admin/ldap.php +++ b/htdocs/admin/ldap.php @@ -301,11 +301,11 @@ print ''; print ''.$langs->trans("DNContactActive").''; if (defined("LDAP_SERVER_TYPE") && LDAP_SERVER_TYPE == activedirectory) { - print ''; + print ''; print ''; } else { print ''; - print ''; + print ''; } print ''; diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 654b289a146..7d00d347e8e 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -109,7 +109,7 @@ if ($account > 0) $var=True; $num = $db->num_rows($result); $i = 0; - $options = ""; + $options = ""; while ($i < $num) { $obj = $db->fetch_object($result); diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index b43a05450ef..44e7a7e57b0 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -136,7 +136,7 @@ if ($result) $var=True; $num = $db->num_rows($result); $i = 0; - $options = ""; + $options = ""; while ($i < $num) { $obj = $db->fetch_object($result); diff --git a/htdocs/compta/bank/rappro.php b/htdocs/compta/bank/rappro.php index a8e3533802e..8a879444f4d 100644 --- a/htdocs/compta/bank/rappro.php +++ b/htdocs/compta/bank/rappro.php @@ -107,7 +107,7 @@ if ($resql) { $num = $db->num_rows($resql); $i = 0; while ($i < $num) { - if ($options == "") { $options = ""; } + if ($options == "") { $options = ""; } $obj = $db->fetch_object($resql); $options .= "\n"; $i++; } diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index 70ad8c86838..d585d973d1a 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -112,7 +112,7 @@ if ($result) { $var=True; $num = $db->num_rows($result); $i = 0; - $options = ""; + $options = ""; while ($i < $num) { $obj = $db->fetch_object($result); $options .= "\n"; $i++; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index fbcf844cab8..a062aee946e 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -792,7 +792,7 @@ if ($_GET['action'] == 'create') if ($num > 0) { print 'Factures récurrentes : "; for ($month = 1 ; $month <= 12 ; $month++) { if ($month == $cmonth) { - print "'; - print ''; + print ''; print ''; print ''; diff --git a/htdocs/compta/voyage/bilan.php b/htdocs/compta/voyage/bilan.php index 4be38c1f541..fdc5d836dba 100644 --- a/htdocs/compta/voyage/bilan.php +++ b/htdocs/compta/voyage/bilan.php @@ -59,7 +59,7 @@ if ($result) { $var=True; $num = $db->num_rows(); $i = 0; - $options = ""; + $options = ""; while ($i < $num) { $obj = $db->fetch_object($result); $options .= "\n"; $i++; diff --git a/htdocs/compta/voyage/index.php b/htdocs/compta/voyage/index.php index 01207f5abf7..f1bcc66edbb 100644 --- a/htdocs/compta/voyage/index.php +++ b/htdocs/compta/voyage/index.php @@ -58,7 +58,7 @@ if ($result) { $var=True; $num = $db->num_rows(); $i = 0; - $options = ""; + $options = ""; while ($i < $num) { $obj = $db->fetch_object($result); $options .= "\n"; $i++; diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 9dee7c982dd..a574fb5403b 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -345,7 +345,7 @@ if ($_GET["action"] == 'create') $sql .= " ORDER BY p.nbvente DESC LIMIT 20"; if ( $db->query($sql) ) { - $opt = ""; + $opt = ""; if ($result) { $num = $db->num_rows(); $i = 0; diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 0c738696e4d..2ec93b815cc 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -259,7 +259,7 @@ if ($_GET["action"] == 'create' or $_GET["action"] == 'copy') if ($_GET["socid"] == $obj->idp) { - print '" selected>'.$obj->nom.''; + print '" selected=\"true\">'.$obj->nom.''; } else { diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 8ad1b6c11b3..1f90bf255d4 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -403,6 +403,7 @@ class Form * \param socid Id société * \param selected Id projet présélectionné * \param htmlname Nom de la zone html + * \return int Nbre de projet si ok, <0 si ko */ function select_projects($socid='', $selected='', $htmlname='projectid') { @@ -436,10 +437,12 @@ class Form } } print ''; + return $num; } else { dolibarr_print_error($this->db); + return -1; } } diff --git a/htdocs/install/index.php b/htdocs/install/index.php index 0da5bd423f2..543cd0c9166 100644 --- a/htdocs/install/index.php +++ b/htdocs/install/index.php @@ -63,7 +63,7 @@ while ($i < $num) { if ($selected == $langs_available[$i]) { - print ''; + print ''; } else { diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index 3f491b4dcdc..b0ed115e4a9 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -1477,18 +1477,18 @@ function print_heure_select($prefix,$begin=1,$end=23) { function print_duree_select($prefix) { print ' H "; print '\n"; } diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 60f7a87f6ce..4e7622807db 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -243,7 +243,7 @@ if ($_GET["action"] == 'create' && $user->rights->produit->creer) print ''.$langs->trans("Status").''; print ''; if ($product->envente) { - print ''; + print ''; print ''; } else { print ''; - print ''; + print ''; } print ''; if ($product->type == 0 && $conf->stock->enabled) diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index 35bba2519c0..17523e8d7f5 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -154,7 +154,7 @@ if ($_GET["action"] == 'create') print ''.$langs->trans("Status").''; print ''; diff --git a/htdocs/projet/tasks/fiche.php b/htdocs/projet/tasks/fiche.php index e748e937f8e..1eb008d3ca2 100644 --- a/htdocs/projet/tasks/fiche.php +++ b/htdocs/projet/tasks/fiche.php @@ -299,7 +299,7 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer) print ''.$langs->trans("NewTask").''; print ' '; print ' '; print '';