Converted filter action to use table Id's instead of filterName's when editing existings and creating new filters.

This commit is contained in:
bhaal2
2016-09-15 01:29:44 +10:00
parent 99a212803a
commit cd626a54ee

View File

@@ -24,12 +24,12 @@ if ( !canEdit( 'Events' ) )
return;
}
$selectName = "filterName";
$newSelectName = "new".ucfirst($selectName);
foreach ( dbFetchAll( "select * from Filters order by Name" ) as $row )
$selectName = "filterId";
$newSelectName = "newFilterName";
foreach ( dbFetchAll( "select * from Filters order by Id" ) as $row )
{
$filterNames[$row['Name']] = $row['Name'];
if ( $_REQUEST['filterName'] == $row['Name'] )
$filterNames[$row['Id']] = $row['Name'];
if ( $_REQUEST['filterId'] == $row['Id'] )
{
$filterData = $row;
}