projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "Updates the CSVImporter so that callbacks for cell generation have
[platal.git]
/
classes
/
csvimporter.php
diff --git
a/classes/csvimporter.php
b/classes/csvimporter.php
index
542de1d
..
0f576a0
100644
(file)
--- a/
classes/csvimporter.php
+++ b/
classes/csvimporter.php
@@
-64,12
+64,12
@@
class CSVImporter
return true;
}
return true;
}
- private function getValue($line, $
partial_ops, $
key, $action)
+ private function getValue($line, $key, $action)
{
if (@array_key_exists($action, $line)) {
$value = $line[$action];
} elseif (is_callable($action, false)) {
{
if (@array_key_exists($action, $line)) {
$value = $line[$action];
} elseif (is_callable($action, false)) {
- $value = call_user_func($action, $line, $
partial_ops, $
key);
+ $value = call_user_func($action, $line, $key);
} else {
$value = $action;
}
} else {
$value = $action;
}
@@
-83,7
+83,7
@@
class CSVImporter
{
$ops = array();
foreach ($relation as $key=>$ref) {
{
$ops = array();
foreach ($relation as $key=>$ref) {
- $ops[$key] = $this->getValue($line, $
ops, $
key, $ref);
+ $ops[$key] = $this->getValue($line, $key, $ref);
}
return $ops;
}
}
return $ops;
}
@@
-92,7
+92,7
@@
class CSVImporter
{
$ops = array();
foreach ($relation as $key=>$ref) {
{
$ops = array();
foreach ($relation as $key=>$ref) {
- $value = $this->getValue($line, $
ops, $
key, $ref);
+ $value = $this->getValue($line, $key, $ref);
if (!is_null($value) && $value != 'NULL') {
$value = "'" . addslashes($value) . "'";
}
if (!is_null($value) && $value != 'NULL') {
$value = "'" . addslashes($value) . "'";
}