/[Frey]/trunk/lib/App/RoomReservation/Messages.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/App/RoomReservation/Messages.pm

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

revision 1154 by dpavlin, Wed Jul 1 22:39:34 2009 UTC revision 1155 by dpavlin, Thu Jul 2 10:12:54 2009 UTC
# Line 14  sub seat_confirmation_message { Line 14  sub seat_confirmation_message {
14                          _seat_number,                          _seat_number,
15                          email,                          email,
16                          md5(id||email) as token,                          md5(id||email) as token,
17                          _confirmed                          _confirmed,
18                            _canceled
19                  from reservation                  from reservation
20                  where                  where
21                          $col = ?                          $col = ?
# Line 24  sub seat_confirmation_message { Line 25  sub seat_confirmation_message {
25    
26          die "can't find user $col = $value" if $sth->rows == 0;          die "can't find user $col = $value" if $sth->rows == 0;
27    
28          my ( $name, $seat, $email, $token, $confirmed ) = $sth->fetchrow_array;          my ( $name, $seat, $email, $token, $confirmed, $canceled ) = $sth->fetchrow_array;
29    
30          if ( $confirmed ) {          if ( $confirmed && $canceled ) {
31    
32                    my $html =
33                    qq|
34                            $name, <em>you have canceled your reservation allready</em>
35                            <br>
36                            If you did that by mistake, and you want to attend this lecture, please
37                            contact us via e-mail.
38                    |;
39    
40                    $self->send( $email,
41                            "Lecture confirmation canceled",
42                            $html
43                    );
44    
45                    return $html;
46    
47            } elsif ( $confirmed ) {
48    
49                  my $url = $self->url_for( 'Confirmation/cancel_as_markup?token=' . $token );                  my $url = $self->url_for( 'Confirmation/cancel_as_markup?token=' . $token );
50    
# Line 46  sub seat_confirmation_message { Line 64  sub seat_confirmation_message {
64                  ;                  ;
65    
66                  $self->send( $email,                  $self->send( $email,
67                          "Lecture confirmation" . $seat ? " [seat $seat]" : " [wating for vacancy]",                          "Lecture confirmation" . ( $seat ? " [seat $seat]" : " [wating for vacancy]" ),
68                          $html . <<__EMAIL__                          $html . <<__EMAIL__
69    
70  If you wish to cancel your reservation please click on link below:  If you wish to cancel your reservation please click on link below:

Legend:
Removed from v.1154  
changed lines
  Added in v.1155

  ViewVC Help
Powered by ViewVC 1.1.26