projects
/
koha_ffzg
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c505daa
)
Bug 3955: Fixes leading space error in search.
author
Garry Collum
<gcollum@gmail.com>
Fri, 18 Dec 2009 18:52:56 +0000
(13:52 -0500)
committer
Henri-Damien LAURENT
<henridamien.laurent@biblibre.com>
Sun, 20 Dec 2009 13:28:48 +0000
(14:28 +0100)
Leading spaces in a search term were causing an error to be thrown in a join operator when auto-truncations is turned on. This patch removes the leading spaces.
C4/Search.pm
patch
|
blob
|
history
diff --git
a/C4/Search.pm
b/C4/Search.pm
index
2fe57ed
..
e8903fc
100644
(file)
--- a/
C4/Search.pm
+++ b/
C4/Search.pm
@@
-932,8
+932,10
@@
sub buildQuery {
}
if ($auto_truncation){
- $operand=~join(" ",map{ "$_*" }split (/\s+/,$operand));
- }
+ # join throws an error if there is a leading space
+ $operand =~ s/^\s+//;
+ $operand=~join(" ",map{ "$_*" }split (/\s+/,$operand));
+ }
# Detect Truncation
my $truncated_operand;