aboutsummaryrefslogtreecommitdiff
path: root/lib/sfIsisImporter.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sfIsisImporter.class.php')
-rw-r--r--lib/sfIsisImporter.class.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sfIsisImporter.class.php b/lib/sfIsisImporter.class.php
index 6ab526d..9b2273a 100644
--- a/lib/sfIsisImporter.class.php
+++ b/lib/sfIsisImporter.class.php
@@ -93,7 +93,7 @@ class sfIsisImporter extends sfIsisImporterRelations
{
// Get data and setup the model.
$this->isis->read($entry);
- $model = $this->newModel($base_model, $entry);
+ $model = $this->newModel($base_model);
if ($model)
{
@@ -121,10 +121,9 @@ class sfIsisImporter extends sfIsisImporterRelations
* to work the entry must provide and id.
*
* @param string $base_model Model to use
- * @param int $entry Entry number
* @return mixed New model or false
*/
- public function newModel($base_model, $entry)
+ public function newModel($base_model)
{
$model = new $base_model();
$id = $this->getBaseModelId($model);
@@ -148,6 +147,7 @@ class sfIsisImporter extends sfIsisImporterRelations
}
}
+ $model->save();
return $model;
}
@@ -186,7 +186,7 @@ class sfIsisImporter extends sfIsisImporterRelations
*/
public function getBaseModelId(&$model)
{
- $method = 'get' . $this->getModelName($model) .'PrimaryKey';
+ $method = 'get'. $this->getModelName($model) .'PrimaryKey';
if (method_exists($this, $method))
{
return $this->{$method}($model);