Permalink
Browse files

whoo we worky

  • Loading branch information...
1 parent 095e9c1 commit c75bc3dff9f7b49c8f7437020592b3a7d2f04978 Devin Austin committed Apr 30, 2010
View
Binary file not shown.
@@ -559,8 +559,26 @@ __PACKAGE__->add_columns(
is_nullable => 1,
size => 255
},
-
-
+ "sessionid",
+ {
+ data_type => "varchar",
+ default_value => "undef",
+ is_nullable => 1,
+ size => 255
+ },
+ "timestamp",
+ {
+ data_type => "timestamp",
+ default_value => "undef",
+ is_nullable => 1,
+ },
+ "user_agent",
+ {
+ data_type => "varchar",
+ default_value => "undef",
+ is_nullabe => 1,
+ size => 255,
+ }
);
__PACKAGE__->set_primary_key("surveyid");
@@ -39,13 +39,19 @@ sub finish_survey : Chained("survey_base") PathPart("finish") Args(0) {
my $os_deploy = $answers->{'os_deployment'};
my $editors = $answers->{'perl_editors'};
my $secondary_editors = $answers->{'perl_editors_secondary'};
-
- push @multis, map +{ perl_versions => $_ }, @$perls;
- push @multis, map +{ os_dev => $_ }, @$os;
-
- push @multis, map +{ os_deployment => $_ }, @$os_deploy;
- push @multis, map +{ perl_editors => $_ }, @$editors;
- push @multis, map +{ perl_editors_secondary => $_ }, @$secondary_editors;
+ for ( qw/ industries perl_versions os_dev field os_deployment perl_editors perl_editors_secondary/ ) {
+ if ( ref $answers->{$_} eq 'ARRAY' ) {
+ my $keyname = $_;
+ push @multis, map +{ $keyname => $_ }, @{ $answers->{$_} };
+ } else {
+ push @multis, { $_ => $answers->{$_} };
+ }
+ }
+ #push @multis, map +{ perl_versions => $_ }, @$perls;
+ #push @multis, map +{ os_dev => $_ }, @$os;
+ #push @multis, map +{ os_deployment => $_ }, @$os_deploy;
+ #push @multis, map +{ perl_editors => $_ }, @$editors;
+ #push @multis, map +{ perl_editors_secondary => $_ }, @$secondary_editors;
delete $answers->{$_}
for qw/ industries perl_versions os_dev field os_deployment perl_editors perl_editors_secondary/;
push @multis, $answers;

0 comments on commit c75bc3d

Please sign in to comment.