* 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-2020 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
* @since 1.5.2
*/
function getMessageCount ($boxes, $type='total') {
+
+ global $trash_folder;
+
// The Trash folder isn't counted...
- if ($boxes->mailboxname_full == $GLOBALS['trash_folder'])
+ if ($boxes->mailboxname_full == $trash_folder)
return 0;
$count = 0;
/**
* 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
$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;
}