Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed regression on logs search caused by autoFilter changes #570

Merged
merged 2 commits into from Aug 30, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions main/core/ChangeLog
@@ -1,3 +1,5 @@
HEAD
+ Fixed regression on logs search caused by autoFilter changes
3.0.25
+ Remove unnecessary and problematic desktop services code
+ No-committed changes does not appear in configuration changes
Expand Down
9 changes: 6 additions & 3 deletions main/core/src/EBox/Logs.pm
Expand Up @@ -454,10 +454,13 @@ sub search
}
if ($filters and %{$filters}) {
while (my ($field, $filterValue) = each %{$filters}) {
$field or next;
(defined $filterValue and ($filterValue eq 0)) or next;
if (not $field) {
next;
} elsif ((not defined $filterValue) or ($filterValue =~ m/^\s*$/)) {
next;
}

if (($field eq 'event') or ($filterValue eq 0)) {
if (($field eq 'event') or (not $filterValue)) {
$self->{'sqlselect'}->{'filter'}->{$field} = $filterValue;
} else {
my $type = exists $tableinfo->{types}->{$field} ?
Expand Down