little fix
[squirrelmail.git] / src / addrbook_search.php
index a4b74f4e281c60ba0d7d1e8319f70ce56aa88784..3205e4a4478b9d8afb14a6f4379eca774fe880cb 100644 (file)
@@ -2,6 +2,9 @@
    /**
     **  addrbook_search.php
     **
+    **  Copyright (c) 1999-2000 The SquirrelMail development team
+    **  Licensed under the GNU GPL. For full terms see the file COPYING.
+    **
     **  Handle addressbook searching in the popup window.
     **
     **  NOTE: A lot of this code is similar to the code in
@@ -97,7 +100,7 @@ function bcc_address($addr) {
 
       print "</TR>\n";
       
-      while(list($key, $row) = each($res)) {
+      while(list($undef, $row) = each($res)) {
         printf("<tr%s nowrap><td valign=top nowrap align=center width=\"5%%\">".
                "<small><a href=\"javascript:to_address('%s');\">To</A> | ".
                "<a href=\"javascript:cc_address('%s');\">Cc</A> | ".
@@ -122,12 +125,17 @@ function bcc_address($addr) {
    /* ================= End of functions ================= */
 
    session_start();
+   
+   if (!isset($i18n_php))
+      include("../functions/i18n.php");
 
    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;
    }
@@ -187,7 +195,7 @@ function bcc_address($addr) {
         printf("<OPTION VALUE=-1 SELECTED>%s\n", 
                _("All address books"));
         $ret = $abook->get_backend_list();
-        while(list($k,$v) = each($ret)) 
+        while(list($undef,$v) = each($ret)) 
            printf("<OPTION VALUE=%d>%s\n", $v->bnum, $v->sname);
         printf("</SELECT>\n");
       } else {