From e22fb3c538bd214cca9f97c1fb65796e9cc5d795 Mon Sep 17 00:00:00 2001 From: philippe grand Date: Fri, 2 Oct 2015 12:39:09 +0200 Subject: [PATCH 1/9] fix : Typo --- ChangeLog | 2 +- htdocs/comm/propal.php | 2 +- htdocs/commande/card.php | 2 +- htdocs/compta/facture.php | 2 +- htdocs/fourn/commande/card.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 43203e0f938..30084927aaa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -126,7 +126,7 @@ For users: Use accesskey on form search. - New: Intervention documents are now available in ECM module. - New: Add attachments on user card + in ECM module. -- New: Can add __PROJECT_REF__ and __TIHRPARTY_NAME__ into email topic or content template. +- New: Can add __PROJECT_REF__ and __THIRDPARTY_NAME__ into email topic or content template. - New: [ task #1204 ] add Numering contrat module free (like leopard in product module). - New: [ task #712 ] Add warning when creating invoice from proposal or order, when there is already one invoice. - New: Enable supplier price log table. diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 5fef6f8ae29..865358c6438 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -2255,7 +2255,7 @@ if ($action == 'create') $formmail->substit['__PROPREF__'] = $object->ref; $formmail->substit['__SIGNATURE__'] = $user->signature; $formmail->substit['__REFCLIENT__'] = $object->ref_client; - $formmail->substit['__THIRPARTY_NAME__'] = $object->thirdparty->name; + $formmail->substit['__THIRDPARTY_NAME__'] = $object->thirdparty->name; $formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:''); $formmail->substit['__PERSONALIZED__'] = ''; $formmail->substit['__CONTACTCIVNAME__'] = ''; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index c326959619a..336b39e43b1 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2345,7 +2345,7 @@ if ($action == 'create' && $user->rights->commande->creer) { $formmail->substit ['__ORDERREF__'] = $object->ref; $formmail->substit ['__SIGNATURE__'] = $user->signature; $formmail->substit ['__REFCLIENT__'] = $object->ref_client; - $formmail->substit ['__THIRPARTY_NAME__'] = $object->thirdparty->name; + $formmail->substit ['__THIRDPARTY_NAME__'] = $object->thirdparty->name; $formmail->substit ['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:''); $formmail->substit ['__PERSONALIZED__'] = ''; $formmail->substit ['__CONTACTCIVNAME__'] = ''; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index dc04004653f..a69b35c9559 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3627,7 +3627,7 @@ if ($action == 'create') $formmail->substit['__FACREF__'] = $object->ref; $formmail->substit['__SIGNATURE__'] = $user->signature; $formmail->substit['__REFCLIENT__'] = $object->ref_client; - $formmail->substit['__THIRPARTY_NAME__'] = $object->thirdparty->name; + $formmail->substit['__THIRDPARTY_NAME__'] = $object->thirdparty->name; $formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:''); $formmail->substit['__PERSONALIZED__'] = ''; $formmail->substit['__CONTACTCIVNAME__'] = ''; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 4daacc43f8a..20abbdf8378 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1981,7 +1981,7 @@ elseif (! empty($object->id)) // Tableau des substitutions $formmail->substit['__ORDERREF__']=$object->ref; $formmail->substit['__ORDERSUPPLIERREF__']=$object->ref_supplier; - $formmail->substit['__THIRPARTY_NAME__'] = $object->thirdparty->name; + $formmail->substit['__THIRDPARTY_NAME__'] = $object->thirdparty->name; $formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:''); $formmail->substit['__SIGNATURE__']=$user->signature; $formmail->substit['__PERSONALIZED__']=''; From c9d8e041d56a7bd5cc32681f2be8bdf0ec18fdde Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 5 Oct 2015 15:20:55 +0200 Subject: [PATCH 2/9] FIX : New adherent from, always redirect on entity --- htdocs/public/members/new.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 255e7fe9134..e9c8264d549 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -304,7 +304,6 @@ if ($action == 'add') $urlback=DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?from=membernewform&source=membersubscription&ref='.$adh->ref; if (price2num(GETPOST('amount'))) $urlback.='&amount='.price2num(GETPOST('amount')); if (GETPOST('email')) $urlback.='&email='.urlencode(GETPOST('email')); - if (! empty($entity)) $urlback.='&entity='.$entity; } else if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paypal') { @@ -315,7 +314,7 @@ if ($action == 'add') { $urlback.='&securekey='.dol_hash($conf->global->PAYPAL_SECURITY_TOKEN . 'membersubscription' . $adh->ref, 2); } - if (! empty($entity)) $urlback.='&entity='.$entity; + } else { @@ -324,6 +323,7 @@ if ($action == 'add') } } + if (! empty($entity)) $urlback.='&entity='.$entity; dol_syslog("member ".$adh->ref." was created, we redirect to ".$urlback); Header("Location: ".$urlback); exit; From bf262c2cae6dd7369bb830bcab3aa393789b76fe Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Mon, 5 Oct 2015 15:41:28 +0200 Subject: [PATCH 3/9] reenable search criteria in sql clause --- htdocs/core/class/extrafields.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 8ce0a1b3b45..b46540ad6d9 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -753,7 +753,7 @@ class ExtraFields $sqlwhere.= ' WHERE 1'; } if (in_array($InfoFieldList[0],array('tablewithentity'))) $sqlwhere.= ' AND entity = '.$conf->entity; // Some tables may have field, some other not. For the moment we disable it. - //$sql.=preg_replace('/^ AND /','',$sqlwhere); + $sql.=preg_replace('/^ AND /','',$sqlwhere); //print $sql; dol_syslog(get_class($this).'::showInputField type=sellist sql='.$sql); From d24f5538f9cf1c5e0ce8b0eb7a559111f9b50963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Mon, 5 Oct 2015 20:25:55 +0200 Subject: [PATCH 4/9] Fix: wrong parameters order --- htdocs/core/class/extrafields.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 99ec23c6a73..40ba0e666ae 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1155,7 +1155,7 @@ class ExtraFields else if (in_array($key_type,array('checkbox'))) { $value_arr=GETPOST("options_".$key.$keyprefix); - $value_key=implode($value_arr,','); + $value_key=implode(',', $value_arr); } else if (in_array($key_type,array('price','double'))) { From 41354ca00d63888f46de15c3ae6c657b3824856d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Mon, 5 Oct 2015 20:30:55 +0200 Subject: [PATCH 5/9] Added type hinting to extrafields object --- htdocs/core/class/commonobject.class.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index f9eeffbb018..a812ccc7bf7 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3564,16 +3564,16 @@ abstract class CommonObject else return 0; } - /** - * Function to show lines of extrafields with output datas - * - * @param object $extrafields Extrafield Object - * @param string $mode Show output (view) or input (edit) for extrafield - * @param array $params Optionnal parameters - * @param string $keyprefix Prefix string to add into name and id of field (can be used to avoid duplicate names) - * - * @return string - */ + /** + * Function to show lines of extrafields with output datas + * + * @param Extrafields $extrafields Extrafield Object + * @param string $mode Show output (view) or input (edit) for extrafield + * @param array $params Optional parameters + * @param string $keyprefix Prefix string to add into name and id of field (can be used to avoid duplicate names) + * + * @return string + */ function showOptionals($extrafields, $mode='view', $params=0, $keyprefix='') { global $_POST, $conf; From 3fdd59bf0a06798476566b6fc173ebb3540ef5cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Mon, 5 Oct 2015 20:39:14 +0200 Subject: [PATCH 6/9] Fix #3666 checkbox extrafields on edit --- htdocs/core/class/commonobject.class.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index a812ccc7bf7..99e497046e0 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3601,7 +3601,16 @@ abstract class CommonObject $value=$this->array_options["options_".$key]; break; case "edit": - $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$this->array_options["options_".$key]); + if (isset($_POST["options_" . $key])) { + if (is_array($_POST["options_" . $key])) { + // $_POST["options"] is an array but following code expects a comma separated string + $value = implode(",", $_POST["options_" . $key]); + } else { + $value = $_POST["options_" . $key]; + } + } else { + $value = $this->array_options["options_" . $key]; + } break; } if ($extrafields->attribute_type[$key] == 'separate') From afbee44993e6c5c6ae80f7e46f5eba72bd523fab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Mon, 5 Oct 2015 20:51:17 +0200 Subject: [PATCH 7/9] Fix #3667 checkbox extrafields on edit For actions and members. --- htdocs/adherents/type.php | 11 ++++++++++- htdocs/comm/action/card.php | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 14bbcb8e854..1819925e723 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -678,7 +678,16 @@ if ($rowid > 0) print '

'; foreach($extrafields->attribute_label as $key=>$label) { - $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($adht->array_options['options_'.$key])?$adht->array_options['options_'.$key]:'')); + if (isset($_POST["options_" . $key])) { + if (is_array($_POST["options_" . $key])) { + // $_POST["options"] is an array but following code expects a comma separated string + $value = implode(",", $_POST["options_" . $key]); + } else { + $value = $_POST["options_" . $key]; + } + } else { + $value = $adht->array_options["options_" . $key]; + } print '\n"; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 2e35b8004f0..c011717c0cc 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1202,7 +1202,16 @@ if ($id > 0) print '

'.$label.''; print $extrafields->showInputField($key,$value); print "
'; foreach($extrafields->attribute_label as $key=>$label) { - $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options['options_'.$key])?$object->array_options['options_'.$key]:'')); + if (isset($_POST["options_" . $key])) { + if (is_array($_POST["options_" . $key])) { + // $_POST["options"] is an array but following code expects a comma separated string + $value = implode(",", $_POST["options_" . $key]); + } else { + $value = $_POST["options_" . $key]; + } + } else { + $value = $object->array_options["options_" . $key]; + } print '\n"; From c208fccf35aaf44b83bdc3edc0c2e5d5623d4b87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Tue, 6 Oct 2015 14:52:06 +0200 Subject: [PATCH 8/9] [Qual] Prevent warning calcul_price_total() prefers to have the seller and localtaxes specified --- htdocs/comm/propal/class/propal.class.php | 2 +- htdocs/contrat/class/contrat.class.php | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index b7ca39db991..dbd03788293 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -368,7 +368,7 @@ class Propal extends CommonObject $localtaxes_type=getLocalTaxesFromRate($txtva,0,$this->thirdparty,$mysoc); - $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, '', $localtaxes_type); + $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; $total_ttc = $tabprice[2]; diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index d2e066082d0..f5b8d516900 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1284,7 +1284,7 @@ class Contrat extends CommonObject $localtaxes_type=getLocalTaxesFromRate($txtva, 0, $this->societe, $mysoc); - $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, 1,'', $localtaxes_type); + $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, 1,$mysoc, $localtaxes_type); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; $total_ttc = $tabprice[2]; @@ -1420,7 +1420,7 @@ class Contrat extends CommonObject $localtaxes_type=getLocalTaxesFromRate($tvatx, 0, $this->societe, $mysoc); - $tabprice=calcul_price_total($qty, $pu, $remise_percent, $tvatx, $localtax1tx, $localtax2tx, 0, $price_base_type, $info_bits, 1, '', $localtaxes_type); + $tabprice=calcul_price_total($qty, $pu, $remise_percent, $tvatx, $localtax1tx, $localtax2tx, 0, $price_base_type, $info_bits, 1, $mysoc, $localtaxes_type); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; $total_ttc = $tabprice[2]; @@ -2333,7 +2333,7 @@ class ContratLigne extends CommonObject */ function update($user, $notrigger=0) { - global $conf, $langs; + global $conf, $langs, $mysoc; $error=0; @@ -2370,7 +2370,9 @@ class ContratLigne extends CommonObject // qty, pu, remise_percent et txtva // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. - $tabprice=calcul_price_total($this->qty, $this->price_ht, $this->remise_percent, $this->tva_tx, $this->localtax1_tx, $this->localtax2_tx, 0, 'HT', 0, 1); + $localtaxes_type = getLocalTaxesFromRate($this->txtva, 0, $this->societe, $mysoc); + + $tabprice=calcul_price_total($this->qty, $this->price_ht, $this->remise_percent, $this->tva_tx, $this->localtax1_tx, $this->localtax2_tx, 0, 'HT', 0, 1, $mysoc, $localtaxes_type); $this->total_ht = $tabprice[0]; $this->total_tva = $tabprice[1]; $this->total_ttc = $tabprice[2]; From 0e343ae3b2920ccd01353f2216d4d81ac0d66470 Mon Sep 17 00:00:00 2001 From: philippe grand Date: Thu, 8 Oct 2015 09:34:02 +0200 Subject: [PATCH 9/9] syntax error --- htdocs/adherents/admin/public.php | 4 ++-- htdocs/adherents/card.php | 2 +- htdocs/admin/dict.php | 2 +- htdocs/cashdesk/admin/cashdesk.php | 2 +- htdocs/categories/class/categorie.class.php | 2 +- htdocs/compta/bank/releve.php | 2 +- htdocs/compta/stats/index.php | 2 +- htdocs/core/lib/memory.lib.php | 2 +- htdocs/core/lib/project.lib.php | 10 +++++----- htdocs/core/lib/tax.lib.php | 2 +- htdocs/core/modules/import/import_csv.modules.php | 2 +- .../project/task/doc/doc_generic_task_odt.modules.php | 2 +- htdocs/livraison/card.php | 2 +- htdocs/opensurvey/card.php | 2 +- htdocs/product/composition/card.php | 4 ++-- htdocs/product/stock/valo.php | 2 +- htdocs/projet/note.php | 2 +- htdocs/societe/canvas/company/tpl/card_view.tpl.php | 2 +- htdocs/societe/canvas/individual/tpl/card_view.tpl.php | 2 +- htdocs/webservices/demo_wsclient_actioncomm.php-NORUN | 4 ++-- htdocs/webservices/demo_wsclient_category.php-NORUN | 4 ++-- htdocs/webservices/demo_wsclient_invoice.php-NORUN | 4 ++-- htdocs/webservices/demo_wsclient_other.php-NORUN | 4 ++-- .../demo_wsclient_productorservice.php-NORUN | 4 ++-- htdocs/webservices/demo_wsclient_thirdparty.php-NORUN | 4 ++-- .../email_expire_services_to_representatives.php | 2 +- .../email_unpaid_invoices_to_representatives.php | 2 +- 27 files changed, 39 insertions(+), 39 deletions(-) diff --git a/htdocs/adherents/admin/public.php b/htdocs/adherents/admin/public.php index 088f96b00c1..e8381584355 100644 --- a/htdocs/adherents/admin/public.php +++ b/htdocs/adherents/admin/public.php @@ -164,7 +164,7 @@ print ''; print '\n"; // Can edit @@ -197,7 +197,7 @@ if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled)) print '\n"; } diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 94f12a61f8b..a2fe0763e97 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -249,7 +249,7 @@ if (empty($reshook)) } $lastname=$_POST["lastname"]; $firstname=$_POST["firstname"]; - $morphy=$morphy=$_POST["morphy"];; + $morphy=$morphy=$_POST["morphy"]; if ($morphy != 'mor' && empty($lastname)) { $error++; $langs->load("errors"); diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 580770e7ba2..ae8ce969f70 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -913,7 +913,7 @@ if ($id) print ""; $colspan=count($fieldlist)+2; - if ($id == 4) $colspan++;; + if ($id == 4) $colspan++; if (! empty($alabelisused)) // Si un des champs est un libelle { diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php index 7571befb121..15f15cedc10 100644 --- a/htdocs/cashdesk/admin/cashdesk.php +++ b/htdocs/cashdesk/admin/cashdesk.php @@ -164,7 +164,7 @@ if (! empty($conf->service->enabled)) $var=! $var; print '\n"; } diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index b9876bb8382..7814b198a02 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1164,7 +1164,7 @@ class Categorie extends CommonObject { $cats = array(); - $typeid=-1; $table='';; + $typeid=-1; $table=''; if ($type == '0' || $type == 'product') { $typeid=0; $table='product'; $type='product'; } else if ($type == '1' || $type == 'supplier') { $typeid=1; $table='societe'; $type='fournisseur'; } else if ($type == '2' || $type == 'customer') { $typeid=2; $table='societe'; $type='societe'; } diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index e4afe6f2b25..c5ca2ef3835 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -343,7 +343,7 @@ else elseif ($links[$key]['type']=='payment_supplier') { $paymentsupplierstatic->id=$links[$key]['url_id']; - $paymentsupplierstatic->ref=$langs->trans("Payment");; + $paymentsupplierstatic->ref=$langs->trans("Payment"); print ' '.$paymentsupplierstatic->getNomUrl(1); $newline=0; } diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index cfd816c29b6..8dfb0d76fc0 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -298,7 +298,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++) if ($annee_decalage != $year_end) print ''; } - $total_ht[$annee]+=!empty($cum_ht[$case]) ? $cum_ht[$case] : 0;; + $total_ht[$annee]+=!empty($cum_ht[$case]) ? $cum_ht[$case] : 0; $total[$annee]+=$cum[$case]; } diff --git a/htdocs/core/lib/memory.lib.php b/htdocs/core/lib/memory.lib.php index a6fae1c7b1f..b68016c3a46 100644 --- a/htdocs/core/lib/memory.lib.php +++ b/htdocs/core/lib/memory.lib.php @@ -231,7 +231,7 @@ function dol_getshmop($memoryid) global $shmkeys,$shmoffset; if (empty($shmkeys[$memoryid]) || ! function_exists("shmop_open")) return 0; - $shmkey=dol_getshmopaddress($memoryid);; + $shmkey=dol_getshmopaddress($memoryid); //print 'dol_getshmop memoryid='.$memoryid." shmkey=".$shmkey."
\n"; $handle=@shmop_open($shmkey,'a',0,0); if ($handle) diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index f3e77916c4b..6b636e99462 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -121,17 +121,17 @@ function task_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/task.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');; + $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/task.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':''); $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'task_task'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/contact.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');; + $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/contact.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':''); $head[$h][1] = $langs->trans("TaskRessourceLinks"); $head[$h][2] = 'task_contact'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');; + $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':''); $head[$h][1] = $langs->trans("TimeSpent"); $head[$h][2] = 'task_time'; $h++; @@ -147,14 +147,14 @@ function task_prepare_head($object) $nbNote = 0; if(!empty($object->note_private)) $nbNote++; if(!empty($object->note_public)) $nbNote++; - $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/note.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');; + $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/note.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':''); $head[$h][1] = $langs->trans('Notes'); if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; $head[$h][2] = 'task_notes'; $h++; } - $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/document.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');; + $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/document.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':''); $filesdir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($object->project->ref) . '/' .dol_sanitizeFileName($object->ref); include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $listoffiles=dol_dir_list($filesdir,'files',1,'','thumbs'); diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index 011f3d26de0..de705111b9d 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -494,7 +494,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction, $sql.= " AND f.fk_statut in (1,2)"; // Paid (partially or completely) if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql.= " AND f.type IN (0,1,2)"; else $sql.= " AND f.type IN (0,1,2,3)"; - $sql.= " AND f.rowid = d.".$fk_facture;; + $sql.= " AND f.rowid = d.".$fk_facture; $sql.= " AND pf.".$fk_facture2." = f.rowid"; $sql.= " AND pa.rowid = pf.".$fk_payment; if ($y && $m) diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index cd3a35e4060..989418794bc 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -376,7 +376,7 @@ class ImportCsv extends ModeleImports if ($obj) $tablewithentity_cache[$tablename]=1; // table contains entity field else $tablewithentity_cache[$tablename]=0; // table does not contains entity field } - else dol_print_error($this->db);; + else dol_print_error($this->db); } else { diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index c074cba31e5..18f0c2fed88 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -416,7 +416,7 @@ class doc_generic_task_odt extends ModelePDFTask $project= new Project($this->db); $project->fetch($object->fk_project); - $dir = $conf->projet->dir_output. "/" . $project->ref. "/";; + $dir = $conf->projet->dir_output. "/" . $project->ref. "/"; $objectref = dol_sanitizeFileName($object->ref); if (! preg_match('/specimen/i',$objectref)) $dir.= "/" . $objectref; $file = $dir . "/" . $objectref . ".odt"; diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php index 1a89a377fef..cf30a7dfcac 100644 --- a/htdocs/livraison/card.php +++ b/htdocs/livraison/card.php @@ -383,7 +383,7 @@ if ($action == 'create') */ print ''; $quantite_commandee = $line->qty; diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index 70e1b49ad48..7096c3947b2 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -367,7 +367,7 @@ if ($comments) { } else { - print $langs->trans("NoCommentYet").'
';; + print $langs->trans("NoCommentYet").'
'; } print '
'; diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index ec616b2f222..89760dc66ba 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -252,7 +252,7 @@ if ($id > 0 || ! empty($ref)) $productstatic->type=$value["fk_product_type"]; $productstatic->ref=$value['label']; print ''; - print '';; + print ''; print ''; } print '
'.$label.''; print $extrafields->showOutputField($key,$value); print "
'; print $langs->trans("DefaultAmount"); print ''; -print '';; +print ''; print "
'; print $langs->trans("MEMBER_PAYONLINE_SENDEMAIL"); print ''; - print '';; + print ''; print "
'; print $langs->trans("CashdeskShowServices"); - print '';; + print ''; print $form->selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1); print "
 '; $quantite_livree = $commande->livraisons[$line->id]; - print $quantite_livree;; + print $quantite_livree; print '
'.$productstatic->getNomUrl(1,'composition').''.$productstatic->getNomUrl(1,'composition').'
'; @@ -401,7 +401,7 @@ if ($id > 0 || ! empty($ref)) $productstatic->type=$value["fk_product_type"]; $productstatic->ref=$value['label']; print ''; - print ''.$productstatic->getNomUrl(1,'composition').'';; + print ''.$productstatic->getNomUrl(1,'composition').''; print ''; } print ''; diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php index 7c73da3794c..59b4f895b73 100644 --- a/htdocs/product/stock/valo.php +++ b/htdocs/product/stock/valo.php @@ -31,7 +31,7 @@ $langs->load("stocks"); // Security check $result=restrictedArea($user,'stock'); -$sref=GETPOST("sref");; +$sref=GETPOST("sref"); $snom=GETPOST("snom"); $sall=GETPOST("sall"); diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php index b581ca01be9..0091ffcc23b 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -131,7 +131,7 @@ if ($id > 0 || ! empty($ref)) $colwidth=30; include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; - dol_fiche_end();; + dol_fiche_end(); } llxFooter(); diff --git a/htdocs/societe/canvas/company/tpl/card_view.tpl.php b/htdocs/societe/canvas/company/tpl/card_view.tpl.php index 4ea5afcbdcb..26c1e77742f 100644 --- a/htdocs/societe/canvas/company/tpl/card_view.tpl.php +++ b/htdocs/societe/canvas/company/tpl/card_view.tpl.php @@ -107,7 +107,7 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company'); trans('EMail'); ?> - control->tpl['email'];; ?> + control->tpl['email']; ?> trans('Web'); ?> control->tpl['url']; ?> diff --git a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php index d2fc7e5551b..bc83f2955da 100644 --- a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php @@ -106,7 +106,7 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company'); trans('EMail'); ?> - control->tpl['email'];; ?> + control->tpl['email']; ?> trans('Web'); ?> control->tpl['url']; ?> diff --git a/htdocs/webservices/demo_wsclient_actioncomm.php-NORUN b/htdocs/webservices/demo_wsclient_actioncomm.php-NORUN index 1e14c07a5bf..d3044fc9bd8 100755 --- a/htdocs/webservices/demo_wsclient_actioncomm.php-NORUN +++ b/htdocs/webservices/demo_wsclient_actioncomm.php-NORUN @@ -160,6 +160,6 @@ echo ''; echo '

