Skip to content

Commit 06c6c94

Browse files
committed
Fixing Issue #56
Sort Fields for Filters Not Saved Correctly
1 parent 536ec40 commit 06c6c94

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* issue#52: init.d script kills poller
2424
* issue#53: Division by zero errors viewing tables
2525
* issue#55: Netflow V9 Errors on CACTI
26+
* issue#56: Sort Fields for Filters Not Saved Correctly
2627
* issue: Partition tables were not being pruned.
2728
* issue: Make the flow_collector.php resilient to loss of the database server.
2829
* feature: New database design. Support for v5, v9, IPFIX flows transparently

functions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ function sort_filter() {
2929

3030
if (isset_request_var('printed') && get_filter_request_var('printed') > 0) {
3131
foreach($print_columns_array[get_request_var('printed')] as $key => $value) {
32-
print "<option value='$key'" . (get_request_var('printed') == $key ? ' selected':'') . '>' . html_escape($value) . '</option>';
32+
print "<option value='$key'" . (get_request_var('sortfield') == $key ? ' selected':'') . '>' . html_escape($value) . '</option>';
3333
}
3434
} elseif (get_filter_request_var('statistics') > 0) {
3535
foreach($stat_columns_array[get_request_var('statistics')] as $key => $value) {
36-
print "<option value='$key'" . (get_request_var('statistics') == $key ? ' selected':'') . '>' . html_escape($value) . '</option>';
36+
print "<option value='$key'" . (get_request_var('sortfield') == $key ? ' selected':'') . '>' . html_escape($value) . '</option>';
3737
}
3838
} else {
3939
print "<option value='0'>" . __('Select a Report Type First', 'flowview') . '</option>';
@@ -1941,7 +1941,7 @@ function run_flow_query($query_id, $title, $sql_where, $start, $end) {
19411941

19421942
$sql = "$sql_query FROM ($sql) AS rs $sql_groupby $sql_having $sql_order $sql_limit";
19431943

1944-
cacti_log(str_replace("\n", " ", str_replace("\t", '', $sql)));
1944+
//cacti_log(str_replace("\n", " ", str_replace("\t", '', $sql)));
19451945

19461946
if ($data['statistics'] == 99) {
19471947
$results = db_fetch_row($sql);

0 commit comments

Comments
 (0)