Completed
Branch master (bf741a)
by Stephan
04:00
created
Category
src/SimpleBatchUpload.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
69 69
 	}
70 70
 
71 71
 	protected function registerUploadModule() {
72
-		if ( file_exists( '../vendor/blueimp' ) ) {
73
-			$localBasePath = dirname( __DIR__ );
72
+		if (file_exists('../vendor/blueimp')) {
73
+			$localBasePath = dirname(__DIR__);
74 74
 			$remoteBasePath = $GLOBALS[ 'wgExtensionAssetsPath' ] . '/SimpleBatchUpload';
75 75
 		} else {
76 76
 			$localBasePath = $GLOBALS[ 'IP' ];
Please login to merge, or discard this patch.
src/SpecialBatchUpload.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
 	 * @param string $restriction User right required, e.g. "block" or "delete"
39 39
 	 * @param bool $listed Whether the page is listed in Special:Specialpages
40 40
 	 */
41
-	function __construct( $name = '', $restriction = '', $listed = true	) {
42
-		parent::__construct( 'BatchUpload', 'upload', $listed );
41
+	function __construct($name = '', $restriction = '', $listed = true) {
42
+		parent::__construct('BatchUpload', 'upload', $listed);
43 43
 	}
44 44
 
45 45
 	/**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	 * @param null|string $par
63 63
 	 * @throws \MWException
64 64
 	 */
65
-	function execute( $par ) {
65
+	function execute($par) {
66 66
 
67 67
 		$this->setHeaders();
68 68
 		$this->checkPermissions();
@@ -77,12 +77,12 @@  discard block
 block discarded – undo
77 77
         <i class="glyphicon glyphicon-plus"></i>
78 78
         <span>Select files (or drop them here)...</span>
79 79
         <!-- The file input field used as target for the file upload widget -->
80
-        <input id="fileupload" type="file" name="file" data-url="' . wfScript( 'api' ) . '" data-token="' . $this->getUser()->getEditToken() . '" multiple>
80
+        <input id="fileupload" type="file" name="file" data-url="' . wfScript('api') . '" data-token="' . $this->getUser()->getEditToken() . '" multiple>
81 81
     </span><ul id="fileupload-results"></ul>
82 82
     ';
83
-		$output->addHTML( $html );
84
-		$output->addModules( 'ext.SimpleBatchUpload' );
85
-		$output->addModuleStyles( [ 'ext.SimpleBatchUpload', 'ext.SimpleBatchUpload.jquery-file-upload' ] );
83
+		$output->addHTML($html);
84
+		$output->addModules('ext.SimpleBatchUpload');
85
+		$output->addModuleStyles([ 'ext.SimpleBatchUpload', 'ext.SimpleBatchUpload.jquery-file-upload' ]);
86 86
 	}
87 87
 
88 88
 }
Please login to merge, or discard this patch.
src/SimpleBatchUpload.alias.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,6 +27,6 @@
 block discarded – undo
27 27
 /** English
28 28
  * @author <your username>
29 29
  */
30
-$specialPageAliases['en'] = array(
31
-	'BatchUpload' => array( 'BatchUpload' ),
30
+$specialPageAliases[ 'en' ] = array(
31
+	'BatchUpload' => array('BatchUpload'),
32 32
 );
Please login to merge, or discard this patch.