| \n";
$sToRender .= "";
$sToRender .= " ";
@@ -100,7 +84,7 @@ function getCommentBody($sCommentBody, $sCommentSubject,$dDate,$iDocumentID, $sU
$sHeading = "Document Comment";
$sToRender .= renderHeading($sHeading);
- $sToRender .= renderDocumentPath($iDocumentID);
+ $sToRender .= displayDocumentPath($iDocumentID);
$sToRender .= " Author: $sUserName";
$sToRender .= "";
$sToRender .= "| Subject: | $sCommentSubject | ";
diff --git a/presentation/lookAndFeel/knowledgeTree/discussions/viewDiscussionBL.php b/presentation/lookAndFeel/knowledgeTree/discussions/viewDiscussionBL.php
index 2d115dd..cac34dd 100644
--- a/presentation/lookAndFeel/knowledgeTree/discussions/viewDiscussionBL.php
+++ b/presentation/lookAndFeel/knowledgeTree/discussions/viewDiscussionBL.php
@@ -36,7 +36,8 @@ require_once("$default->fileSystemRoot/lib/visualpatterns/PatternCustom.inc");
require_once("$default->fileSystemRoot/lib/visualpatterns/PatternBrowsableSearchResults.inc");
require_once("$default->fileSystemRoot/lib/visualpatterns/PatternListFromQuery.inc");
require_once("$default->fileSystemRoot/lib/discussions/DiscussionThread.inc");
-require_once("$default->fileSystemRoot/lib/discussions/DiscussionComment.inc");
+require_once("$default->fileSystemRoot/lib/discussions/DiscussionComment.inc");
+require_once("$default->fileSystemRoot/presentation/lookAndFeel/knowledgeTree/documentmanagement/documentUI.inc");
require_once("$default->fileSystemRoot/presentation/Html.inc");
if (checkSession()) {
@@ -70,7 +71,7 @@ if (checkSession()) {
$oSearchResults = & new PatternTableSqlQuery ($sQuery, $aColumns, $aColumnTypes, $aColumnNames, "100%", $aHyperLinkURL, $aQueryStringCols, $aQueryStringVars);
$sToRender .= renderHeading("Document Discussion Thread");
- $sToRender .= renderDocumentPath($oThread->getDocumentID());
+ $sToRender .= displayDocumentPath($oThread->getDocumentID());
$oPatternCustom->addHtml($sToRender);
$oPatternCustom->addHtml(getPageButtons($oThread));
$oPatternCustom->addHtml($oSearchResults->render());
diff --git a/presentation/lookAndFeel/knowledgeTree/discussions/viewDiscussionUI.inc b/presentation/lookAndFeel/knowledgeTree/discussions/viewDiscussionUI.inc
index d135d3b..ce9d0c3 100644
--- a/presentation/lookAndFeel/knowledgeTree/discussions/viewDiscussionUI.inc
+++ b/presentation/lookAndFeel/knowledgeTree/discussions/viewDiscussionUI.inc
@@ -66,23 +66,6 @@ function getNewThreadOption($fDocumentID) {
return $sToRender;
}
-
-/**
- * Renders the path for the document
- *
- * @param $fDocumentID -> a valid document ID
- */
-function renderDocumentPath($iDocumentID) {
- global $default;
-
- $oDocument = & Document::get($iDocumentID);
- $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));
- $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td");
- $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($oDocument->getFolderID()), Folder::getFolderPathNamesAsArray($oDocument->getFolderID()), "$default->rootUrl/control.php?action=browse") . " > ";
- $sDocumentPath .= "rootUrl/presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php?fDocumentID=" . $oDocument->getID() . "&fForInlineView=1\">" . $oDocument->getName() . "";
- return "\n";
-}
-
/**
* Views the list of comments for a document
* Prints out 1 comment
@@ -110,7 +93,7 @@ function getViewComment($iNum,$oThread,$oComment,$oUser) {
$sHeading = "Document Discussion Comments";
$sToRender .= renderHeading($sHeading );
- $sToRender .= renderDocumentPath($oThread->getDocumentID());
+ $sToRender .= displayDocumentPath($oThread->getDocumentID());
$sToRender .= "";
$sToRender .= "| Views: " . $oThread->getNumberOfViews() . " | ";
$sToRender .= " | ";
@@ -148,7 +131,7 @@ function getCommentBody($oComment, $iDocumentID, $oUser) {
$sHeading = "Document Comment";
$sToRender .= renderHeading($sHeading);
- $sToRender .= renderDocumentPath($iDocumentID);
+ $sToRender .= displayDocumentPath($iDocumentID);
$aBody = explode("\n",$oComment->getBody());
$sBody = "";
$numChars = 160; // number of chars in a line
|