fix warning and sql error
This commit is contained in:
parent
ad96229ec4
commit
f37d482331
@ -103,6 +103,7 @@ class BlockedLog
|
|||||||
public $ref_object = '';
|
public $ref_object = '';
|
||||||
|
|
||||||
public $object_data = null;
|
public $object_data = null;
|
||||||
|
public $user_fullname='';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of tracked event codes
|
* Array of tracked event codes
|
||||||
|
|||||||
@ -531,7 +531,11 @@ class modFournisseur extends DolibarrModules
|
|||||||
case 'sellist':
|
case 'sellist':
|
||||||
$tmp='';
|
$tmp='';
|
||||||
$tmpparam=unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null
|
$tmpparam=unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null
|
||||||
if ($tmpparam['options'] && is_array($tmpparam['options'])) $tmp=array_shift(array_keys($tmpparam['options']));
|
|
||||||
|
if ($tmpparam['options'] && is_array($tmpparam['options'])) {
|
||||||
|
$tmpparam_param_key=array_keys($tmpparam['options']);
|
||||||
|
$tmp=array_shift($tmpparam_param_key);
|
||||||
|
}
|
||||||
if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter="List:".$tmp;
|
if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter="List:".$tmp;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -216,8 +216,9 @@ if (empty($user->rights->holiday->read_all))
|
|||||||
$userchilds=$user->getAllChildIds(1);
|
$userchilds=$user->getAllChildIds(1);
|
||||||
$filters.=' AND u.rowid IN ('.join(', ',$userchilds).')';
|
$filters.=' AND u.rowid IN ('.join(', ',$userchilds).')';
|
||||||
}
|
}
|
||||||
|
if (!empty($search_name)) {
|
||||||
$filters.=natural_search(array('u.firstname','u.lastname'), $search_name);
|
$filters.=natural_search(array('u.firstname','u.lastname'), $search_name);
|
||||||
|
}
|
||||||
if ($search_supervisor > 0) $filters.=natural_search(array('u.fk_user'), $search_supervisor, 2);
|
if ($search_supervisor > 0) $filters.=natural_search(array('u.fk_user'), $search_supervisor, 2);
|
||||||
|
|
||||||
$listUsers = $holiday->fetchUsers(false, true, $filters);
|
$listUsers = $holiday->fetchUsers(false, true, $filters);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user