Changeset 2789

Show
Ignore:
Timestamp:
07/16/08 05:05:53 (3 months ago)
Author:
arvind
Message:

Foundation of MT::Revisable with creation of MT::Object::Revision subclasses

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/feature-revision-histories/lib/MT/Entry.pm

    r2785 r2789  
    1010 
    1111use MT::Tag; # Holds MT::Taggable 
    12 use base qw( MT::Object MT::Taggable MT::Scorable ); 
     12use base qw( MT::Object MT::Taggable MT::Scorable MT::Revisable ); 
    1313 
    1414use MT::Blog; 
  • branches/feature-revision-histories/lib/MT/Object.pm

    r2785 r2789  
    235235        $class->install_meta({ ( %meta ? ( column_defs => \%meta ) : ( columns => [] ) ) }); 
    236236        $class->add_trigger( post_remove => \&remove_meta ); 
     237    } 
     238     
     239    # Because of the inheritance of MT::Entry by MT::Page, we need to do this here 
     240    if($class->isa('MT::Revisable')) { 
     241        $class->install_revisioning(); 
    237242    } 
    238243 
  • branches/feature-revision-histories/lib/MT/Upgrade.pm

    r2732 r2789  
    17421742 
    17431743    my $class = MT->model($type); 
    1744  
     1744     
    17451745    # handle schema updates for meta table 
    17461746    if ($class->meta_pkg) { 
    17471747        $self->check_type($type . ':meta'); 
     1748    } 
     1749     
     1750    # handle schema updates for revision table 
     1751    if ($class->isa('MT::Revisable')) { 
     1752        $self->check_type($type . ':revision'); 
    17481753    } 
    17491754