mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge v17
This commit is contained in:
commit
3dbfbe965a
|
|
@ -62,7 +62,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
|
|||
$product_static->getNomUrl(1);
|
||||
}
|
||||
print '</td>';
|
||||
echo '<td class="linkedcol-date">'.dol_print_date($objectlink->date_creation, 'day').'</td>';
|
||||
echo '<td class="linkedcol-date center">'.dol_print_date($objectlink->date_creation, 'day').'</td>';
|
||||
echo '<td class="linkedcol-amount right">';
|
||||
if ($user->hasRight('commande', 'lire')) {
|
||||
$total = $total + $objectlink->total_ht;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4729,7 +4729,7 @@ if ($mode == 'replacesite' || $massaction == 'replace') {
|
|||
print '</td>';
|
||||
|
||||
// Categories - Tags
|
||||
print '<td>';
|
||||
print '<td class="center">';
|
||||
if (isModEnabled('categorie') && $user->hasRight('categorie', 'lire')) {
|
||||
// Get current categories
|
||||
$existing = $c->containing($answerrecord->id, Categorie::TYPE_WEBSITE_PAGE, 'object');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user