Create page header before addressbook_init in order to display error
[squirrelmail.git] / src / addressbook.php
index 853b01a7b6ad82c0a98edaa4c25619611f031749..8fafa44a656a093b1d65dbbdc593e4313235f1fc 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * addressbook.php
  *
- * Copyright (c) 1999-2004 The SquirrelMail Project Team
+ * Copyright (c) 1999-2005 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * Manage personal address book.
@@ -45,6 +45,9 @@ sqgetGlobalVar('doedit',    $doedit,    SQ_POST);
 /* Get sorting order */
 $abook_sort_order = get_abook_sort();
 
+/* Create page header before addressbook_init in order to  display error messages correctly. */
+displayPageHeader($color, 'None');
+
 /* Open addressbook with error messages on.
  remote backends (LDAP) are enabled because they can be used. (list_addr function)
 */
@@ -56,7 +59,6 @@ if($abook->localbackend == 0) {
     exit();
 }
 
-displayPageHeader($color, 'None');
 
 $defdata   = array();
 $formerror = '';