Commit 133deda9a24a8aa718cbbfc4c73415ba0f77f924
1 parent
c03bb5a1
ensure that the folder-change on restore is updated in the DB, so it cascades to oVersion objected.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5111 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
2 additions
and
2 deletions
plugins/ktcore/admin/deletedDocuments.php
| ... | ... | @@ -120,7 +120,7 @@ class DeletedDocumentsDispatcher extends KTAdminDispatcher { |
| 120 | 120 | foreach ($aDocuments as $oDoc) { |
| 121 | 121 | // first evaluate the folder for inconsistencies. |
| 122 | 122 | $oFolder = Folder::get($oDoc->getFolderID()); |
| 123 | - if (PEAR::isError($oFolder)) { $oDoc->setFolderId(1); } | |
| 123 | + if (PEAR::isError($oFolder)) { $oDoc->setFolderId(1); $oDoc->update(); } | |
| 124 | 124 | |
| 125 | 125 | if (!$oStorage->expunge($oDoc)) { $aErrorDocuments[] = $oDoc->getDisplayPath(); } |
| 126 | 126 | else { |
| ... | ... | @@ -196,7 +196,7 @@ class DeletedDocumentsDispatcher extends KTAdminDispatcher { |
| 196 | 196 | |
| 197 | 197 | foreach ($aDocuments as $oDoc) { |
| 198 | 198 | $oFolder = Folder::get($oDoc->getFolderID()); |
| 199 | - if (PEAR::isError($oFolder)) { $oDoc->setFolderId(1); } // move to root if parent no longer exists. | |
| 199 | + if (PEAR::isError($oFolder)) { $oDoc->setFolderId(1); $oDoc->update(); } // move to root if parent no longer exists. | |
| 200 | 200 | if ($oStorage->restore($oDoc)) { |
| 201 | 201 | $oDoc->setStatusId(LIVE); |
| 202 | 202 | $res = $oDoc->update(); | ... | ... |