Changeset 2887

Show
Ignore:
Timestamp:
08/01/08 23:29:45 (4 months ago)
Author:
bchoate
Message:

Improved handling of save/publish button when template maps are removed. Hide save/publish button when no template maps exist. BugId:80910

Files:

Legend:

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

    r2876 r2887  
    311311                $param->{static_maps} = $build_type == MT::PublishOption::DYNAMIC() ? 0 : 1; 
    312312                $param->{build_type_0} = 1 unless $build_type_0; 
     313            } else { 
     314                $param->{can_rebuild} = 0; 
    313315            } 
    314316        } 
     
    559561 
    560562    $param->{can_preview} = 1 
    561         if (!$param->{is_special}) && (!$obj || ($obj && ($obj->outfile || '') !~ m/\.(css|xml|rss|js)$/))
     563        if (!$param->{is_special}) && (!$obj || ($obj && ($obj->outfile || '') !~ m/\.(css|xml|rss|js)$/)) && (!exists $param->{can_preview})
    562564 
    563565    1; 
     
    21622164 
    21632165    $app->return_args( $return_args ); 
     2166    return $app->call_return unless %ats; 
     2167 
    21642168    $app->param( 'template_id', $tmpl_id ); 
    21652169    $app->param( 'single_template', 1 ); # forces fullscreen mode