[interchange-cvs] interchange - jon modified 2 files

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Thu Feb 28 12:33:01 2002


User:      jon
Date:      2002-02-28 17:32:16 GMT
Modified:  lib/Vend Interpolate.pm Search.pm
Log:
Remove some unneeded field name -> number conversion for mv_more_alpha.

Revision  Changes    Path
2.61      +2 -14     interchange/lib/Vend/Interpolate.pm


rev 2.61, prev_rev 2.60
Index: Interpolate.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.60
retrieving revision 2.61
diff -u -u -r2.60 -r2.61
--- Interpolate.pm	18 Feb 2002 01:00:21 -0000	2.60
+++ Interpolate.pm	28 Feb 2002 17:32:15 -0000	2.61
@@ -1,6 +1,6 @@
 # Vend::Interpolate - Interpret Interchange tags
 # 
-# $Id: Interpolate.pm,v 2.60 2002/02/18 01:00:21 mheins Exp $
+# $Id: Interpolate.pm,v 2.61 2002/02/28 17:32:15 jon Exp $
 #
 # Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -27,7 +27,7 @@
 require Exporter;
 @ISA = qw(Exporter);
 
-$VERSION = substr(q$Revision: 2.60 $, 10);
+$VERSION = substr(q$Revision: 2.61 $, 10);
 
 @EXPORT = qw (
 
@@ -4618,9 +4618,6 @@
 	if($opt->{ma}) {
 		# Find the sort field and alpha options....
 		Vend::Scan::parse_profile_ref($object, $opt);
-		# Contents of mv_return_fields must be of the same type
-		# (numeric here) as the contents of mv_sort_field
-		@{$object->{mv_return_fields}} = map {$nh->{$_}} @{$object->{mv_return_fields}};
 		# We need to turn the hash reference into a search object
 		$object = new Vend::Search (%$object);
 		# Delete this so it will meet conditions for creating a more
@@ -4733,15 +4730,6 @@
 		$obj->{mv_cache_key} = generate_key(substr($page,0,100));
 		$obj->{mv_first_match} = $opt->{fm} if $opt->{fm};
 		$obj->{mv_search_page} = $opt->{sp} if $opt->{sp};
-
-		# We have an mv_more_alpha in a [query], need a numeric sort field that
-		# relates to the field. [search-region] and [loop] would have
-		# been caught elsewhere
-		if($opt->{ma} and $obj->{mv_sort_field} and $obj->{mv_field_hash}) {
-			my @ary = map { $obj->{mv_field_hash}{$_} } @{$obj->{mv_sort_field}};
-			$obj->{mv_sort_field} = \@ary;
-		}
-
 		$obj->{prefix} = $opt->{prefix} if $opt->{prefix};
 		my $out = delete $obj->{mv_results};
 		Vend::Search::save_more($obj, $out);



2.6       +3 -3      interchange/lib/Vend/Search.pm


rev 2.6, prev_rev 2.5
Index: Search.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Search.pm,v
retrieving revision 2.5
retrieving revision 2.6
diff -u -u -r2.5 -r2.6
--- Search.pm	9 Feb 2002 05:21:42 -0000	2.5
+++ Search.pm	28 Feb 2002 17:32:15 -0000	2.6
@@ -1,6 +1,6 @@
 # Vend::Search - Base class for search engines
 #
-# $Id: Search.pm,v 2.5 2002/02/09 05:21:42 mheins Exp $
+# $Id: Search.pm,v 2.6 2002/02/28 17:32:15 jon Exp $
 #
 # Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -21,7 +21,7 @@
 
 package Vend::Search;
 
-$VERSION = substr(q$Revision: 2.5 $, 10);
+$VERSION = substr(q$Revision: 2.6 $, 10);
 
 use strict;
 use vars qw($VERSION);
@@ -367,7 +367,7 @@
 
 	# determine position of sort field within results
 	for ($i = 0; $i < @{$s->{mv_return_fields}}; $i++) {
-		last if $s->{mv_return_fields}->[$i] == $s->{mv_sort_field}->[0];
+		last if $s->{mv_return_fields}->[$i] eq $s->{mv_sort_field}->[0];
 	}
 	$sfpos = $i;