X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Flib%2FRT%2FObjectClass.pm;h=ba96c594a9baff05718773641e735082078e6318;hp=e1c66da0ffcf82735af72ad7e8f878cf9622b8a1;hb=9aee669886202be7035e6c6049fc71bc99dd3013;hpb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7 diff --git a/rt/lib/RT/ObjectClass.pm b/rt/lib/RT/ObjectClass.pm index e1c66da0f..ba96c594a 100644 --- a/rt/lib/RT/ObjectClass.pm +++ b/rt/lib/RT/ObjectClass.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -114,10 +114,10 @@ Returns the Class Object which has the id returned by Class =cut sub ClassObj { - my $self = shift; - my $Class = RT::Class->new($self->CurrentUser); - $Class->Load($self->Class()); - return($Class); + my $self = shift; + my $Class = RT::Class->new($self->CurrentUser); + $Class->Load($self->Class()); + return($Class); } =head2 ObjectType @@ -197,25 +197,38 @@ sub _CoreAccessible { { id => - {read => 1, type => 'int(11)', default => ''}, + {read => 1, type => 'int(11)', default => ''}, Class => - {read => 1, write => 1, type => 'int(11)', default => '0'}, + {read => 1, write => 1, type => 'int(11)', default => '0'}, ObjectType => - {read => 1, write => 1, type => 'varchar(255)', default => ''}, + {read => 1, write => 1, type => 'varchar(255)', default => ''}, ObjectId => - {read => 1, write => 1, type => 'int(11)', default => '0'}, + {read => 1, write => 1, type => 'int(11)', default => '0'}, Creator => - {read => 1, auto => 1, type => 'int(11)', default => '0'}, + {read => 1, auto => 1, type => 'int(11)', default => '0'}, Created => - {read => 1, auto => 1, type => 'datetime', default => ''}, + {read => 1, auto => 1, type => 'datetime', default => ''}, LastUpdatedBy => - {read => 1, auto => 1, type => 'int(11)', default => '0'}, + {read => 1, auto => 1, type => 'int(11)', default => '0'}, LastUpdated => - {read => 1, auto => 1, type => 'datetime', default => ''}, + {read => 1, auto => 1, type => 'datetime', default => ''}, } }; +sub FindDependencies { + my $self = shift; + my ($walker, $deps) = @_; + + $self->SUPER::FindDependencies($walker, $deps); + + $deps->Add( out => $self->ClassObj ); + + my $obj = $self->ObjectType->new( $self->CurrentUser ); + $obj->Load( $self->ObjectId ); + $deps->Add( out => $obj ); +} + RT::Base->_ImportOverlays();