Centralized init
[squirrelmail.git] / functions / rfc822address.php
index 16885ababc3eab99de31bd0c75e83b8312e416d9..1225ed0ba4d8dc5ac2ca4312229030b2446684b4 100644 (file)
@@ -1,13 +1,12 @@
 <?php
+
 /**
  * rfc822address.php
  *
- * Copyright (c) 2004 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
  * Contains rfc822 email address function parsing functions.
  *
- *
+ * @copyright &copy; 2004-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
  */
@@ -46,8 +45,8 @@ function parseRFC822Address($sAddress,$iLimit = 0) {
         case ';':
             if ($sGroup) {
                 $aAddress[] = _createAddressElement($aStack,$aComment,$sEmail);
-                $oAddr = end($aAddress);
-                if(!$oAddr || ((isset($oAddr)) && !$oAddr->mailbox && !$oAddr->personal)) {
+                $aAddr = end($aAddress);
+                if(!$aAddr || ((isset($aAddr)) && !$aAddr[SQM_ADDR_MAILBOX] && !$aAddr[SQM_ADDR_PERSONAL])) {
                     $sEmail = $sGroup . ':;';
                 }
                 $aAddress[] = _createAddressElement($aStack,$aComment,$sEmail);