Commit 20c0b675a775db946d0850f4d969a0985059cd6e

Authored by rob
1 parent 87176c88

changed displayFolderPathLink


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1039 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc
@@ -159,7 +159,7 @@ function renderPage($aResults, $sBrowseType) { @@ -159,7 +159,7 @@ function renderPage($aResults, $sBrowseType) {
159 $sToRender .= "<table border=\"1\" width=\"100%\">\n"; 159 $sToRender .= "<table border=\"1\" width=\"100%\">\n";
160 $sToRender .= "\t<tr><td>"; 160 $sToRender .= "\t<tr><td>";
161 switch ($sBrowseType) { 161 switch ($sBrowseType) {
162 - case "folder" : $sToRender .= displayFolderPathLink(Folder::getFolderPathAsArray($aResults["folders"][0]->getID())); break; 162 + case "folder" : $sToRender .= displayFolderPathLink(Folder::getFolderPathAsArray($aResults["folders"][0]->getID()), Folder::getFolderPathNamesAsArray($aResults["folders"][0]->getID())); break;
163 case "category" : $sToRender .= displayCategoryPathLink($aResults["categories"]); break; 163 case "category" : $sToRender .= displayCategoryPathLink($aResults["categories"]); break;
164 case "documentType" : $sToRender .= displayDocumentTypePathLink($aResults["documentTypes"]); break; 164 case "documentType" : $sToRender .= displayDocumentTypePathLink($aResults["documentTypes"]); break;
165 } 165 }
presentation/lookAndFeel/knowledgeTree/documentmanagement/deleteDocumentUI.inc
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 11
12 function getDocumentPath($iFolderID, $sDocumentName) { 12 function getDocumentPath($iFolderID, $sDocumentName) {
13 global $default; 13 global $default;
14 - $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), "$default->owl_root_url/control.php?action=browse") . " > " . $sDocumentName; 14 + $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), Folder::getFullFolderPath($iFolderID), "$default->owl_root_url/control.php?action=browse") . " > " . $sDocumentName;
15 return "<table border=1 width = 100%><tr><td>$sDocumentPath</td></tr></table>\n"; 15 return "<table border=1 width = 100%><tr><td>$sDocumentPath</td></tr></table>\n";
16 } 16 }
17 17
presentation/lookAndFeel/knowledgeTree/documentmanagement/emailUI.inc
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 10
11 function getDocumentPath($oDocument) { 11 function getDocumentPath($oDocument) {
12 global $default; 12 global $default;
13 - $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($oDocument->getFolderID()), "$default->owl_root_url/control.php?action=browse") . " > " . $oDocument->getName(); 13 + $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($oDocument->getFolderID()), Folder::getFolderPathNamesAsArray($oDocument->getFolderID(()) "$default->owl_root_url/control.php?action=browse") . " > " . $oDocument->getName();
14 return "<table border=1 width = 100%><tr><td>$sDocumentPath</td></tr></table>\n"; 14 return "<table border=1 width = 100%><tr><td>$sDocumentPath</td></tr></table>\n";
15 } 15 }
16 16
presentation/lookAndFeel/knowledgeTree/documentmanagement/modifyUI.inc
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 */ 10 */
11 11
12 function renderDocumentPath($oDocument) { 12 function renderDocumentPath($oDocument) {
13 - $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($oDocument->getFolderID())) . " > " . $oDocument->getName(); 13 + $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($oDocument->getFolderID()), Folder::getFolderPathNamesAsArray($oDocument->getFolderID())) . " > " . $oDocument->getName();
14 return "<table border=1 width = 100%><tr><td>$sDocumentPath</td></tr></table>\n"; 14 return "<table border=1 width = 100%><tr><td>$sDocumentPath</td></tr></table>\n";
15 } 15 }
16 16
presentation/lookAndFeel/knowledgeTree/documentmanagement/moveDocumentUI.inc
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 2
3 function getFolderPath($iFolderID) { 3 function getFolderPath($iFolderID) {
4 global $default; 4 global $default;
5 - $sFolderPath = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), "$default->owl_root_url/control.php?action=browse"); 5 + $sFolderPath = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->owl_root_url/control.php?action=browse");
6 return "<table border=1 width = 100%><tr><td>$sFolderPath</td></tr></table>\n"; 6 return "<table border=1 width = 100%><tr><td>$sFolderPath</td></tr></table>\n";
7 } 7 }
8 8
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewHistoryUI.inc
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 11
12 function getDocumentPath($iFolderID, $sDocumentName) { 12 function getDocumentPath($iFolderID, $sDocumentName) {
13 global $default; 13 global $default;
14 - $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), "$default->owl_root_url/control.php?action=browse") . " > " . $sDocumentName; 14 + $sDocumentPath = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->owl_root_url/control.php?action=browse") . " > " . $sDocumentName;
15 return "<table border=1 width = 100%><tr><td>$sDocumentPath</td></tr></table>\n"; 15 return "<table border=1 width = 100%><tr><td>$sDocumentPath</td></tr></table>\n";
16 } 16 }
17 17
presentation/lookAndFeel/knowledgeTree/foldermanagement/addFolderBL.php
@@ -28,7 +28,7 @@ if (checkSession()) { @@ -28,7 +28,7 @@ if (checkSession()) {
28 28
29 if (!isset($fFolderName)) { 29 if (!isset($fFolderName)) {
30 require_once("$default->owl_fs_root/presentation/webpageTemplate.inc"); 30 require_once("$default->owl_fs_root/presentation/webpageTemplate.inc");
31 - //we're still browsing 31 + //we're still browsing
32 if (Permission::userHasFolderWritePermission($fFolderID)) { 32 if (Permission::userHasFolderWritePermission($fFolderID)) {
33 //if the user is allowed to add folders, then display the add button 33 //if the user is allowed to add folders, then display the add button
34 $oPatternCustom->setHtml(renderBrowseAddPage($fFolderID)); 34 $oPatternCustom->setHtml(renderBrowseAddPage($fFolderID));
presentation/lookAndFeel/knowledgeTree/foldermanagement/addFolderCollaborationUI.inc
@@ -42,7 +42,7 @@ function getPage($iFolderID, $iGroupID, $iRoleID, $iSequenceNumber) { @@ -42,7 +42,7 @@ function getPage($iFolderID, $iGroupID, $iRoleID, $iSequenceNumber) {
42 42
43 function getFolderPath($iFolderID) { 43 function getFolderPath($iFolderID) {
44 global $default; 44 global $default;
45 - return displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), "$default->owl_root_url/control.php?action=browse"); 45 + return displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->owl_root_url/control.php?action=browse");
46 } 46 }
47 47
48 function getGroupDropDown($iGroupID) { 48 function getGroupDropDown($iGroupID) {
presentation/lookAndFeel/knowledgeTree/foldermanagement/collaborationUI.inc
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 10
11 function getFolderPath($iFolderID) { 11 function getFolderPath($iFolderID) {
12 global $default; 12 global $default;
13 - return displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), "$default->owl_root_url/control.php?action=browse"); 13 + return displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->owl_root_url/control.php?action=browse");
14 } 14 }
15 15
16 function getFolderCollaborationData($iFolderCollaborationID) { 16 function getFolderCollaborationData($iFolderCollaborationID) {
presentation/lookAndFeel/knowledgeTree/foldermanagement/deleteFolderCollaborationUI.inc
@@ -38,7 +38,7 @@ function getPage($iFolderID, $iGroupID, $iRoleID, $iSequenceNumber) { @@ -38,7 +38,7 @@ function getPage($iFolderID, $iGroupID, $iRoleID, $iSequenceNumber) {
38 38
39 function getFolderPath($iFolderID) { 39 function getFolderPath($iFolderID) {
40 global $default; 40 global $default;
41 - return displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), "$default->owl_root_url/control.php?action=browse"); 41 + return displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->owl_root_url/control.php?action=browse");
42 } 42 }
43 43
44 44
presentation/lookAndFeel/knowledgeTree/foldermanagement/deleteFolderUI.inc
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 12
13 function getFolderPath($iFolderID) { 13 function getFolderPath($iFolderID) {
14 global $default; 14 global $default;
15 - $sFolderPath = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), "$default->owl_root_url/control.php?action=browse"); 15 + $sFolderPath = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->owl_root_url/control.php?action=browse");
16 return "<table border=1 width = 100%><tr><td>$sFolderPath</td></tr></table>\n"; 16 return "<table border=1 width = 100%><tr><td>$sFolderPath</td></tr></table>\n";
17 } 17 }
18 18
presentation/lookAndFeel/knowledgeTree/foldermanagement/editUI.inc
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 10
11 function getFolderPath($iFolderID) { 11 function getFolderPath($iFolderID) {
12 global $default; 12 global $default;
13 - return displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), "$default->owl_root_url/control.php?action=browse"); 13 + return displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), "$default->owl_root_url/control.php?action=browse");
14 } 14 }
15 15
16 16
presentation/lookAndFeel/knowledgeTree/foldermanagement/folderUI.inc
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 * @param array containing the path to the folder (folder ids) 19 * @param array containing the path to the folder (folder ids)
20 * @param string the page to link to (defaults to the page this is called from) 20 * @param string the page to link to (defaults to the page this is called from)
21 */ 21 */
22 -function displayFolderPathLink($aPathArray, $sLinkPage = "") { 22 +function displayFolderPathLink($aPathArray, $aPathNameArray, $sLinkPage = "") {
23 global $default; 23 global $default;
24 if (strlen($sLinkPage) == 0) { 24 if (strlen($sLinkPage) == 0) {
25 $sLinkPage = $_SERVER["PHP_SELF"]; 25 $sLinkPage = $_SERVER["PHP_SELF"];
@@ -27,9 +27,10 @@ function displayFolderPathLink($aPathArray, $sLinkPage = &quot;&quot;) { @@ -27,9 +27,10 @@ function displayFolderPathLink($aPathArray, $sLinkPage = &quot;&quot;) {
27 $default->log->debug("displayFolderPathLink: slinkPage=$sLinkPage"); 27 $default->log->debug("displayFolderPathLink: slinkPage=$sLinkPage");
28 // display a separate link to each folder in the path 28 // display a separate link to each folder in the path
29 for ($i=0; $i<count($aPathArray); $i++) { 29 for ($i=0; $i<count($aPathArray); $i++) {
30 - $iFolderID = $aPathArray[$i]; 30 + $iFolderID = $aPathArray[$i];
31 // retrieve the folder name for this folder 31 // retrieve the folder name for this folder
32 - $sFolderName = Folder::getFolderName($iFolderID); 32 + //$sFolderName = Folder::getFolderName($iFolderID);
  33 + $sFolderName = $aPathNameArray[$i];
33 // generate a link back to this page setting fFolderID 34 // generate a link back to this page setting fFolderID
34 $sLink = generateLink($sLinkPage, 35 $sLink = generateLink($sLinkPage,
35 "fBrowseType=folder&fFolderID=$iFolderID", 36 "fBrowseType=folder&fFolderID=$iFolderID",
@@ -60,8 +61,8 @@ function displayFolderLink($oFolder, $sLinkPage = &quot;&quot;) { @@ -60,8 +61,8 @@ function displayFolderLink($oFolder, $sLinkPage = &quot;&quot;) {
60 $oFolder->getName()); 61 $oFolder->getName());
61 } 62 }
62 63
63 -function renderFolderPath($fFolderID, $sLinkURL) {  
64 - $sFolderPath = displayFolderPathLink(Folder::getFolderPathAsArray($fFolderID, $sLinkURL)); 64 +function renderFolderPath($iFolderID, $sLinkURL) {
  65 + $sFolderPath = displayFolderPathLink(Folder::getFolderPathAsArray($iFolderID), Folder::getFolderPathNamesAsArray($iFolderID), $sLinkURL);
65 return "<table border=1 width = 100%><tr><td>$sFolderPath</td></tr></table>\n"; 66 return "<table border=1 width = 100%><tr><td>$sFolderPath</td></tr></table>\n";
66 } 67 }
67 68