Fix bookmark edit
This commit is contained in:
parent
074eda016b
commit
31aa1faa32
@ -98,7 +98,7 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update')
|
|||||||
|
|
||||||
if ($res > 0)
|
if ($res > 0)
|
||||||
{
|
{
|
||||||
if (empty($backtopage)) $backtopage=($urlsource?$urlsource:((! empty($url))?$url:DOL_URL_ROOT.'/bookmarks/list.php'));
|
if (empty($backtopage)) $backtopage=($urlsource?$urlsource:((! empty($url) && ! preg_match('/^http/i', $url))?$url:DOL_URL_ROOT.'/bookmarks/list.php'));
|
||||||
header("Location: ".$backtopage);
|
header("Location: ".$backtopage);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,7 +50,7 @@ $pagenext = $page + 1;
|
|||||||
if (! $sortfield) $sortfield='position';
|
if (! $sortfield) $sortfield='position';
|
||||||
if (! $sortorder) $sortorder='ASC';
|
if (! $sortorder) $sortorder='ASC';
|
||||||
|
|
||||||
$id = GETPOST("bid",'int');
|
$id = GETPOST("id",'int');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -179,11 +179,11 @@ if ($resql)
|
|||||||
print '<td align="right" class="nowrap">';
|
print '<td align="right" class="nowrap">';
|
||||||
if ($user->rights->bookmark->creer)
|
if ($user->rights->bookmark->creer)
|
||||||
{
|
{
|
||||||
print "<a href=\"".DOL_URL_ROOT."/bookmarks/card.php?action=edit&id=".$obj->bid."&backtopage=".urlencode($_SERVER["PHP_SELF"])."\">".img_edit()."</a> ";
|
print "<a href=\"".DOL_URL_ROOT."/bookmarks/card.php?action=edit&id=".$obj->rowid."&backtopage=".urlencode($_SERVER["PHP_SELF"])."\">".img_edit()."</a> ";
|
||||||
}
|
}
|
||||||
if ($user->rights->bookmark->supprimer)
|
if ($user->rights->bookmark->supprimer)
|
||||||
{
|
{
|
||||||
print "<a href=\"".$_SERVER["PHP_SELF"]."?action=delete&bid=$obj->bid\">".img_delete()."</a>";
|
print "<a href=\"".$_SERVER["PHP_SELF"]."?action=delete&id=$obj->rowid\">".img_delete()."</a>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -209,7 +209,7 @@ print "<div class=\"tabsAction\">\n";
|
|||||||
|
|
||||||
if ($user->rights->bookmark->creer)
|
if ($user->rights->bookmark->creer)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="card.php?action=create">'.$langs->trans("NewBookmark").'</a>';
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/bookmarks/card.php?action=create">'.$langs->trans("NewBookmark").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user