aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@devlet.com.br>2010-09-29 16:12:21 -0300
committerSilvio <silvio@devlet.com.br>2010-09-29 16:12:21 -0300
commit83581a1f366295983a015b6e4c931102d04e0c49 (patch)
tree7ff6d8e110ef0e6b1ea3e087c5de26f0db694b29
parent0e12894d6c504cb02731d7fba2f7e227faef3398 (diff)
downloadsf_isis_importer_plugin-83581a1f366295983a015b6e4c931102d04e0c49.tar.gz
sf_isis_importer_plugin-83581a1f366295983a015b6e4c931102d04e0c49.tar.bz2
Cleanup
-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);