Index: trunk/extensions/SemanticForms/specials/SF_RunQuery.php |
— | — | @@ -22,14 +22,16 @@ |
23 | 23 | |
24 | 24 | function execute( $query ) { |
25 | 25 | global $wgRequest; |
26 | | - if ( !$this->including() ) |
| 26 | + |
| 27 | + if ( !$this->including() ) { |
27 | 28 | $this->setHeaders(); |
| 29 | + } |
28 | 30 | $form_name = $this->including() ? $query : $wgRequest->getVal( 'form', $query ); |
29 | 31 | |
30 | | - self::printPage( $form_name, $this->including() ); |
| 32 | + $this->printPage( $form_name, $this->including() ); |
31 | 33 | } |
32 | 34 | |
33 | | - static function printPage( $form_name, $embedded = false ) { |
| 35 | + function printPage( $form_name, $embedded = false ) { |
34 | 36 | global $wgOut, $wgRequest, $sfgFormPrinter, $wgParser; |
35 | 37 | |
36 | 38 | // Get contents of form-definition page. |
— | — | @@ -39,8 +41,8 @@ |
40 | 42 | if ( $form_name == '' ) { |
41 | 43 | $text = Xml::element( 'p', array( 'class' => 'error' ), wfMsg( 'sf_runquery_badurl' ) ) . "\n"; |
42 | 44 | } else { |
43 | | - /// FIXME: i18n |
44 | | - $text = '<p class="error">Error: No form page was found at ' . SFUtils::linkText( SF_NS_FORM, $form_name ) . ".</p>\n"; |
| 45 | + $text = Xml::tags( 'p', array( 'class' => 'error' ), |
| 46 | + wfMsg( 'sf_formstart_badform', SFUtils::linkText( SF_NS_FORM, $form_name ) ) ) . "\n"; |
45 | 47 | } |
46 | 48 | $wgOut->addHTML( $text ); |
47 | 49 | return; |