Skip to content

Commit

Permalink
Modify button generation to submit parameters as POST
Browse files Browse the repository at this point in the history
Fixes #20141
  • Loading branch information
cproensa authored and dregad committed Mar 7, 2016
1 parent 6332942 commit 813f42b
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions bugnote_view_inc.php
Expand Up @@ -219,20 +219,36 @@

# show edit button if the user is allowed to edit this bugnote
if( $t_can_edit_bugnote ) {
print_button( 'bugnote_edit_page.php?bugnote_id='.$t_bugnote->id, lang_get( 'bugnote_edit_link' ), null, OFF );
print_button(
'bugnote_edit_page.php',
lang_get( 'bugnote_edit_link' ),
array( 'bugnote_id' => $t_bugnote->id ),
OFF );
}

# show delete button if the user is allowed to delete this bugnote
if( $t_can_delete_bugnote ) {
print_button( 'bugnote_delete.php?bugnote_id='.$t_bugnote->id, lang_get( 'delete_link' ), null, $t_security_token_delete );
print_button(
'bugnote_delete.php',
lang_get( 'delete_link' ),
array( 'bugnote_id' => $t_bugnote->id ),
$t_security_token_delete );
}

# show make public or make private button if the user is allowed to change the view state of this bugnote
if( $t_can_change_view_state ) {
if( VS_PRIVATE == $t_bugnote->view_state ) {
print_button( 'bugnote_set_view_state.php?private=0&bugnote_id=' . $t_bugnote->id, lang_get( 'make_public' ), null, $t_security_token_state );
print_button(
'bugnote_set_view_state.php',
lang_get( 'make_public' ),
array( 'private' => '0', 'bugnote_id' => $t_bugnote->id ),
$t_security_token_state );
} else {
print_button( 'bugnote_set_view_state.php?private=1&bugnote_id=' . $t_bugnote->id, lang_get( 'make_private' ), null, $t_security_token_state );
print_button(
'bugnote_set_view_state.php',
lang_get( 'make_private' ),
array( 'private' => '1', 'bugnote_id' => $t_bugnote->id ),
$t_security_token_state );
}
}
}
Expand Down

0 comments on commit 813f42b

Please sign in to comment.