/[wopi2]/trunk/lib/WOPI.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/WOPI.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6 by dpavlin, Fri Jun 25 20:51:16 2004 UTC revision 7 by dpavlin, Tue Jul 6 22:21:35 2004 UTC
# Line 40  sub new { Line 40  sub new {
40  sub last_order {  sub last_order {
41          my $self = shift;          my $self = shift;
42    
43            return 0 if (! defined $self->{'poll'}->{'questions'});
44    
45          return scalar @{$self->{'poll'}->{'questions'}} || 0;          return scalar @{$self->{'poll'}->{'questions'}} || 0;
46  }  }
47    
# Line 154  sub save_question { Line 156  sub save_question {
156  #       print "v = ",Dumper(\%v);  #       print "v = ",Dumper(\%v);
157    
158          my $o = $self->{'cgi'}->param('order');          my $o = $self->{'cgi'}->param('order');
159          die "no order?" if (! defined($o));          confess "no order?" if (! defined($o));
160            confess "order not number? [$o]" if ($o !~ /^\d+$/);
161    
162          if (! $self->{'cgi'}->param('save')) {          if (! $self->{'cgi'}->param('save')) {
163                  $self->status("No save button, won't save question $o");                  $self->status("No save button, won't save question $o");
# Line 175  sub save_question { Line 178  sub save_question {
178    
179          $self->{'poll'}->{'questions'}->[$o] = $question;          $self->{'poll'}->{'questions'}->[$o] = $question;
180    
181            confess "question $0 not saved" if (! $self->{'poll'}->{'questions'}->[$o]);
182    
183          $self->editor();          $self->editor();
184  }  }
185    

Legend:
Removed from v.6  
changed lines
  Added in v.7

  ViewVC Help
Powered by ViewVC 1.1.26