Index: trunk/extensions/SemanticForms/includes/SF_PageSchemas.php |
— | — | @@ -67,10 +67,11 @@ |
68 | 68 | public static function createSchemaXMLFromForm() { |
69 | 69 | global $wgRequest; |
70 | 70 | |
| 71 | + $formName = null; |
71 | 72 | $xml = ''; |
72 | 73 | foreach ( $wgRequest->getValues() as $var => $val ) { |
73 | 74 | if ( $var == 'sf_form_name' ) { |
74 | | - $xml = '<semanticforms_Form name="' . $val . '" >'; |
| 75 | + $formName = $val; |
75 | 76 | } elseif ( $var == 'sf_page_name_formula' ) { |
76 | 77 | if ( !empty( $val ) ) { |
77 | 78 | $xml .= '<PageNameFormula>' . $val . '</PageNameFormula>'; |
— | — | @@ -83,9 +84,10 @@ |
84 | 85 | if ( !empty( $val ) ) { |
85 | 86 | $xml .= '<EditTitle>' . $val . '</EditTitle>'; |
86 | 87 | } |
87 | | - $xml .= '</semanticforms_Form>'; |
88 | 88 | } |
89 | 89 | } |
| 90 | + $xml = '<semanticforms_Form name="' . $formName . '" >' . $xml; |
| 91 | + $xml .= '</semanticforms_Form>'; |
90 | 92 | return $xml; |
91 | 93 | } |
92 | 94 | |
— | — | @@ -186,7 +188,7 @@ |
187 | 189 | // we set it based on whether or not a page formula has been |
188 | 190 | // specified. |
189 | 191 | $twoStepProcessAttrs = array( 'id' => 'sf-two-step-process' ); |
190 | | - if ( $pageNameFormula === '' ) { |
| 192 | + if ( is_null( $pageNameFormula ) ) { |
191 | 193 | $twoStepProcessAttrs['checked'] = true; |
192 | 194 | } |
193 | 195 | $text .= '<p>' . Html::input( 'sf_two_step_process', null, 'checkbox', $twoStepProcessAttrs ); |