formatting

This commit is contained in:
Miles Lott 2002-05-26 20:09:01 +00:00
parent 090f676483
commit bd6d7aac97
2 changed files with 88 additions and 87 deletions

View File

@ -16,7 +16,7 @@
class msg_base
{
var $msg_struct;
var $err = array("code","msg","desc");
var $err = array('code','msg','desc');
var $msg_info = Array(Array());
var $tempfile;
@ -32,9 +32,9 @@
function msg_base()
{
$this->err["code"] = " ";
$this->err["msg"] = " ";
$this->err["desc"] = " ";
$this->err['code'] = ' ';
$this->err['msg'] = ' ';
$this->err['desc'] = ' ';
$this->tempfile = $GLOBALS['phpgw_info']['server']['temp_dir'].SEP.$GLOBALS['phpgw_info']['user']['sessionid'].'.mhd';
$this->force_check = false;
$this->got_structure = false;
@ -133,13 +133,13 @@
$name['translated'] = '';
// folder name at this stage is {SERVER_NAME:PORT}FOLDERNAME
// get everything to the right of the bracket "}", INCLUDES the bracket itself
// get everything to the right of the bracket '}', INCLUDES the bracket itself
$name['folder_before'] = strstr($data_str,'}');
// get rid of that 'needle' "}"
// get rid of that 'needle' '}'
$name['folder_before'] = substr($name['folder_before'], 1);
// translate
$name['folder_after'] = imap_utf7_decode($name['folder_before']);
// "imap_utf7_decode" returns False if no translation occured
// 'imap_utf7_decode' returns False if no translation occured
if ($name['folder_after'] == False)
{
// no translation occured
@ -159,7 +159,7 @@
$flag = strtolower($flag);
for ($i=0;$i<count($header);$i++)
{
$pos = strpos($header[$i],":");
$pos = strpos($header[$i],':');
if (is_int($pos) && $pos)
{
$keyword = trim(substr($header[$i],0,$pos));
@ -172,6 +172,5 @@
}
return false;
}
} // end of class mail
?>

View File

@ -21,6 +21,8 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
\**************************************************************************/
/* $Id$ */
define('SA_MESSAGES',1);
define('SA_RECENT',2);
define('SA_UNSEEN',4);
@ -986,15 +988,15 @@
{
switch ($type_int)
{
case TYPETEXT : $type_str = 'text'; break;
case TYPEMULTIPART : $type_str = 'multipart'; break;
case TYPEMESSAGE : $type_str = 'message'; break;
case TYPEAPPLICATION : $type_str = 'application'; break;
case TYPEAUDIO : $type_str = 'audio'; break;
case TYPEIMAGE : $type_str = 'image'; break;
case TYPEVIDEO : $type_str = 'video'; break;
case TYPEOTHER : $type_str = 'other'; break;
default : $type_str = 'unknown';
case TYPETEXT : $type_str = 'text'; break;
case TYPEMULTIPART : $type_str = 'multipart'; break;
case TYPEMESSAGE : $type_str = 'message'; break;
case TYPEAPPLICATION : $type_str = 'application'; break;
case TYPEAUDIO : $type_str = 'audio'; break;
case TYPEIMAGE : $type_str = 'image'; break;
case TYPEVIDEO : $type_str = 'video'; break;
case TYPEOTHER : $type_str = 'other'; break;
default : $type_str = 'unknown';
}
return $type_str;
}
@ -1020,14 +1022,14 @@
{
switch ($encoding_int)
{
case ENC7BIT : $encoding_str = '7bit'; break;
case ENC8BIT : $encoding_str = '8bit'; break;
case ENCBINARY : $encoding_str = 'binary'; break;
case ENCBASE64 : $encoding_str = 'base64'; break;
case ENC7BIT : $encoding_str = '7bit'; break;
case ENC8BIT : $encoding_str = '8bit'; break;
case ENCBINARY : $encoding_str = 'binary'; break;
case ENCBASE64 : $encoding_str = 'base64'; break;
case ENCQUOTEDPRINTABLE : $encoding_str = 'quoted-printable'; break;
case ENCOTHER : $encoding_str = 'other'; break;
case ENCUU : $encoding_str = 'uu'; break;
default : $encoding_str = 'other';
case ENCOTHER : $encoding_str = 'other'; break;
case ENCUU : $encoding_str = 'uu'; break;
default : $encoding_str = 'other';
}
return $encoding_str;
}