Index: trunk/extensions/SemanticForms/specials/SF_FormEdit.php |
— | — | @@ -88,12 +88,6 @@ |
89 | 89 | |
90 | 90 | if ( $target_name != '' ) { |
91 | 91 | $target_title = Title::newFromText( $target_name ); |
92 | | - if ( $target_title->exists() ) { |
93 | | - $s = wfMsg( 'sf_formedit_edittitle', $form_title->getText(), $target_title->getPrefixedText() ); |
94 | | - } else { |
95 | | - $s = wfMsg( 'sf_formedit_createtitle', $form_title->getText(), $target_title->getPrefixedText() ); |
96 | | - } |
97 | | - $wgOut->setPageTitle( $s ); |
98 | 92 | } |
99 | 93 | |
100 | 94 | // handling is different depending on whether or not page |
— | — | @@ -150,6 +144,18 @@ |
151 | 145 | } |
152 | 146 | list ( $form_text, $javascript_text, $data_text, $form_page_title, $generated_page_name ) = |
153 | 147 | $sfgFormPrinter->formHTML( $form_definition, $form_submitted, $page_is_source, $form_article->getID(), $page_contents, $target_name, $page_name_formula ); |
| 148 | + |
| 149 | + // Before we do anything else, set the form header |
| 150 | + // title - this needs to be done after formHTML() is |
| 151 | + // called, because otherwise it doesn't take hold |
| 152 | + // for some reason if the form is disabled. |
| 153 | + if ( $target_title->exists() ) { |
| 154 | + $s = wfMsg( 'sf_formedit_edittitle', $form_title->getText(), $target_title->getPrefixedText() ); |
| 155 | + } else { |
| 156 | + $s = wfMsg( 'sf_formedit_createtitle', $form_title->getText(), $target_title->getPrefixedText() ); |
| 157 | + } |
| 158 | + $wgOut->setPageTitle( $s ); |
| 159 | + |
154 | 160 | if ( $form_submitted ) { |
155 | 161 | if ( $page_name_formula != '' ) { |
156 | 162 | $target_name = $generated_page_name; |