Commit 380fb732d73558feb040f4b3d9a2c107292b20c7
1 parent
a5503889
KTS-1671
"Validation breaks: Unable to move file into folder after copied file has been deleted." Fixed. Reviewed By: Kevin Fourie git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@6302 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
2 additions
and
2 deletions
lib/documentmanagement/Document.inc
| ... | ... | @@ -296,7 +296,7 @@ class Document { |
| 296 | 296 | $sQuery = "SELECT D.id AS id FROM $sD AS D |
| 297 | 297 | LEFT JOIN $sDM AS DM ON D.metadata_version_id = DM.id |
| 298 | 298 | LEFT JOIN $sDC AS DC ON DM.content_version_id = DC.id |
| 299 | - WHERE DC.filename = ? AND D.folder_id = ?"; | |
| 299 | + WHERE DC.filename = ? AND D.folder_id = ? AND D.status_id=1"; | |
| 300 | 300 | $aParams = array($sFileName, $iFolderID); |
| 301 | 301 | $id = DBUtil::getOneResultKey(array($sQuery, $aParams), 'id'); |
| 302 | 302 | if (empty($id)) { |
| ... | ... | @@ -336,7 +336,7 @@ class Document { |
| 336 | 336 | $sQuery = "SELECT D.id AS id FROM $sD AS D |
| 337 | 337 | LEFT JOIN $sDM AS DM ON D.metadata_version_id = DM.id |
| 338 | 338 | LEFT JOIN $sDC AS DC ON DM.content_version_id = DC.id |
| 339 | - WHERE DM.name = ? AND D.folder_id = ?"; | |
| 339 | + WHERE DM.name = ? AND D.folder_id = ? AND D.status_id=1"; | |
| 340 | 340 | $aParams = array($sName, $iFolderID); |
| 341 | 341 | $id = DBUtil::getOneResultKey(array($sQuery, $aParams), 'id'); |
| 342 | 342 | if (empty($id)) { | ... | ... |