Changeset 1391
- Timestamp:
- 02/21/08 19:47:17 (6 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/release-30/lib/MT/Template/ContextHandlers.pm
r1379 r1391 2315 2315 } elsif (my $app_file = $arg->{name}) { 2316 2316 # app template include mode 2317 my $mt = MT->instance; 2318 local $mt->{component} = $arg->{component} if exists $arg->{component}; 2317 2319 my $stash_id = 'template_file::' . $app_file; 2318 2320 return $ctx->error(MT->translate("Recursion attempt on file: [_1]", $app_file)) 2319 2321 if $include_stack{$stash_id}; 2320 2322 local $include_stack{$stash_id} = 1; 2321 my $tmpl = MT->instance->load_tmpl($app_file);2323 my $tmpl = $mt->load_tmpl($app_file); 2322 2324 if ($tmpl) { 2323 2325 $tmpl->name($app_file); … … 2329 2331 $tmpl_file = '.' . $tmpl_file; 2330 2332 } 2331 my $mt = MT->instance;2332 2333 $mt->run_callbacks('template_param' . $tmpl_file, $mt, $tmpl->param, $tmpl); 2333 2334
