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); }