Updating copyrights. Happy New Year.
[squirrelmail.git] / functions / template / folder_list_util.php
index 42a29eee9794357ec78e6482dde3b67638babe72..ac96809c700aa6d48f62bf5b1e9e49267b5cb227 100644 (file)
@@ -6,7 +6,7 @@
  * Provides some functions for use in left_main.php and templates.  Do not echo
  * output from these functions!
  *
- * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @copyright 1999-2012 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -47,6 +47,7 @@ function getMessageCount ($boxes, $type='total') {
 /**
  * Recursively iterates a mailboxes object to build a data structure that is
  * easy for template authors to work with.
+FIXME: well.... why not document that data structure here?
  * 
  * @param object $boxes Object of the class mailboxes
  * @author Steve Brown
@@ -115,5 +116,16 @@ function getBoxStructure ($boxes) {
         $box['ChildBoxes'][] = getBoxStructure($boxes->mbxs[$i]);
     }
     
+    // if plugins want to add some text or link after the folder name in
+    // the folder list, they should add to the "ExtraOutput" array element
+    // in $box (remember, it's passed through the hook by reference) -- making
+    // sure to play nice with other plugins by *concatenating* to "ExtraOutput"
+    // and NOT by overwriting it
+    //
+    // known users of this hook:
+    // empty_folders
+    //
+    do_hook('left_main_after_each_folder', $box);
+
     return $box;
 }