Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] Bug in MV in Scan.pm



******    message to minivend-users from "Bill Randle" <billr@exgate.tek.com>     ******


Yes, I noticed the _yes_array() routine. This guy appears to take an
array as an argument and breaks it apart and feeds the individual
items to _yes().

Is it possible that in the _yes() call you mention:
	$joiner = ' OR ' if _yes($options->{or_search});
that $options->{or_search} actually contains two elements, e.g.:
	'mv_orsearch', 'yes'
or
	'mv_orsearch', 'no'
that when fed to the subroutine taking two scalar arguments, the
thing you want to test is the second arg?

If you wanted to see for sure what is going on, you could put a
log message in there. E.g.:
	::logError("or_search contains: $options->{or_search}");
which should dump a message into the error.log file.

I'd do it myself, except I'm using MV4 and this part of the code
in Scan.pm has been completely rewritten and doesn't have this
particualr call to _yes().

	-Bill


On Feb 10,  8:43am, Alexander Lazic wrote:
} Subject: Re: [mv] Bug in MV in Scan.pm
} ******    message to minivend-users from Alexander Lazic <all@gmx.at>
    ******
}
} Hi,
}
} but there is also a routine called "_yes_array" is that what you mean.
}
} Call in Scan.pm:
} _yes: $joiner = ' OR ' if _yes($options->{or_search});
} _yes_array: $substring = _yes_array('', $options->{substring_match});
}
} in Sub: sql_search.
}
} al ;-)
}
} > Actually, it appears to me that _yes() *is* called with two arguments
} > in the places in Scan.pm that use it. E.g.:
} > 	map { $_ = _yes('',$_) } @fields;
} > If you find an instance where that is not the case, then you've found a
} bug.
} > If you need a routine that takes a single argument, see is_yes() in
} Util.pm.
} >
} > 	-Bill Randle
} > On Feb 9,  3:42pm, Alexander Lazic wrote:
} > } Subject: [mv] Bug in MV in Scan.pm
} > } ******    message to minivend-users from Alexander Lazic <all@gmx.at>
} > }
} > } Hi all,
} > }
} > } i think i have found a bug.
} > }
} > } in Vend/Scan.pm:"sub _yes"
} > }
} > } ORIG:  return( defined($_[1]) && ($_[1] =~ /^[yYtT1]/));
} > } OK:  return( defined($_[0]) && ($_[0] =~ /^[yYtT1]/));
} > }
} > } Because you give only one argument to this Routine.
}
} --
} Sent through Global Message Exchange - http://www.gmx.net
}
} -
} To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
} email with 'UNSUBSCRIBE minivend-users' in the body to
Majordomo@minivend.com.
} Archive of past messages: http://www.minivend.com/minivend/minivend-list
}-- End of excerpt from Alexander Lazic


-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: