Ignore:
Timestamp:
12/18/15 07:25:11 (8 years ago)
Author:
nanardon
Message:
  • Add expiration list to expiration page and Employment things
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Objects.pm

    r1453 r1500  
    320320=cut 
    321321 
     322=head2 checkValues ($base, $obj, %attributes) 
     323 
     324Allow to pre-check values when object are modified or created 
     325 
     326C<$obj> is either the new id at object creation or the object itself on modification. 
     327 
     328=cut 
     329 
     330sub checkValues { 
     331    my ($class, $base, $obj, %attributes) = @_; 
     332 
     333    return 1; 
     334} 
     335 
    322336=head2 check_allowed_values ($attr, $values) 
    323337 
     
    369383        }; 
    370384    } 
     385 
    371386    $self->_set_c_fields(%cdata); 
    372387} 
     
    399414            return; 
    400415        }; 
     416    } 
     417 
     418    if (!$self->checkValues($self->base, $self, %cdata)) { 
     419        $self->base->log(LA_ERR, 
     420            "Cannot update %s (%s): wrong values", 
     421            $self->id, $self->type 
     422        ); 
     423        return; 
    401424    } 
    402425 
Note: See TracChangeset for help on using the changeset viewer.