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

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

revision 1118 by dpavlin, Tue Jun 30 09:42:37 2009 UTC revision 1133 by dpavlin, Tue Jun 30 15:10:55 2009 UTC
# Line 81  has _confirmed => ( Line 81  has _confirmed => (
81          default => sub { 0 },          default => sub { 0 },
82  );  );
83    
84    has _seat_number => (
85            is => 'rw',
86            isa => 'Int',
87    );
88    
89  sub BUILD {  sub BUILD {
90          my $self = shift;          my $self = shift;
91          die "e-mail not verified\n" unless $self->email eq $self->email_verify;          die "e-mail not verified\n" unless $self->email eq $self->email_verify;
92            my $sth = $self->dbh->prepare(qq{
93                    select count(*) from reservation where email = ?
94            });
95            $sth->execute( $self->email );
96            my ($registred) = $sth->fetchrow_array;
97            die "e-mail address ", $self->email, " allready registred\n" if $registred;
98  }  }
99    
100  my @cols = Frey::PPI->new( class => __PACKAGE__ )->attribute_order;  my @cols = Frey::PPI->new( class => __PACKAGE__ )->attribute_order;
# Line 133  sub create_as_markup { Line 144  sub create_as_markup {
144                          by clicking on link which should be in your e-mail INBOX shortly                          by clicking on link which should be in your e-mail INBOX shortly
145                          </div>                          </div>
146                  |                  |
147                  . qq|<a href="/App::RoomReservation::Reservation::Confirmation/verify_as_markup?token=|                  . qq|<a href="/App::RoomReservation::Confirmation/verify_as_markup?token=|
148                  . $self->token                  . $self->token
149                  . qq|">verify</a>|                  . qq|">verify</a>|
150                  . ' or '                  . ' or '
151                  . qq|<a href="/App::RoomReservation::Reservation::Confirmation/cancel_as_markup?token=|                  . qq|<a href="/App::RoomReservation::Confirmation/cancel_as_markup?token=|
152                  . $self->token                  . $self->token
153                  . qq|">cancel</a>|                  . qq|">cancel</a>|
154                  ;                  ;
155  }  }
156    
157    __PACKAGE__->meta->make_immutable;
158    no Moose;
159    no Moose::Util::TypeConstraints;
160    
161  1;  1;

Legend:
Removed from v.1118  
changed lines
  Added in v.1133

  ViewVC Help
Powered by ViewVC 1.1.26