Skip to content

Commit

Permalink
Fix updating projects in filter edit.
Browse files Browse the repository at this point in the history
Two form inputs with the same name was causing to not updating the
"projects" attribute when editing a filter.

Fixes: #23436
  • Loading branch information
cproensa authored and dregad committed Oct 7, 2017
1 parent 187c058 commit ac722d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions manage_filter_edit_page.php
Expand Up @@ -182,20 +182,20 @@
</td>
<td>
<label class="inline">
<input type="radio" class="ace input-sm" name="project_id" value="<?php echo ALL_PROJECTS ?>" <?php check_checked( ALL_PROJECTS == $t_filter_project_id ) ?>>
<input type="radio" class="ace input-sm" name="filter_project_id" value="<?php echo ALL_PROJECTS ?>" <?php check_checked( ALL_PROJECTS == $t_filter_project_id ) ?>>
<span class="lbl"> <?php echo lang_get( 'all_projects' ) ?></span>
</label>
<br>
<?php if( ALL_PROJECTS != $t_filter_project_id ) { ?>
<label>
<input type="radio" class="ace input-sm" name="project_id" value="<?php echo $t_filter_project_id ?>" <?php check_checked( ALL_PROJECTS != $t_filter_project_id ) ?>>
<input type="radio" class="ace input-sm" name="filter_project_id" value="<?php echo $t_filter_project_id ?>" <?php check_checked( ALL_PROJECTS != $t_filter_project_id ) ?>>
<span class="lbl"> <?php echo lang_get( 'stored_project' ) . ' (' . project_get_name( $t_filter_project_id ) . ')' ?></span>
</label>
<br>
<?php } ?>
<?php if( $t_filter_project_id != $t_current_project_id ) { ?>
<label>
<input type="radio" class="ace input-sm" name="project_id" value="<?php echo $t_current_project_id ?>">
<input type="radio" class="ace input-sm" name="filter_project_id" value="<?php echo $t_current_project_id ?>">
<span class="lbl"> <?php echo lang_get( 'current_project' ) . ' (' . project_get_name( $t_current_project_id ) . ')' ?></span>
</label>
<?php } ?>
Expand Down
2 changes: 1 addition & 1 deletion manage_filter_edit_update.php
Expand Up @@ -82,7 +82,7 @@
$f_is_public = null;
}

$f_project_id = gpc_get_int( 'project_id', null );
$f_project_id = gpc_get_int( 'filter_project_id', null );

$t_editable = filter_db_can_delete_filter( $f_filter_id );
if( !$t_editable ) {
Expand Down

0 comments on commit ac722d5

Please sign in to comment.