Fix phpcs
This commit is contained in:
parent
b6dbe45242
commit
f51e892a97
@ -869,13 +869,13 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) {
|
|||||||
$keycode = $value;
|
$keycode = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($value == 'price' || preg_match('/^amount/i', $value)) {
|
if ($value == 'price' || preg_match('/^amount/i', $value)) {
|
||||||
$_POST[$keycode] = price2num(GETPOST($keycode), 'MU');
|
$_POST[$keycode] = price2num(GETPOST($keycode), 'MU');
|
||||||
} elseif ($value == 'taux' || $value == 'localtax1') {
|
} elseif ($value == 'taux' || $value == 'localtax1') {
|
||||||
$_POST[$keycode] = price2num(GETPOST($keycode), 8); // Note that localtax2 can be a list of rates separated by coma like X:Y:Z
|
$_POST[$keycode] = price2num(GETPOST($keycode), 8); // Note that localtax2 can be a list of rates separated by coma like X:Y:Z
|
||||||
} elseif ($value == 'entity') {
|
} elseif ($value == 'entity') {
|
||||||
$_POST[$keycode] = getEntity($tabname[$id]);
|
$_POST[$keycode] = getEntity($tabname[$id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($i) {
|
if ($i) {
|
||||||
$sql .= ",";
|
$sql .= ",";
|
||||||
@ -938,13 +938,13 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) {
|
|||||||
$keycode = $field;
|
$keycode = $field;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($field == 'price' || preg_match('/^amount/i', $field)) {
|
if ($field == 'price' || preg_match('/^amount/i', $field)) {
|
||||||
$_POST[$keycode] = price2num(GETPOST($keycode), 'MU');
|
$_POST[$keycode] = price2num(GETPOST($keycode), 'MU');
|
||||||
} elseif ($field == 'taux' || $field == 'localtax1') {
|
} elseif ($field == 'taux' || $field == 'localtax1') {
|
||||||
$_POST[$keycode] = price2num(GETPOST($keycode), 8); // Note that localtax2 can be a list of rates separated by coma like X:Y:Z
|
$_POST[$keycode] = price2num(GETPOST($keycode), 8); // Note that localtax2 can be a list of rates separated by coma like X:Y:Z
|
||||||
} elseif ($field == 'entity') {
|
} elseif ($field == 'entity') {
|
||||||
$_POST[$keycode] = getEntity($tabname[$id]);
|
$_POST[$keycode] = getEntity($tabname[$id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($i) {
|
if ($i) {
|
||||||
$sql .= ",";
|
$sql .= ",";
|
||||||
|
|||||||
@ -73,8 +73,8 @@ class Users extends DolibarrApi
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
if (empty(DolibarrApiAccess::$user->rights->user->user->lire) && empty(DolibarrApiAccess::$user->admin)) {
|
if (empty(DolibarrApiAccess::$user->rights->user->user->lire) && empty(DolibarrApiAccess::$user->admin)) {
|
||||||
throw new RestException(401, "You are not allowed to read list of users");
|
throw new RestException(401, "You are not allowed to read list of users");
|
||||||
}
|
}
|
||||||
|
|
||||||
$obj_ret = array();
|
$obj_ret = array();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user