Give an error to the user when SquirrelMail is not configured yet
[squirrelmail.git] / src / addressbook.php
index ec4f979307fa7d4fbfa256af5837774acffc74b4..8fafa44a656a093b1d65dbbdc593e4313235f1fc 100644 (file)
@@ -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 = '';