From b488be53a1bfe17e9f068bba858193b8b287cd70 Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Wed, 26 Oct 2011 16:13:02 +0200 Subject: [PATCH] Fixed filter edit handling in report admin, which was broken because of changes in last version --- src/admin/reports.php | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/src/admin/reports.php b/src/admin/reports.php index 65441c0..54e7427 100644 --- a/src/admin/reports.php +++ b/src/admin/reports.php @@ -589,9 +589,9 @@ if ( isset($content['ISADDSAVEDREPORT']) && $content['ISADDSAVEDREPORT'] ) $szFilterString = ""; if ( - ( strlen($content['filterString']) <= 0 && - isset($_POST['report_filterString']) ) - || +// ( strlen($content['filterString']) <= 0 && +// isset($_POST['report_filterString']) ) +// || ( strlen($content['filterString']) > 0 && !isset($_POST['subop']) && !isset($_POST['subop_edit']) && @@ -739,10 +739,20 @@ if ( isset($content['ISADDSAVEDREPORT']) && $content['ISADDSAVEDREPORT'] ) $i++; } -// DEBUG stuff -// echo $content['filterString'] . "
\r\n"; -// echo $szFilterString . "
\r\n"; -// print_r ( $AllFilters ); + // Reset Allfilters Array to NULL in this case! + if ( strlen($szFilterString) <= 0 ) + { + $content['filterString'] = ""; + $content['filterString_htmlform'] = ""; + } + + /* + // DEBUG stuff + echo $content['filterString'] . "
\r\n"; + echo $szFilterString . "
\r\n"; + print_r ( $AllFilters ); + // */ + } } @@ -796,7 +806,10 @@ if ( isset($content['ISADDSAVEDREPORT']) && $content['ISADDSAVEDREPORT'] ) } // Copy Final Filterstring if necessary if ( strlen($szFilterString) > 0 ) + { $content['filterString'] = $szFilterString; + $content['filterString_htmlform'] = htmlspecialchars($szFilterString); + } // echo $content['SourceID']; if ( isset($content['Sources'][$content['SourceID']]['ObjRef']) )