script creates two frames. there is no need to display same error in both.
[squirrelmail.git] / src / addrbook_search.php
index 4a5af188c60e7aec466273dbdb601b66a857ef7b..a1c0b7be3b7df331a15a80e058e9d4d3539e9503 100644 (file)
@@ -175,6 +175,10 @@ require_once('../functions/addressbook.php');
 
 displayHtmlHeader();
 
+/** set correct value of $default_charset */
+global $default_charset;
+set_my_charset();
+
 /* Initialize vars */
 if (!isset($query)) { $query = ''; }
 if (!isset($show))  { $show  = ''; }
@@ -201,8 +205,9 @@ if (empty($query) && empty($show) && empty($listall)) {
     exit;
 }
 
-/* Initialize addressbook */
-$abook = addressbook_init();
+/* Initialize addressbook, show init errors only in bottom frame */
+$showerr=($show=='form' ? false : true);
+$abook = addressbook_init($showerr);
 
 /* Create search form */
 if ($show == 'form' && empty($listall)) {