[Vtigercrm-commits] [vtiger-commits] r5142 - in /vtigercrm/trunk/modules/Webmails: DetailView.php EditView.php ListView.php Save.php body.php index.php.orig.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Sun Apr 16 22:00:53 EDT 2006


Author: mmbrich
Date: Sun Apr 16 20:00:51 2006
New Revision: 5142

Log:
fix for php5 imap_open command


Removed:
    vtigercrm/trunk/modules/Webmails/index.php.orig.php
Modified:
    vtigercrm/trunk/modules/Webmails/DetailView.php
    vtigercrm/trunk/modules/Webmails/EditView.php
    vtigercrm/trunk/modules/Webmails/ListView.php
    vtigercrm/trunk/modules/Webmails/Save.php
    vtigercrm/trunk/modules/Webmails/body.php

Modified: vtigercrm/trunk/modules/Webmails/DetailView.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/DetailView.php (original)
+++ vtigercrm/trunk/modules/Webmails/DetailView.php Sun Apr 16 20:00:51 2006
@@ -29,7 +29,7 @@
 
 if($_REQUEST["mailbox"] && $_REQUEST["mailbox"] != "") {$mailbox=$_REQUEST["mailbox"];} else {$mailbox="INBOX";}
 global $mbox;
-$mbox = @imap_open("\{$imapServerAddress/$mail_protocol}$mailbox", $login_username, $secretkey) or die("Connection to server failed");
+$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey) or die("Connection to server failed");
 
 $email = new Webmail($mbox, $mailid);
 $from = $email->from;
@@ -47,11 +47,12 @@
 $bcc_list = $email->bcc_list_name[0]." <".$email->bcc_list[0].">";
 for($l=1;$l<count($email->bcc_list);$l++) {
 	$bcc_list .= "; ".$email->bcc_list_name[$l]." &lt;".$email->bcc_list[$l]."&gt;";
-}
-$reply_to = $email->$reply_to_name[0]." &lt;".$email->reply_to[0]."&gt;";
-for($l=1;$l<count($email->reply_to);$l++) {
-	$reply_to .= "; ".$email->reply_to_name[$l]." &lt;".$email->reply_to[$l]."&gt;";
-}
+}
+$reply_to = $from." <".$email->reply_to[0].">";
+
+for($l=1;$l<count($email->reply_to);$l++) {
+	$reply_to .= "; ".$email->reply_to_name[$l]." &lt;".$email->reply_to[$l]."&gt;";
+}
 
 $email->loadMail();
 $body = $email->body;

Modified: vtigercrm/trunk/modules/Webmails/EditView.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/EditView.php (original)
+++ vtigercrm/trunk/modules/Webmails/EditView.php Sun Apr 16 20:00:51 2006
@@ -77,9 +77,7 @@
 $ssltype=$temprow["ssltype"];
 $sslmeth=$temprow["sslmeth"];
 
-
-$mbox = @imap_open("\{$imapServerAddress/$mail_protocol/$ssltype/$sslmeth}$mailbox", $login_username, $secretkey) or die("Connection to server failed");
-		
+$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey) or die("Connection to server failed");
 $webmail = new Webmail($mbox,$mailid);
 $webmail->loadMail();
 $focus->column_fields['description'] = strip_tags($webmail->body);

Modified: vtigercrm/trunk/modules/Webmails/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/ListView.php (original)
+++ vtigercrm/trunk/modules/Webmails/ListView.php Sun Apr 16 20:00:51 2006
@@ -129,23 +129,24 @@
 
 
 global $mbox;
-$mbox = @imap_open("\{$imapServerAddress/$mail_protocol}$mailbox", $login_username, $secretkey) or die("Connection to server failed with: ".imap_last_error());
-
-function SureRemoveDir($dir) {
-   if(!$dh = @opendir($dir)) return;
-   while (($obj = readdir($dh))) {
-     if($obj=='.' || $obj=='..') continue;
-     if (!@unlink($dir.'/'.$obj)) {
-         SureRemoveDir($dir.'/'.$obj);
-     } else {
-         $file_deleted++;
-     }
-   }
-   if (@rmdir($dir)) $dir_deleted++;
-}
-
-$save_path='/usr/local/share/vtiger/modules/Webmails/tmp';
-$user_dir=$save_path."/".$_SESSION["authenticated_user_id"];
+$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey) or die("Connection to server failed");
+
+
+function SureRemoveDir($dir) {
+   if(!$dh = @opendir($dir)) return;
+   while (($obj = readdir($dh))) {
+     if($obj=='.' || $obj=='..') continue;
+     if (!@unlink($dir.'/'.$obj)) {
+         SureRemoveDir($dir.'/'.$obj);
+     } else {
+         $file_deleted++;
+     }
+   }
+   if (@rmdir($dir)) $dir_deleted++;
+}
+
+$save_path='/usr/local/share/vtiger/modules/Webmails/tmp';
+$user_dir=$save_path."/".$_SESSION["authenticated_user_id"];
 if($_REQUEST["expunge"]) {
 	imap_expunge($mbox);
 	SureRemoveDir($user_dir);

Modified: vtigercrm/trunk/modules/Webmails/Save.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/Save.php (original)
+++ vtigercrm/trunk/modules/Webmails/Save.php Sun Apr 16 20:00:51 2006
@@ -33,7 +33,7 @@
 if($_REQUEST["mailbox"] && $_REQUEST["mailbox"] != "") {$mailbox=$_REQUEST["mailbox"];} else {$mailbox="INBOX";}
 
 global $mbox;
-$mbox = @imap_open("\{$imapServerAddress/$mail_protocol/$ssltype/$sslmeth}$mailbox", $login_username, $secretkey) or die("Connection to server failed");
+$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey) or die("Connection to server failed");
 
 $email = new Webmail($mbox, $_REQUEST["mailid"]);
 

Modified: vtigercrm/trunk/modules/Webmails/body.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/body.php (original)
+++ vtigercrm/trunk/modules/Webmails/body.php Sun Apr 16 20:00:51 2006
@@ -21,7 +21,7 @@
 if(isset($_REQUEST["mailbox"]) && $_REQUEST["mailbox"] != "") {$mailbox=$_REQUEST["mailbox"];} else {$mailbox="INBOX";}
 
 global $mbox;
-$mbox = @imap_open("\{$imapServerAddress/$mail_protocol/$ssltype/$sslmeth}$mailbox", $login_username, $secretkey) or die("Connection to server failed");
+$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey) or die("Connection to server failed");
 
 $email = new Webmail($mbox,$mailid);
 $email->loadMail();





More information about the vtigercrm-commits mailing list