SOAP Message

'; echo '
' . htmlspecialchars($soapclient->response, ENT_QUOTES) . '
'; -echo ''."\n";; -echo ''."\n";; +echo ''."\n"; +echo ''."\n"; ?> diff --git a/htdocs/webservices/demo_wsclient_category.php-NORUN b/htdocs/webservices/demo_wsclient_category.php-NORUN index 0793fd1806c..e0d78681eac 100755 --- a/htdocs/webservices/demo_wsclient_category.php-NORUN +++ b/htdocs/webservices/demo_wsclient_category.php-NORUN @@ -92,6 +92,6 @@ echo '

SOAP Message

'; echo '
' . htmlspecialchars($soapclient->response, ENT_QUOTES) . '
'; -echo ''."\n";; -echo ''."\n";; +echo ''."\n"; +echo ''."\n"; ?> diff --git a/htdocs/webservices/demo_wsclient_invoice.php-NORUN b/htdocs/webservices/demo_wsclient_invoice.php-NORUN index ad6612692fc..8708e89e13f 100755 --- a/htdocs/webservices/demo_wsclient_invoice.php-NORUN +++ b/htdocs/webservices/demo_wsclient_invoice.php-NORUN @@ -136,6 +136,6 @@ echo ''; echo '

SOAP Message

