Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2021-10-26 01:32:37 +02:00
commit 299376f221
71 changed files with 301 additions and 285 deletions

View File

@ -244,7 +244,6 @@ class Categorie extends CommonObject
* @see Categorie::TYPE_ACTIONCOMM * @see Categorie::TYPE_ACTIONCOMM
* @see Categorie::TYPE_WEBSITE_PAGE * @see Categorie::TYPE_WEBSITE_PAGE
* @see Categorie::TYPE_TICKET * @see Categorie::TYPE_TICKET
*/ */
public $type; public $type;

View File

@ -1560,8 +1560,11 @@ class Facture extends CommonInvoice
$hookmanager->initHooks(array('invoicedao')); $hookmanager->initHooks(array('invoicedao'));
$parameters = array('id'=>$this->id, 'getnomurl'=>$result, 'notooltip' => $notooltip, 'addlinktonotes' => $addlinktonotes, 'save_lastsearch_value'=> $save_lastsearch_value, 'target' => $target); $parameters = array('id'=>$this->id, 'getnomurl'=>$result, 'notooltip' => $notooltip, 'addlinktonotes' => $addlinktonotes, 'save_lastsearch_value'=> $save_lastsearch_value, 'target' => $target);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) $result = $hookmanager->resPrint; if ($reshook > 0) {
else $result .= $hookmanager->resPrint; $result = $hookmanager->resPrint;
} else {
$result .= $hookmanager->resPrint;
}
return $result; return $result;
} }

View File

@ -145,8 +145,12 @@ class DefaultValues extends CommonObject
$this->db = $db; $this->db = $db;
if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) $this->fields['rowid']['visible'] = 0; if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) {
if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) $this->fields['entity']['enabled'] = 0; $this->fields['rowid']['visible'] = 0;
}
if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) {
$this->fields['entity']['enabled'] = 0;
}
// Unset fields that are disabled // Unset fields that are disabled
foreach ($this->fields as $key => $val) { foreach ($this->fields as $key => $val) {

View File

@ -1256,7 +1256,9 @@ class pdf_einstein extends ModelePDFCommandes
global $conf, $langs, $hookmanager; global $conf, $langs, $hookmanager;
$ltrdirection = 'L'; $ltrdirection = 'L';
if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R'; if ($outputlangs->trans("DIRECTION") == 'rtl') {
$ltrdirection = 'R';
}
// Load traductions files required by page // Load traductions files required by page
$outputlangs->loadLangs(array("main", "bills", "propal", "orders", "companies")); $outputlangs->loadLangs(array("main", "bills", "propal", "orders", "companies"));

View File

@ -1127,7 +1127,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
global $langs, $conf, $mysoc; global $langs, $conf, $mysoc;
$ltrdirection = 'L'; $ltrdirection = 'L';
if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R'; if ($outputlangs->trans("DIRECTION") == 'rtl') {
$ltrdirection = 'R';
}
// Load translation files required by the page // Load translation files required by the page
$outputlangs->loadLangs(array("main", "orders", "companies", "bills", "sendings")); $outputlangs->loadLangs(array("main", "orders", "companies", "bills", "sendings"));

View File

@ -408,7 +408,9 @@ class ConferenceOrBooth extends ActionComm
if (!$error && !$notrigger) { if (!$error && !$notrigger) {
// Call trigger // Call trigger
$result = $this->call_trigger('CONFERENCEORBOOTH_VALIDATE', $user); $result = $this->call_trigger('CONFERENCEORBOOTH_VALIDATE', $user);
if ($result < 0) $error++; if ($result < 0) {
$error++;
}
// End call triggers // End call triggers
} }

View File

@ -113,7 +113,9 @@ if ($user->socid > 0) { // Protection if external user
accessforbidden(); accessforbidden();
} }
//$result = restrictedArea($user, 'productbatch'); //$result = restrictedArea($user, 'productbatch');
if (!$permissiontoread) accessforbidden(); if (!$permissiontoread) {
accessforbidden();
}
/* /*

View File

@ -1405,7 +1405,9 @@ class SupplierProposal extends CommonObject
$soc = new Societe($this->db); $soc = new Societe($this->db);
$result = $soc->fetch($this->socid); $result = $soc->fetch($this->socid);
if ($result < 0) return -1; if ($result < 0) {
return -1;
}
// Define new ref // Define new ref
if (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) { // empty should not happened, but when it occurs, the test save life if (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) { // empty should not happened, but when it occurs, the test save life