[interchange-cvs] interchange - kwalsh modified lib/Vend/Search.pm

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Fri Feb 9 16:32:09 EST 2007


User:      kwalsh
Date:      2007-02-09 21:32:09 GMT
Modified:  lib/Vend Tag: STABLE_5_4-branch Search.pm
Log:
    * Back-ported the SearchOp bug fixes, which were committed to the 5.5
      trunk on 2006-07-05 at 13:19:54 GMT by kwalsh.

Revision  Changes    Path
No                   revision



No                   revision



2.30.2.1  +11 -5     interchange/lib/Vend/Search.pm


rev 2.30.2.1, prev_rev 2.30
Index: Search.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Search.pm,v
retrieving revision 2.30
retrieving revision 2.30.2.1
diff -u -r2.30 -r2.30.2.1
--- Search.pm	30 Apr 2005 15:09:58 -0000	2.30
+++ Search.pm	9 Feb 2007 21:32:08 -0000	2.30.2.1
@@ -1,6 +1,6 @@
 # Vend::Search - Base class for search engines
 #
-# $Id: Search.pm,v 2.30 2005/04/30 15:09:58 mheins Exp $
+# $Id: Search.pm,v 2.30.2.1 2007/02/09 21:32:08 kwalsh Exp $
 #
 # Copyright (C) 2002-2004 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -22,7 +22,7 @@
 
 package Vend::Search;
 
-$VERSION = substr(q$Revision: 2.30 $, 10);
+$VERSION = substr(q$Revision: 2.30.2.1 $, 10);
 
 use strict;
 no warnings qw(uninitialized numeric);
@@ -649,12 +649,18 @@
 		$c->[$i] =~ tr/ \t//;
 		my $o = $c->[$i];
 		$c->[$i] = $s->{mv_numeric}[$i]
-				? [ @{$numopmap{$o}} ]
-				: [ @{$stropmap{$o}} ];
-		if(! $c->[$i]) {
+				? $numopmap{$o}
+				: $stropmap{$o};
+		if (ref($c->[$i]) eq 'ARRAY') {
+			$c->[$i] = [ @{$c->[$i]} ];
+		}
+		elsif (!$c->[$i]) {
 			my $r;
 			$c->[$i] = [$r, $o], next
 				if  $r = Vend::Util::codedef_routine('SearchOp',$o);
+		}
+		if (!$c->[$i]) {
+		    $s->search_error("Unknown mv_column_op (%s)",$o);
 		}
 	}
 	@{$s->{mv_column_op}};








More information about the interchange-cvs mailing list