Development

Changeset 11129

You must first sign up to be able to contribute.

Changeset 11129

Show
Ignore:
Timestamp:
08/25/08 21:52:08 (10 months ago)
Author:
fabien
Message:

[1.1, 1.2] fixed sfWidgetFormPropelSelect rendering in a view has different behaviours depending on how it is called (closes #4257)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/widget/sfWidgetFormPropelSelect.class.php

    r10437 r11129  
    100100  public function __clone() 
    101101  { 
    102     $this->setOption('choices', new sfCallable(array($this, 'getChoices'))); 
     102    if ($this->getOption('choices') instanceof sfCallable) 
     103    { 
     104      $callable = $this->getOption('choices')->getCallable(); 
     105      if (is_array($callable)) 
     106      { 
     107        $callable[0] = $this; 
     108        $this->setOption('choices', new sfCallable($callable)); 
     109      } 
     110    } 
    103111  } 
    104112} 
  • plugins/sfPropelPlugin/trunk/lib/propel/widget/sfWidgetFormPropelSelect.class.php

    r10450 r11129  
    100100  public function __clone() 
    101101  { 
    102     $this->setOption('choices', new sfCallable(array($this, 'getChoices'))); 
     102    if ($this->getOption('choices') instanceof sfCallable) 
     103    { 
     104      $callable = $this->getOption('choices')->getCallable(); 
     105      if (is_array($callable)) 
     106      { 
     107        $callable[0] = $this; 
     108        $this->setOption('choices', new sfCallable($callable)); 
     109      } 
     110    } 
    103111  } 
    104112} 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.