Commit 5eab9721953dc5ad3ac7978f0313c99c11604daf

Authored by Michael Joseph
1 parent 5dfa77d6

fixed error displaying


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1163 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/documentmanagement/checkOutDocumentBL.php
... ... @@ -60,7 +60,7 @@ if (checkSession()) {
60 60  
61 61 } else {
62 62 // document update failed
63   - $oPatternCustom->setHtml("<p class=\"errorText\">An error occurred while storing this document in the database</p>\n");
  63 + $oPatternCustom->setHtml(renderErrorPage("An error occurred while storing this document in the database"));
64 64 }
65 65 } else {
66 66 // prompt the user for a checkout comment
... ... @@ -69,27 +69,24 @@ if (checkSession()) {
69 69 } else {
70 70 // this document is already checked out
71 71 // TODO: for extra credit, tell the user who has this document checked out
72   - $oPatternCustom->setHtml("<p class=\"errorText\">This document is already checked out</p>\n");
  72 + $oPatternCustom->setHtml(renderErrorPage("This document is already checked out"));
73 73 }
74 74 } else {
75 75 // no permission to checkout the document
76   - $oPatternCustom->setHtml("<p class=\"errorText\">Could not check out this document</p>\n");
  76 + $oPatternCustom->setHtml(renderErrorPage("You don't have permission to check out this document"));
77 77 }
78 78 } else {
79 79 // couldn't instantiate the document
80   - $oPatternCustom->setHtml("<p class=\"errorText\">Could not check out this document</p>\n");
  80 + $oPatternCustom->setHtml(renderErrorPage("Could not check out this document"));
81 81 }
82 82 } else {
83 83 // no document id was set when coming to this page,
84   - $oPatternCustom->setHtml("<p class=\"errorText\">No document is currently selected for check out</p>\n");
  84 + $oPatternCustom->setHtml(renderErrorPage("No document is currently selected for check out"));
85 85 }
86 86  
87 87 require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc");
88 88 $main->setCentralPayload($oPatternCustom);
89 89 $main->setFormAction($_SERVER["PHP_SELF"]);
90   - if (isset($sErrorMessage)) {
91   - $main->setErrorMessage($sErrorMessage);
92   - }
93 90 $main->render();
94 91 }
95 92 ?>
... ...