[Vtigercrm-commits] [vtiger-commits] r6431 - in /vtigercrm/trunk/modules/Webmails: CallRelatedList.php DetailView.php EditView.php ListView.php dlAttachments.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Thu May 25 13:32:56 EDT 2006


Author: mmbrich
Date: Thu May 25 11:32:54 2006
New Revision: 6431

Log:
workaround for windows SSL bug in PHP

Modified:
    vtigercrm/trunk/modules/Webmails/CallRelatedList.php
    vtigercrm/trunk/modules/Webmails/DetailView.php
    vtigercrm/trunk/modules/Webmails/EditView.php
    vtigercrm/trunk/modules/Webmails/ListView.php
    vtigercrm/trunk/modules/Webmails/dlAttachments.php

Modified: vtigercrm/trunk/modules/Webmails/CallRelatedList.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/CallRelatedList.php (original)
+++ vtigercrm/trunk/modules/Webmails/CallRelatedList.php Thu May 25 11:32:54 2006
@@ -33,7 +33,8 @@
 global $mbox;
 if($ssltype == "") {$ssltype = "notls";}
 if($sslmeth == "") {$sslmeth = "novalidate-cert";}
-$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey);
+if(!preg_match("/windows/i",php_uname()))
+	$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey);
 
 if(!$mbox)
         $mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/}".$mailbox, $login_username, $secretkey) or die("Connection to server failed ".imap_last_error());

Modified: vtigercrm/trunk/modules/Webmails/DetailView.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/DetailView.php (original)
+++ vtigercrm/trunk/modules/Webmails/DetailView.php Thu May 25 11:32:54 2006
@@ -29,7 +29,8 @@
 global $mbox;
 if($ssltype == "") {$ssltype = "notls";}
 if($sslmeth == "") {$sslmeth = "novalidate-cert";}
-$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey);
+if(!preg_match("/windows/i",php_uname()))
+	$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey);
 
 if(!$mbox)
         $mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/}".$mailbox, $login_username, $secretkey) or die("Connection to server failed ".imap_last_error());

Modified: vtigercrm/trunk/modules/Webmails/EditView.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/EditView.php (original)
+++ vtigercrm/trunk/modules/Webmails/EditView.php Thu May 25 11:32:54 2006
@@ -79,7 +79,8 @@
 
 if($ssltype == "") {$ssltype = "notls";}
 if($sslmeth == "") {$sslmeth = "novalidate-cert";}
-$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey);
+if(!preg_match("/windows/i",php_uname()))
+	$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey);
 
 if(!$mbox)
         $mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/}".$mailbox, $login_username, $secretkey) or die("Connection to server failed ".imap_last_error());

Modified: vtigercrm/trunk/modules/Webmails/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/ListView.php (original)
+++ vtigercrm/trunk/modules/Webmails/ListView.php Thu May 25 11:32:54 2006
@@ -107,6 +107,9 @@
                 }
         }
 	runEmailCommand('expunge','');
+}
+function search_emails() {
+	confirm("Seriously?  This really doesn't work yet "+$("search_input").value);
 }
 </script>
 <?php
@@ -256,7 +259,10 @@
 global $mbox;
 if($ssltype == "") {$ssltype = "notls";}
 if($sslmeth == "") {$sslmeth = "novalidate-cert";}
-$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey);
+// bug in windows PHP having to do with SSL not being linked correctly
+// causes this open command to fail.
+if(!preg_match("/windows/i",php_uname()))
+	$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey);
 
 if(!$mbox)
 	$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/}".$mailbox, $login_username, $secretkey) or die("Connection to server failed ".imap_last_error());
@@ -457,7 +463,8 @@
 		} else {
 			if($ssltype == "") {$ssltype = "notls";}
 			if($sslmeth == "") {$sslmeth = "novalidate-cert";}
-			$tmbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$tmpval, $login_username, $secretkey) or die("Connection to server failed ".imap_last_error());
+			if(!preg_match("/windows/i",php_uname()))
+				$tmbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$tmpval, $login_username, $secretkey) or die("Connection to server failed ".imap_last_error());
 			if(!$tmbox)
 				$tmbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/}".$mailbox, $login_username, $secretkey) or die("Connection to server failed ".imap_last_error());
 			$box = imap_mailboxmsginfo($tmbox);

Modified: vtigercrm/trunk/modules/Webmails/dlAttachments.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/dlAttachments.php (original)
+++ vtigercrm/trunk/modules/Webmails/dlAttachments.php Thu May 25 11:32:54 2006
@@ -17,7 +17,8 @@
 
 if($ssltype == "") {$ssltype = "notls";}
 if($sslmeth == "") {$sslmeth = "novalidate-cert";}
-$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey);
+if(!preg_match("/windows/i",php_uname()))
+	$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey);
 
 if(!$mbox)
         $mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/}".$mailbox, $login_username, $secretkey) or die("Connection to server failed ".imap_last_error());





More information about the vtigercrm-commits mailing list