diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php
index 3c3e03ecb37..f71a750027f 100644
--- a/htdocs/bookmarks/card.php
+++ b/htdocs/bookmarks/card.php
@@ -171,7 +171,7 @@ if ($action == 'create') {
// Owner
print '
| '.$langs->trans("Owner").' | ';
- print img_picto('', 'user').' '.$form->select_dolusers(GETPOSTISSET('userid') ? GETPOST('userid', 'int') : $user->id, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
+ print img_picto('', 'user').' '.$form->select_dolusers(GETPOSTISSET('userid') ? GETPOST('userid', 'int') : $user->id, 'userid', 0, '', 0, GETPOSTISSET('userid') ? GETPOST('userid', 'int') : array($user->id), '', 0, 0, 0, '', ($user->admin) ? 1 : 0, '', 'maxwidth300');
print ' | |
';
// Position
diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php
index d94b5cbdd88..2190bd7fc8d 100644
--- a/htdocs/bookmarks/list.php
+++ b/htdocs/bookmarks/list.php
@@ -204,8 +204,10 @@ while ($i < min($num, $limit)) {
print '';
$linkintern = 0;
- $title = $obj->title;
- $link = $obj->url;
+ $title = $obj->title;
+ $link = $obj->url;
+ $canedit = $user->rights->bookmark->supprimer;
+ $candelete = $user->rights->bookmark->creer;
// Title
print "";
@@ -252,6 +254,10 @@ while ($i < min($num, $limit)) {
print $tmpuser->getNomUrl(1);
} else {
print $langs->trans("Public");
+ if (!$user->admin) {
+ $candelete = false;
+ $canedit = false;
+ }
}
print " | \n";
@@ -263,10 +269,10 @@ while ($i < min($num, $limit)) {
// Actions
print '';
- if ($user->rights->bookmark->creer) {
+ if ($canedit)
print ''.img_edit()."";
}
- if ($user->rights->bookmark->supprimer) {
+ if ($candelete)
print 'rowid.'">'.img_delete().'';
} else {
print " ";
|