Index: TWiki/Plugins.pm =================================================================== RCS file: C:/desarrollo/cvsnt/root/twiki/alpha/lib/TWiki/Plugins.pm,v retrieving revision 1.1 diff -u -r1.1 Plugins.pm --- TWiki/Plugins.pm 2 Mar 2004 16:02:25 -0000 1.1 +++ TWiki/Plugins.pm 2 Mar 2004 19:02:27 -0000 @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details, published at # http://www.gnu.org/copyleft/gpl.html - +# 2004-01-13 RafaelAlvarez Added a new Plugin callback handler (afterSaveHandler) =begin twiki ---+ TWiki:: Module @@ -48,6 +48,9 @@ 'beforeEditHandler', # ( $text, $topic, $web ) 1.010 'afterEditHandler', # ( $text, $topic, $web ) 1.010 'beforeSaveHandler', # ( $text, $topic, $web ) 1.010 +### RafaelAlvarez 2004-01-13 + 'afterSaveHandler', # ( $text, $topic, $web, $errors ) 1.020 +### RafaelAlvarez 2004-01-13 'writeHeaderHandler', # ( $query ) 1.010 'redirectCgiQueryHandler', # ( $query, $url ) 1.010 'getSessionValueHandler', # ( $key ) 1.010 @@ -549,6 +552,15 @@ &applyHandlers; } +### RafaelAlvarez 2004-01-13 +sub afterSaveHandler +{ +# Called by TWiki::Store::saveTopic after the save action +# my ( $theText, $theTopic, $theWeb ) = @_; + unshift @_, ( 'afterSaveHandler' ); + &applyHandlers; +} +### RafaelAlvarez 2004-01-13 # ========================= =pod Index: TWiki/Store.pm =================================================================== RCS file: C:/desarrollo/cvsnt/root/twiki/alpha/lib/TWiki/Store.pm,v retrieving revision 1.1 diff -u -r1.1 Store.pm --- TWiki/Store.pm 2 Mar 2004 16:02:25 -0000 1.1 +++ TWiki/Store.pm 2 Mar 2004 17:23:44 -0000 @@ -25,7 +25,7 @@ # 20000917 - NicholasLee : Split file/storage related functions from wiki.pm # 200105 - JohnTalintyre : AttachmentsUnderRevisionControl & meta data in topics # 200106 - JohnTalintyre : Added Form capability (replaces Category tables) - +# 200401 - RafaelAlvarez : Added a new Plugin callback (afterSaveHandler) =begin twiki ---+ TWiki::Store Module @@ -723,6 +723,9 @@ $text = $meta->read( $text ); # restore meta data my$error = saveNew( $web, $topic, $text, $meta, $saveCmd, $attachment, $dontLogSave, $doUnlock, $dontNotify, $comment, $forceDate ); + ### 2004-01-13 RafaelAlvarez + TWiki::Plugins::afterSaveHandler( $text, $topic, $web ); + ### 2004-01-13 RafaelAlvarez return $error; }