Changeset 1911 for trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql.pm
- Timestamp:
- 01/04/17 12:16:26 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql.pm
r1910 r1911 98 98 $self->log(LA_DEBUG, 'New connection to DB'); 99 99 100 100 101 foreach my $otype ($self->list_supported_objects) { 102 my %attrlist = map { $_ => 1 } $self->list_registered_attributes($otype); 101 103 foreach my $attribute ($self->list_canonical_fields($otype, 'r')) { 102 104 my $attr = $self->attribute($otype, $attribute); … … 104 106 $attr->{managed} and next; 105 107 106 if ($ self->is_registered_attribute($otype, $attribute)) {108 if ($attrlist{$attribute}) { 107 109 } else { 108 110 if($self->register_attribute($otype, $attribute, $attr->{comment})) { … … 778 780 } 779 781 782 =head2 list_registered_attributes ($otype) 783 784 List all regiestered attribute 785 786 =cut 787 788 sub list_registered_attributes { 789 my ($self, $otype) = @_; 790 my $pclass = $self->_load_obj_class($otype) or return; 791 if ($pclass->_has_extended_attributes) { 792 return $pclass->list_registered_attributes($self); 793 } else { 794 return (); 795 } 796 } 797 780 798 =head2 get_attribute_comment ($otype, $attribute) 781 799
Note: See TracChangeset
for help on using the changeset viewer.