Merge pull request #4773 from civicrm/version-fix
[civicrm-core.git] / CRM / Import / DataSource / CSV.php
index c9cee1e0f31314a18dd106f1bba134a1323cf71a..55f7af6f2f08ae182eca4280709bdb1724c00030 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -49,7 +49,7 @@ class CRM_Import_DataSource_CSV extends CRM_Import_DataSource {
   }
 
   /**
-   * Function to set variables up before form is built
+   * Set variables up before form is built
    *
    * @access public
    */
@@ -60,7 +60,7 @@ class CRM_Import_DataSource_CSV extends CRM_Import_DataSource {
    * form snippet. It should add all fields necesarry to get the data
    * uploaded to the temporary table in the DB.
    *
-   * @param $form
+   * @param CRM_Core_Form $form
    *
    * @return void (operates directly on form argument)
    * @access public
@@ -70,9 +70,7 @@ class CRM_Import_DataSource_CSV extends CRM_Import_DataSource {
 
     $config = CRM_Core_Config::singleton();
 
-    // FIXME: why do we limit the file size to 8 MiB if it's larger in config?
-    $sizeInBytes = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize.'m');
-    $uploadFileSize = $sizeInBytes >= 8388608 ? 8388608 : $sizeInBytes;
+    $uploadFileSize = CRM_Core_Config_Defaults::formatUnitSize($config->maxFileSize.'m');
     $uploadSize = round(($uploadFileSize / (1024 * 1024)), 2);
     $form->assign('uploadSize', $uploadSize);
     $form->add('File', 'uploadFile', ts('Import Data File'), 'size=30 maxlength=255', TRUE);
@@ -85,7 +83,7 @@ class CRM_Import_DataSource_CSV extends CRM_Import_DataSource {
   }
 
   /**
-   * Function to process the form
+   * Process the form submission
    *
    * @access public
    */