From c4ec5ebd9cb1b67d80cf59edc0f1c8d1f0df33c3 Mon Sep 17 00:00:00 2001 From: kevin_fourie Date: Thu, 9 Oct 2008 14:07:04 +0000 Subject: [PATCH] Merged in... --- lib/documentmanagement/documentutil.inc.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+), 0 deletions(-) diff --git a/lib/documentmanagement/documentutil.inc.php b/lib/documentmanagement/documentutil.inc.php index 6b5a458..a02f51f 100644 --- a/lib/documentmanagement/documentutil.inc.php +++ b/lib/documentmanagement/documentutil.inc.php @@ -1249,6 +1249,21 @@ $sourceDocument->getName(), $oDocumentTransaction = new DocumentTransaction($oDocument, _kt('Document renamed'), 'ktcore.transactions.update'); $oDocumentTransaction->create(); + $oKTTriggerRegistry = KTTriggerRegistry::getSingleton(); + $aTriggers = $oKTTriggerRegistry->getTriggers('renameDocument', 'postValidate'); + foreach ($aTriggers as $aTrigger) { + $sTrigger = $aTrigger[0]; + $oTrigger = new $sTrigger; + $aInfo = array( + 'document' => $oDocument + ); + $oTrigger->setInfo($aInfo); + $ret = $oTrigger->postValidate(); + if (PEAR::isError($ret)) { + return $ret; + } + } + // fire subscription alerts for the checked in document $oSubscriptionEvent = new SubscriptionEvent(); $oFolder = Folder::get($oDocument->getFolderID()); -- libgit2 0.21.4