[Tickets #5987] Re: Remember the last folder tree view

bugs at bugs.horde.org bugs at bugs.horde.org
Fri Dec 14 08:37:33 UTC 2007


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=5987
-----------------------------------------------------------------------
 Ticket             | 5987
 Updated By         | tinu at humbapa.ch
 Summary            | Remember the last folder tree view
 Queue              | Trean
 Type               | Enhancement
 State              | Accepted
 Priority           | 1. Low
 Owners             | 
-----------------------------------------------------------------------


tinu at humbapa.ch (2007-12-14 03:37) wrote:

> Patch?

I saw that there already exists a not activated preference named
expand_tree. my patch to templates/browse.php now implements this.

when I try to attach a file whups says: Unable to create VFS directory.
so I paste it directly here:

Index: templates/browse.php
===================================================================
RCS file: /repository/trean/templates/browse.php,v
retrieving revision 1.8
diff -u -r1.8 browse.php
--- templates/browse.php	5 Jun 2007 06:35:34 -0000	1.8
+++ templates/browse.php	14 Dec 2007 08:09:58 -0000
@@ -119,7 +119,9 @@
     foreach ($folders as $tfn => $tf) {
         $params['class'] = ($tf->getId() == $GLOBALS['folder']->getId())
? 'selected' : null;
         $params['url'] = Horde::applicationUrl('browse.php?f=' .
$tf->getId());
-        $tree->addNode($tf->getId(), $tf->getParent(), $tf->get('name'),
substr_count($tfn, ':'), true, $params);
+        $level = substr_count($tfn, ':');
+        $expand = ($prefs->getValue('expand_tree') == 'none') ? false :
(($prefs->getValue('expand_tree') == 'all') ? true :
(($prefs->getValue('expand_tree') == 'first' && $level == 0) ? true :
false));
+        $tree->addNode($tf->getId(), $tf->getParent(), $tf->get('name'),
$level, $expand, $params);
     }
 
     echo $tree->renderTree();




More information about the bugs mailing list