34 $this->folderDao = $folderDao;
44 $sql = $this->folderDao->getFolderTreeCte($parentFolder)
45 .
" SELECT folder_pk, folder_name, folder_desc, depth, name_path FROM folder_tree ORDER BY name_path";
48 $res = $this->
dbManager->execute($stmt,array($parentFolder));
51 while ($row = $this->
dbManager->fetchArray($res)) {
52 for (; $row[
'depth']<$lastDepth; $lastDepth--) {
55 if ($row[
'depth']==$lastDepth) {
56 $out .=
"</li>\n<li>";
58 if ($row[
'depth']==0) {
59 $out .=
'<ul id="tree"><li>';
62 for (;$row[
'depth']>$lastDepth;$lastDepth++) {
65 $out .= $this->getFormattedItem($row, $uri);
67 for (; - 1<$lastDepth;$lastDepth--) {
73 protected function getFormattedItem($row,$uri)
75 $title = empty($row[
'folder_desc']) ?
'' :
' title="' . htmlspecialchars($row[
'folder_desc']) .
'"';
77 ' href="'.$uri.
'?mod=browse&folder='.$row[
'folder_pk'].
'"'.
78 ' class="clickable-folder" data-folder="'.$row[
'folder_pk'].
'"'.
79 '>'.htmlentities($row[
'folder_name']).
'</a>';
Traceback_uri()
Get the URI without query to this location.
showFolderTree($parentFolder)
fo_dbManager * dbManager
fo_dbManager object