From 99a212803a87e1ed945fa78e12e4e10da9728355 Mon Sep 17 00:00:00 2001 From: bhaal2 Date: Thu, 15 Sep 2016 01:29:35 +1000 Subject: [PATCH] Converted filter action to use table Id's instead of filterName's when editing existings and creating new filters. --- web/skins/classic/views/filter.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/web/skins/classic/views/filter.php b/web/skins/classic/views/filter.php index 757fd1bee..8723bcc99 100644 --- a/web/skins/classic/views/filter.php +++ b/web/skins/classic/views/filter.php @@ -22,15 +22,15 @@ if ( !canView( 'Events' ) ) { $view = "error"; return; } -$selectName = "filterName"; +$selectName = "filterId"; $filterNames = array( ''=>translate('ChooseFilter') ); -foreach ( dbFetchAll( "select * from Filters order by Name" ) as $row ) { - $filterNames[$row['Name']] = $row['Name']; +foreach ( dbFetchAll( "select * from Filters order by Id" ) as $row ) { + $filterNames[$row['Id']] = $row['Name']; if ( $row['Background'] ) - $filterNames[$row['Name']] .= "*"; + $filterNames[$row['Id']] .= "*"; if ( $row['Concurrent'] ) - $filterNames[$row['Name']] .= "&"; - if ( !empty($_REQUEST['reload']) && isset($_REQUEST['filterName']) && $_REQUEST['filterName'] == $row['Name'] ) + $filterNames[$row['Id']] .= "&"; + if ( !empty($_REQUEST['reload']) && isset($_REQUEST['filterId']) && $_REQUEST['filterId'] == $row['Id'] ) $dbFilter = $row; } @@ -57,7 +57,7 @@ if ( isset( $_REQUEST['reload'] ) and ! $_REQUEST['reload'] ) { $dbFilter['AutoUpload'] = isset( $_REQUEST['AutoUpload'] ); $dbFilter['AutoVideo'] = isset( $_REQUEST['AutoVideo'] ); $dbFilter['AutoDelete'] = isset( $_REQUEST['AutoDelete'] ); - $dbFilter['Name'] = $_REQUEST['filterName']; + $dbFilter['Name'] = $_REQUEST['filterId']; } $conjunctionTypes = array(