[interchange-cvs] interchange - pajamian modified 2 files
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Fri Jan 5 04:58:29 EST 2007
User: pajamian
Date: 2007-01-05 09:58:28 GMT
Modified: . WHATSNEW-5.5
Modified: lib/Vend Order.pm
Log:
Wait until the *next* line of the profile before undefining $And.
$And gets set if there is a &and or &or command with no further args (ie
chaining the line above and below together, not chaining two or more tests
together on the same line). Currently $And gets unset before it has a chance
to affect the following line. This results in the &and or &or being ignored
and the two lines treated as individual tests. This patch fixes that by
skipping to the next iteration of the loop before $And is undefined.
Revision Changes Path
1.24 +8 -0 interchange/WHATSNEW-5.5
rev 1.24, prev_rev 1.23
Index: WHATSNEW-5.5
===================================================================
RCS file: /var/cvs/interchange/WHATSNEW-5.5,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- WHATSNEW-5.5 17 Nov 2006 10:04:25 -0000 1.23
+++ WHATSNEW-5.5 5 Jan 2007 09:58:28 -0000 1.24
@@ -45,6 +45,14 @@
* Fixed case-insensitive searches for different locales.
+* Fixed bug which prevented &and and &or profile commands from working
+ on a line by itself when used to join the previous and next profile
+ checks. The following now works:
+
+ username=required You must enter a username.
+ &and
+ username=unique mytable Sorry, that username is already taken.
+
UserDB
------
2.90 +5 -2 interchange/lib/Vend/Order.pm
rev 2.90, prev_rev 2.89
Index: Order.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Order.pm,v
retrieving revision 2.89
retrieving revision 2.90
diff -u -r2.89 -r2.90
--- Order.pm 22 Sep 2006 19:18:57 -0000 2.89
+++ Order.pm 5 Jan 2007 09:58:28 -0000 2.90
@@ -1,6 +1,6 @@
# Vend::Order - Interchange order routing routines
#
-# $Id: Order.pm,v 2.89 2006/09/22 19:18:57 racke Exp $
+# $Id: Order.pm,v 2.90 2007/01/05 09:58:28 pajamian Exp $
#
# Copyright (C) 2002-2006 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -29,7 +29,7 @@
package Vend::Order;
require Exporter;
-$VERSION = substr(q$Revision: 2.89 $, 10);
+$VERSION = substr(q$Revision: 2.90 $, 10);
@ISA = qw(Exporter);
@@ -1024,6 +1024,9 @@
s/^\s+//;
s/\s+$//;
($val, $var, $message) = do_check($_, $vref);
+ # Wait until the *next* line of the profile before
+ # undefining $And.
+ next if /^&(?:and|or)\s*$/i;
if(defined $And) {
if($And) {
$val = ($last_one && $val);
More information about the interchange-cvs
mailing list