diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index f991758250f..c739a261575 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -440,7 +440,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) } // Clean some parameters if (isset($_POST["localtax1"]) && empty($_POST["localtax1"])) $_POST["localtax1"]='0'; // If empty, we force to 0 - if (isset($_POST["localtax2"]) && empty($_POST["localtax2"])) $_POST["localtax2"]='0'; // If empty, we force to 0 + if (isset($_POST["localtax2"]) && empty($_POST["localtax2"])) $_POST["localtax2"]='0'; // If empty, we force to 0 // Si verif ok et action add, on ajoute la ligne if ($ok && GETPOST('actionadd')) @@ -814,7 +814,7 @@ if ($id) /* $tmparray=getLabelOfField($fieldlist[$field]); $showfield=$tmp['showfield']; - $valuetoshow=$tmp['valuetoshow']; + $valuetoshow=$tmp['valuetoshow']; $align=$tmp['align']; $sortable=$tmp['sortable']; */ diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 2b71b92d330..18a38ca3d8f 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -237,13 +237,13 @@ if ($action == 'edit') // Edit print ''; if ($conf->global->MAIN_FEATURES_LEVEL > 1) - { - // Show bugtrack link - $var=!$var; - print ''.$langs->trans("ShowBugTrackLink").''; - print $form->selectyesno('MAIN_BUGTRACK_ENABLELINK',$conf->global->MAIN_BUGTRACK_ENABLELINK,1); - print ''; - print ' '; + { + // Show bugtrack link + $var=!$var; + print ''.$langs->trans("ShowBugTrackLink").''; + print $form->selectyesno('MAIN_BUGTRACK_ENABLELINK',$conf->global->MAIN_BUGTRACK_ENABLELINK,1); + print ''; + print ' '; print ''; } @@ -390,13 +390,13 @@ else // Show print yn((isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0),1); print ''; - if ($conf->global->MAIN_FEATURES_LEVEL > 1) + if ($conf->global->MAIN_FEATURES_LEVEL > 1) { - // Show bugtrack link - $var=!$var; - print ''.$langs->trans("ShowBugTrackLink").''; - print yn($conf->global->MAIN_BUGTRACK_ENABLELINK).""; - print ' '; + // Show bugtrack link + $var=!$var; + print ''.$langs->trans("ShowBugTrackLink").''; + print yn($conf->global->MAIN_BUGTRACK_ENABLELINK).""; + print ' '; print ""; } diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index e5cd3bed15f..bf0f5057179 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -263,21 +263,21 @@ class Contact extends CommonObject unset($this->state_code); unset($this->state); - // Actions on extra fields (by external module or standard code) - include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; - $hookmanager=new HookManager($this->db); - $hookmanager->initHooks(array('contactdao')); - $parameters=array('socid'=>$this->id); - $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks - if (empty($reshook)) + // Actions on extra fields (by external module or standard code) + include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; + $hookmanager=new HookManager($this->db); + $hookmanager->initHooks(array('contactdao')); + $parameters=array('socid'=>$this->id); + $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + if (empty($reshook)) { - $result=$this->insertExtraFields(); - if ($result < 0) - { - $error++; - } - } - else if ($reshook < 0) $error++; + $result=$this->insertExtraFields(); + if ($result < 0) + { + $error++; + } + } + else if ($reshook < 0) $error++; if (! $error && ! $notrigger) { diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 78c9e7e01e7..30e6952db44 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/contact.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; $langs->load("companies"); $langs->load("users"); @@ -48,7 +48,7 @@ $socid = GETPOST('socid','int'); if ($user->societe_id) $socid=$user->societe_id; $object = new Contact($db); -$extrafields = new ExtraFields($db); +$extrafields = new ExtraFields($db); // Get object canvas (By default, this is not defined, so standard usage of dolibarr) $object->getCanvas($id); @@ -76,7 +76,7 @@ $hookmanager->initHooks(array('contactcard')); $parameters=array('id'=>$id, 'objcanvas'=>$objcanvas); $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks -$error=$hookmanager->error; $errors=array_merge($errors, (array) $hookmanager->errors); +$error=$hookmanager->error; $errors=array_merge($errors, (array) $hookmanager->errors); if (empty($reshook)) { @@ -254,14 +254,14 @@ if (empty($reshook)) $object->priv = $_POST["priv"]; $object->note = $_POST["note"]; - // Get extra fields - foreach($_POST as $key => $value) - { - if (preg_match("/^options_/",$key)) - { - $object->array_options[$key]=GETPOST($key); - } - } + // Get extra fields + foreach($_POST as $key => $value) + { + if (preg_match("/^options_/",$key)) + { + $object->array_options[$key]=GETPOST($key); + } + } $result = $object->update($_POST["contactid"], $user); @@ -285,8 +285,8 @@ if (empty($reshook)) * View */ -// fetch optionals attributes and labels -$extralabels=$extrafields->fetch_name_optionals_label('contact'); +// fetch optionals attributes and labels +$extralabels=$extrafields->fetch_name_optionals_label('contact'); $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('',$langs->trans("ContactsAddresses"),$help_url); @@ -492,20 +492,20 @@ else // Note print ''.$langs->trans("Note").''; - // Other attributes - $parameters=array('colspan' => ' colspan="3"'); - $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook - if (empty($reshook) && ! empty($extrafields->attribute_label)) - { - 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]:'')); - print ''.$label.''; - print $extrafields->showInputField($key,$value); - print ''."\n"; - } - } - + // Other attributes + $parameters=array('colspan' => ' colspan="3"'); + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + if (empty($reshook) && ! empty($extrafields->attribute_label)) + { + 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]:'')); + print ''.$label.''; + print $extrafields->showInputField($key,$value); + print ''."\n"; + } + } + print "
"; @@ -688,20 +688,20 @@ else print isset($_POST["note"])?$_POST["note"]:$object->note; print ''; - // Other attributes - $parameters=array('colspan' => ' colspan="3"'); - $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook - if (empty($reshook) && ! empty($extrafields->attribute_label)) - { - foreach($extrafields->attribute_label as $key=>$label) - { - $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]); - print ''.$label.''; - print $extrafields->showInputField($key,$value); - print "\n"; - } - } - + // Other attributes + $parameters=array('colspan' => ' colspan="3"'); + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + if (empty($reshook) && ! empty($extrafields->attribute_label)) + { + foreach($extrafields->attribute_label as $key=>$label) + { + $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]); + print ''.$label.''; + print $extrafields->showInputField($key,$value); + print "\n"; + } + } + $object->load_ref_elements(); if (! empty($conf->commande->enabled)) @@ -898,20 +898,20 @@ else print nl2br($object->note); print ''; - // Other attributes - $parameters=array('socid'=>$socid, 'colspan' => ' colspan="3"'); - $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook - if (empty($reshook) && ! empty($extrafields->attribute_label)) - { - 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]:'')); - print ''.$label.''; - print $extrafields->showOutputField($key,$value); - print "\n"; - } - } - + // Other attributes + $parameters=array('socid'=>$socid, 'colspan' => ' colspan="3"'); + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + if (empty($reshook) && ! empty($extrafields->attribute_label)) + { + 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]:'')); + print ''.$label.''; + print $extrafields->showOutputField($key,$value); + print "\n"; + } + } + $object->load_ref_elements(); if (! empty($conf->commande->enabled)) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 92399378f53..90a2f8970c8 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -906,12 +906,12 @@ function dol_meta_create($object) // Define parent dir of elements $element=$object->element; - if ($object->element == 'order_supplier') $dir = $conf->fournisseur->dir_output.'/commande'; - elseif ($object->element == 'invoice_supplier') $dir = $conf->fournisseur->dir_output.'/facture'; - elseif ($object->element == 'project') $dir = $conf->projet->dir_output; - elseif ($object->element == 'shipping') $dir = $conf->expedition->dir_output.'/sending'; - elseif ($object->element == 'delivery') $dir = $conf->expedition->dir_output.'/receipt'; - elseif ($object->element == 'fichinter') $dir = $conf->ficheinter->dir_output; + if ($object->element == 'order_supplier') $dir = $conf->fournisseur->dir_output.'/commande'; + elseif ($object->element == 'invoice_supplier') $dir = $conf->fournisseur->dir_output.'/facture'; + elseif ($object->element == 'project') $dir = $conf->projet->dir_output; + elseif ($object->element == 'shipping') $dir = $conf->expedition->dir_output.'/sending'; + elseif ($object->element == 'delivery') $dir = $conf->expedition->dir_output.'/receipt'; + elseif ($object->element == 'fichinter') $dir = $conf->ficheinter->dir_output; else $dir=empty($conf->$element->dir_output)?'':$conf->$element->dir_output; if ($dir) diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index b0561ed7310..495e292d3f6 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -262,7 +262,7 @@ class pdf_einstein extends ModelePDFCommandes { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage - $pdf->SetTextColor(0,0,0); + $pdf->SetTextColor(0,0,0); $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it. diff --git a/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php index 29b8eea38f0..0e41524f4a7 100644 --- a/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php @@ -206,7 +206,7 @@ class pdf_expedition_merou extends ModelePdfExpedition { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 3); - $pdf->SetTextColor(0,0,0); + $pdf->SetTextColor(0,0,0); $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. diff --git a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php index 9ef088bb9a3..31fb518df1b 100644 --- a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php @@ -233,7 +233,7 @@ class pdf_expedition_rouget extends ModelePdfExpedition { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage - $pdf->SetTextColor(0,0,0); + $pdf->SetTextColor(0,0,0); $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it. diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 8f2198928a8..90f6030e11d 100755 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -265,7 +265,7 @@ class pdf_crabe extends ModelePDFFactures { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage - $pdf->SetTextColor(0,0,0); + $pdf->SetTextColor(0,0,0); $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it. diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index dde7c8dfd78..9a5509de183 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -246,7 +246,7 @@ class pdf_soleil extends ModelePDFFicheinter { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage - $pdf->SetTextColor(0,0,0); + $pdf->SetTextColor(0,0,0); $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it. diff --git a/htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php b/htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php index 719a0d98bee..1e49e8f6c6d 100644 --- a/htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php +++ b/htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php @@ -184,7 +184,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage - $pdf->SetTextColor(0,0,0); + $pdf->SetTextColor(0,0,0); $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it. diff --git a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php index da54ea642bd..b2653beb7cc 100644 --- a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php @@ -239,7 +239,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage - $pdf->SetTextColor(0,0,0); + $pdf->SetTextColor(0,0,0); $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot-50); // The only function to edit the bottom margin of current page to set it. diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 704171866e6..9f199310dc4 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -263,7 +263,7 @@ class pdf_azur extends ModelePDFPropales { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage - $pdf->SetTextColor(0,0,0); + $pdf->SetTextColor(0,0,0); $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it. diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index d1ef4e3bb27..e6948d6ef7c 100755 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -260,7 +260,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage - $pdf->SetTextColor(0,0,0); + $pdf->SetTextColor(0,0,0); $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it. diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index dd6109b818b..d638c940988 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -272,7 +272,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage - $pdf->SetTextColor(0,0,0); + $pdf->SetTextColor(0,0,0); $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it. diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 84a21b97a1c..6b598b1a8b5 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1905,7 +1905,7 @@ class CommandeFournisseurLigne var $total_localtax2; var $total_ttc; var $info_bits; - var $special_code; + var $special_code; // From llx_product var $libelle; // Label produit diff --git a/htdocs/holiday/admin/holiday.php b/htdocs/holiday/admin/holiday.php index e14b1a2bba9..dbb8dc67d74 100644 --- a/htdocs/holiday/admin/holiday.php +++ b/htdocs/holiday/admin/holiday.php @@ -266,7 +266,7 @@ print '
'; print_fiche_titre($langs->trans('TitleOptionMainCP'),'',''); -dol_fiche_head(array(),'',''); +dol_fiche_head(array(),'',''); print '
'."\n"; print ''."\n"; @@ -334,13 +334,13 @@ print ''."\n"; print '
'."\n"; print '
'."\n\n"; -dol_fiche_end(); +dol_fiche_end(); print '
'; print_fiche_titre($langs->trans('TitleOptionEventCP'),'',''); -dol_fiche_head(array(),'',''); +dol_fiche_head(array(),'',''); $cp_events = $cp->fetchEventsCP(); diff --git a/htdocs/product/admin/product_extrafields.php b/htdocs/product/admin/product_extrafields.php index 9c9276669af..6ad785a35c6 100755 --- a/htdocs/product/admin/product_extrafields.php +++ b/htdocs/product/admin/product_extrafields.php @@ -146,7 +146,7 @@ if ($action == 'create') print "
"; print_titre($langs->trans('NewAttribute')); - require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields.tpl.php'; + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields.tpl.php'; print '
'; print ''; diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php index 7abdcfe0303..f3f57994860 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -134,7 +134,7 @@ if ($id > 0 || ! empty($ref)) print '
'; $colwidth=30; - include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; + include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; dol_fiche_end();; } diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index ec6257e7854..521b6708858 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -354,10 +354,10 @@ else //var_dump($tasksarray); //var_dump($tasksrole); - if (! empty($conf->use_javascript_ajax)) + if (! empty($conf->use_javascript_ajax)) { - include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; - } + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; + } print ''; print '';