The delete-icon link on bankentries_list.php stripped 'action=reconcile' from $param but left a stray trailing '&' (and the same string can be re-emitted by other includes), so the final URL ended up with two action= query params (action=delete and action=reconcile). PHP picks the last one, the page silently switches to the reconcile path and the delete confirm dialog never opens. Widen the preg_replace to consume the surrounding & as well, and also clean up the confirm_deleteonreconcile form. Signed-off-by: Dolicraft <contact@dolicraft.com> Co-authored-by: Dolicraft <contact@dolicraft.com>
This commit is contained in:
parent
4ee7657dca
commit
a04db9bd0b
1 changed files with 3 additions and 1 deletions
|
|
@ -1913,7 +1913,9 @@ if ($resql) {
|
|||
}
|
||||
}
|
||||
if ($user->hasRight('banque', 'modifier')) {
|
||||
$parambis = preg_replace('/action=reconcile/', '', $param);
|
||||
// Strip the surrounding & so the leading action= we put first stays the only action= in the URL.
|
||||
// Without this the URL ends up with two action= params; PHP picks the last one and the page silently switches to 'reconcile' instead of 'delete'.
|
||||
$parambis = preg_replace('/&?action=(reconcile|confirm_deleteonreconcile)(&|$)/', '\2', $param);
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action='.($action == 'reconcile' ? 'confirm_deleteonreconcile&confirm=yes' : 'delete').'&token='.newToken().'&rowid='.$objp->rowid.'&page='.$page.$parambis.($sortfield ? '&sortfield='.$sortfield : '').($sortorder ? '&sortorder='.$sortorder : '').'">';
|
||||
print img_delete('', 'class="marginleftonly"');
|
||||
print '</a>';
|
||||
|
|
|
|||
Loading…
Reference in a new issue