From: gmc Date: Fri, 15 Oct 2010 13:08:52 +0000 (+0000) Subject: tweak expanding search field aliases X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c910a7481ec5c5de2765c0fbfecbf72bd23b2460;p=evergreen%2Fmasslnc.git tweak expanding search field aliases Avoids a glitch that can occur if a search field alias exists that happens to have the same name as a search field. Signed-off-by: Galen Charlton git-svn-id: svn://svn.open-ils.org/ILS/trunk@18353 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/QueryParser.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/QueryParser.pm index 05ff6befee..6338384388 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/QueryParser.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/QueryParser.pm @@ -442,7 +442,7 @@ sub decompose { for my $alias ( @{$pkg->search_field_aliases->{$class}{$field}} ) { $alias = qr/$alias/; - s/\b$alias[:=]/$class\|$field:/g; + s/(^|\s+)$alias[:=]/$1$class\|$field:/g; } }