From 83581a1f366295983a015b6e4c931102d04e0c49 Mon Sep 17 00:00:00 2001 From: Silvio Date: Wed, 29 Sep 2010 16:12:21 -0300 Subject: Cleanup --- lib/sfIsisImporter.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') 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); -- cgit v1.2.3