cvsuser 02/03/06 15:02:37
Modified: P5EEx/Blue/P5EEx/Blue/Context CGI.pm
Log:
changed handling of multivalue vars to a sequence of wset()s
Revision Changes Path
1.8 +19 -34 p5ee/P5EEx/Blue/P5EEx/Blue/Context/CGI.pm
Index: CGI.pm
===================================================================
RCS file: /cvs/public/p5ee/P5EEx/Blue/P5EEx/Blue/Context/CGI.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -r1.7 -r1.8
--- CGI.pm 2 Mar 2002 03:07:46 -0000 1.7
+++ CGI.pm 6 Mar 2002 23:02:37 -0000 1.8
@@ -1,6 +1,6 @@
#############################################################################
-## $Id: CGI.pm,v 1.7 2002/03/02 03:07:46 spadkins Exp $
+## $Id: CGI.pm,v 1.8 2002/03/06 23:02:37 spadkins Exp $
#############################################################################
package P5EEx::Blue::Context::CGI;
@@ -389,28 +389,12 @@
# these vars are used in the Session restore() to restore state.
}
else {
- @values = $cgi->param($var);
- if ($#values > 0) {
- $value = [ @values ];
- }
- elsif ($#values == 0) {
- $value = $values[0];
- }
- else {
- $value = "";
- }
-
+ foreach $value ($cgi->param($var)) {
# Indexed vars: e.g. "table_editor{data}[1][5]"
if ($var =~ /^([^\[\]\{\}]+)([\[\]\{\}].*)/) {
$self->wset($1, $2, $value);
}
else {
- # check to see if the value should be multi-valued
- $multiple = $self->wget($var, "multiple");
- if ($multiple && ref($value) eq "") {
- $value = [ $value ];
- }
-
if ($var eq "wname") {
;
}
@@ -422,9 +406,10 @@
elsif ($wname) {
$self->wset($wname, $var, $value);
}
- # Simple vars: e.g. "width" (gets dumped in the "global"
widget)
+ # Simple vars: e.g. "width" (gets dumped in the
"session" widget)
else {
- $self->wset("global", $var, $value);
+ $self->wset("session", $var, $value);
+ }
}
}
}