r101176 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101175‎ | r101176 | r101177 >
Date:19:14, 28 October 2011
Author:foxtrott
Status:deferred
Tags:
Comment:
followup r101172: another small bugfix
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
@@ -48,13 +48,14 @@
4949
5050 static $hasRun = false;
5151
52 - if ( !$hasRun &&
53 - array_key_exists( 'wikieditor', $other_args ) &&
 52+ if ( array_key_exists( 'wikieditor', $other_args ) &&
5453 in_array( 'jquery.wikiEditor', $wgOut->getResourceLoader()->getModuleNames() ) ) {
55 -
56 - WikiEditorHooks::editPageShowEditFormInitial( $this );
5754
58 - $wgOut->addModules( 'ext.semanticforms.wikieditor' );
 55+ if ( !$hasRun ) {
 56+ $hasRun = true;
 57+ WikiEditorHooks::editPageShowEditFormInitial( $this );
 58+ $wgOut->addModules( 'ext.semanticforms.wikieditor' );
 59+ }
5960
6061 $jstext = <<<JAVASCRIPT
6162 jQuery(function(){ jQuery('#$input_id').SemanticForms_registerInputInit( ext.wikieditor.init, null ); });
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaInput.php
@@ -38,13 +38,14 @@
3939
4040 static $hasRun = false;
4141
42 - if ( !$hasRun &&
43 - array_key_exists( 'wikieditor', $other_args ) &&
 42+ if ( array_key_exists( 'wikieditor', $other_args ) &&
4443 in_array( 'jquery.wikiEditor', $wgOut->getResourceLoader()->getModuleNames() ) ) {
4544
46 - WikiEditorHooks::editPageShowEditFormInitial( $this );
47 -
48 - $wgOut->addModules( 'ext.semanticforms.wikieditor' );
 45+ if ( !$hasRun ) {
 46+ $hasRun = true;
 47+ WikiEditorHooks::editPageShowEditFormInitial( $this );
 48+ $wgOut->addModules( 'ext.semanticforms.wikieditor' );
 49+ }
4950
5051 $jstext = <<<JAVASCRIPT
5152 jQuery(function(){ jQuery('#$input_id').SemanticForms_registerInputInit( ext.wikieditor.init, null ); });

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r101172followup r101069: bugfix (calling hook causes fatal error), Html::inlineScrip...foxtrott19:09, 28 October 2011