[Vtigercrm-commits] [vtiger-commits] r10756 - in /vtigercrm/branches/5.0.3/modules/Settings: language/en_us.lang.php savewordtemplate.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Sun Apr 22 13:12:21 EDT 2007


Author: saraj
Date: Sun Apr 22 11:12:15 2007
New Revision: 10756

Log:
Settings - Mail merge templates goes to blank page if wrong file given as input - fixed . Fixes #3586

Modified:
    vtigercrm/branches/5.0.3/modules/Settings/language/en_us.lang.php
    vtigercrm/branches/5.0.3/modules/Settings/savewordtemplate.php

Modified: vtigercrm/branches/5.0.3/modules/Settings/language/en_us.lang.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Settings/language/en_us.lang.php (original)
+++ vtigercrm/branches/5.0.3/modules/Settings/language/en_us.lang.php Sun Apr 22 11:12:15 2007
@@ -904,7 +904,8 @@
 'LBL_FIELDS_TO_BE_SHOWN'=>'Fields to be shown',
 //Added for alerts
 'SPECIFY_FILE_TO_MERGE' => 'Please Specify a File to Merge',
-'FILESIZE_EXCEEDS_INFO' => 'Sorry, the uploaded file exceeds the maximum filesize limit. Please try a smaller file',
+'FILESIZE_EXCEEDS_INFO_CONFIG_INC' => 'Sorry, the uploaded file exceeds the maximum file size limit in config.inc.php. Please try a smaller file',
+'FILESIZE_EXCEEDS_INFO_PHP_INI' => 'Sorry, the uploaded file exceeds the maximum file size limit in php.ini. Please try a smaller file',
 'PROBLEMS_IN_FILEUPLOAD' => 'Problems in file upload. Please try again!',
 
 //Added fields for Invoice Number labels

Modified: vtigercrm/branches/5.0.3/modules/Settings/savewordtemplate.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Settings/savewordtemplate.php (original)
+++ vtigercrm/branches/5.0.3/modules/Settings/savewordtemplate.php Sun Apr 22 11:12:15 2007
@@ -128,32 +128,37 @@
 } 
 else 
 {
-  $errorCode =  $_FILES['binFile']['error'];
-	
-  if($errorCode == 4)
-  {
-   include('themes/'.$theme.'/header.php');
-    include "upload.php";
-   // $errormessage = "<B><font color='red'>Kindly give a valid file for upload!</font></B> <br>" ;
-    echo "<script>alert('".$mod_strings['SPECIFY_FILE_TO_MERGE']."')</script>";
-  }
-  else if($errorCode == 2)
-  {
-    include('themes/'.$theme.'/header.php');
-    include "upload.php";
-    //$errormessage = "<B><font color='red'>Sorry, the uploaded file exceeds the maximum filesize limit. Please try a smaller file</font></B> <br>";
-	echo "<script>alert('".$mod_strings['FILESIZE_EXCEEDS_INFO']."')</script>";	
-    //echo $errormessage;
-    //echo $errorCode;
-  }
-  else if($errorCode == 3)
-  {
-   include('themes/'.$theme.'/header.php');
-    include "upload.php";
-    echo "<script>alert('".$mod_strings['PROBLEMS_IN_FILEUPLOAD']."')</script>";
-	
-  }
-  
+	$errorCode =  $_FILES['binFile']['error'];
+	if($errorCode == 4)
+	{
+		include('themes/'.$theme.'/header.php');
+		include "upload.php";
+		// $errormessage = "<B><font color='red'>Kindly give a valid file for upload!</font></B> <br>" ;
+		echo "<script>alert('".$mod_strings['SPECIFY_FILE_TO_MERGE']."')</script>";
+	}
+	else if($errorCode == 2) 
+	{
+		include('themes/'.$theme.'/header.php');
+		include "upload.php";
+		//$errormessage = "<B><font color='red'>Sorry, the uploaded file exceeds the maximum filesize limit. Please try a smaller file</font></B> <br>";
+		echo "<script>alert('".$mod_strings['FILESIZE_EXCEEDS_INFO_CONFIG_INC']."')</script>";	
+		//echo $errormessage;
+		//echo $errorCode;
+	}
+	elseif($errorCode == 1)
+	{
+		include('themes/'.$theme.'/header.php');
+		include "upload.php";
+		echo "<script>alert('".$mod_strings['FILESIZE_EXCEEDS_INFO_PHP_INI']."')</script>";
+	}
+	else if($errorCode == 3)
+	{
+		include('themes/'.$theme.'/header.php');
+		include "upload.php";
+		echo "<script>alert('".$mod_strings['PROBLEMS_IN_FILEUPLOAD']."')</script>";
+
+	}
+
 }
 
 function deleteFile($dir,$filename)





More information about the vtigercrm-commits mailing list