Commit 8440ff6f3f7ff27bad26fa54721cfa53661dcb9d
Merge branch 'master' of git@github.com:ktgit/knowledgetree
Showing
1 changed file
with
15 additions
and
2 deletions
plugins/ktcore/admin/deletedDocuments.php
| @@ -171,13 +171,26 @@ var $sHelpPage = 'ktcore/admin/deleted documents.html'; | @@ -171,13 +171,26 @@ var $sHelpPage = 'ktcore/admin/deleted documents.html'; | ||
| 171 | $oDocumentTransaction->create(); | 171 | $oDocumentTransaction->create(); |
| 172 | 172 | ||
| 173 | // delete this from the db now | 173 | // delete this from the db now |
| 174 | - if (!$oDoc->delete()) { $aErrorDocuments[] = $oDoc->getId(); } | ||
| 175 | - else { | 174 | + if (!$oDoc->delete()) { |
| 175 | + $aErrorDocuments[] = $oDoc->getId(); | ||
| 176 | + } else { | ||
| 176 | // removed succesfully | 177 | // removed succesfully |
| 177 | $aSuccessDocuments[] = $oDoc->getDisplayPath(); | 178 | $aSuccessDocuments[] = $oDoc->getDisplayPath(); |
| 178 | 179 | ||
| 179 | // remove any document data | 180 | // remove any document data |
| 180 | $oDoc->cleanupDocumentData($oDoc->getId()); // silly - why the redundancy? | 181 | $oDoc->cleanupDocumentData($oDoc->getId()); // silly - why the redundancy? |
| 182 | + | ||
| 183 | + $oKTTriggerRegistry = KTTriggerRegistry::getSingleton(); | ||
| 184 | + $aTriggers = $oKTTriggerRegistry->getTriggers('expunge', 'finalised'); | ||
| 185 | + foreach ($aTriggers as $aTrigger) { | ||
| 186 | + $sTrigger = $aTrigger[0]; | ||
| 187 | + $oTrigger = new $sTrigger; | ||
| 188 | + $aInfo = array( | ||
| 189 | + 'document' => $oDoc, | ||
| 190 | + ); | ||
| 191 | + $oTrigger->setInfo($aInfo); | ||
| 192 | + $ret = $oTrigger->finalised(); | ||
| 193 | + } | ||
| 181 | } | 194 | } |
| 182 | } | 195 | } |
| 183 | } | 196 | } |