[MTOS-dev] [movabletype] takayama, r2268: Fixed BugId:79630

Hirotaka Ogawa hirotaka.ogawa at gmail.com
Wed May 7 21:14:57 PDT 2008


On Thu, May 8, 2008 at 7:18 AM,  <commits at code.sixapart.com> wrote:
> Fixed BugId:79630
>  * Changed to use localized context object
>
>
>  U   branches/release-38/lib/MT/WeblogPublisher.pm
>
>
>  Modified: branches/release-38/lib/MT/WeblogPublisher.pm
>  ===================================================================
>  --- branches/release-38/lib/MT/WeblogPublisher.pm       2008-05-07 20:16:43 UTC (rev 2267)
>  +++ branches/release-38/lib/MT/WeblogPublisher.pm       2008-05-07 22:18:51 UTC (rev 2268)
>  @@ -817,15 +817,14 @@
>
>   sub rebuild_file {
>      my $mt = shift;
>  -    my ( $blog, $root_path, $map, $at, $ctx, $cond, $build_static, %args )
>  +    my ( $blog, $root_path, $map, $at, $ctx_, $cond, $build_static, %args )
>        = @_;
>  +    my $ctx = bless { %$ctx_ }, ref $ctx_;
>
>      my $finfo;
>      my $archiver = $mt->archiver($at);
>      my ( $entry, $start, $end, $category, $author );
>
>  -    local $ctx->{__stash}{vars} = ();
>  -
>      if ( $finfo = $args{FileInfo} ) {
>          $args{Author}   = $finfo->author_id   if $finfo->author_id;
>          $args{Category} = $finfo->category_id if $finfo->category_id;
>
>
>  _______________________________________________
>  MTOS-commits mailing list
>  MTOS-commits at sixapart.com
>  http://www.sixapart.com/mailman/listinfo/mtos-commits
>

nasty.

I think this problem can be resolved more straightforwardly as like:
http://pastie.org/193447

Or, you should define MT::Template::Context->clone() properly and make
a clone in the *caller* side.

-- 
Hirotaka Ogawa
http://twitter.com/ogawa
http://as-is.net/blog/


More information about the MTOS-dev mailing list