Fix warning
This commit is contained in:
parent
79ecc945e9
commit
b7c56f5680
@ -188,7 +188,8 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
// Visibility / Owner
|
// Visibility / Owner
|
||||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||||
print img_picto('', 'user').' '.$form->select_dolusers(GETPOSTISSET('userid') ? GETPOST('userid', 'int') : $user->id, 'userid', 0, '', 0, ($user->admin ? '' : array($user->id)), '', 0, 0, 0, '', ($user->admin) ? 1 : 0, '', 'maxwidth300 widthcentpercentminusx');
|
print img_picto('', 'user', 'class="pictofixedwidth"');
|
||||||
|
print $form->select_dolusers(GETPOSTISSET('userid') ? GETPOST('userid', 'int') : $user->id, 'userid', 0, '', 0, ($user->admin ? '' : array($user->id)), '', 0, 0, 0, '', ($user->admin) ? 1 : 0, '', 'maxwidth300 widthcentpercentminusx');
|
||||||
print '</td><td class="hideonsmartphone"></td></tr>';
|
print '</td><td class="hideonsmartphone"></td></tr>';
|
||||||
|
|
||||||
// Position
|
// Position
|
||||||
@ -282,12 +283,13 @@ if ($id > 0 && !preg_match('/^add/i', $action)) {
|
|||||||
// Visibility / owner
|
// Visibility / owner
|
||||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||||
if ($action == 'edit' && $user->admin) {
|
if ($action == 'edit' && $user->admin) {
|
||||||
print img_picto('', 'user').' '.$form->select_dolusers(GETPOSTISSET('userid') ? GETPOST('userid', 'int') : ($object->fk_user ? $object->fk_user : ''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300 widthcentpercentminusx');
|
print img_picto('', 'user', 'class="pictofixedwidth"');
|
||||||
|
print $form->select_dolusers(GETPOSTISSET('userid') ? GETPOST('userid', 'int') : ($object->fk_user ? $object->fk_user : ''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300 widthcentpercentminusx');
|
||||||
} else {
|
} else {
|
||||||
if ($object->fk_user > 0) {
|
if ($object->fk_user > 0) {
|
||||||
$fuser = new User($db);
|
$fuser = new User($db);
|
||||||
$fuser->fetch($object->fk_user);
|
$fuser->fetch($object->fk_user);
|
||||||
print $fuser->getNomUrl(1);
|
print $fuser->getNomUrl(-1);
|
||||||
} else {
|
} else {
|
||||||
print '<span class="opacitymedium">'.$langs->trans("Everybody").'</span>';
|
print '<span class="opacitymedium">'.$langs->trans("Everybody").'</span>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -212,8 +212,6 @@ print_liste_field_titre("Position", $_SERVER["PHP_SELF"], "b.position", "", $par
|
|||||||
print_liste_field_titre('');
|
print_liste_field_titre('');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$cacheOfUsers = array();
|
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < min($num, $limit)) {
|
while ($i < min($num, $limit)) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
@ -268,13 +266,13 @@ while ($i < min($num, $limit)) {
|
|||||||
// Author
|
// Author
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
if ($obj->fk_user) {
|
if ($obj->fk_user) {
|
||||||
if (empty($cacheOfUsers[$obj->fk_user])) {
|
if (empty($conf->cache['users'][$obj->fk_user])) {
|
||||||
$tmpuser = new User($db);
|
$tmpuser = new User($db);
|
||||||
$tmpuser->fetch($obj->fk_user);
|
$tmpuser->fetch($obj->fk_user);
|
||||||
$cacheOfUsers[$obj->fk_user] = $tmpuser;
|
$conf->cache['users'][$obj->fk_user] = $tmpuser;
|
||||||
}
|
}
|
||||||
$tmpuser = $cacheOfUsers[$obj->fk_user];
|
$tmpuser = $conf->cache['users'][$obj->fk_user];
|
||||||
print $tmpuser->getNomUrl(1);
|
print $tmpuser->getNomUrl(-1);
|
||||||
} else {
|
} else {
|
||||||
print '<span class="opacitymedium">'.$langs->trans("Everybody").'</span>';
|
print '<span class="opacitymedium">'.$langs->trans("Everybody").'</span>';
|
||||||
if (!$user->admin) {
|
if (!$user->admin) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user