projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
933bc89
)
fix service searching, RT#12477
author
ivan
<ivan>
Thu, 14 Apr 2011 18:00:01 +0000
(18:00 +0000)
committer
ivan
<ivan>
Thu, 14 Apr 2011 18:00:01 +0000
(18:00 +0000)
FS/FS/svc_hardware.pm
patch
|
blob
|
history
diff --git
a/FS/FS/svc_hardware.pm
b/FS/FS/svc_hardware.pm
index
5b81a9c
..
96a8e76
100644
(file)
--- a/
FS/FS/svc_hardware.pm
+++ b/
FS/FS/svc_hardware.pm
@@
-112,7
+112,12
@@
sub search_sql {
$hex =~ s/\W//g;
push @where, 'svc_hardware.hw_addr LIKE \'%'.$hex.'%\'';
}
- '(' . join(' OR ', @where) . ')';
+
+ if ( @where ) {
+ '(' . join(' OR ', @where) . ')';
+ } else {
+ '1 = 0'; #false
+ }
}
sub label {