/[Frey]/branches/zimbardo/lib/App/RoomReservation/Confirmation.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 /branches/zimbardo/lib/App/RoomReservation/Confirmation.pm

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

revision 1173 by dpavlin, Sun Jul 5 21:40:54 2009 UTC revision 1186 by dpavlin, Mon Sep 21 21:29:38 2009 UTC
# Line 16  sub verify_as_markup { Line 16  sub verify_as_markup {
16    
17          my $dbh = $self->dbh;          my $dbh = $self->dbh;
18    
19            my $size = $self->room->seats;
20    
21          my $sth = $dbh->prepare(qq{          my $sth = $dbh->prepare(qq{
22                  update reservation                  update reservation
23                  set                  set
# Line 23  sub verify_as_markup { Line 25  sub verify_as_markup {
25                          _seat_number = (                          _seat_number = (
26                                  select                                  select
27                                          min(seat.nr)                                          min(seat.nr)
28                                  from (select generate_series(1,600) as nr) as seat                                  from (select generate_series(1,$size) as nr) as seat
29                                  full join reservation on reservation._seat_number = seat.nr                                  full join reservation on reservation._seat_number = seat.nr
30                                  where id is null                                  where id is null
31                                  group by seat.nr                                  group by seat.nr
# Line 32  sub verify_as_markup { Line 34  sub verify_as_markup {
34                          )                          )
35                  where                  where
36                          md5(id||email) = ?                          md5(id||email) = ?
                         and _confirmed is false  
37                          and _canceled is false                          and _canceled is false
38                            and (
39                                    _confirmed is false
40                                    or
41                                    ( _confirmed is true and _seat_number is null )
42                            )
43          });          });
44    
45          my $token = $self->token;          my $token = $self->token;

Legend:
Removed from v.1173  
changed lines
  Added in v.1186

  ViewVC Help
Powered by ViewVC 1.1.26