/[A3C]/lib/A3C/Model/hrEduOrg.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 /lib/A3C/Model/hrEduOrg.pm

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

revision 128 by dpavlin, Mon May 26 17:51:43 2008 UTC revision 208 by dpavlin, Thu Jun 19 21:24:26 2008 UTC
# Line 5  use warnings; Line 5  use warnings;
5  use Jifty::DBI::Schema;  use Jifty::DBI::Schema;
6  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
7    
 sub create {  
         warn "# create",dump(@_);  
         my $self = shift;  
         my %data = @_ or die "no data?";  
         foreach my $col ( keys %data ) {  
                 warn "## ref($col)=",ref($col);  
                 $data{$col} = join(' <*> ', @{$data{$col}}) if ref( $data{$col} ) eq 'ARRAY';  
         }  
         warn "## data = ",dump( %data );  
         $self->SUPER::create( %data );  
 }  
   
8  use A3C::Record schema {  use A3C::Record schema {
9    
10          # hrEduOrg super: organization          # hrEduOrg super: organization
# Line 209  sub name { Line 197  sub name {
197          return $self->cn . ' - ' . $self->o;          return $self->cn . ' - ' . $self->o;
198  }  }
199    
200    =head2 validate_uidNumber
201    
202    =cut
203    
204    sub validate_uidNumber {
205            my ( $self, $value ) = @_;
206            return ( 0, _('uidNumber must be only digits') ) unless $value =~ m/^\d+$/;
207            return ( 1, 'OK' );
208    }
209    
210    =head2 validate_gidNumber
211    
212    =cut
213    
214    sub validate_gidNumber {
215            my ( $self, $value ) = @_;
216            return ( 0, _('gidNumber must be only digits') ) unless $value =~ m/^\d+$/;
217            return ( 1, 'OK' );
218    }
219    
220  =head2 ACL  =head2 ACL
221    

Legend:
Removed from v.128  
changed lines
  Added in v.208

  ViewVC Help
Powered by ViewVC 1.1.26