[Alba-desarrollo] SVN Alba r4923 - prosistem/alba/trunk/dist/symfony-1.0.5/lib/util

commits en pressenter.com.ar commits en pressenter.com.ar
Mar Ago 7 02:41:13 CEST 2007


Author: josx
Date: 2007-08-06 21:41:01 -0300 (Mon, 06 Aug 2007)
New Revision: 4923

Modified:
   prosistem/alba/trunk/dist/symfony-1.0.5/lib/util/sfFillInForm.class.php
Log:
Parche para solucionar bug #1176 de symfony. Lo incluyo ahora y luego cuando lo agreguen en versiones posteriores ya seguramente estara integrado

Modified: prosistem/alba/trunk/dist/symfony-1.0.5/lib/util/sfFillInForm.class.php
===================================================================
--- prosistem/alba/trunk/dist/symfony-1.0.5/lib/util/sfFillInForm.class.php	2007-08-06 22:36:59 UTC (rev 4922)
+++ prosistem/alba/trunk/dist/symfony-1.0.5/lib/util/sfFillInForm.class.php	2007-08-07 00:41:01 UTC (rev 4923)
@@ -116,10 +116,19 @@
         {
           // checkbox and radio
           $element->removeAttribute('checked');
-          if ($this->hasValue($values, $name) && ($this->getValue($values, $name) == $value || !$element->hasAttribute('value')))
+
+	  if (is_array($this->getValue($values, $name)) && ($this->hasValue($values, $name) || !$element->hasAttribute('value'))) 
+	  {
+	    if (in_array($value, $this->getValue($values, $name))) 
+	    {
+              $element->setAttribute('checked', 'checked');
+	    }
+	  } 
+	  else if ($this->hasValue($values, $name) && ($this->getValue($values, $name) == $value || !$element->hasAttribute('value')))
           {
             $element->setAttribute('checked', 'checked');
           }
+
         }
         else
         {




Más información sobre la lista de distribución Alba-desarrollo