Commit fe75e399804bb0ef9bcda64d2bcdacb29aa65793

Authored by michael
1 parent f1b63a57

removed debug logging and added operational/status logging


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2450 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/documentmanagement/addDocumentBL.php
... ... @@ -31,7 +31,6 @@ if (checkSession()) {
31 31 require_once("addDocumentUI.inc");
32 32 require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/store.inc");
33 33  
34   - $default->log->info("before:" . arrayToString($_REQUEST));
35 34 if (isset($fFolderID)) {
36 35 if (Permission::userHasFolderWritePermission($fFolderID)) {
37 36 //user has permission to add document to this folder
... ... @@ -51,11 +50,18 @@ if (checkSession()) {
51 50 if (PhysicalDocumentManager::uploadPhysicalDocument($oDocument, $fFolderID, "None", $_FILES['fFile']['tmp_name'])) {
52 51 //create the web document link
53 52 $oWebDocument = & new WebDocument($oDocument->getID(), -1, 1, NOT_PUBLISHED, getCurrentDateTime());
54   - $oWebDocument->create();
  53 + if ($oWebDocument->create()) {
  54 + $default->log->error("addDocumentBL.php created web document for document ID=" . $oDocument->getID());
  55 + } else {
  56 + $default->log->error("addDocumentBL.php couldn't create web document for document ID=" . $oDocument->getID());
  57 + }
55 58 //create the document transaction record
56 59 $oDocumentTransaction = & new DocumentTransaction($oDocument->getID(), "Document created", CREATE);
57   - $oDocumentTransaction->create();
58   - $default->log->info("addDocumentBL.php successfully added document " . $oDocument->getFileName() . " to folder " . Folder::getFolderPath($fFolderID) . " id=$fFolderID");
  60 + if ($oDocumentTransaction->create()) {
  61 + $default->log->error("addDocumentBL.php created create document transaction for document ID=" . $oDocument->getID());
  62 + } else {
  63 + $default->log->error("addDocumentBL.php couldn't create create document transaction for document ID=" . $oDocument->getID());
  64 + }
59 65  
60 66 //the document was created/uploaded due to a collaboration step in another
61 67 //document and must be linked to that document
... ... @@ -101,6 +107,7 @@ if (checkSession()) {
101 107 "folderName" => Folder::getFolderName($fFolderID)));
102 108 $default->log->info("addDocumentBL.php fired $count subscription alerts for new document " . $oDocument->getName());
103 109  
  110 + $default->log->info("addDocumentBL.php successfully added document " . $oDocument->getFileName() . " to folder " . Folder::getFolderPath($fFolderID) . " id=$fFolderID");
104 111 //redirect to the document details page
105 112 controllerRedirect("viewDocument", "fDocumentID=" . $oDocument->getID());
106 113 } else {
... ...