Commit 967d75a1d8058bf4b1ae44d7deba705dc766f705
1 parent
573bdbf4
Use the abstract storage system rather than PhysicalDocumentManager.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3590 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
7 additions
and
1 deletions
presentation/lookAndFeel/knowledgeTree/documentmanagement/addDocumentBL.php
| @@ -53,6 +53,10 @@ require_once("$default->fileSystemRoot/lib/subscriptions/SubscriptionEngine.inc" | @@ -53,6 +53,10 @@ require_once("$default->fileSystemRoot/lib/subscriptions/SubscriptionEngine.inc" | ||
| 53 | require_once("addDocumentUI.inc"); | 53 | require_once("addDocumentUI.inc"); |
| 54 | require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/store.inc"); | 54 | require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/store.inc"); |
| 55 | 55 | ||
| 56 | +require_once(KT_LIB_DIR . '/storage/storagemanager.inc.php'); | ||
| 57 | + | ||
| 58 | +$oStorage =& KTStorageManagerUtil::getSingleton(); | ||
| 59 | + | ||
| 56 | $postExpected = KTUtil::arrayGet($_REQUEST, "postExpected"); | 60 | $postExpected = KTUtil::arrayGet($_REQUEST, "postExpected"); |
| 57 | $postReceived = KTUtil::arrayGet($_REQUEST, "postReceived"); | 61 | $postReceived = KTUtil::arrayGet($_REQUEST, "postReceived"); |
| 58 | if (!is_null($postExpected) && is_null($postReceived)) { | 62 | if (!is_null($postExpected) && is_null($postReceived)) { |
| @@ -175,7 +179,7 @@ if (!$oDocument->create()) { | @@ -175,7 +179,7 @@ if (!$oDocument->create()) { | ||
| 175 | } | 179 | } |
| 176 | 180 | ||
| 177 | //if the document was successfully created in the db, then store it on the file system | 181 | //if the document was successfully created in the db, then store it on the file system |
| 178 | -if (!PhysicalDocumentManager::uploadPhysicalDocument($oDocument, $fFolderID, "None", $_FILES['fFile']['tmp_name'])) { | 182 | +if (!$oStorage->upload($oDocument, $_FILES['fFile']['tmp_name'])) { |
| 179 | // couldn't store document on filesystem | 183 | // couldn't store document on filesystem |
| 180 | $default->log->error("addDocumentBL.php Filesystem error attempting to store document " . $oDocument->getFileName() . " in folder " . Folder::getFolderPath($fFolderID) . "; id=$fFolderID"); | 184 | $default->log->error("addDocumentBL.php Filesystem error attempting to store document " . $oDocument->getFileName() . " in folder " . Folder::getFolderPath($fFolderID) . "; id=$fFolderID"); |
| 181 | require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); | 185 | require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc"); |
| @@ -190,6 +194,8 @@ if (!PhysicalDocumentManager::uploadPhysicalDocument($oDocument, $fFolderID, "No | @@ -190,6 +194,8 @@ if (!PhysicalDocumentManager::uploadPhysicalDocument($oDocument, $fFolderID, "No | ||
| 190 | 194 | ||
| 191 | // ALL SYSTEMS GO! | 195 | // ALL SYSTEMS GO! |
| 192 | 196 | ||
| 197 | +$oDocument->update(); | ||
| 198 | + | ||
| 193 | 199 | ||
| 194 | //create the web document link | 200 | //create the web document link |
| 195 | $oWebDocument = & new WebDocument($oDocument->getID(), -1, 1, NOT_PUBLISHED, getCurrentDateTime()); | 201 | $oWebDocument = & new WebDocument($oDocument->getID(), -1, 1, NOT_PUBLISHED, getCurrentDateTime()); |