*** lib/TWiki/Plugins.pm.orig Fri Aug 30 14:34:17 2002 --- lib/TWiki/Plugins.pm Fri Aug 30 15:05:09 2002 *************** *** 314,319 **** --- 314,328 ---- } # ========================= + sub beforeSaveHandler + { + # Called by TWiki::Store::saveTopic before the save action + # my ( $theText, $theTopic, $theWeb ) = @_; + unshift @_, ( 'beforeSaveHandler' ); + &applyHandlers; + } + + # ========================= sub writeHeaderHandler { # Called by TWiki.writeHeader *** lib/TWiki/Store.pm.orig Fri Aug 30 14:34:56 2002 --- lib/TWiki/Store.pm Fri Aug 30 15:06:33 2002 *************** *** 738,743 **** --- 738,745 ---- my( $web, $topic, $text, $meta, $saveCmd, $doUnlock, $dontNotify, $dontLogSave, $forceDate ) = @_; my $attachment = ""; my $comment = ""; + TWiki::Func::writeDebug( "Calling save handler: $web.$topic"); + &TWiki::Plugins::beforeSaveHandler( $text, $topic, $web, $meta ); # $meta is undocumented saveNew( $web, $topic, $text, $meta, $saveCmd, $attachment, $dontLogSave, $doUnlock, $dontNotify, $comment, $forceDate ); }