Commit efdcc8fd39bc3b4600c4cf28976a1dfe4032b6cc
1 parent
74e50a60
Merge in test inversion fixes from PREKT3UI branch.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4037 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
2 deletions
presentation/lookAndFeel/knowledgeTree/documentmanagement/deleteDocumentBL.php
| @@ -92,6 +92,7 @@ if (!isset($fDeleteConfirmed)) { | @@ -92,6 +92,7 @@ if (!isset($fDeleteConfirmed)) { | ||
| 92 | $oPatternCustom->addHtml(getPage($fRememberDocumentID)); | 92 | $oPatternCustom->addHtml(getPage($fRememberDocumentID)); |
| 93 | $main->setCentralPayload($oPatternCustom); | 93 | $main->setCentralPayload($oPatternCustom); |
| 94 | $main->render(); | 94 | $main->render(); |
| 95 | + exit(0); | ||
| 95 | } | 96 | } |
| 96 | 97 | ||
| 97 | /* Delete all files | 98 | /* Delete all files |
| @@ -107,7 +108,7 @@ if (!isset($fDeleteConfirmed)) { | @@ -107,7 +108,7 @@ if (!isset($fDeleteConfirmed)) { | ||
| 107 | 108 | ||
| 108 | for ($i = 0; $i < count($fDocumentIDs); $i++) { | 109 | for ($i = 0; $i < count($fDocumentIDs); $i++) { |
| 109 | $oDocument = Document::get($fDocumentIDs[$i]); | 110 | $oDocument = Document::get($fDocumentIDs[$i]); |
| 110 | - if (isset($oDocument)) { | 111 | + if (!isset($oDocument)) { |
| 111 | // Store the doc with problem | 112 | // Store the doc with problem |
| 112 | array_push($aNondeletedDocs, array($oDocument, _("Could not load document in database"))); | 113 | array_push($aNondeletedDocs, array($oDocument, _("Could not load document in database"))); |
| 113 | } | 114 | } |
| @@ -121,7 +122,7 @@ for ($i = 0; $i < count($fDocumentIDs); $i++) { | @@ -121,7 +122,7 @@ for ($i = 0; $i < count($fDocumentIDs); $i++) { | ||
| 121 | $oDocument->setStatusID(DELETED); | 122 | $oDocument->setStatusID(DELETED); |
| 122 | 123 | ||
| 123 | // store | 124 | // store |
| 124 | - if ($oDocument->update()) { | 125 | + if (!$oDocument->update()) { |
| 125 | //could not update the documents status in the db | 126 | //could not update the documents status in the db |
| 126 | $default->log->error("deleteDocumentBL.php DB error deleting document " . | 127 | $default->log->error("deleteDocumentBL.php DB error deleting document " . |
| 127 | $oDocument->getFileName() . " from folder " . | 128 | $oDocument->getFileName() . " from folder " . |