'; echo '
' . htmlspecialchars($soapclient2->response, ENT_QUOTES) . '
'; -echo ''."\n";; -echo ''."\n";; +echo ''."\n"; +echo ''."\n"; ?> diff --git a/htdocs/webservices/demo_wsclient_other.php-NORUN b/htdocs/webservices/demo_wsclient_other.php-NORUN index 60c801e10fc..0de1ac6b71a 100755 --- a/htdocs/webservices/demo_wsclient_other.php-NORUN +++ b/htdocs/webservices/demo_wsclient_other.php-NORUN @@ -99,6 +99,6 @@ echo ''; echo '

SOAP Message

'; echo '
' . htmlspecialchars($soapclient->response, ENT_QUOTES) . '
'; -echo ''."\n";; -echo ''."\n";; +echo ''."\n"; +echo ''."\n"; ?> diff --git a/htdocs/webservices/demo_wsclient_productorservice.php-NORUN b/htdocs/webservices/demo_wsclient_productorservice.php-NORUN index e27db313bfc..e684a39b1e7 100755 --- a/htdocs/webservices/demo_wsclient_productorservice.php-NORUN +++ b/htdocs/webservices/demo_wsclient_productorservice.php-NORUN @@ -177,6 +177,6 @@ echo ''; echo '

