NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use
trunk.foswiki.org to view this page for some minimal testing.
Use
Item9693 for docu changes for 1.2 and 2.0.
Item11017: Redundant afterSaveHandler called before renaming
| Priority: |
CurrentState: |
AppliesTo: |
Component: |
WaitingFor: |
| Normal |
Closed |
Engine |
|
|
I noticed when moving a topic to Trash. FW is not creating a topic in Trash first, it first calls
afterSaveHandler with the current web as
web parameter.
This makes it difficult to keep a separate database in sync because there is no way to tell from the called
afterSaveHandler what kind of save this was.
--
ArthurClemens - 02 Aug 2011
This happens because of this save call in line 2167:
$from->save(); # to save the metadata change
$from->{_session}->{store}->moveTopic( $from, $to, $cUID );
This call is used to store
TOPICMOVED info. But do we really want to call
beforeSaveHandler and
afterSaveHandler with that (old) topic change?
Proposed new way:
# save the metadata change without logging
$this->saveAs(
$this->{_web}, $this->{_topic},
dontlog => 1, # no statistics
);
--
ArthurClemens - 04 Aug 2011