@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * @return SimpleBatchUpload |
36 | 36 | */ |
37 | 37 | public static function singleton() { |
38 | - if ( !isset( self::$singleton ) ) { |
|
38 | + if (!isset(self::$singleton)) { |
|
39 | 39 | self::$singleton = new self(); |
40 | 40 | } |
41 | 41 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $this->registerUploadModule(); |
60 | 60 | |
61 | 61 | $GLOBALS[ 'wgResourceModules' ][ 'ext.SimpleBatchUpload' ] = [ |
62 | - 'localBasePath' => dirname( __DIR__ ), |
|
62 | + 'localBasePath' => dirname(__DIR__), |
|
63 | 63 | 'remoteExtPath' => $GLOBALS[ 'wgExtensionAssetsPath' ] . '/SimpleBatchUpload', |
64 | 64 | 'scripts' => [ 'res/ext.SimpleBatchUpload.js' ], |
65 | 65 | 'styles' => [ 'res/ext.SimpleBatchUpload.css' ], |
@@ -69,8 +69,8 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | protected function registerUploadModule() { |
72 | - if ( file_exists( '../vendor' ) ) { |
|
73 | - $localBasePath = dirname( __DIR__ ); |
|
72 | + if (file_exists('../vendor')) { |
|
73 | + $localBasePath = dirname(__DIR__); |
|
74 | 74 | $remoteBasePath = $GLOBALS[ 'wgExtensionAssetsPath' ] . '/SimpleBatchUpload'; |
75 | 75 | } else { |
76 | 76 | $localBasePath = $GLOBALS[ 'IP' ]; |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | * @param string $restriction User right required, e.g. "block" or "delete" |
40 | 40 | * @param bool $listed Whether the page is listed in Special:Specialpages |
41 | 41 | */ |
42 | - public function __construct( $name = '', $restriction = '', $listed = true ) { |
|
43 | - parent::__construct( 'BatchUpload', 'upload', $listed ); |
|
42 | + public function __construct($name = '', $restriction = '', $listed = true) { |
|
43 | + parent::__construct('BatchUpload', 'upload', $listed); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * @param null|string $par |
64 | 64 | * @throws \MWException |
65 | 65 | */ |
66 | - public function execute( $par ) { |
|
66 | + public function execute($par) { |
|
67 | 67 | |
68 | 68 | $this->setHeaders(); |
69 | 69 | $this->checkPermissions(); |
@@ -74,12 +74,12 @@ discard block |
||
74 | 74 | <i class="glyphicon glyphicon-plus"></i> |
75 | 75 | <span>Select files (or drop them here)...</span> |
76 | 76 | <!-- The file input field used as target for the file upload widget --> |
77 | - <input id="fileupload" type="file" name="file" data-url="' . wfScript( 'api' ) . '" data-token="' . $this->getUser()->getEditToken() . '" multiple> |
|
77 | + <input id="fileupload" type="file" name="file" data-url="' . wfScript('api') . '" data-token="' . $this->getUser()->getEditToken() . '" multiple> |
|
78 | 78 | </span><ul id="fileupload-results"></ul>'; |
79 | 79 | |
80 | - $output->addHTML( $html ); |
|
81 | - $output->addModules( 'ext.SimpleBatchUpload' ); |
|
82 | - $output->addModuleStyles( [ 'ext.SimpleBatchUpload', 'ext.SimpleBatchUpload.jquery-file-upload' ] ); |
|
80 | + $output->addHTML($html); |
|
81 | + $output->addModules('ext.SimpleBatchUpload'); |
|
82 | + $output->addModuleStyles([ 'ext.SimpleBatchUpload', 'ext.SimpleBatchUpload.jquery-file-upload' ]); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | } |