Changeset 1913

Show
Ignore:
Timestamp:
04/15/08 08:32:02 (22 months ago)
Author:
takayama
Message:

Fixed BugId:79313
* Changed to show included module's error

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-35/lib/MT/CMS/Template.pm

    r1891 r1913  
    147147                        } 
    148148                    ); 
     149                    # Try to compile template module if using MTInclude in this template. 
     150                    $other->compile; 
     151                    if ( $other->{errors} && @{ $other->{errors} } ) { 
     152                        $param->{error} = $app->translate( 
     153                            "One or more errors were found in included template module (".$other->name.")."); 
     154                        $param->{error} .= "<ul>\n"; 
     155                        foreach my $err ( @{ $other->{errors} } ) { 
     156                            $param->{error} .= "<li>" 
     157                              . MT::Util::encode_html( $err->{message} ) 
     158                              . "</li>\n"; 
     159                        } 
     160                        $param->{error} .= "</ul>\n"; 
     161                    } 
    149162                } 
    150163                else {