[Vtigercrm-commits] [vtiger-commits] r10146 - in /vtigercrm/branches/5.0.3/modules/Webmails: ListView.php Webmail.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue Feb 6 07:46:49 EST 2007
Author: saraj
Date: Tue Feb 6 05:46:45 2007
New Revision: 10146
Log:
* Modified to get the utf8 decoded string ie., to fix the translation issue
Modified:
vtigercrm/branches/5.0.3/modules/Webmails/ListView.php
vtigercrm/branches/5.0.3/modules/Webmails/Webmail.php
Modified: vtigercrm/branches/5.0.3/modules/Webmails/ListView.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Webmails/ListView.php (original)
+++ vtigercrm/branches/5.0.3/modules/Webmails/ListView.php Tue Feb 6 05:46:45 2007
@@ -219,23 +219,26 @@
var msgCount = "<?php echo $numEmails;?>";
<?php
$mails = array();
-if (is_array($overview)) {
- foreach ($overview as $val) {
- $mails[$val->msgno] = $val;
- ?>
- webmail[<?php echo $val->msgno;?>] = new Array();
- webmail[<?php echo $val->msgno;?>]["from"]="<?php echo addslashes($val->from);?>";
- webmail[<?php echo $val->msgno;?>]["to"]="<?php echo addslashes($val->to);?>";
-
- <?php
+if (is_array($overview))
+{
+ foreach ($overview as $val)
+ {
+ $mails[$val->msgno] = $val;
+
//Added to get the UTF-8 string - 30-11-06 - Mickie
+ //we have to do this utf8 decode for the fields which may contains special characters -- Mickie - 02-02-07
+ $val->from = utf8_decode(imap_utf8(addslashes($val->from)));
+ $val->to = utf8_decode(imap_utf8(addslashes($val->to)));
$val->subject = utf8_decode(imap_utf8($val->subject));
?>
-
- webmail[<?php echo $val->msgno;?>]["subject"]="<?php echo addslashes($val->subject);?>";
- webmail[<?php echo $val->msgno;?>]["date"]="<?php echo addslashes($val->date);?>";
+
+ webmail[<?php echo $val->msgno;?>] = new Array();
+ webmail[<?php echo $val->msgno;?>]["from"]="<?php echo addslashes($val->from);?>";
+ webmail[<?php echo $val->msgno;?>]["to"]="<?php echo addslashes($val->to);?>";
+ webmail[<?php echo $val->msgno;?>]["subject"]="<?php echo addslashes($val->subject);?>";
+ webmail[<?php echo $val->msgno;?>]["date"]="<?php echo addslashes($val->date);?>";
<?php
- }
+ }
}
echo "</script>";
Modified: vtigercrm/branches/5.0.3/modules/Webmails/Webmail.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Webmails/Webmail.php (original)
+++ vtigercrm/branches/5.0.3/modules/Webmails/Webmail.php Tue Feb 6 05:46:45 2007
@@ -268,6 +268,9 @@
//Added to get the UTF-8 string - 30-11-06 - Mickie
$parts[$i]->dparameters[0]->value = utf8_decode(imap_utf8($parts[$i]->dparameters[0]->value));
+ //Added to get the UTF-8 string - 02-02-06 - Mickie
+ $filedata = utf8_decode(imap_utf8($filedata));
+
$inline[] = array("filename" => $parts[$i]->dparameters[0]->value,"filedata"=>$filedata,"subtype"=>$parts[$i]->subtype,"filesize"=>$parts[$i]->bytes);
}
}
More information about the vtigercrm-commits
mailing list