[Vtigercrm-commits] [vtiger-commits] r4056 - /vtigercrm/branches/4.2/modules/uploads/add2db.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Mar 6 05:20:11 EST 2006
Author: mfedyk
Date: Mon Mar 6 03:20:09 2006
New Revision: 4056
Log:
clean up error checking during upload
Modified:
vtigercrm/branches/4.2/modules/uploads/add2db.php
Modified: vtigercrm/branches/4.2/modules/uploads/add2db.php
==============================================================================
--- vtigercrm/branches/4.2/modules/uploads/add2db.php (original)
+++ vtigercrm/branches/4.2/modules/uploads/add2db.php Mon Mar 6 03:20:09 2006
@@ -85,22 +85,36 @@
if($errorCode == 4)
{
include('themes/'.$theme.'/header.php');
- $errormessage = "<B><font color='red'>Kindly give a valid file for upload!</font></B> <br>" ;
+ $errormessage = "<B><font color='red'>Please give a valid file for upload.</font></B> <br>" ;
echo $errormessage;
include "upload.php";
}
else if($errorCode == 2)
{
- $errormessage = "<B><font color='red'>Sorry, the uploaded file exceeds the maximum filesize limit. Please try a file smaller than 1000000 bytes</font></B> <br>";
+ $errormessage = "<B><font color='red'>Sorry, the uploaded file exceeds the maximum filesize limit. Please try a file smaller than $upload_maxsize bytes</font></B> <br>";
include('themes/'.$theme.'/header.php');
echo $errormessage;
include "upload.php";
//echo $errorCode;
}
- else if($errorCode == 3 || $errorcode == '')
+ else if($errorCode == 1)
+ {
+ $errormessage = "<B><font color='red'>Sorry, the uploaded file exceeds the upload_max_filesize directive in php.ini</font></B> <br>";
+ include('themes/'.$theme.'/header.php');
+ echo $errormessage;
+ include "upload.php";
+ //echo $errorCode;
+ }
+ else if($errorCode == 3)
{
include('themes/'.$theme.'/header.php');
- echo "<b><font color='red'>Problems in file upload. Please try again!</font></b><br>";
+ echo "<b><font color='red'>The uploaded file was only partially received. Please try again.</font></b><br>";
+ include "upload.php";
+ }
+ else if($errorcode == '')
+ {
+ include('themes/'.$theme.'/header.php');
+ echo "<b><font color='red'>Error while receiving file. Check post_max_size in php.ini</font></b><br>";
include "upload.php";
}
More information about the vtigercrm-commits
mailing list