Fix phpcs
This commit is contained in:
parent
a5bcc47d0d
commit
7f1d61f8a8
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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).')';
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user