forked from Wavyzz/dolibarr
Fix warnings
This commit is contained in:
@@ -169,7 +169,7 @@ class Reception extends CommonObject
|
||||
if (getDolGlobalString('RECEPTION_ADDON_NUMBER')) {
|
||||
$mybool = false;
|
||||
|
||||
$file = $conf->global->RECEPTION_ADDON_NUMBER.".php";
|
||||
$file = getDolGlobalString('RECEPTION_ADDON_NUMBER') . ".php";
|
||||
$classname = $conf->global->RECEPTION_ADDON_NUMBER;
|
||||
|
||||
// Include file with class
|
||||
@@ -505,8 +505,8 @@ class Reception extends CommonObject
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!((!getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && !empty($user->rights->reception->creer))
|
||||
|| (getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && !empty($user->rights->reception->reception_advance->validate)))) {
|
||||
if (!((!getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('reception', 'creer'))
|
||||
|| (getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('reception', 'reception_advance', 'validate')))) {
|
||||
$this->error = 'Permission denied';
|
||||
dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
@@ -1420,7 +1420,7 @@ class Reception extends CommonObject
|
||||
public function setDeliveryDate($user, $delivery_date)
|
||||
{
|
||||
// phpcs:enable
|
||||
if ($user->rights->reception->creer) {
|
||||
if ($user->hasRight('reception', 'creer')) {
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."reception";
|
||||
$sql .= " SET date_delivery = ".($delivery_date ? "'".$this->db->idate($delivery_date)."'" : 'null');
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
@@ -1853,8 +1853,8 @@ class Reception extends CommonObject
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!((!getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && !empty($user->rights->reception->creer))
|
||||
|| (getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && !empty($user->rights->reception->reception_advance->validate)))) {
|
||||
if (!((!getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('reception', 'creer'))
|
||||
|| (getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('reception', 'reception_advance', 'validate')))) {
|
||||
$this->error = 'Permission denied';
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user