diff --git a/htdocs/bom/tpl/linkedobjectblock.tpl.php b/htdocs/bom/tpl/linkedobjectblock.tpl.php index d00340a1322..082936be50a 100644 --- a/htdocs/bom/tpl/linkedobjectblock.tpl.php +++ b/htdocs/bom/tpl/linkedobjectblock.tpl.php @@ -62,7 +62,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) { $product_static->getNomUrl(1); } print ''; - echo ''.dol_print_date($objectlink->date_creation, 'day').''; + echo ''.dol_print_date($objectlink->date_creation, 'day').''; echo ''; if ($user->hasRight('commande', 'lire')) { $total = $total + $objectlink->total_ht; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 3e4f1dff4c0..978f350b352 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1878,19 +1878,18 @@ class FactureFournisseur extends CommonInvoice // We rename directory ($this->ref = old ref, $num = new ref) in order not to lose the attachments $oldref = dol_sanitizeFileName($this->ref); - $newref = dol_sanitizeFileName($num); $dirsource = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$oldref; - $dirdest = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$newref; + $dirdest = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$this->newref; if (!$error && file_exists($dirsource)) { dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest); if (@rename($dirsource, $dirdest)) { dol_syslog("Rename ok"); - // Rename docs starting with $oldref with $newref - $listoffiles = dol_dir_list($conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$newref, 'files', 1, '^'.preg_quote($oldref, '/')); + // Rename docs starting with $oldref with $this->newref + $listoffiles = dol_dir_list($conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$this->newref, 'files', 1, '^'.preg_quote($oldref, '/')); foreach ($listoffiles as $fileentry) { $dirsource = $fileentry['name']; - $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); + $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $this->newref, $dirsource); $dirsource = $fileentry['path'].'/'.$dirsource; $dirdest = $fileentry['path'].'/'.$dirdest; @rename($dirsource, $dirdest); diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index b21dbf46a0d..099274d2b53 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -158,6 +158,11 @@ if (empty($reshook)) { // Add new contact if ($action == 'addcontact_confirm' && $user->rights->projet->creer) { + if (GETPOST('confirm', 'alpha') == 'no') { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit; + } + $contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int')); $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type')); diff --git a/htdocs/public/agenda/agendaexport.php b/htdocs/public/agenda/agendaexport.php index e9bca76cdbc..cacf9970654 100644 --- a/htdocs/public/agenda/agendaexport.php +++ b/htdocs/public/agenda/agendaexport.php @@ -89,7 +89,7 @@ if (!isModEnabled('agenda')) { } // Not older than -if (!isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) { +if (empty($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) { $conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY = 100; // default limit } diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 4a0eedbbae3..5228586f856 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -4729,7 +4729,7 @@ if ($mode == 'replacesite' || $massaction == 'replace') { print ''; // Categories - Tags - print ''; + print ''; if (isModEnabled('categorie') && $user->hasRight('categorie', 'lire')) { // Get current categories $existing = $c->containing($answerrecord->id, Categorie::TYPE_WEBSITE_PAGE, 'object');