[Vtigercrm-commits] [vtiger-commits] r10920 - in /vtigercrm/branches/5.0.3/modules/Webmails: MailBox.php language/en_us.lang.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon May 14 15:24:01 EDT 2007


Author: richie
Date: Mon May 14 13:23:52 2007
New Revision: 10920

Log:
* Added condition to check the imap function to avoid the error if imap is not supported

Modified:
    vtigercrm/branches/5.0.3/modules/Webmails/MailBox.php
    vtigercrm/branches/5.0.3/modules/Webmails/language/en_us.lang.php

Modified: vtigercrm/branches/5.0.3/modules/Webmails/MailBox.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Webmails/MailBox.php (original)
+++ vtigercrm/branches/5.0.3/modules/Webmails/MailBox.php Mon May 14 13:23:52 2007
@@ -159,7 +159,13 @@
 		$connectString1 = "{".$this->imapServerAddress."/".$this->mail_protocol.":".$port."}".$this->mailbox; 
 
 		$this->db->println("Done Building Connection String.. Connecting to box");
-
+		//checking the imap support in php
+		if(!function_exists('imap_open'))
+		{
+			echo "<strong>".$mod_strings['LBL_ENABLE_IMAP_SUPPORT']."</strong>";
+			exit();
+		}
+			
 		if(!$this->mbox = @imap_open($connectString, $this->login_username, $this->secretkey))
 		{
 			//try second string which has no tls or validate-cert

Modified: vtigercrm/branches/5.0.3/modules/Webmails/language/en_us.lang.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Webmails/language/en_us.lang.php (original)
+++ vtigercrm/branches/5.0.3/modules/Webmails/language/en_us.lang.php Mon May 14 13:23:52 2007
@@ -160,5 +160,6 @@
 'ADD_FOLDER' => 'Add Folder[X]',
 //Added for 5.0.3
 'LBL_LOADING_IMAGE' => 'Loading Image',
+'LBL_ENABLE_IMAP_SUPPORT' => 'Please enable the IMAP support in php to run this module',
 );
 ?>





More information about the vtigercrm-commits mailing list