Fixed imap search bug.
[squirrelmail.git] / functions / tree.php
index 9871d45a6e30d907446b29eea764a55f88371033..f37c8422a7ee06dd3472177d9cf0b1b0bc9136f9 100644 (file)
@@ -2,12 +2,11 @@
 
    /* $Id$ */
 
-   $tree_php = true;
+   if (defined('tree_php'))
+       return;
+   define('tree_php', true);
 
-   if (!isset($imap_php))
-      include('../functions/imap.php');
-   if (!isset($config_php))
-      include('../config/config.php');
+   require_once('../functions/imap.php');
 
    // Recursive function to find the correct parent for a new node
    function findParentForChild($value, $treeIndexToStart, $tree) {