[open-ils-commits] r16837 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher (gmc)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jun 30 19:06:15 EDT 2010


Author: gmc
Date: 2010-06-30 19:06:15 -0400 (Wed, 30 Jun 2010)
New Revision: 16837

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm
Log:
bug #600432: fix MARC expert search

Fix gitch introduced via overzealous tidying that broke MARC
expert search; in the expression @array || $scalar, @array 
is evaluated in scalar context and thus returns the number
of elements in it.

Signed-off-by: Galen Charlton <gmc at esilibrary.com>


Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm	2010-06-30 19:08:54 UTC (rev 16836)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm	2010-06-30 23:06:15 UTC (rev 16837)
@@ -432,7 +432,8 @@
 		my $term     = $$arg{term};
 		my $limiters = $$arg{restrict};
 
-		my ($index_col)  = metabib::full_rec->columns('FTS') || 'value';
+		my ($index_col)  = metabib::full_rec->columns('FTS');
+		$index_col ||= 'value';
 		my $search_table = metabib::full_rec->table;
 
 		my $fts = OpenILS::Application::Storage::FTS->compile('default' => $term, 'value',"$index_col");



More information about the open-ils-commits mailing list