mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Debug v20
This commit is contained in:
parent
175a53f4b2
commit
ef84ba2a13
|
|
@ -634,7 +634,7 @@ if (!empty($arrayfields['cp.fk_validator']['checked'])) {
|
|||
if ($user->hasRight('holiday', 'readall')) {
|
||||
print '<td class="liste_titre maxwidthonsmartphone left">';
|
||||
$validator = new UserGroup($db);
|
||||
$excludefilter = $user->admin ? '' : 'u.rowid <> '.$user->id;
|
||||
$excludefilter = $user->admin ? '' : 'u.rowid <> '.((int) $user->id);
|
||||
$valideurobjects = $validator->listUsersForGroup($excludefilter, 1);
|
||||
$valideurarray = array();
|
||||
foreach ($valideurobjects as $val) {
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ if (!empty($arrayfields['cpl.date_action']['checked'])) {
|
|||
// Filter: Validator
|
||||
if (!empty($arrayfields['cpl.fk_user_action']['checked'])) {
|
||||
$validator = new UserGroup($db);
|
||||
$excludefilter = $user->admin ? '' : 'u.rowid <> '.$user->id;
|
||||
$excludefilter = $user->admin ? '' : 'u.rowid <> '.((int) $user->id);
|
||||
$valideurobjects = $validator->listUsersForGroup($excludefilter, 1);
|
||||
$valideurarray = array();
|
||||
foreach ($valideurobjects as $val) {
|
||||
|
|
|
|||
|
|
@ -177,7 +177,8 @@ if (empty($reshook)) {
|
|||
$usergroup = new UserGroup($db);
|
||||
$result = $usergroup->fetch($groupid);
|
||||
if ($result > 0) {
|
||||
$tmpcontactarray = $usergroup->listUsersForGroup();
|
||||
$excludefilter = 'statut = 1';
|
||||
$tmpcontactarray = $usergroup->listUsersForGroup($excludefilter, 0);
|
||||
if ($contactarray <= 0) {
|
||||
$error++;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ class UserGroup extends CommonObject
|
|||
|
||||
|
||||
/**
|
||||
* Charge un object group avec toutes ses caracteristiques (except ->members array)
|
||||
* Load a group object with all properties (except ->members array that is array of users in group)
|
||||
*
|
||||
* @param int $id Id of group to load
|
||||
* @param string $groupname Name of group to load
|
||||
|
|
@ -161,8 +161,6 @@ class UserGroup extends CommonObject
|
|||
*/
|
||||
public function fetch($id = 0, $groupname = '', $load_members = false)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
||||
if (!empty($groupname)) {
|
||||
$result = $this->fetchCommon(0, '', ' AND nom = \''.$this->db->escape($groupname).'\'');
|
||||
|
|
@ -174,7 +172,8 @@ class UserGroup extends CommonObject
|
|||
|
||||
if ($result) {
|
||||
if ($load_members) {
|
||||
$this->members = $this->listUsersForGroup(); // This make a lot of subrequests
|
||||
$excludefilter = '';
|
||||
$this->members = $this->listUsersForGroup($excludefilter, 0); // This make a request to get list of users but may also do subrequest to fetch each users on some versions
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user