[interchange-cvs] interchange - jon modified dist/lib/UI/usertag/table_editor.tag
interchange-core@interchange.redhat.com
interchange-core@interchange.redhat.com
Tue May 14 14:20:59 2002
User: jon
Date: 2002-05-14 18:19:31 GMT
Modified: dist/lib/UI/usertag Tag: STABLE_4_8-branch table_editor.tag
Log:
Merge from trunk code/UI_Tag/table_editor.coretag version 1.5:
Fix bug in profile handling of table editor that kept '$' in profiles from
working right ($Values->{whatever} and so on).
Also tolerate profiles that don't end in a newline (e.g. when quoted
with |...| in the table-editor tag).
Revision Changes Path
No revision
No revision
2.10.2.2 +8 -4 interchange/dist/lib/UI/usertag/Attic/table_editor.tag
rev 2.10.2.2, prev_rev 2.10.2.1
Index: table_editor.tag
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/usertag/Attic/table_editor.tag,v
retrieving revision 2.10.2.1
retrieving revision 2.10.2.2
diff -u -u -r2.10.2.1 -r2.10.2.2
--- table_editor.tag 6 Dec 2001 23:17:27 -0000 2.10.2.1
+++ table_editor.tag 14 May 2002 18:19:31 -0000 2.10.2.2
@@ -379,11 +379,13 @@
$error_show_var = 0 if $v =~ /\S /;
}
}
- $prof = '&calc delete \\$Values->{step_' . $name . "}\n" . $prof;
+ $prof = '&calc delete $Values->{step_' . $name . "}\n" . $prof;
$opt->{ui_profile_success} = "&set=step_$name 1";
}
}
my $success = $opt->{ui_profile_success};
+ # make sure profile so far ends with a newline so we can add more
+ $prof .= "\n" unless $prof =~ /\n\s*\z/;
if(ref $check) {
while ( my($k, $v) = each %$check ) {
$error->{$k} = 1;
@@ -409,12 +411,13 @@
$opt->{hidden} = {} if ! $opt->{hidden};
$opt->{hidden}{mv_form_profile} = 'ui_profile';
my $fail = $opt->{mv_failpage} || $Global::Variable->{MV_PAGE};
+
+ # watch out for early interpolation here!
$Scratch->{ui_profile} = <<EOF;
[perl]
#Debug("cancel='$opt->{orig_cancel_text}' back='$opt->{orig_back_text}' click=\$CGI->{mv_click}");
my \@clicks = split /\\0/, \$CGI->{mv_click};
- my \$fail = '$fail';
for( qq{$opt->{orig_cancel_text}}, qq{$opt->{orig_back_text}}) {
#Debug("compare is '\$_'");
next unless \$_;
@@ -424,8 +427,9 @@
return if \$_ eq \$cancel;
}
}
-
- return <<EOP;
+ # the following should already be interpolated by the table-editor tag
+ # before going into scratch ui_profile
+ return <<'EOP';
$prof
&fail=$fail
&fatal=1