r101300 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101299‎ | r101300 | r101301 >
Date:13:21, 30 October 2011
Author:foxtrott
Status:deferred
Tags:
Comment:
bugfix (using RL in MW1.16)
Modified paths:
  • /trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaInput.php (modified) (history)
  • /trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaWithAutocompleteInput.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaWithAutocompleteInput.php
@@ -30,6 +30,8 @@
3131
3232 public static function getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
3333
 34+ // TODO: Lots of duplication of code in the parent class. Needs refactoring!
 35+
3436 global $wgOut;
3537
3638 // If 'no autocomplete' was specified, print a regular
@@ -49,10 +51,14 @@
5052 static $hasRun = false;
5153
5254 if ( array_key_exists( 'wikieditor', $other_args ) &&
 55+ method_exists($wgOut, 'getResourceLoader') &&
5356 in_array( 'jquery.wikiEditor', $wgOut->getResourceLoader()->getModuleNames() ) ) {
5457
5558 if ( !$hasRun ) {
 59+
5660 $hasRun = true;
 61+
 62+ // one time initialization
5763 WikiEditorHooks::editPageShowEditFormInitial( $this );
5864 $wgOut->addModules( 'ext.semanticforms.wikieditor' );
5965 }
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaInput.php
@@ -39,10 +39,14 @@
4040 static $hasRun = false;
4141
4242 if ( array_key_exists( 'wikieditor', $other_args ) &&
 43+ method_exists($wgOut, 'getResourceLoader') &&
4344 in_array( 'jquery.wikiEditor', $wgOut->getResourceLoader()->getModuleNames() ) ) {
4445
4546 if ( !$hasRun ) {
 47+
4648 $hasRun = true;
 49+
 50+ // one time initialization
4751 WikiEditorHooks::editPageShowEditFormInitial( $this );
4852 $wgOut->addModules( 'ext.semanticforms.wikieditor' );
4953 }