phppgadmin/phppgadmin — pull request #10 by osteenbergen (2012-12-31 11:50:09+00:00)
Title: Fix broken buttons if used multiple times

The bug:
- User browses a table
- Clicks on any 'edit' button
- Clicks on 'Cancel' button
- Clicks on any 'edit' button
- User is unable to edit the row (no edit screen, just the browse screen)

The Cause:
The buttons include the state information in 'urlvars'. This was done via a merge of two arrays, the first with the button information and the second contains the page state variables. Merge will override values in the first array if they are also in the second array.
Also after the buttons are defined a for-loop merges the urlvars for a second time.