Changeset 103
- Timestamp:
- 05/13/09 22:43:57 (15 years ago)
- Location:
- LATMOS-Accounts
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm
r96 r103 64 64 } 65 65 66 =head2 list_canonical s_fields($otype, $for)66 =head2 list_canonical_fields($otype, $for) 67 67 68 68 Return the list of supported fields by the database for object type $otype. … … 73 73 =cut 74 74 75 sub list_canonical s_fields {75 sub list_canonical_fields { 76 76 my ($self, $otype, $for) = @_; 77 77 $for ||= 'rw'; … … 287 287 my @fields = $options{attrs} 288 288 ? @{ $options{attrs} } 289 : $self->list_canonical s_fields($srcobj->type, 'w');289 : $self->list_canonical_fields($srcobj->type, 'w'); 290 290 my %data; 291 291 foreach (@fields) { -
LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Unix.pm
r90 r103 96 96 } 97 97 98 sub list_canonical s_fields {98 sub list_canonical_fields { 99 99 my ($self, $type, $for) = @_; 100 100 $for ||= 'rw'; -
LATMOS-Accounts/lib/LATMOS/Accounts/Synchro.pm
r83 r103 197 197 my %fields = (); 198 198 my %delayed = map { $_ => 1 } $to->delayed_fields($otype); 199 foreach ($from->list_canonical s_fields($otype, 'r')) {199 foreach ($from->list_canonical_fields($otype, 'r')) { 200 200 $delayed{$_} and next; 201 201 $fields{$_} ||= 0; # avoid 202 202 $fields{$_}++; 203 203 } 204 foreach ($to->list_canonical s_fields($otype, 'w')) {204 foreach ($to->list_canonical_fields($otype, 'w')) { 205 205 $delayed{$_} and next; 206 206 $fields{$_} ||= 0; # avoid … … 216 216 my %fields = (); 217 217 my %delayed = map { $_ => 1 } $to->delayed_fields($otype); 218 foreach ($from->list_canonical s_fields($otype, 'r')) {218 foreach ($from->list_canonical_fields($otype, 'r')) { 219 219 $delayed{$_} or next; 220 220 $fields{$_} ||= 0; # avoid 221 221 $fields{$_}++; 222 222 } 223 foreach ($to->list_canonical s_fields($otype, 'w')) {223 foreach ($to->list_canonical_fields($otype, 'w')) { 224 224 $delayed{$_} or next; 225 225 $fields{$_} ||= 0; # avoid -
LATMOS-Accounts/t/10_bases.t
r8 r103 17 17 18 18 ok(eq_set( 19 [ $dummyb->list_canonical s_fields('user') ],19 [ $dummyb->list_canonical_fields('user') ], 20 20 [qw(username homeDirectory) ], 21 21 ), "Can get canonicals fields");
Note: See TracChangeset
for help on using the changeset viewer.