X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=classes%2Fcsvimporter.php;h=6acb2c73b0203b763fed73000d9b8f7760e974e0;hb=ee47c4357d535e26a408f14e1144a3f8ed85528f;hp=571d22767225462ce3dac823b6acf25d1653b9cb;hpb=afada5eb6cf23005f775fbab0d421c27393172f1;p=platal.git diff --git a/classes/csvimporter.php b/classes/csvimporter.php index 571d227..6acb2c7 100644 --- a/classes/csvimporter.php +++ b/classes/csvimporter.php @@ -1,6 +1,6 @@ $ref) { - $ops[$key] = $this->getValue($line, $key, $ref); + $ops[$key] = $this->getValue($line, $key, $ref, $relation); } return $ops; } @@ -92,7 +92,7 @@ class CSVImporter { $ops = array(); foreach ($relation as $key=>$ref) { - $value = $this->getValue($line, $key, $ref); + $value = $this->getValue($line, $key, $ref, $relation); if (!is_null($value) && $value != 'NULL') { $value = "'" . addslashes($value) . "'"; } @@ -239,11 +239,11 @@ class CSVImporter } /** Handle insertion form - * @param $page PlatalPage to process + * @param $page PlPage to process * @param $url URI of the page * @param $field Editable fields */ - public function apply(&$page, $url, $fields = null) + public function apply($page, $url, $fields = null) { $sesfields = array('csv_value', 'csv_user_value', 'csv_cond_field', 'csv_update', 'csv_action', 'csv_cond_field',