X-Git-Url: http://git.inspyration.org/?p=zf2.biz%2Fgalerie.git;a=blobdiff_plain;f=vendor%2Fzf2biz%2FCustom%2FModel%2FManager.php;h=c615e66d0237e8427d2f28b51dfd127139211271;hp=e7ae61960cc1adc64de1380d028f312d6a50804e;hb=1d8dc5f8f0a8510e71a99d11f4b09d6dbb970e8a;hpb=aa1c7f5a2437df40f75e7f2ff907c8e314593680 diff --git a/vendor/zf2biz/Custom/Model/Manager.php b/vendor/zf2biz/Custom/Model/Manager.php index e7ae619..c615e66 100644 --- a/vendor/zf2biz/Custom/Model/Manager.php +++ b/vendor/zf2biz/Custom/Model/Manager.php @@ -89,11 +89,11 @@ abstract class Manager extends AbstractTableGateway public function save(Entity $entity) { - if ($this->is_new()) { + if ($this->is_new($entity)) { $this->insert( $entity->toUpdatableArray() ); - } elseif ($this->getGalerie(extract_primary($entity))) { + } elseif ($this->any($this->extract_primary($entity))) { $this->update( $entity->toUpdatableArray(), $entity->toPrimaryArray()