Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0
This commit is contained in:
commit
2a299068ad
@ -383,7 +383,7 @@ foreach ($dirmodels as $reldir) {
|
||||
if (in_array($name, $def)) {
|
||||
print '<td class="center">'."\n";
|
||||
if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF != "$name") {
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=order_supplier">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=order_supplier">';
|
||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||
print '</a>';
|
||||
} else {
|
||||
@ -399,8 +399,7 @@ foreach ($dirmodels as $reldir) {
|
||||
// Default
|
||||
print '<td class="center">';
|
||||
if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF == "$name") {
|
||||
// print img_picto($langs->trans("Default"), 'on');
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=order_supplier"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=order_supplier" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||
} else {
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=order_supplier" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2023 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -147,6 +148,9 @@ class DolibarrApiAccess implements iAuthenticate
|
||||
if ($result <= 0) {
|
||||
throw new RestException(503, 'Error when fetching user :'.$fuser->error.' (conf->entity='.$conf->entity.')');
|
||||
}
|
||||
if ($fuser->statut == 0) {
|
||||
throw new RestException(503, 'Error when fetching user. This user has been locked or disabled');
|
||||
}
|
||||
|
||||
$fuser->getrights();
|
||||
|
||||
|
||||
@ -712,6 +712,8 @@ class ActionComm extends CommonObject
|
||||
$action = '';
|
||||
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
$this->errors += $hookmanager->errors;
|
||||
$this->error = $hookmanager->error;
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -582,6 +582,7 @@ if (empty($reshook)) {
|
||||
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been
|
||||
// modified by hook
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -1425,6 +1425,8 @@ class Propal extends CommonObject
|
||||
$action = '';
|
||||
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
$this->errors += $hookmanager->errors;
|
||||
$this->error = $hookmanager->error;
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -461,6 +461,7 @@ if (empty($reshook)) {
|
||||
// Note that $action and $object may be modified by hook
|
||||
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action);
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -1260,6 +1260,8 @@ class Commande extends CommonOrder
|
||||
$action = '';
|
||||
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
$this->errors += $hookmanager->errors;
|
||||
$this->error = $hookmanager->error;
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
@ -1414,6 +1416,8 @@ class Commande extends CommonOrder
|
||||
$action = '';
|
||||
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
$this->errors += $hookmanager->errors;
|
||||
$this->error = $hookmanager->error;
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
||||
@ -1319,6 +1319,8 @@ class Facture extends CommonInvoice
|
||||
$action = '';
|
||||
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
$this->errors += $hookmanager->errors;
|
||||
$this->error = $hookmanager->error;
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
@ -1452,6 +1454,8 @@ class Facture extends CommonInvoice
|
||||
$action = '';
|
||||
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
$this->errors += $hookmanager->errors;
|
||||
$this->error = $hookmanager->error;
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
||||
@ -364,6 +364,7 @@ if (empty($reshook)) {
|
||||
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been
|
||||
// modified by hook
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -2557,6 +2557,8 @@ class Contrat extends CommonObject
|
||||
$action = '';
|
||||
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $clonedObj, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
$this->errors += $hookmanager->errors;
|
||||
$this->error = $hookmanager->error;
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -344,6 +344,7 @@ function completeFileArrayWithDatabaseInfo(&$filearray, $relativedir)
|
||||
$filearray[$key]['position_name'] = ($filearrayindatabase[$key2]['position'] ? $filearrayindatabase[$key2]['position'] : '0').'_'.$filearrayindatabase[$key2]['name'];
|
||||
$filearray[$key]['position'] = $filearrayindatabase[$key2]['position'];
|
||||
$filearray[$key]['cover'] = $filearrayindatabase[$key2]['cover'];
|
||||
$filearray[$key]['keywords'] = $filearrayindatabase[$key2]['keywords'];
|
||||
$filearray[$key]['acl'] = $filearrayindatabase[$key2]['acl'];
|
||||
$filearray[$key]['rowid'] = $filearrayindatabase[$key2]['rowid'];
|
||||
$filearray[$key]['label'] = $filearrayindatabase[$key2]['label'];
|
||||
|
||||
@ -455,6 +455,8 @@ class ExpenseReport extends CommonObject
|
||||
$action = '';
|
||||
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
$this->errors += $hookmanager->errors;
|
||||
$this->error = $hookmanager->error;
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1211,6 +1211,8 @@ class Fichinter extends CommonObject
|
||||
$action = '';
|
||||
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
$this->errors += $hookmanager->errors;
|
||||
$this->error = $hookmanager->error;
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1665,6 +1665,8 @@ class CommandeFournisseur extends CommonOrder
|
||||
$action = '';
|
||||
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
$this->errors += $hookmanager->errors;
|
||||
$this->error = $hookmanager->error;
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1365,6 +1365,7 @@ if (empty($reshook)) {
|
||||
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been
|
||||
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -1359,6 +1359,8 @@ if ($dirins && $action == 'addproperty' && empty($cancel) && !empty($module) &&
|
||||
$addfieldentry['arrayofkeyval'] = json_decode($addfieldentry['arrayofkeyval'], true);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$addfieldentry = array();
|
||||
}
|
||||
|
||||
/*if (GETPOST('regeneratemissing'))
|
||||
|
||||
@ -423,6 +423,7 @@ if (empty($reshook)) {
|
||||
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been
|
||||
// modified by hook
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -1168,6 +1168,8 @@ class SupplierProposal extends CommonObject
|
||||
$action = '';
|
||||
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
$this->errors += $hookmanager->errors;
|
||||
$this->error = $hookmanager->error;
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user