From e60230ae7a50ee323292404b311bca78c1bb6a2b Mon Sep 17 00:00:00 2001 From: indiri69 Date: Sat, 24 Aug 2002 21:28:18 +0000 Subject: [PATCH] Code cleanup git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3449 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- class/mime.class.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/class/mime.class.php b/class/mime.class.php index 42c6762f..a23fb100 100644 --- a/class/mime.class.php +++ b/class/mime.class.php @@ -681,12 +681,12 @@ class message { * */ function parseStructure($read, $i = 0) { - $arg_no = 0; - $arg_a = array(); - $cnt = strlen($read); + $arg_no = 0; + $arg_a = array(); + $cnt = strlen($read); - for (; $i < $cnt; ++$i) { - $char = strtoupper($read{$i}); + for (; $i < $cnt; ++$i) { + $char = strtoupper($read{$i}); switch ($char) { case '(': if ($arg_no == 0) { @@ -885,9 +885,9 @@ class message { function parseProperties($read, $i) { $properties = array(); $prop_name = ''; - $arg_s = ''; for (; $read{$i} != ')'; ++$i) { + $arg_s = ''; if ($read{$i} == '"') { $res = $this->parseQuote($read, $i); $arg_s = $res[0]; @@ -898,18 +898,18 @@ class message { $i = $res[1]; } - if (($prop_name == '') && $arg_s) { - $prop_name = strtolower($arg_s); - $properties[$prop_name] = ''; - $arg_s = ''; - } else if (($prop_name != '') && ($arg_s != '')) { - $properties[$prop_name] = $arg_s; - $prop_name = ''; - $arg_s = ''; + if ($arg_s != '') { + if ($prop_name == '') { + $prop_name = strtolower($arg_s); + $properties[$prop_name] = ''; + } else if ($prop_name != '') { + $properties[$prop_name] = $arg_s; + $prop_name = ''; + } } } - return (array($properties, $i)); + return array($properties, $i); } function parseEnvelope($read, $i, $hdr) { -- 2.25.1