From 7480181a1889ee9f98e8b64b59bee0bafee5085e Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Thu, 14 May 2009 19:16:00 +0000 Subject: [PATCH] functions.inc.php: - gen_show_status(): honor recipient_delimiter in POP/IMAP check git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@657 a1433add-5e2c-0410-b055-b7f2511e0802 --- functions.inc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/functions.inc.php b/functions.inc.php index e7122d8e..7bc0e10b 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -2174,8 +2174,15 @@ function gen_show_status ($show_alias) // POP/IMAP CHECK if ( $CONF['show_popimap'] == 'YES' ) { + $stat_delimiter = ""; + if (!empty($CONF['recipient_delimiter'])) { + $delimiter = preg_quote($CONF['recipient_delimiter'], "/"); + $stat_delimiter = preg_replace('/' .$delimiter. '[^' .$delimiter. '@]*@/', "@", $stat_goto); + $stat_delimiter = ',' . $stat_delimiter; + } + //if the address passed in appears in its own goto field, its POP/IMAP - if ( preg_match ('/,' . $show_alias . ',/', ',' . $stat_goto . ',') ) + if ( preg_match ('/,' . $show_alias . ',/', ',' . $stat_goto . $stat_delimiter . ',') ) { $stat_string .= "" . $CONF['show_status_text'] . " ";