Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.6

Request #5029 [PATCH] HTML_QuickForm filter support
Submitted: 2005-08-08 22:16 UTC
From: ieure at php dot net Assigned: wiesemann
Status: Closed Package: DB_Table
PHP Version: Irrelevant OS: Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 22 - 7 = ?

 
 [2005-08-08 22:16 UTC] ieure at php dot net
Description: ------------ This patch implements filter support for DB_Table-generated forms. In the column definition, you can now add: $col = array( 'someField' => array( 'type' => 'clob', ... 'qf_filters' => array( 'strtolower', 'htmlspecialchars', array('some_class', 'some_function') ) ), ... ); ...and so on. Filters are applied in the order they are declared. Unfortunately, you can only add regular functions and static class methods. There's no way to assign $this in class var definitions. I wanted to add a special key like _THIS_CLASS_, but it doesn't appear that there's any way to know what the correct class is from any function in DB_Table_QuickForm. I'm open to suggestions, if you have any. Patch: http://atomized.org/PEAR/DB_Table-filters.patch

Comments

 [2005-08-09 14:38 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-08-09 18:49 UTC] ieure at php dot net
Right, I know about get_class(), but that won't work because you can't use the result of an expression for assigning a member variable. I'll see about implementing form-wide filtering in a couple days.
 [2005-08-09 21:12 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-08-13 13:22 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-08-17 18:10 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!