[MTOS-dev] $blog->touch() & save() should not be performed redundantly
Hirotaka Ogawa
hirotaka.ogawa at gmail.com
Sun Mar 23 23:22:27 PDT 2008
Around line 370 of MT::App::Trackback, we'll see:
$blog->touch;
$blog->save;
...
This two lines are not always required. Because,
MT::App::_cb_mark_blog() is called after the preceding $ping->save(),
and this callback function sets the flag in order to do touch() and
save() if necessary when MT::App::takedown() is called.
Also, at line 283 of MT::CMS::Common.pm, we'll see:
$obj->touch() if ( $type eq 'blog' );
In this case, _cb_mark_blog() is called after the following $obj->save().
In both cases, $blog->touch(), which is probably for properly
invalidating smarty cache for dynamic publishing, should not be
performed redundantly, I think.
--
Hirotaka Ogawa makes no sense.
http://as-is.net/blog/
More information about the MTOS-dev
mailing list