Index: trunk/extensions/SemanticForms/includes/SF_PageSchemas.php |
— | — | @@ -100,10 +100,10 @@ |
101 | 101 | $value = str_replace( "\a", $listSeparator, trim( $value ) ); |
102 | 102 | $param_value = explode( "=", $value ); |
103 | 103 | if ( $param_value[1] != null ) { |
104 | | - //handles Parameter name="size">20</Parameter> |
| 104 | + // Handles <Parameter name="size">20</Parameter> |
105 | 105 | $xml .= '<Parameter name="'.$param_value[0].'">'.$param_value[1].'</Parameter>'; |
106 | 106 | } else { |
107 | | - //handles <Parameter name="mandatory" /> |
| 107 | + // Handles <Parameter name="mandatory" /> |
108 | 108 | $xml .= '<Parameter name="'.$param_value[0].'"/>'; |
109 | 109 | } |
110 | 110 | } |
— | — | @@ -116,7 +116,7 @@ |
117 | 117 | return true; |
118 | 118 | } |
119 | 119 | |
120 | | - public static function getSchemaHTML( $pageSchemaObj, &$text_extensions ) { |
| 120 | + public static function getSchemaHTML( $pageSchemaObj, &$extensionsHTML ) { |
121 | 121 | $form_array = array(); |
122 | 122 | $hasExistingValues = false; |
123 | 123 | if ( !is_null( $pageSchemaObj ) ) { |
— | — | @@ -150,7 +150,7 @@ |
151 | 151 | $editTitle = ''; |
152 | 152 | } |
153 | 153 | $text .= "\t<p>" . wfMsg( 'sf-pageschemas-edittitle' ) . ' ' . Html::input( 'sf_edit_title', $editTitle, 'text', array( 'size' => 25 ) ) . "</p>\n"; |
154 | | - $text_extensions['sf'] = array( 'Form', '#CF9', $text, $hasExistingValues ); |
| 154 | + $extensionsHTML['sf'] = array( 'Form', '#CF9', $text, $hasExistingValues ); |
155 | 155 | |
156 | 156 | return true; |
157 | 157 | } |
— | — | @@ -159,7 +159,7 @@ |
160 | 160 | * Returns the HTML for inputs to define a single form field, |
161 | 161 | * within the Page Schemas 'edit schema' page. |
162 | 162 | */ |
163 | | - public static function getFieldHTML( $field, &$text_extensions ) { |
| 163 | + public static function getFieldHTML( $field, &$extensionsHTML ) { |
164 | 164 | $hasExistingValues = false; |
165 | 165 | $fieldValues = array(); |
166 | 166 | if ( !is_null( $field ) ) { |
— | — | @@ -204,7 +204,7 @@ |
205 | 205 | $inputParamsAttrs = array( 'size' => 80 ); |
206 | 206 | $inputParamsInput = Html::input( 'sf_key_values_num', $param_value_str, 'text', $inputParamsAttrs ); |
207 | 207 | $text .= "\t<p>$inputParamsInput</p>\n"; |
208 | | - $text_extensions['sf'] = array( 'Form input', '#CF9', $text, $hasExistingValues ); |
| 208 | + $extensionsHTML['sf'] = array( 'Form input', '#CF9', $text, $hasExistingValues ); |
209 | 209 | |
210 | 210 | return true; |
211 | 211 | } |
— | — | @@ -214,7 +214,7 @@ |
215 | 215 | if ( is_null( $mainFormInfo ) || !array_key_exists( 'name', $mainFormInfo ) ) { |
216 | 216 | return null; |
217 | 217 | } |
218 | | - return $mainFormInfo['name'] |
| 218 | + return $mainFormInfo['name']; |
219 | 219 | } |
220 | 220 | |
221 | 221 | public static function getMainFormInfo( $psSchemaObj ) { |
— | — | @@ -287,7 +287,7 @@ |
288 | 288 | if ( array_key_exists( 'smw', $smw_array ) ) { |
289 | 289 | $propertyName = $smw_array['smw']['name']; |
290 | 290 | } else { |
291 | | - $propertName = null; |
| 291 | + $propertyName = null; |
292 | 292 | } |
293 | 293 | if ( $fieldObj->getLabel() == '' ) { |
294 | 294 | $fieldLabel = $fieldObj->getName(); |
— | — | @@ -393,11 +393,11 @@ |
394 | 394 | $text = PageSchemas::tableMessageRowHTML( "paramAttr", wfMsg( 'specialpages-group-sf_group' ), (string)$tag ); |
395 | 395 | foreach ( $child->children() as $prop ) { |
396 | 396 | if ( $prop->getName() == 'InputType' ) { |
397 | | - $text .= PageSchemas::tableMessageRowHTML("paramAttrMsg", $prop->getName(), $prop ); |
| 397 | + $propName = 'Input type'; |
398 | 398 | } else { |
399 | | - $prop_name = (string)$prop->attributes()->name; |
400 | | - $text .= PageSchemas::tableMessageRowHTML("paramAttrMsg", $prop_name, (string)$prop ); |
| 399 | + $propName = (string)$prop->attributes()->name; |
401 | 400 | } |
| 401 | + $text .= PageSchemas::tableMessageRowHTML("paramAttrMsg", $propName, (string)$prop ); |
402 | 402 | } |
403 | 403 | $text_object['sf'] = $text; |
404 | 404 | break; |