Changeset 1049

Show
Ignore:
Timestamp:
01/21/07 08:57:29 (2 years ago)
Author:
fumiakiy
Message:

Removed MT::FileInfo::parent_names and added it to MT::BackupRestore. This has been overlooked in the fix checked inin r910.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/wheeljack/lib/MT/BackupRestore.pm

    r1031 r1049  
    10401040} 
    10411041 
     1042package MT::FileInfo; 
     1043 
     1044sub parent_names { 
     1045    my $obj = shift; 
     1046    my $parents = { 
     1047        blog => 'MT::Blog', 
     1048        template => 'MT::Template', 
     1049        templatemap => 'MT::TemplateMap', 
     1050        category => 'MT::Category', 
     1051        entry => 'MT::Entry', 
     1052    }; 
     1053    $parents; 
     1054} 
     1055 
    104210561; 
    10431057__END__ 
  • branches/wheeljack/lib/MT/FileInfo.pm

    r1040 r1049  
    6262} 
    6363 
    64 sub parent_names { 
    65     my $obj = shift; 
    66     my $parents = { 
    67         blog => 'MT::Blog', 
    68         template => 'MT::Template', 
    69         templatemap => 'MT::TemplateMap', 
    70         category => 'MT::Category', 
    71         entry => 'MT::Entry', 
    72     }; 
    73     $parents; 
    74 } 
    75  
    76641; 
    7765 
     
    120108TemplateMap should be given. 
    121109 
    122 =item parent_names() 
    123  
    124 Returns a hash of package names relating the data model to parent 
    125 objects. 
    126  
    127110=back 
    128111 
  • branches/wheeljack/lib/MT/Object.pm

    r1031 r1049  
    11551155=item * $obj->parent_names() 
    11561156 
    1157 TODO - Should be overridden by subclasses to return correct hash 
    1158 whose keys are xml element names of the object's parent objects 
    1159 and values are class names of them. 
     1157TODO - Should be overridden by subclasses and returns a hash 
     1158reference whose keys are xml element names of the object's parent  
     1159objects and values are package names of each of them. 
     1160 
     1161   { 'blog' => 'MT::Blog' } 
     1162 
     1163Here, parent-child relationship is determined based on the data 
     1164model, not based on "base class" and "derived class" in the paradigm of 
     1165the object oriented programming. 
     1166 
    11601167This method is defined in MT/BackupRestore.pm - you must first  
    11611168use MT::BackupRestore to use this method.