Changeset 1849

Show
Ignore:
Timestamp:
04/11/08 00:41:33 (5 months ago)
Author:
mpaschal
Message:

Column defs in MT::Objects are hashes, not just strings, so check for blob type fields appropriately
Use MT::Object's hash-column-def-aware columns_of_type() method
BugzID: 68749

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/feature-narrow-tables/lib/MT/Meta/Proxy.pm

    r1836 r1849  
    177177            or Carp::croak("Metadata $field on $pkg not found."); 
    178178        my $type = $meta->{type}; 
    179         my $meta_is_blob = ($meta_obj->properties->{column_defs}->{$type}||'') eq 'blob'; 
     179 
     180        my $meta_col_def = $meta_obj->column_def($type); 
     181        my $meta_is_blob = $meta_col_def ? $meta_col_def->{type} eq 'blob' : 0; 
    180182 
    181183        ## xxx can be a hook? 
  • branches/feature-narrow-tables/lib/MT/Object.pm

    r1844 r1849  
    11551155*__parse_def = \&MT::Object::__parse_def; 
    11561156*count = \&MT::Object::count; 
     1157*columns_of_type = \&MT::Object::columns_of_type; 
    11571158 
    11581159# TODO: copy this too