projects
/
koha.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enhancement Bug 4444: Centralize Code Handling Perl Dependencies
[koha.git]
/
C4
/
Search.pm
diff --git
a/C4/Search.pm
b/C4/Search.pm
index
1161223
..
229ee40
100644
(file)
--- a/
C4/Search.pm
+++ b/
C4/Search.pm
@@
-16,7
+16,7
@@
package C4::Search;
# Suite 330, Boston, MA 02111-1307 USA
use strict;
# Suite 330, Boston, MA 02111-1307 USA
use strict;
-#
use warnings; # FIXME
+#
use warnings; FIXME - Bug 2505
require Exporter;
use C4::Context;
use C4::Biblio; # GetMarcFromKohaField, GetBiblioData
require Exporter;
use C4::Context;
use C4::Biblio; # GetMarcFromKohaField, GetBiblioData
@@
-1079,6
+1079,7
@@
sub buildQuery {
# COMBINE OPERANDS, INDEXES AND OPERATORS
if ( $operands[$i] ) {
# COMBINE OPERANDS, INDEXES AND OPERATORS
if ( $operands[$i] ) {
+ $operands[$i]=~s/^\s+//;
# A flag to determine whether or not to add the index to the query
my $indexes_set;
# A flag to determine whether or not to add the index to the query
my $indexes_set;
@@
-1122,14
+1123,14
@@
sub buildQuery {
}
# Set default structure attribute (word list)
}
# Set default structure attribute (word list)
- my $struct_attr;
+ my $struct_attr
= q{}
;
unless ( $indexes_set || !$index || $index =~ /(st-|phr|ext|wrdl)/ ) {
$struct_attr = ",wrdl";
}
# Some helpful index variants
unless ( $indexes_set || !$index || $index =~ /(st-|phr|ext|wrdl)/ ) {
$struct_attr = ",wrdl";
}
# Some helpful index variants
- my $index_plus = $index . $struct_attr .
":" if $index
;
- my $index_plus_comma = $index . $struct_attr .
"," if $index
;
+ my $index_plus = $index . $struct_attr .
':'
;
+ my $index_plus_comma = $index . $struct_attr .
','
;
# Remove Stopwords
if ($remove_stopwords) {
# Remove Stopwords
if ($remove_stopwords) {