From 720637b6784f80016e55f43521c072cff9c9bf87 Mon Sep 17 00:00:00 2001 From: Megan Watson Date: Fri, 18 Apr 2008 13:03:59 +0000 Subject: [PATCH] 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. --- lib/browse/browseutil.inc.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/browse/browseutil.inc.php b/lib/browse/browseutil.inc.php index 1f6f7e5..b7519c5 100644 --- a/lib/browse/browseutil.inc.php +++ b/lib/browse/browseutil.inc.php @@ -186,7 +186,7 @@ class KTBrowseUtil { $aBreadcrumbs = array(); // skip root. - $folder_path_names = $oFolder->getPathArray(); + //$folder_path_names = $oFolder->getPathArray(); $folder_path_ids = array_slice(explode(',', $oFolder->getParentFolderIds()), 1); $parents = count($folder_path_ids); @@ -204,19 +204,20 @@ class KTBrowseUtil { foreach (range(0, $parents - 1) as $index) { $id = $folder_path_ids[$index]; $oThisFolder = Folder::get($id); + $sFolderName = $oThisFolder->getName(); $url = KTUtil::addQueryStringSelf('fFolderId=' . $id); if (!empty($sAction)) { $url = generateControllerUrl($sAction, 'fFolderId=' . $id); } if (!KTPermissionUtil::userHasPermissionOnItem($oUser, 'ktcore.permissions.folder_details', $oThisFolder)) { if (KTBrowseUtil::inAdminMode($oUser, $oThisFolder)) { - $aBreadcrumbs[] = array('url' => $url, 'name' => sprintf('(%s)', $folder_path_names[$index])); + $aBreadcrumbs[] = array('url' => $url, 'name' => sprintf('(%s)', $sFolderName)); } else { $aBreadcrumbs[] = array('name' => '...'); } continue; } - $aBreadcrumbs[] = array('url' => $url, 'name' => $folder_path_names[$index]); + $aBreadcrumbs[] = array('url' => $url, 'name' => $sFolderName); } } -- libgit2 0.21.4