Commit de7ddba46e054e19d63f624c44e34d2a0d2272c9

Authored by megan_w
1 parent 301530c6

KTS-3153

"if folder name contains "&" then if you browse to subfolders the breadcrumb navigation only shows "." for the "&"-folder"
Fixed. Changed the breadcrumbsForFolder to use oFolder->getName instead of the pathArray() for the parent folder names.

Committed by: Megan Watson
Reviewed by: Jonathan Byrne



git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@8382 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 4 additions and 3 deletions
lib/browse/browseutil.inc.php
@@ -186,7 +186,7 @@ class KTBrowseUtil { @@ -186,7 +186,7 @@ class KTBrowseUtil {
186 $aBreadcrumbs = array(); 186 $aBreadcrumbs = array();
187 187
188 // skip root. 188 // skip root.
189 - $folder_path_names = $oFolder->getPathArray(); 189 + //$folder_path_names = $oFolder->getPathArray();
190 $folder_path_ids = array_slice(explode(',', $oFolder->getParentFolderIds()), 1); 190 $folder_path_ids = array_slice(explode(',', $oFolder->getParentFolderIds()), 1);
191 191
192 $parents = count($folder_path_ids); 192 $parents = count($folder_path_ids);
@@ -204,19 +204,20 @@ class KTBrowseUtil { @@ -204,19 +204,20 @@ class KTBrowseUtil {
204 foreach (range(0, $parents - 1) as $index) { 204 foreach (range(0, $parents - 1) as $index) {
205 $id = $folder_path_ids[$index]; 205 $id = $folder_path_ids[$index];
206 $oThisFolder = Folder::get($id); 206 $oThisFolder = Folder::get($id);
  207 + $sFolderName = $oThisFolder->getName();
207 $url = KTUtil::addQueryStringSelf('fFolderId=' . $id); 208 $url = KTUtil::addQueryStringSelf('fFolderId=' . $id);
208 if (!empty($sAction)) { 209 if (!empty($sAction)) {
209 $url = generateControllerUrl($sAction, 'fFolderId=' . $id); 210 $url = generateControllerUrl($sAction, 'fFolderId=' . $id);
210 } 211 }
211 if (!KTPermissionUtil::userHasPermissionOnItem($oUser, 'ktcore.permissions.folder_details', $oThisFolder)) { 212 if (!KTPermissionUtil::userHasPermissionOnItem($oUser, 'ktcore.permissions.folder_details', $oThisFolder)) {
212 if (KTBrowseUtil::inAdminMode($oUser, $oThisFolder)) { 213 if (KTBrowseUtil::inAdminMode($oUser, $oThisFolder)) {
213 - $aBreadcrumbs[] = array('url' => $url, 'name' => sprintf('(%s)', $folder_path_names[$index])); 214 + $aBreadcrumbs[] = array('url' => $url, 'name' => sprintf('(%s)', $sFolderName));
214 } else { 215 } else {
215 $aBreadcrumbs[] = array('name' => '...'); 216 $aBreadcrumbs[] = array('name' => '...');
216 } 217 }
217 continue; 218 continue;
218 } 219 }
219 - $aBreadcrumbs[] = array('url' => $url, 'name' => $folder_path_names[$index]); 220 + $aBreadcrumbs[] = array('url' => $url, 'name' => $sFolderName);
220 } 221 }
221 } 222 }
222 223