Skip to content

Commit

Permalink
Release 1.4.0
Browse files Browse the repository at this point in the history
Some clean-up and documentation
  • Loading branch information
s7eph4n committed Oct 24, 2018
1 parent 1854c4f commit c44bde8
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
[![Latest Stable Version](https://poser.pugx.org/mediawiki/simple-batch-upload/v/stable)](https://packagist.org/packages/mediawiki/simple-batch-upload)
[![Packagist download count](https://poser.pugx.org/mediawiki/simple-batch-upload/downloads)](https://packagist.org/packages/mediawiki/simple-batch-upload)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/s7eph4n/SimpleBatchUpload/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/s7eph4n/SimpleBatchUpload/?branch=master)
[![Dependency Status](https://www.versioneye.com/php/mediawiki:simple-batch-upload/badge.png)](https://www.versioneye.com/php/mediawiki:simple-batch-upload)

The [SimpleBatchUpload][mw-simple-batch-upload] extension provides basic,
no-frills uploading of multiple files to MediaWiki.
Expand All @@ -23,7 +22,7 @@ installation directory.
```json
{
"require": {
"mediawiki/simple-batch-upload": "~1.0"
"mediawiki/simple-batch-upload": "~1.4"
}
}
```
Expand Down Expand Up @@ -88,7 +87,20 @@ Pics | These pics were uploaded using [[mw:Extension:SimpleBatchUpload{{!}}Simpl

Available configuration options:

* `$wgSimpleBatchUploadMaxFilesPerBatch` - defines maximum number of files that could be uploaded at time.
* `$wgSimpleBatchUploadMaxFilesPerBatch` - Array defining the maximum number of
files that can be uploaded each time depending on the user group. <br> Default:
``` php
$wgSimpleBatchUploadMaxFilesPerBatch = [
'*' => 1000,
];
```

**Note:** Be aware that this is not the right setting to completely block file
uploads! Users can still use the normal file upload or the MediaWiki API. See
the paragraph on user permissions on
[Configuring file uploads](https://www.mediawiki.org/wiki/Manual:Configuring_file_uploads#Upload_permissions)
on mediawiki.org.


## License

Expand Down
2 changes: 1 addition & 1 deletion extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SimpleBatchUpload",
"version": "1.3.2",
"version": "1.4.0",
"author": [
"[http://www.mediawiki.org/wiki/User:F.trott Stephan Gambke]"
],
Expand Down
9 changes: 8 additions & 1 deletion release-notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## Release Notes

### SimpleBatchUpload 1.4.0

Released on 24-Oct-2018

Changes:
* New configuration setting `$wgSimpleBatchUploadMaxFilesPerBatch`

### SimpleBatchUpload 1.3.2

Released on 12-Oct-2018
Expand All @@ -21,7 +28,7 @@ Changes:
Released on 30-Mar-2018

Changes:
* Add parser function #batchupload
* Add parser function `#batchupload`
* Improved error messages

### SimpleBatchUpload 1.2.0
Expand Down
5 changes: 3 additions & 2 deletions src/SimpleBatchUpload.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,11 @@ public function onSetupAfterCache() {
* @return array
*/
public function getMaxFilesPerBatchConfig() {
global $wgSimpleBatchUploadMaxFilesPerBatch;

if ( $this->maxFilesPerBatchConfig === null ) {
$this->maxFilesPerBatchConfig = $wgSimpleBatchUploadMaxFilesPerBatch;
$this->maxFilesPerBatchConfig = $GLOBALS[ 'wgSimpleBatchUploadMaxFilesPerBatch' ];
}

return $this->maxFilesPerBatchConfig;
}

Expand Down

0 comments on commit c44bde8

Please sign in to comment.