[Vtigercrm-commits] [vtiger-commits] r6413 - in /vtigercrm/trunk/modules/Webmails: CallRelatedList.php DetailView.php EditView.php EditView.php.orig Forms.php ListView.php ListView.php.orig Save.php WebmailsAjax.php body.php dlAttachments.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu May 25 09:50:38 EDT 2006
Author: mmbrich
Date: Thu May 25 07:50:37 2006
New Revision: 6413
Log:
cleaned up old .orig files and added an extra mbox check for users still having SSL/TLS problems.
Removed:
vtigercrm/trunk/modules/Webmails/EditView.php.orig
vtigercrm/trunk/modules/Webmails/ListView.php.orig
Modified:
vtigercrm/trunk/modules/Webmails/CallRelatedList.php
vtigercrm/trunk/modules/Webmails/DetailView.php
vtigercrm/trunk/modules/Webmails/EditView.php
vtigercrm/trunk/modules/Webmails/Forms.php
vtigercrm/trunk/modules/Webmails/ListView.php
vtigercrm/trunk/modules/Webmails/Save.php
vtigercrm/trunk/modules/Webmails/WebmailsAjax.php
vtigercrm/trunk/modules/Webmails/body.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 07:50:37 2006
@@ -33,7 +33,10 @@
global $mbox;
if($ssltype == "") {$ssltype = "notls";}
if($sslmeth == "") {$sslmeth = "novalidate-cert";}
-$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey) or die("Connection to server failed ".imap_last_error());
+$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());
$email = new Webmail($mbox, $mailid);
Modified: vtigercrm/trunk/modules/Webmails/DetailView.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/DetailView.php (original)
+++ vtigercrm/trunk/modules/Webmails/DetailView.php Thu May 25 07:50:37 2006
@@ -29,7 +29,11 @@
global $mbox;
if($ssltype == "") {$ssltype = "notls";}
if($sslmeth == "") {$sslmeth = "novalidate-cert";}
-$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey) or die("Connection to server failed ".imap_last_error());
+$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());
+
echo ' after in DetailView ';
Modified: vtigercrm/trunk/modules/Webmails/EditView.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/EditView.php (original)
+++ vtigercrm/trunk/modules/Webmails/EditView.php Thu May 25 07:50:37 2006
@@ -79,7 +79,11 @@
if($ssltype == "") {$ssltype = "notls";}
if($sslmeth == "") {$sslmeth = "novalidate-cert";}
-$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey) or die("Connection to server failed ".imap_last_error());
+$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());
+
$webmail = new Webmail($mbox,$mailid);
$webmail->loadMail();
Modified: vtigercrm/trunk/modules/Webmails/Forms.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/Forms.php (original)
+++ vtigercrm/trunk/modules/Webmails/Forms.php Thu May 25 07:50:37 2006
@@ -3,17 +3,9 @@
}
function get_new_record_form () {
-
- //$login_username= "mmbrich";
- //$secretkey="mk2305";
- //$imapServerAddress="mail.fosslabs.com";
-
$the_form = '<table width="100%" class="leftFormTable" cellpadding="0" cellspacing="0" border="0" align="center"><tbody><tr>';
$the_form .= '<td class="leftFormHeader" align="left" height="20" nowrap="nowrap" valign="middle">Folders</td></tbody></tr></table>';
$the_form .= '<table width="100%" cellpadding="2" cellspacing="0" border="0" align="center" class="leftFormBorder1"><tr> <form><td nowrap>';
- //global $mbox;
- //$mbox = @imap_open("\{$imapServerAddress/imap}INBOX", $login_username, $secretkey) or die("Connection to server failed");
- //$list = imap_getmailboxes($mbox, "{".$imapServerAddress."}", "*");
$the_boxes=array();
if (is_array($list)) {
foreach ($list as $key => $val) {
Modified: vtigercrm/trunk/modules/Webmails/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/ListView.php (original)
+++ vtigercrm/trunk/modules/Webmails/ListView.php Thu May 25 07:50:37 2006
@@ -56,6 +56,7 @@
window.location=window.location;
$("status").style.display="none";
+ timer = window.setTimeout("check_for_new_mail()",box_refresh);
}
}
);
@@ -129,16 +130,8 @@
<script language="JavaScript" type="text/javascript" src="include/js/prototype.js"></script>
<script type="text/Javascript">
-//var box_refresh=<?php echo $box_refresh;?>;
-//var timer = window.onload=window.setTimeout("refresh_list()",box_refresh);
-function reset_timer() {
- timer = window.setTimeout("refresh_list()",box_refresh);
-}
-function refresh_list() {
- var sURL = unescape(window.location);
- window.location.replace( sURL );
- timer = window.setTimeout("refresh_list()",box_refresh);
-}
+var box_refresh=<?php echo $box_refresh;?>;
+var timer = window.onload=window.setTimeout("check_for_new_mail()",box_refresh);
var command;
var id;
@@ -225,7 +218,7 @@
return r;
}
function changeMbox(box) {
- location.href = "index.php?module=Webmails&action=index&parenttab=My%20Home%20Page&mailbox="+box;
+ location.href = "index.php?module=Webmails&action=index&parenttab=My%20Home%20Page&mailbox="+box+"&start=<?php echo $start;?>";
}
</script>
<?
@@ -245,7 +238,11 @@
global $mbox;
if($ssltype == "") {$ssltype = "notls";}
if($sslmeth == "") {$sslmeth = "novalidate-cert";}
-$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey) or die("Connection to server failed ".imap_last_error());
+$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());
+
if($_POST["command"] == "check_mbox" && $_POST["ajax"] == "true") {
$check = imap_mailboxmsginfo($mbox);
@@ -442,6 +439,8 @@
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(!$mbox)
+ $mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/}".$mailbox, $login_username, $secretkey) or die("Connection to server failed ".imap_last_error());
$box = imap_mailboxmsginfo($tmbox);
$boxes .= '<option value="'.$tmpval.'">'.$tmpval;
$folders .= '<li><img src="'.$image_path.'/'.$img.'" align="absmiddle" /> <a href="javascript:changeMbox(\''.$tmpval.'\');" class="webMnu">'.$tmpval.'</a> <b>('.$box->Unread.' of '.$box->Nmsgs.')</b></li>';
Modified: vtigercrm/trunk/modules/Webmails/Save.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/Save.php (original)
+++ vtigercrm/trunk/modules/Webmails/Save.php Thu May 25 07:50:37 2006
@@ -43,7 +43,11 @@
global $mbox;
if($ssltype == "") {$ssltype = "notls";}
if($sslmeth == "") {$sslmeth = "novalidate-cert";}
-$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey) or die("Connection to server failed ".imap_last_error());
+$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());
+
$email = new Webmail($mbox, $_REQUEST["mailid"]);
Modified: vtigercrm/trunk/modules/Webmails/WebmailsAjax.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/WebmailsAjax.php (original)
+++ vtigercrm/trunk/modules/Webmails/WebmailsAjax.php Thu May 25 07:50:37 2006
@@ -1,6 +1,21 @@
<?php
+/*********************************************************************************
+ ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
+ * ("License"); You may not use this file except in compliance with the License
+ * The Original Code is: vtiger CRM Open Source
+ * The Initial Developer of the Original Code is vtiger.
+ * Portions created by vtiger are Copyright (C) vtiger.
+ * All Rights Reserved.
+ *
+ ********************************************************************************/
-//foreach($_REQUEST as $key=>$value) {
-// echo $value."<br />";
-//}
+require_once('include/logging.php');
+require_once('modules/Emails/Email.php');
+require_once('include/database/PearDatabase.php');
+global $adb;
+
+$local_log =& LoggerManager::getLogger('EmailsAjax');
+
+$ajaxaction = $_REQUEST["ajxaction"];
+
?>
Modified: vtigercrm/trunk/modules/Webmails/body.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/body.php (original)
+++ vtigercrm/trunk/modules/Webmails/body.php Thu May 25 07:50:37 2006
@@ -23,7 +23,11 @@
global $mbox;
if($ssltype == "") {$ssltype = "notls";}
if($sslmeth == "") {$sslmeth = "novalidate-cert";}
-$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey) or die("Connection to server failed ".imap_last_error());
+$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());
+
$email = new Webmail($mbox,$mailid);
$email->loadMail();
Modified: vtigercrm/trunk/modules/Webmails/dlAttachments.php
==============================================================================
--- vtigercrm/trunk/modules/Webmails/dlAttachments.php (original)
+++ vtigercrm/trunk/modules/Webmails/dlAttachments.php Thu May 25 07:50:37 2006
@@ -17,7 +17,11 @@
if($ssltype == "") {$ssltype = "notls";}
if($sslmeth == "") {$sslmeth = "novalidate-cert";}
-$mbox = @imap_open("{".$imapServerAddress."/".$mail_protocol."/".$ssltype."/".$sslmeth."}".$mailbox, $login_username, $secretkey) or die("Connection to server failed ".imap_last_error());
+$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());
+
$mailid=$_REQUEST["mailid"];
More information about the vtigercrm-commits
mailing list