|
@@ -58,16 +58,16 @@ discard block |
|
|
block discarded – undo |
|
58
|
58
|
*/ |
|
59
|
59
|
public function getConfiguration() { |
|
60
|
60
|
|
|
61
|
|
- $configuration = []; |
|
|
61
|
+ $configuration = [ ]; |
|
62
|
62
|
|
|
63
|
|
- $configuration[ 'wgExtensionMessagesFiles' ][ 'SimpleBatchUploadAlias' ] = __DIR__ . '/SimpleBatchUpload.alias.php'; |
|
64
|
|
- $configuration[ 'wgExtensionMessagesFiles' ][ 'SimpleBatchUploadMagic' ] = __DIR__ . '/SimpleBatchUpload.magic.php'; |
|
|
63
|
+ $configuration[ 'wgExtensionMessagesFiles' ][ 'SimpleBatchUploadAlias' ] = __DIR__.'/SimpleBatchUpload.alias.php'; |
|
|
64
|
+ $configuration[ 'wgExtensionMessagesFiles' ][ 'SimpleBatchUploadMagic' ] = __DIR__.'/SimpleBatchUpload.magic.php'; |
|
65
|
65
|
|
|
66
|
66
|
$configuration[ 'wgSpecialPages' ][ 'BatchUpload' ] = '\SimpleBatchUpload\SpecialBatchUpload'; |
|
67
|
67
|
|
|
68
|
68
|
$configuration[ 'wgHooks' ][ 'ParserFirstCallInit' ][ 'ext.simplebatchupload' ] = [ $this, 'registerParserFunction' ]; |
|
69
|
69
|
$configuration[ 'wgHooks' ][ 'MakeGlobalVariablesScript' ][ 'ext.simplebatchupload' ] = [ $this, 'onMakeGlobalVariablesScript' ]; |
|
70
|
|
- $configuration[ 'wgHooks' ][ 'SetupAfterCache' ][ 'ext.simplebatchupload' ] = [ $this, 'onSetupAfterCache']; |
|
|
70
|
+ $configuration[ 'wgHooks' ][ 'SetupAfterCache' ][ 'ext.simplebatchupload' ] = [ $this, 'onSetupAfterCache' ]; |
|
71
|
71
|
|
|
72
|
72
|
return $configuration; |
|
73
|
73
|
|
|
@@ -112,9 +112,9 @@ discard block |
|
|
block discarded – undo |
|
112
|
112
|
$dependencies = [ 'ext.SimpleBatchUpload.jquery-file-upload', 'mediawiki.Title', 'mediawiki.jqueryMsg' ]; |
|
113
|
113
|
|
|
114
|
114
|
if ( version_compare( $GLOBALS[ 'wgVersion' ], '1.32.0', '>' ) ) { |
|
115
|
|
- $dependencies[] = 'mediawiki.api'; |
|
|
115
|
+ $dependencies[ ] = 'mediawiki.api'; |
|
116
|
116
|
} else { |
|
117
|
|
- $dependencies[] = 'mediawiki.api.edit'; |
|
|
117
|
+ $dependencies[ ] = 'mediawiki.api.edit'; |
|
118
|
118
|
} |
|
119
|
119
|
|
|
120
|
120
|
return [ 'ext.SimpleBatchUpload' => |
|
@@ -137,7 +137,7 @@ discard block |
|
|
block discarded – undo |
|
137
|
137
|
protected function getBasePathsForNonComposerModules() { |
|
138
|
138
|
return [ |
|
139
|
139
|
'localBasePath' => dirname( __DIR__ ), |
|
140
|
|
- 'remoteBasePath' => $GLOBALS[ 'wgExtensionAssetsPath' ] . '/SimpleBatchUpload', |
|
|
140
|
+ 'remoteBasePath' => $GLOBALS[ 'wgExtensionAssetsPath' ].'/SimpleBatchUpload', |
|
141
|
141
|
]; |
|
142
|
142
|
} |
|
143
|
143
|
|
|
@@ -146,7 +146,7 @@ discard block |
|
|
block discarded – undo |
|
146
|
146
|
* @param \OutputPage $out |
|
147
|
147
|
*/ |
|
148
|
148
|
public function onMakeGlobalVariablesScript( &$vars, $out ) { |
|
149
|
|
- $vars['simpleBatchUploadMaxFilesPerBatch'] = $this->getMaxFilesPerBatchConfig(); |
|
|
149
|
+ $vars[ 'simpleBatchUploadMaxFilesPerBatch' ] = $this->getMaxFilesPerBatchConfig(); |
|
150
|
150
|
} |
|
151
|
151
|
|
|
152
|
152
|
public function onSetupAfterCache() { |