input_form.php.diff (2.4 kb) added by Christian Michel
Description: working implementation of form_input.php with cvs-version
Index: input_form.php
===================================================================
--- input_form.php (Revision 3885)
+++ input_form.php (Arbeitskopie)
@@ -29,7 +29,7 @@
* ),
* 'integer1' => new ezcInputFormDefinitionElement(
* ezcInputFormDefinitionElement::REQUIRED, 'int',
- * array( 'min_range' => 0, 'max_range' => 42 )
+ * array('options'=>array( 'min_range' => 0, 'max_range' => 42 ))
* ),
* 'xmlfield' => new ezcInputFormDefinitionElement(
* ezcInputFormDefinitionElement::REQUIRED, 'unsafe_raw'
@@ -208,7 +208,7 @@
foreach ( $this->definition as $elementName => $inputElement )
{
- $hasVariable = input_has_variable( $this->inputSource, $elementName );
+ $hasVariable = filter_has_var( $this->inputSource, $elementName );
if ( ! $hasVariable )
{
if ( $inputElement->type == ezcInputFormDefinitionElement::REQUIRED )
@@ -224,11 +224,11 @@
if ( isset( $inputElement->parameters ) )
{
- $value = input_get( $this->inputSource, $elementName, input_name_to_filter( $inputElement->filterName ), $inputElement->parameters );
+ $value = filter_input( $this->inputSource, $elementName, filter_id($inputElement->filterName) , $inputElement->parameters );
}
else
{
- $value = input_get( $this->inputSource, $elementName, input_name_to_filter( $inputElement->filterName ) );
+ $value = filter_input( $this->inputSource, $elementName, filter_id($inputElement->filterName) );
}
if ( $value !== null )
@@ -313,9 +313,9 @@
}
// The filter should be an existing filter
- if ( !in_array( $element->filterName, input_filters_list() ) )
+ if ( !in_array( $element->filterName, filter_list() ) )
{
- $filters = join( ', ', input_filters_list() );
+ $filters = join( ', ', filter_list() );
return array( ezcInputForm::DEF_UNSUPPORTED_FILTER, "The filter <{$element->filterName}> for element <{$name}> does not exist. Pick one of: $filters" );
}