Fix use of newtoken()
This commit is contained in:
parent
b33e639099
commit
b76828df9f
@ -592,7 +592,7 @@ if (!$showdatefilter)
|
||||
{
|
||||
print '<div class="center centpercent">';
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION["newtoken"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="tablename" value="'.$tablename.'">';
|
||||
print '<input type="hidden" name="action" value="view">';
|
||||
print '<table class="center"><tr>';
|
||||
@ -894,7 +894,7 @@ foreach ($listofreferent as $key => $value)
|
||||
// Define form with the combo list of elements to link
|
||||
$addform .= '<div class="inline-block valignmiddle">';
|
||||
$addform .= '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||
$addform .= '<input type="hidden" name="token" value="'.$_SESSION["newtoken"].'">';
|
||||
$addform .= '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
$addform .= '<input type="hidden" name="tablename" value="'.$tablename.'">';
|
||||
$addform .= '<input type="hidden" name="action" value="addelement">';
|
||||
$addform .= '<input type="hidden" name="datesrfc" value="'.dol_print_date($dates, 'dayhourrfc').'">';
|
||||
|
||||
@ -2275,7 +2275,7 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment
|
||||
var hiddenInput2 = document.createElement('input');
|
||||
hiddenInput2.setAttribute('type', 'hidden');
|
||||
hiddenInput2.setAttribute('name', 'token');
|
||||
hiddenInput2.setAttribute('value', '<?php echo $_SESSION["newtoken"]; ?>');
|
||||
hiddenInput2.setAttribute('value', '<?php echo newToken(); ?>');
|
||||
form.appendChild(hiddenInput2);
|
||||
|
||||
// Submit the form
|
||||
@ -2299,7 +2299,7 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment
|
||||
var hiddenInput2 = document.createElement('input');
|
||||
hiddenInput2.setAttribute('type', 'hidden');
|
||||
hiddenInput2.setAttribute('name', 'token');
|
||||
hiddenInput2.setAttribute('value', '<?php echo $_SESSION["newtoken"]; ?>');
|
||||
hiddenInput2.setAttribute('value', '<?php echo newToken(); ?>');
|
||||
form.appendChild(hiddenInput2);
|
||||
|
||||
// Submit the form
|
||||
|
||||
Loading…
Reference in New Issue
Block a user