SOAP Message

'; echo '
' . htmlspecialchars($soapclient3->response, ENT_QUOTES) . '
'; -echo ''."\n";; -echo ''."\n";; +echo ''."\n"; +echo ''."\n"; ?> diff --git a/htdocs/webservices/demo_wsclient_thirdparty.php-NORUN b/htdocs/webservices/demo_wsclient_thirdparty.php-NORUN index 3260549b712..45f3d89939f 100755 --- a/htdocs/webservices/demo_wsclient_thirdparty.php-NORUN +++ b/htdocs/webservices/demo_wsclient_thirdparty.php-NORUN @@ -223,6 +223,6 @@ echo ''; echo '

SOAP Message

'; echo '
' . htmlspecialchars($soapclient->response, ENT_QUOTES) . '
'; -echo ''."\n";; -echo ''."\n";; +echo ''."\n"; +echo ''."\n"; ?> diff --git a/scripts/contracts/email_expire_services_to_representatives.php b/scripts/contracts/email_expire_services_to_representatives.php index ae51af38009..44ccb4c7e97 100755 --- a/scripts/contracts/email_expire_services_to_representatives.php +++ b/scripts/contracts/email_expire_services_to_representatives.php @@ -116,7 +116,7 @@ if ($resql) $oldemail = $obj->email; $olduid = $obj->uid; $oldlang = $obj->lang; - $oldsalerepresentative=dolGetFirstLastname($obj->firstname, $obj->lastname);; + $oldsalerepresentative=dolGetFirstLastname($obj->firstname, $obj->lastname); $message = ''; $total = 0; $foundtoprocess = 0; diff --git a/scripts/invoices/email_unpaid_invoices_to_representatives.php b/scripts/invoices/email_unpaid_invoices_to_representatives.php index 2960e2eb685..2870766ff21 100755 --- a/scripts/invoices/email_unpaid_invoices_to_representatives.php +++ b/scripts/invoices/email_unpaid_invoices_to_representatives.php @@ -120,7 +120,7 @@ if ($resql) $oldemail = $obj->email; $olduid = $obj->uid; $oldlang = $obj->lang; - $oldsalerepresentative=dolGetFirstLastname($obj->firstname, $obj->lastname);; + $oldsalerepresentative=dolGetFirstLastname($obj->firstname, $obj->lastname); $message = ''; $total = 0; $foundtoprocess = 0;