From: pdontthink Date: Mon, 9 Jun 2008 19:07:26 +0000 (+0000) Subject: Don't display page header when browser will be redirected with header() call. X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=10d827083dc9d85324d79b2dce8244af6de700e0 Don't display page header when browser will be redirected with header() call. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13174 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/addressbook.php b/src/addressbook.php index 214a6f8f..46c989ad 100644 --- a/src/addressbook.php +++ b/src/addressbook.php @@ -49,8 +49,12 @@ if (!sqGetGlobalVar('show_all', $show_all, SQ_FORM)) /* Get sorting order */ $abook_sort_order = get_abook_sort(); -/* Create page header before addressbook_init in order to display error messages correctly. */ -displayPageHeader($color); +// Create page header before addressbook_init in order to +// display error messages correctly, unless we might be +// redirecting the browser to the compose page. +// +if ((empty($compose_to)) || sizeof($sel) < 1) + displayPageHeader($color); /* Open addressbook with error messages on. remote backends (LDAP) are enabled because they can be used. (list_addr function) @@ -194,6 +198,9 @@ if(sqgetGlobalVar('REQUEST_METHOD', $req_method, SQ_SERVER) && $req_method == 'P if ($lookup_failed || empty($send_to)) { $showaddrlist = true; $defselected = $sel; + + // we skipped the page header above for this functionality, so add it here + displayPageHeader($color); }