[cvs] commit: imp/lib Tree.php imp folders.php
Michael M Slusarz
slusarz at bigworm.colorado.edu
Tue Jan 6 12:54:21 PST 2004
slusarz 2004/01/06 12:54:20 PST
Modified files:
lib Tree.php
. folders.php
Log:
Lots of changes...
Turns out that the current c-client defines LATT_* constants up to 64, so
it is probably best to start our constant numbering at 128.
Only re-store the tree object in the session if something has changed.
Add _getNextLevelList() helper function to automatically determine the
next level list given a folder (handling special 'INBOX' cases).
Cleaned up init() a lot, and used other methods to prevent duplicate code.
Much better expandAll() and collapseAll() functions.
No need to check the current status in the _set* functions - just go ahead
and do whatever the request is.
The value of 'nav_expanded' is now handled internally by IMP_Tree.
Most importatnly, we just go ahead and build the entire tree when initializing
instead of marking as discovered/not discovered. Since we have to do
'lookaheads' anyway (to determine if a particular element has children or
not) we might as well store this information in the tree at the beginning
since, if using a discovery algorithim, we would have to do these
identical queries later anyway.
Now the only items left with the folders that require a rebuilding of the
cached tree is subscription/unsubscription events. This is next on my list.
Revision Changes Path
2.250 +7 -30 imp/folders.php
1.93 +267 -263 imp/lib/Tree.php
Chora Links:
http://cvs.horde.org/diff.php/imp/folders.php?r1=2.249&r2=2.250&ty=u
http://cvs.horde.org/diff.php/imp/lib/Tree.php?r1=1.92&r2=1.93&ty=u
More information about the cvs
mailing list