r96080 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96079‎ | r96080 | r96081 >
Date:04:40, 2 September 2011
Author:yaron
Status:deferred
Tags:
Comment:
Follow-up to r95742 - changes didn't work correctly because printPage() was a static method, so now it's non-static. Also replaced hardcoded English with a language value
Modified paths:
  • /trunk/extensions/SemanticForms/specials/SF_RunQuery.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/specials/SF_RunQuery.php
@@ -22,14 +22,16 @@
2323
2424 function execute( $query ) {
2525 global $wgRequest;
26 - if ( !$this->including() )
 26+
 27+ if ( !$this->including() ) {
2728 $this->setHeaders();
 29+ }
2830 $form_name = $this->including() ? $query : $wgRequest->getVal( 'form', $query );
2931
30 - self::printPage( $form_name, $this->including() );
 32+ $this->printPage( $form_name, $this->including() );
3133 }
3234
33 - static function printPage( $form_name, $embedded = false ) {
 35+ function printPage( $form_name, $embedded = false ) {
3436 global $wgOut, $wgRequest, $sfgFormPrinter, $wgParser;
3537
3638 // Get contents of form-definition page.
@@ -39,8 +41,8 @@
4042 if ( $form_name == '' ) {
4143 $text = Xml::element( 'p', array( 'class' => 'error' ), wfMsg( 'sf_runquery_badurl' ) ) . "\n";
4244 } 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";
4547 }
4648 $wgOut->addHTML( $text );
4749 return;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r95742Small fixes, avoid oldid bugs, whitespacenikerabbit08:56, 30 August 2011