Fix phpcs

This commit is contained in:
Laurent Destailleur 2021-03-02 15:34:43 +01:00
parent a5bcc47d0d
commit 7f1d61f8a8
4 changed files with 3 additions and 4 deletions

View File

@ -86,7 +86,7 @@ if ($action == 'set') {
$result = $defaultValues->fetchAll('', '', 0, 0, array('t.page'=>'comm/action/card.php', 't.param'=>'complete','t.user_id'=>'0', 't.type'=>'createform', 't.entity'=>$conf->entity));
if (!is_array($result) && $result<0) {
setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
} elseif (count($result)>0) {
} elseif (count($result)>0) {
foreach ($result as $defval) {
$defaultValues->id=$defval->id;
$resultDel = $defaultValues->delete($user);

View File

@ -138,7 +138,6 @@ if (($action == 'add' || (GETPOST('add') && $action != 'update')) || GETPOST('ac
}
if (!$error) {
if ($action == 'add' || (GETPOST('add') && $action != 'update')) {
$object->type=$mode;
$object->user_id=0;

View File

@ -270,7 +270,7 @@ class DefaultValues extends CommonObject
$sqlwhere[] = $key.' = \''.$this->db->idate($value).'\'';
} elseif ($key == 't.page' || $key == 't.param' || $key == 't.type') {
$sqlwhere[] = $key.' = \''.$this->db->escape($value).'\'';
} elseif ($key == 'customsql') {
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
} elseif (is_array($value)) {
$sqlwhere[] = $key.' IN ('.implode(',', $value).')';

View File

@ -622,7 +622,7 @@ class User extends CommonObject
setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
dol_print_error($this->db);
return -1;
} elseif (count($result) > 0) {
} elseif (count($result) > 0) {
foreach ($result as $defval) {
if (!empty($defval->page) && !empty($defval->type) && !empty($defval->param)) {
$pagewithoutquerystring = $defval->page;