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));
|
$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) {
|
if (!is_array($result) && $result<0) {
|
||||||
setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
|
setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
|
||||||
} elseif (count($result)>0) {
|
} elseif (count($result)>0) {
|
||||||
foreach ($result as $defval) {
|
foreach ($result as $defval) {
|
||||||
$defaultValues->id=$defval->id;
|
$defaultValues->id=$defval->id;
|
||||||
$resultDel = $defaultValues->delete($user);
|
$resultDel = $defaultValues->delete($user);
|
||||||
|
|||||||
@ -138,7 +138,6 @@ if (($action == 'add' || (GETPOST('add') && $action != 'update')) || GETPOST('ac
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
|
|
||||||
if ($action == 'add' || (GETPOST('add') && $action != 'update')) {
|
if ($action == 'add' || (GETPOST('add') && $action != 'update')) {
|
||||||
$object->type=$mode;
|
$object->type=$mode;
|
||||||
$object->user_id=0;
|
$object->user_id=0;
|
||||||
|
|||||||
@ -270,7 +270,7 @@ class DefaultValues extends CommonObject
|
|||||||
$sqlwhere[] = $key.' = \''.$this->db->idate($value).'\'';
|
$sqlwhere[] = $key.' = \''.$this->db->idate($value).'\'';
|
||||||
} elseif ($key == 't.page' || $key == 't.param' || $key == 't.type') {
|
} elseif ($key == 't.page' || $key == 't.param' || $key == 't.type') {
|
||||||
$sqlwhere[] = $key.' = \''.$this->db->escape($value).'\'';
|
$sqlwhere[] = $key.' = \''.$this->db->escape($value).'\'';
|
||||||
} elseif ($key == 'customsql') {
|
} elseif ($key == 'customsql') {
|
||||||
$sqlwhere[] = $value;
|
$sqlwhere[] = $value;
|
||||||
} elseif (is_array($value)) {
|
} elseif (is_array($value)) {
|
||||||
$sqlwhere[] = $key.' IN ('.implode(',', $value).')';
|
$sqlwhere[] = $key.' IN ('.implode(',', $value).')';
|
||||||
|
|||||||
@ -622,7 +622,7 @@ class User extends CommonObject
|
|||||||
setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
|
setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
return -1;
|
return -1;
|
||||||
} elseif (count($result) > 0) {
|
} elseif (count($result) > 0) {
|
||||||
foreach ($result as $defval) {
|
foreach ($result as $defval) {
|
||||||
if (!empty($defval->page) && !empty($defval->type) && !empty($defval->param)) {
|
if (!empty($defval->page) && !empty($defval->type) && !empty($defval->param)) {
|
||||||
$pagewithoutquerystring = $defval->page;
|
$pagewithoutquerystring = $defval->page;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user