Development

Changeset 8937

You must first sign up to be able to contribute.

Changeset 8937

Show
Ignore:
Timestamp:
05/14/08 03:48:32 (2 months ago)
Author:
Jonathan.Wage
Message:

fixes #3530

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfDoctrinePlugin/trunk/lib/sfFormDoctrine.class.php

    r8743 r8937  
    3030{ 
    3131  protected 
    32     $isNew    = true, 
    3332    $cultures = array(), 
    3433    $object   = null; 
     
    5857 
    5958      $this->object = $object; 
    60       $this->isNew = $this->object->exists(); 
    6159    } 
    6260 
     
    8886  public function isNew() 
    8987  { 
    90     return $this->object->exists(); 
     88    return !$this->object->exists(); 
    9189  } 
    9290 
     
    307305  { 
    308306    // update defaults for the main object 
    309     if ($this->isNew
     307    if ($this->isNew()
    310308    { 
    311309      $this->setDefaults(array_merge($this->object->toArray(BasePeer::TYPE_FIELDNAME), $this->getDefaults())); 
     
    322320      foreach ($this->cultures as $culture) 
    323321      { 
    324         if ($this->isNew
     322        if ($this->isNew()
    325323        { 
    326324          $this->setDefault($culture, array_merge($this->object->$method($culture)->toArray(BasePeer::TYPE_FIELDNAME), $this->getDefault($culture)));