From 08c0961a16754b84280ad6f5242be3572f9da09d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 30 Apr 2013 20:11:16 +0200 Subject: [PATCH] added hook before adding a document --- op/op.AddDocument.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/op/op.AddDocument.php b/op/op.AddDocument.php index fbe743974..f5599241f 100644 --- a/op/op.AddDocument.php +++ b/op/op.AddDocument.php @@ -216,6 +216,14 @@ for ($file_num=0;$file_numpreAddDocument(array('name'=>&$name, 'comment'=>&$comment)); + } + } + } + $res = $folder->addDocument($name, $comment, $expires, $user, $keywords, $cats, $userfiletmp, basename($userfilename), $fileType, $userfiletype, $sequence, @@ -226,8 +234,8 @@ for ($file_num=0;$file_num $folder->getName())),getMLText("error_occured")); } else { $document = $res[0]; - if(isset($GLOBALS['SEEDDMS_HOOKS']['postAddDocument'])) { - foreach($GLOBALS['SEEDDMS_HOOKS']['postAddDocument'] as $hookObj) { + if(isset($GLOBALS['SEEDDMS_HOOKS']['addDocument'])) { + foreach($GLOBALS['SEEDDMS_HOOKS']['addDocument'] as $hookObj) { if (method_exists($hookObj, 'postAddDocument')) { $hookObj->postAddDocument($document); }