@@ -22,10 +22,10 @@ |
||
22 | 22 | * @ingroup ExtensionManager |
23 | 23 | */ |
24 | 24 | |
25 | -$specialPageAliases = []; |
|
25 | +$specialPageAliases = [ ]; |
|
26 | 26 | |
27 | 27 | /** English |
28 | 28 | */ |
29 | -$specialPageAliases['en'] = [ |
|
29 | +$specialPageAliases[ 'en' ] = [ |
|
30 | 30 | 'BatchUpload' => [ 'BatchUpload' ], |
31 | 31 | ]; |
@@ -22,10 +22,10 @@ |
||
22 | 22 | * @ingroup ExtensionManager |
23 | 23 | */ |
24 | 24 | |
25 | -$magicWords = []; |
|
25 | +$magicWords = [ ]; |
|
26 | 26 | |
27 | 27 | /** English |
28 | 28 | */ |
29 | -$magicWords['en'] = [ |
|
29 | +$magicWords[ 'en' ] = [ |
|
30 | 30 | 'batchupload' => [ 0, 'batchupload' ], |
31 | 31 | ]; |
32 | 32 | \ No newline at end of file |
@@ -95,17 +95,17 @@ |
||
95 | 95 | |
96 | 96 | return |
97 | 97 | |
98 | - '<span class="fileupload-container"> ' . |
|
99 | - '<span class="fileupload-dropzone fileinput-button"> ' . |
|
100 | - '<i class="glyphicon glyphicon-plus"></i> ' . |
|
101 | - '<span>' . \Message::newFromKey( 'simplebatchupload-buttonlabel' )->escaped() . '</span> ' . |
|
102 | - '<!-- The file input field used as target for the file upload widget -->' . |
|
103 | - '<input class="fileupload" type="file" name="file" multiple ' . |
|
104 | - ' data-url="' . wfScript( 'api' ) . '" ' . |
|
105 | - ' data-comment="' . $escapedUploadComment . '" ' . |
|
106 | - ' data-text="' . $escapedUploadPageText . '" ' . |
|
107 | - '> ' . |
|
108 | - '</span><ul class="fileupload-results"></ul> ' . |
|
98 | + '<span class="fileupload-container"> '. |
|
99 | + '<span class="fileupload-dropzone fileinput-button"> '. |
|
100 | + '<i class="glyphicon glyphicon-plus"></i> '. |
|
101 | + '<span>'.\Message::newFromKey( 'simplebatchupload-buttonlabel' )->escaped().'</span> '. |
|
102 | + '<!-- The file input field used as target for the file upload widget -->'. |
|
103 | + '<input class="fileupload" type="file" name="file" multiple '. |
|
104 | + ' data-url="'.wfScript( 'api' ).'" '. |
|
105 | + ' data-comment="'.$escapedUploadComment.'" '. |
|
106 | + ' data-text="'.$escapedUploadPageText.'" '. |
|
107 | + '> '. |
|
108 | + '</span><ul class="fileupload-results"></ul> '. |
|
109 | 109 | '</span>'; |
110 | 110 | } |
111 | 111 |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | return ''; |
59 | 59 | } |
60 | 60 | |
61 | - return '{{' . $this->getEscapedParameter( self::IDX_TEMPLATENAME ) . $this->getEscapedParameter( self::IDX_TEMPLATEPARAMETERS ) . '}}'; |
|
61 | + return '{{'.$this->getEscapedParameter( self::IDX_TEMPLATENAME ).$this->getEscapedParameter( self::IDX_TEMPLATEPARAMETERS ).'}}'; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $this->populateParameters(); |
158 | 158 | } |
159 | 159 | |
160 | - $this->parameters[ self::IDX_TEMPLATEPARAMETERS ] .= '|' . $parameter; |
|
160 | + $this->parameters[ self::IDX_TEMPLATEPARAMETERS ] .= '|'.$parameter; |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |
@@ -58,16 +58,16 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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() { |