Qual: Uniformize var $backtopage (no more $backtourl vars)
This commit is contained in:
parent
9ea3e33f94
commit
06dbc4e36c
@ -1651,7 +1651,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
$langs->load("agenda");
|
||||
if ($object->statut < 2)
|
||||
{
|
||||
if ($user->rights->agenda->myactions->create) print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("AddEvent").'</a></div>';
|
||||
if ($user->rights->agenda->myactions->create) print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id).'">'.$langs->trans("AddEvent").'</a></div>';
|
||||
else print '<div class="inline-block divButAction"><a class="butActionRefused" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("AddEvent").'</a></div>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ $langs->load('orders');
|
||||
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$confirm=GETPOST('confirm', 'alpha');
|
||||
$backtourl=GETPOST('backtourl');
|
||||
$backtopage=GETPOST('backtopage');
|
||||
|
||||
// Security check
|
||||
$id = GETPOST('id', 'int');
|
||||
@ -150,7 +150,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expeditio
|
||||
if ($result > 0)
|
||||
{
|
||||
$db->commit();
|
||||
if (! empty($backtourl)) header("Location: ".$backtourl);
|
||||
if (! empty($backtopage)) header("Location: ".$backtopage);
|
||||
else header("Location: ".DOL_URL_ROOT.'/expedition/index.php');
|
||||
exit;
|
||||
}
|
||||
@ -493,7 +493,7 @@ else
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$expedition_id = GETPOST("expid");
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$delivery->id.'&expid='.$expedition_id.'&backtourl='.urlencode($backtourl),$langs->trans("DeleteDeliveryReceipt"),$langs->trans("DeleteDeliveryReceiptConfirm",$delivery->ref),'confirm_delete','','',1);
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$delivery->id.'&expid='.$expedition_id.'&backtopage='.urlencode($backtopage),$langs->trans("DeleteDeliveryReceipt"),$langs->trans("DeleteDeliveryReceiptConfirm",$delivery->ref),'confirm_delete','','',1);
|
||||
|
||||
}
|
||||
|
||||
@ -739,7 +739,7 @@ else
|
||||
{
|
||||
if ($conf->expedition_bon->enabled)
|
||||
{
|
||||
print '<a class="butActionDelete" href="fiche.php?id='.$delivery->id.'&expid='.$delivery->origin_id.'&action=delete&backtourl='.urlencode(DOL_URL_ROOT.'/expedition/fiche.php?id='.$delivery->origin_id).'">'.$langs->trans("Delete").'</a>';
|
||||
print '<a class="butActionDelete" href="fiche.php?id='.$delivery->id.'&expid='.$delivery->origin_id.'&action=delete&backtopage='.urlencode(DOL_URL_ROOT.'/expedition/fiche.php?id='.$delivery->origin_id).'">'.$langs->trans("Delete").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user