Index: trunk/extensions/SemanticForms/includes/SF_FormEditAction.php |
— | — | @@ -174,9 +174,18 @@ |
175 | 175 | if ( count( $form_names ) == 0 ) { |
176 | 176 | return true; |
177 | 177 | } |
| 178 | + |
| 179 | + // For backward-compatibility |
| 180 | + if ( is_string( $action ) ) { |
| 181 | + global $wgOut; |
| 182 | + $output = $wgOut; |
| 183 | + } else { |
| 184 | + $output = $action->getOutput(); |
| 185 | + } |
| 186 | + |
178 | 187 | if ( count( $form_names ) > 1 ) { |
179 | | - $warning_text = "\t" . '<div class="warningMessage">' . wfMsg( 'sf_formedit_morethanoneform' ) . "</div>\n"; |
180 | | - $action->getOutput()->addHTML( $warning_text ); |
| 188 | + $warning_text = "\t" . '<div class="warningbox">' . wfMsg( 'sf_formedit_morethanoneform' ) . "</div>\n"; |
| 189 | + $output->addWikiText( $warning_text ); |
181 | 190 | } |
182 | 191 | $form_name = $form_names[0]; |
183 | 192 | |
— | — | @@ -202,7 +211,7 @@ |
203 | 212 | $msg = $msg[0]; |
204 | 213 | } |
205 | 214 | |
206 | | - $action->getOutput()->addHTML( Html::element( 'p', array( 'class' => 'error' ), wfMsg( $msg, $msgdata ) ) ); |
| 215 | + $output->addHTML( Html::element( 'p', array( 'class' => 'error' ), wfMsg( $msg, $msgdata ) ) ); |
207 | 216 | |
208 | 217 | } |
209 | 218 | |