Changeset 2096

Show
Ignore:
Timestamp:
04/25/08 03:42:58 (19 months ago)
Author:
fumiakiy
Message:

Redirect to dashboard if the specified type is not appropriate for system level template edit. BugId:68410

Files:
1 modified

Legend:

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

    r2064 r2096  
    1515    my $q = $app->param; 
    1616    my $blog_id = $q->param('blog_id'); 
     17 
     18    # FIXME: enumeration of types 
     19    unless ( $blog_id ) { 
     20        my $type = $q->param('type'); 
     21        return $app->return_to_dashboard( redirect => 1 ) 
     22            unless $type eq 'module' 
     23                || $type eq 'widget' 
     24                || $type eq 'widgetset'; 
     25    } 
     26 
    1727    my $type = $q->param('_type'); 
    1828    my $blog = $app->blog;