Index: trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaWithAutocompleteInput.php |
— | — | @@ -48,13 +48,14 @@ |
49 | 49 | |
50 | 50 | static $hasRun = false; |
51 | 51 | |
52 | | - if ( !$hasRun && |
53 | | - array_key_exists( 'wikieditor', $other_args ) && |
| 52 | + if ( array_key_exists( 'wikieditor', $other_args ) && |
54 | 53 | in_array( 'jquery.wikiEditor', $wgOut->getResourceLoader()->getModuleNames() ) ) { |
55 | | - |
56 | | - WikiEditorHooks::editPageShowEditFormInitial( $this ); |
57 | 54 | |
58 | | - $wgOut->addModules( 'ext.semanticforms.wikieditor' ); |
| 55 | + if ( !$hasRun ) { |
| 56 | + $hasRun = true; |
| 57 | + WikiEditorHooks::editPageShowEditFormInitial( $this ); |
| 58 | + $wgOut->addModules( 'ext.semanticforms.wikieditor' ); |
| 59 | + } |
59 | 60 | |
60 | 61 | $jstext = <<<JAVASCRIPT |
61 | 62 | jQuery(function(){ jQuery('#$input_id').SemanticForms_registerInputInit( ext.wikieditor.init, null ); }); |
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaInput.php |
— | — | @@ -38,13 +38,14 @@ |
39 | 39 | |
40 | 40 | static $hasRun = false; |
41 | 41 | |
42 | | - if ( !$hasRun && |
43 | | - array_key_exists( 'wikieditor', $other_args ) && |
| 42 | + if ( array_key_exists( 'wikieditor', $other_args ) && |
44 | 43 | in_array( 'jquery.wikiEditor', $wgOut->getResourceLoader()->getModuleNames() ) ) { |
45 | 44 | |
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 | + } |
49 | 50 | |
50 | 51 | $jstext = <<<JAVASCRIPT |
51 | 52 | jQuery(function(){ jQuery('#$input_id').SemanticForms_registerInputInit( ext.wikieditor.init, null ); }); |