[Solar-svn] Revision 2788

pmjones at solarphp.com pmjones at solarphp.com
Mon Sep 24 21:33:49 CDT 2007


branch: Solar_Form: [FIX] Multiple fixes from Rodrigo Moraes; many thanks, Rodrigo, for the walk-through on these.


Modified: branches/orm/Solar/Form.php
===================================================================
--- branches/orm/Solar/Form.php	2007-09-24 18:39:43 UTC (rev 2787)
+++ branches/orm/Solar/Form.php	2007-09-25 02:33:49 UTC (rev 2788)
@@ -265,6 +265,12 @@
             $this->_config['request']
         );
         
+        // filter object
+        $this->_filter = Solar::dependency(
+            'Solar_Filter',
+            $this->_config['filter']
+        );
+        
         // set the default action attribute
         $action = $this->_request->server('REQUEST_URI');
         $this->_default_attribs['action'] = $action;
@@ -274,6 +280,9 @@
             $this->_default_attribs,
             $this->_config['attribs']
         );
+        
+        // reset all the properties based on config now
+        $this->reset();
     }
     
     // -----------------------------------------------------------------
@@ -606,8 +615,8 @@
             $data[$name] = &$info['value'];
             
             // set the filters and require-flag, reference not needed
-            $this->_filter->addChainFilters($info['filters']);
-            $this->_filter->setChainRequire($info['require']);
+            $this->_filter->addChainFilters($name, $info['filters']);
+            $this->_filter->setChainRequire($name, $info['require']);
             
         }
         
@@ -682,8 +691,7 @@
         $this->attribs    = $this->_config['attribs'];
         $this->elements   = array();
         $this->feedback   = null;
-        $this->_filter    = array();
-        $this->_valid     = array();
+        $this->_filters   = array();
         $this->_submitted = null;
     }
     




More information about the Solar-svn mailing list