Changeset 1367

Show
Ignore:
Timestamp:
02/14/08 19:05:26 (7 months ago)
Author:
mpaschal
Message:

Let image_* properties work on any asset that has them, but still return 0 if they don't
BugzID: 68227

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/release-29/lib/MT/Template/ContextHandlers.pm

    r1333 r1367  
    78067806            $ret = $size; 
    78077807        } 
    7808     } elsif (($prop =~ m/^image_/) && $class !~ m/Image/) { 
     7808    } elsif ($prop =~ m/^image_/ && $class->can($prop)) { 
     7809        # These are numbers, so default to 0. 
     7810        $ret = $a->$prop || 0; 
     7811    } elsif ($prop =~ m/^image_/) { 
    78097812        $ret = 0; 
    78107813    } else {