|
@@ -105,7 +105,7 @@ if (empty($reshook)) {
|
|
|
if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
|
|
|
$backtopage = $backurlforlist;
|
|
|
} else {
|
|
|
- $backtopage = dol_buildpath('/bom/bom_card.php', 1).'?id='.($id > 0 ? $id : '__ID__');
|
|
|
+ $backtopage = DOL_URL_ROOT.'/bom/bom_card.php?id='.($id > 0 ? $id : '__ID__');
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -450,7 +450,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|
|
|
|
|
// Object card
|
|
|
// ------------------------------------------------------------
|
|
|
- $linkback = '<a href="'.dol_buildpath('/bom/bom_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
|
|
+ $linkback = '<a href="'.DOL_URL_ROOT.'/bom/bom_list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
|
|
|
|
|
$morehtmlref = '<div class="refidno">';
|
|
|
/*
|
|
@@ -616,24 +616,24 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|
|
|
|
|
// Re-open
|
|
|
if ($permissiontoadd && $object->status == $object::STATUS_CANCELED) {
|
|
|
- print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen">'.$langs->trans("ReOpen").'</a>'."\n";
|
|
|
+ print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen&token='.newToken().'">'.$langs->trans("ReOpen").'</a>'."\n";
|
|
|
}
|
|
|
|
|
|
// Create MO
|
|
|
if ($conf->mrp->enabled) {
|
|
|
if ($object->status == $object::STATUS_VALIDATED && !empty($user->rights->mrp->write)) {
|
|
|
- print '<a class="butAction" href="'.DOL_URL_ROOT.'/mrp/mo_card.php?action=create&fk_bom='.$object->id.'&backtopageforcancel='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id).'">'.$langs->trans("CreateMO").'</a>'."\n";
|
|
|
+ print '<a class="butAction" href="'.DOL_URL_ROOT.'/mrp/mo_card.php?action=create&fk_bom='.$object->id.'&token='.newToken().'&backtopageforcancel='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id).'">'.$langs->trans("CreateMO").'</a>'."\n";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Clone
|
|
|
if ($permissiontoadd) {
|
|
|
- print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=clone&object=bom">'.$langs->trans("ToClone").'</a>'."\n";
|
|
|
+ print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=clone&object=bom&token='.newToken().'">'.$langs->trans("ToClone").'</a>'."\n";
|
|
|
}
|
|
|
|
|
|
// Close / Cancel
|
|
|
if ($permissiontoadd && $object->status == $object::STATUS_VALIDATED) {
|
|
|
- print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=close">'.$langs->trans("Disable").'</a>'."\n";
|
|
|
+ print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=close&token='.newToken().'">'.$langs->trans("Disable").'</a>'."\n";
|
|
|
}
|
|
|
|
|
|
/*
|
|
@@ -687,7 +687,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|
|
|
|
|
$MAXEVENT = 10;
|
|
|
|
|
|
- $morehtmlright = '<a href="'.dol_buildpath('/bom/bom_agenda.php', 1).'?id='.$object->id.'">';
|
|
|
+ $morehtmlright = '<a href="'.DOL_URL_ROOT.'/bom/bom_agenda.php?id='.$object->id.'">';
|
|
|
$morehtmlright .= $langs->trans("SeeAll");
|
|
|
$morehtmlright .= '</a>';
|
|
|
|