Author Topic: Show line in "Incorrect column count"  (Read 2388 times)

Matias Aguirre

  • Beginner
  • *
  • Posts: 3
    • Matware
Show line in "Incorrect column count"
« on: May 07, 2007, 23:01:01 pm »
Hi.

Here the simple modification that show the line of "Incorrect column count" error in classes/ps_csv.php file.

Code: [Select]
--- ps_csv.php  2007-05-07 17:43:52.000000000 -0300
+++ /home/fastslack/www/test.matware.com.ar/maravillosaflor.net/administrator/components/com_virtuemart/classes/ps_csv.php  2007-05-07 17:49:49.000000000 -0300
@@ -356,7 +356,7 @@
        // Check if the number of configured fields is the same as the number of fields in the CSV file

        if (2 > count($data)) {
-           $d['csv_stats']['incorrect']['message'] .= "<strong>Incorrect column count</strong>";
+           $d['csv_stats']['incorrect']['message'] .= "Line $this->line: <strong>Incorrect column count</strong>";
            $data = false;
            return false;
        }
@@ -427,7 +427,7 @@

        // Check if the number of configured fields is the same as the number of fields in the CSV file
        if (count($this->required_fields) != count($data)) {
-           $d['csv_stats']['incorrect']['message'] .= "<strong>Incorrect column count</strong><br />Configration: ".count($this->required_fields)." fields<br />File: ".count($data)." fields<br />";
+           $d['csv_stats']['incorrect']['message'] .= "Line $this->line: <strong>Incorrect column count</strong><br />Configration: ".count($this->required_fields)." fields<br />File: ".count($data)." fields<br />";
            return false;
        }
        else {

PS: sorry by my bad english
Matias Aguirre
Linux User Number: 78193
http://www.matware.com.ar/