r96915 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96914‎ | r96915 | r96916 >
Date:21:49, 12 September 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fixed 1.17 compat issue
Modified paths:
  • /trunk/extensions/Survey/specials/SpecialSurvey.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Survey/specials/SpecialSurvey.php
@@ -309,10 +309,11 @@
310310
311311 // getContext was added in 1.18 and since that version is
312312 // the second argument for the HTMLForm constructor.
313 - if ( is_callable( array( $this, 'getContext' ) ) ) {
 313+ if ( version_compare( $GLOBALS['wgVersion'], '1.18', '>=' ) ) {
314314 $form = new HTMLForm( $fields, $this->getContext() );
315315 } else {
316316 $form = new HTMLForm( $fields );
 317+ $form->setTitle( $this->getTitle() );
317318 }
318319
319320 $form->setSubmitText( wfMsg( 'surveys-special-save' ) );

Status & tagging log