/[SQLSession]/trunk/lib/SQLSession/Action/DoSQL.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/SQLSession/Action/DoSQL.pm

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

revision 7 by dpavlin, Sat Dec 2 22:30:43 2006 UTC revision 8 by dpavlin, Sat Dec 2 22:54:15 2006 UTC
# Line 49  Can't be empty! Line 49  Can't be empty!
49    
50  =cut  =cut
51    
52  sub valdate_sql_query {  sub validate_sql_query {
53          my $self = shift;          my $self = shift;
54          my $value = shift || return $self->validation_error( sql_query => 'You need to type in SQL query' );          my $value = shift;
55          return $self->validation_ok('sql_query');  
56            if ( $value =~ m/^\s+;*\s*$/s ) {
57                    return $self->validation_error( sql_query => 'You need to type in SQL query' );
58            } else {
59                    return $self->validation_ok('sql_query');
60            }
61  }  }
62    
63  =head2 take_action  =head2 take_action

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

  ViewVC Help
Powered by ViewVC 1.1.26