8 namespace Fossology\Lib\UI;
23 $this->folderDao = $folderDao;
33 $sql = $this->folderDao->getFolderTreeCte($parentFolder)
34 .
" SELECT folder_pk, folder_name, folder_desc, depth, name_path FROM folder_tree ORDER BY name_path";
37 $res = $this->
dbManager->execute($stmt,array($parentFolder));
40 while ($row = $this->
dbManager->fetchArray($res)) {
41 for (; $row[
'depth']<$lastDepth; $lastDepth--) {
44 if ($row[
'depth']==$lastDepth) {
45 $out .=
"</li>\n<li>";
47 if ($row[
'depth']==0) {
48 $out .=
'<ul id="tree"><li>';
51 for (;$row[
'depth']>$lastDepth;$lastDepth++) {
54 $out .= $this->getFormattedItem($row, $uri);
56 for (; - 1<$lastDepth;$lastDepth--) {
62 protected function getFormattedItem($row,$uri)
64 $title = empty($row[
'folder_desc']) ?
'' :
' title="' . htmlspecialchars($row[
'folder_desc']) .
'"';
66 ' href="'.$uri.
'?mod=browse&folder='.$row[
'folder_pk'].
'"'.
67 ' class="clickable-folder text-info stretched-link" style="padding:2px;" data-folder="'.$row[
'folder_pk'].
'"'.
68 '>'.htmlentities($row[
'folder_name']).
'</a>';
showFolderTree($parentFolder)
Traceback_uri()
Get the URI without query to this location.
fo_dbManager * dbManager
fo_dbManager object