r73660 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73659‎ | r73660 | r73661 >
Date:15:58, 24 September 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.7 - filtering non-map params comming from SF
Modified paths:
  • /trunk/extensions/SemanticMaps/includes/forminputs/SM_FormInput.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/includes/forminputs/SM_FormInput.php
@@ -109,17 +109,21 @@
110110
111111 $validator = new Validator( 'form' ); // TODO
112112
113 - /* TODO: filter these params!
114 - 'service_name' => array(),
115 - 'part_of_multiple' => array(),
116 - 'possible_values' => array(
117 - 'type' => array( 'string', 'array' ),
118 - ),
119 - 'is_list' => array(),
120 - 'semantic_property' => array(),
121 - 'value_labels' => array(),
122 - */
 113+ $paramsToFilter = array(
 114+ 'service_name',
 115+ 'part_of_multiple',
 116+ 'possible_values',
 117+ 'is_list',
 118+ 'semantic_property',
 119+ 'value_labels'
 120+ );
123121
 122+ foreach ( $paramsToFilter as $paramName ) {
 123+ if ( aray_key_exists( $paramName, $mapProperties ) ) {
 124+ unset( $mapProperties[$paramName] );
 125+ }
 126+ }
 127+
124128 $validator->setParameters( $mapProperties, $parameterInfo );
125129
126130 $validator->validateParameters();

Status & tagging log