Fix phpcs
This commit is contained in:
parent
b6dbe45242
commit
f51e892a97
@ -869,13 +869,13 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) {
|
||||
$keycode = $value;
|
||||
}
|
||||
|
||||
if ($value == 'price' || preg_match('/^amount/i', $value)) {
|
||||
$_POST[$keycode] = price2num(GETPOST($keycode), 'MU');
|
||||
} 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
|
||||
} elseif ($value == 'entity') {
|
||||
$_POST[$keycode] = getEntity($tabname[$id]);
|
||||
}
|
||||
if ($value == 'price' || preg_match('/^amount/i', $value)) {
|
||||
$_POST[$keycode] = price2num(GETPOST($keycode), 'MU');
|
||||
} 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
|
||||
} elseif ($value == 'entity') {
|
||||
$_POST[$keycode] = getEntity($tabname[$id]);
|
||||
}
|
||||
|
||||
if ($i) {
|
||||
$sql .= ",";
|
||||
@ -938,13 +938,13 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) {
|
||||
$keycode = $field;
|
||||
}
|
||||
|
||||
if ($field == 'price' || preg_match('/^amount/i', $field)) {
|
||||
$_POST[$keycode] = price2num(GETPOST($keycode), 'MU');
|
||||
} 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
|
||||
} elseif ($field == 'entity') {
|
||||
$_POST[$keycode] = getEntity($tabname[$id]);
|
||||
}
|
||||
if ($field == 'price' || preg_match('/^amount/i', $field)) {
|
||||
$_POST[$keycode] = price2num(GETPOST($keycode), 'MU');
|
||||
} 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
|
||||
} elseif ($field == 'entity') {
|
||||
$_POST[$keycode] = getEntity($tabname[$id]);
|
||||
}
|
||||
|
||||
if ($i) {
|
||||
$sql .= ",";
|
||||
|
||||
@ -48,7 +48,7 @@ class Users extends DolibarrApi
|
||||
public function __construct()
|
||||
{
|
||||
global $db, $conf;
|
||||
|
||||
|
||||
$this->db = $db;
|
||||
$this->useraccount = new User($this->db);
|
||||
}
|
||||
@ -73,8 +73,8 @@ class Users extends DolibarrApi
|
||||
global $conf;
|
||||
|
||||
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();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user