Commit 4079982f03342e3052f70db60b0423a758e39b81
1 parent
acd4504a
added to code to remove web document entries for deleted documents
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1662 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
6 additions
and
1 deletions
presentation/lookAndFeel/knowledgeTree/documentmanagement/deleteDocumentBL.php
| ... | ... | @@ -17,6 +17,7 @@ require_once("$default->fileSystemRoot/lib/documentmanagement/Document.inc"); |
| 17 | 17 | require_once("$default->fileSystemRoot/lib/documentmanagement/DocumentTransaction.inc"); |
| 18 | 18 | require_once("$default->fileSystemRoot/lib/subscriptions/SubscriptionEngine.inc"); |
| 19 | 19 | require_once("$default->fileSystemRoot/lib/subscriptions/SubscriptionManager.inc"); |
| 20 | +require_once("$default->fileSystemRoot/lib/web/WebDocument.inc"); | |
| 20 | 21 | |
| 21 | 22 | require_once("$default->fileSystemRoot/presentation/Html.inc"); |
| 22 | 23 | |
| ... | ... | @@ -62,7 +63,7 @@ if (checkSession()) { |
| 62 | 63 | "folderName" => Folder::getFolderDisplayPath($oDocument->getFolderID()))); |
| 63 | 64 | $default->log->info("deleteDocumentBL.php fired $count subscription alerts for removed document " . $oDocument->getName()); |
| 64 | 65 | |
| 65 | - // TODO: remove all document subscriptions for this document | |
| 66 | + // remove all document subscriptions for this document | |
| 66 | 67 | if (SubscriptionManager::removeSubscriptions($fDocumentID, SubscriptionConstants::subscriptionType("DocumentSubscription"))) { |
| 67 | 68 | $default->log->info("deleteDocumentBL.php removed all subscriptions for this document"); |
| 68 | 69 | } else { |
| ... | ... | @@ -75,6 +76,10 @@ if (checkSession()) { |
| 75 | 76 | //delete all fields associated with the document |
| 76 | 77 | Document::deleteDocumentFieldsLinks($fDocumentID); |
| 77 | 78 | |
| 79 | + // delete the corresponding web document entry | |
| 80 | + $oWebDocument = WebDocument::get(lookupID($default->owl_web_documents_table, "document_id", $fDocumentID)); | |
| 81 | + $oWebDocument->delete(); | |
| 82 | + | |
| 78 | 83 | // redirect to the browse folder page |
| 79 | 84 | redirect("$default->rootUrl/control.php?action=browse&fFolderID=" . $oDocument->getFolderID()); |
| 80 | 85 | } else { | ... | ... |