fixed uninitialized urlMailbox bug on bug list
[squirrelmail.git] / src / search.php
index fe169f8332dd6ae9d977276535513fc8d2e4af4d..ed92be5e85d7a2173d7d65f9e43b07483764882e 100644 (file)
@@ -2,14 +2,18 @@
    session_start();
 
    if(!isset($logged_in)) {
+      set_up_language($squirrelmail_language, true);
       echo _("You must login first.");
       exit;
    }
    if(!isset($username) || !isset($key)) {
+      set_up_language($squirrelmail_language, true);
       echo _("You need a valid user and password to access this page!");
       exit;
    }
 
+   if (!isset($i18n_php))
+      include("../functions/i18n.php");
    if (!isset($config_php))
       include("../config/config.php");
    if (!isset($strings_php))
    if ($where && $what) {   
       sqimap_mailbox_select($imapConnection, $mailbox);
       sqimap_search($imapConnection, $where, $what, $mailbox, $color);
+      sqimap_mailbox_close($imapConnection);
    }
    do_hook("search_bottom");
    sqimap_logout ($imapConnection);