[interchange-cvs] interchange - pajamian modified 2 files
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Tue Jan 30 19:13:36 EST 2007
User: pajamian
Date: 2007-01-31 00:13:36 GMT
Modified: . Tag: STABLE_5_4-branch WHATSNEW-5.4
Modified: lib/Vend Tag: STABLE_5_4-branch 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
No revision
No revision
1.1.2.12 +8 -0 interchange/Attic/WHATSNEW-5.4
rev 1.1.2.12, prev_rev 1.1.2.11
Index: WHATSNEW-5.4
===================================================================
RCS file: /var/cvs/interchange/Attic/WHATSNEW-5.4,v
retrieving revision 1.1.2.11
retrieving revision 1.1.2.12
diff -u -r1.1.2.11 -r1.1.2.12
--- WHATSNEW-5.4 30 Jan 2007 23:15:41 -0000 1.1.2.11
+++ WHATSNEW-5.4 31 Jan 2007 00:13:36 -0000 1.1.2.12
@@ -38,6 +38,14 @@
* Fixed a problem where get_option_hash would return the reference itself
when passed one, instead of a copy. Thanks to Bruno Cantieni.
+* 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.
+
Options
-------
No revision
No revision
2.83.2.4 +6 -2 interchange/lib/Vend/Order.pm
rev 2.83.2.4, prev_rev 2.83.2.3
Index: Order.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Order.pm,v
retrieving revision 2.83.2.3
retrieving revision 2.83.2.4
diff -u -r2.83.2.3 -r2.83.2.4
--- Order.pm 26 Aug 2006 05:24:22 -0000 2.83.2.3
+++ Order.pm 31 Jan 2007 00:13:36 -0000 2.83.2.4
@@ -1,6 +1,6 @@
# Vend::Order - Interchange order routing routines
#
-# $Id: Order.pm,v 2.83.2.3 2006/08/26 05:24:22 pajamian Exp $
+# $Id: Order.pm,v 2.83.2.4 2007/01/31 00:13:36 pajamian Exp $
#
# Copyright (C) 2002-2003 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -29,7 +29,7 @@
package Vend::Order;
require Exporter;
-$VERSION = substr(q$Revision: 2.83.2.3 $, 10);
+$VERSION = substr(q$Revision: 2.83.2.4 $, 10);
@ISA = qw(Exporter);
@@ -1022,6 +1022,10 @@
s/^\s+//;
s/\s+$//;
($val, $var, $message) = do_check($_, $vref);
+
+ # no actual check on this line, skip to next
+ next if /^&(?:and|or)\s*$/i;
+
if(defined $And) {
if($And) {
$val = ($last_one && $val);
More information about the interchange-cvs
mailing list