diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2018-12-01 17:57:53 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2018-12-01 18:56:03 +0000 |
| commit | e70f282ef978b175c5529f439f3b572c5b8531a2 (patch) | |
| tree | cc022e973d89a5507dcbb35561ef93852c551dff /vendor/league | |
| parent | c16be598f1a8d42127bd64c4878bd92297e18f3b (diff) | |
| download | webtrees-e70f282ef978b175c5529f439f3b572c5b8531a2.tar.gz webtrees-e70f282ef978b175c5529f439f3b572c5b8531a2.tar.bz2 webtrees-e70f282ef978b175c5529f439f3b572c5b8531a2.zip | |
Update minimum version of PHP to 7.1
Diffstat (limited to 'vendor/league')
22 files changed, 156 insertions, 46 deletions
diff --git a/vendor/league/commonmark/CHANGELOG.md b/vendor/league/commonmark/CHANGELOG.md index 237b15d87c..f59c5abd14 100644 --- a/vendor/league/commonmark/CHANGELOG.md +++ b/vendor/league/commonmark/CHANGELOG.md @@ -4,6 +4,18 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip ## [Unreleased][unreleased] +## [0.18.0] - 2018-09-18 + +### Added + + - Added `ConverterInterface` to `Converter` and `CommonMarkConverter` (#330) + - Added `ListItem::getListData()` method (#329) + +### Changed + + - Links with `target="_blank"` will also get `rel="noopener noreferrer"` by default (#331) + - Implemented several performance optimizations (#324) + ## [0.17.5] - 2018-03-29 ### Fixed @@ -645,7 +657,8 @@ An unused constant and static method were deprecated and will be removed in a fu ### Added - Initial commit (compatible with jgm/stmd:spec.txt @ 0275f34) -[unreleased]: https://github.com/thephpleague/commonmark/compare/0.17.5...HEAD +[unreleased]: https://github.com/thephpleague/commonmark/compare/0.18.0...HEAD +[0.18.0]: https://github.com/thephpleague/commonmark/compare/0.17.5...0.18.0 [0.17.5]: https://github.com/thephpleague/commonmark/compare/0.17.4...0.17.5 [0.17.4]: https://github.com/thephpleague/commonmark/compare/0.17.3...0.17.4 [0.17.3]: https://github.com/thephpleague/commonmark/compare/0.17.2...0.17.3 diff --git a/vendor/league/commonmark/README.md b/vendor/league/commonmark/README.md index 0c08a9bd69..d58423646f 100644 --- a/vendor/league/commonmark/README.md +++ b/vendor/league/commonmark/README.md @@ -102,8 +102,10 @@ Documentation can be found at [commonmark.thephpleague.com][docs]. - [Drupal 7 & 8](https://www.drupal.org/project/markdown) - [Laravel 4 & 5](https://github.com/GrahamCampbell/Laravel-Markdown) - [Sculpin](https://github.com/bcremer/sculpin-commonmark-bundle) -- [Symfony](https://github.com/webuni/commonmark-bundle) -- [Twig](https://github.com/webuni/commonmark-twig-renderer) +- [Symfony 2 & 3](https://github.com/webuni/commonmark-bundle) +- [Symfony 4](https://github.com/avensome/commonmark-bundle) +- [Twig-based renderer](https://github.com/webuni/commonmark-twig-renderer) +- [Twig filter and tag](https://github.com/aptoma/twig-markdown) ### CommonMark Extras @@ -118,6 +120,7 @@ Custom parsers/renderers can be bundled into extensions which extend CommonMark. - [CommonMark Attributes Extension](https://github.com/webuni/commonmark-attributes-extension) - Adds a syntax to define attributes on the various HTML elements. - [Alt Three Emoji](https://github.com/AltThree/Emoji) An emoji parser for CommonMark. - [uafrica/commonmark-ext](https://github.com/uafrica/commonmark-ext) - Adds strikethrough support. + - [Sup Sub extensions](https://github.com/OWS/commonmark-sup-sub-extensions) - Adds support of superscript and subscript (`<sup>` and `<sub>` HTML tags) If you build your own, feel free to submit a PR to add it to this list! @@ -151,17 +154,17 @@ $ ./tests/benchmark/benchmark.php ## Versioning -[SemVer](http://semver.org/) will be followed closely. 0.x.0 versions will introduce breaking changes to the codebase, so be careful which version constraints you use. **It's highly recommended that you use [Composer's caret operator](https://getcomposer.org/doc/articles/versions.md#caret) to ensure compatibility**; for example: `^0.16`. This is equivalent to `>=0.16.0 <0.17.0`. +[SemVer](http://semver.org/) will be followed closely. 0.x.0 versions will introduce breaking changes to the codebase, so be careful which version constraints you use. **It's highly recommended that you use [Composer's caret operator](https://getcomposer.org/doc/articles/versions.md#caret) to ensure compatibility**; for example: `^0.18`. This is equivalent to `>=0.18.0 <0.19.0`. 0.x.y releases should not introduce breaking changes to the codebase; however, they might change the resulting AST or HTML output of parsed Markdown (due to bug fixes, minor spec changes, etc.) As a result, you might get slightly different HTML, but any custom code built onto this library will still function correctly. -If you're only using the `CommonMarkConverter` class to convert Markdown (no other class references, custom parsers, etc.), then it should be safe to use a broader constraint like `~0.16`, `>0.16`, etc. I personally promise to never break this specific class in any future 0.x release. +If you're only using the `CommonMarkConverter` class or `ConverterInterface` to convert Markdown (no other class references, custom parsers, etc.), then it should be safe to use a broader constraint like `~0.18`, `>0.18`, etc. I personally promise to never break this specific class in any future 0.x release. ## Stability While this package does work well, the underlying code should not be considered "stable" yet. The original spec and JS parser may undergo changes in the near future which will result in corresponding changes to this code. Any methods tagged with `@api` are not expected to change, but other methods/classes might. -Major release 1.0.0 will be reserved for when both CommonMark and this project are considered stable (see [outstanding CommonMark spec issues](http://talk.commonmark.org/t/issues-to-resolve-before-1-0-release/1287)). 0.x.y will be used until that happens. +Major release 1.0.0 will be reserved for when either the CommonMark spec or this project are considered stable (see [outstanding CommonMark spec issues](http://talk.commonmark.org/t/issues-to-resolve-before-1-0-release/1287)). 0.x.y will be used until that happens. ## Contributing diff --git a/vendor/league/commonmark/UPGRADE.md b/vendor/league/commonmark/UPGRADE.md index 15bace7226..cfe5cc4c6f 100644 --- a/vendor/league/commonmark/UPGRADE.md +++ b/vendor/league/commonmark/UPGRADE.md @@ -1,5 +1,9 @@ # Upgrade Instructions +## 0.18.0 + +No breaking changes were introduced, but we did add a new interface: `ConverterInface`. Consider depending on this interface in your code instead of the concrete implementation. (See #330) + ## 0.17.0 ## Minimum PHP version diff --git a/vendor/league/commonmark/composer.json b/vendor/league/commonmark/composer.json index 9ae47e3c2c..b41e8e7509 100644 --- a/vendor/league/commonmark/composer.json +++ b/vendor/league/commonmark/composer.json @@ -60,7 +60,7 @@ "bin": ["bin/commonmark"], "extra": { "branch-alias": { - "dev-master": "0.18-dev" + "dev-master": "0.19-dev" } } } diff --git a/vendor/league/commonmark/src/Block/Element/AbstractBlock.php b/vendor/league/commonmark/src/Block/Element/AbstractBlock.php index cf764f5c33..15da520d45 100644 --- a/vendor/league/commonmark/src/Block/Element/AbstractBlock.php +++ b/vendor/league/commonmark/src/Block/Element/AbstractBlock.php @@ -94,7 +94,7 @@ abstract class AbstractBlock extends Node */ public function hasChildren() { - return !is_null($this->firstChild); + return $this->firstChild !== null; } /** diff --git a/vendor/league/commonmark/src/Block/Element/ListItem.php b/vendor/league/commonmark/src/Block/Element/ListItem.php index 2da2c7d81e..a455a8a444 100644 --- a/vendor/league/commonmark/src/Block/Element/ListItem.php +++ b/vendor/league/commonmark/src/Block/Element/ListItem.php @@ -31,6 +31,14 @@ class ListItem extends AbstractBlock } /** + * @return ListData + */ + public function getListData() + { + return $this->listData; + } + + /** * Returns true if this block can contain the given block as a child node * * @param AbstractBlock $block diff --git a/vendor/league/commonmark/src/Block/Parser/FencedCodeParser.php b/vendor/league/commonmark/src/Block/Parser/FencedCodeParser.php index d27abb2b8a..b35cf81025 100644 --- a/vendor/league/commonmark/src/Block/Parser/FencedCodeParser.php +++ b/vendor/league/commonmark/src/Block/Parser/FencedCodeParser.php @@ -34,7 +34,7 @@ class FencedCodeParser extends AbstractBlockParser $indent = $cursor->getIndent(); $fence = $cursor->match('/^[ \t]*(?:`{3,}(?!.*`)|^~{3,}(?!.*~))/'); - if (is_null($fence)) { + if ($fence === null) { return false; } diff --git a/vendor/league/commonmark/src/CommonMarkConverter.php b/vendor/league/commonmark/src/CommonMarkConverter.php index bd626f8243..0341446aa7 100644 --- a/vendor/league/commonmark/src/CommonMarkConverter.php +++ b/vendor/league/commonmark/src/CommonMarkConverter.php @@ -24,7 +24,7 @@ class CommonMarkConverter extends Converter * * This might be a typical `x.y.z` version, or `x.y-dev`. */ - const VERSION = '0.17.5'; + const VERSION = '0.18.0'; /** * Create a new commonmark converter instance. diff --git a/vendor/league/commonmark/src/Context.php b/vendor/league/commonmark/src/Context.php index e99cf9ef9e..67d542bedc 100644 --- a/vendor/league/commonmark/src/Context.php +++ b/vendor/league/commonmark/src/Context.php @@ -62,6 +62,8 @@ class Context implements ContextInterface */ protected $blocksParsed = false; + protected $encoding = 'UTF-8'; + protected $referenceParser; public function __construct(Document $document, Environment $environment) @@ -222,4 +224,24 @@ class Context implements ContextInterface { return $this->referenceParser; } + + /** + * @return string + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * @param string $encoding + * + * @return $this + */ + public function setEncoding($encoding) + { + $this->encoding = $encoding; + + return $this; + } } diff --git a/vendor/league/commonmark/src/ContextInterface.php b/vendor/league/commonmark/src/ContextInterface.php index 12846c6ec3..351b280a63 100644 --- a/vendor/league/commonmark/src/ContextInterface.php +++ b/vendor/league/commonmark/src/ContextInterface.php @@ -95,4 +95,9 @@ interface ContextInterface * @return ReferenceParser */ public function getReferenceParser(); + + /** + * @return string + */ + public function getEncoding(); } diff --git a/vendor/league/commonmark/src/Converter.php b/vendor/league/commonmark/src/Converter.php index 9f49bcc666..babe0afbab 100644 --- a/vendor/league/commonmark/src/Converter.php +++ b/vendor/league/commonmark/src/Converter.php @@ -17,7 +17,7 @@ namespace League\CommonMark; /** * Converts CommonMark-compatible Markdown to HTML. */ -class Converter +class Converter implements ConverterInterface { /** * The document parser instance. diff --git a/vendor/league/commonmark/src/ConverterInterface.php b/vendor/league/commonmark/src/ConverterInterface.php new file mode 100644 index 0000000000..3d47a275d1 --- /dev/null +++ b/vendor/league/commonmark/src/ConverterInterface.php @@ -0,0 +1,29 @@ +<?php + +/* + * This file is part of the league/commonmark package. + * + * (c) Colin O'Dell <colinodell@gmail.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace League\CommonMark; + +/** + * Interface for a service which converts CommonMark to HTML. + */ +interface ConverterInterface +{ + /** + * Converts CommonMark to HTML. + * + * @param string $commonMark + * + * @return string HTML + * + * @api + */ + public function convertToHtml($commonMark); +} diff --git a/vendor/league/commonmark/src/Cursor.php b/vendor/league/commonmark/src/Cursor.php index 7de36dfab3..91af05d6f1 100644 --- a/vendor/league/commonmark/src/Cursor.php +++ b/vendor/league/commonmark/src/Cursor.php @@ -74,12 +74,17 @@ class Cursor private $isMultibyte; /** + * @var int + */ + private $charCache = []; + + /** * @param string $line */ - public function __construct($line) + public function __construct($line, $encoding = 'UTF-8') { $this->line = $line; - $this->encoding = mb_detect_encoding($line, 'ASCII,UTF-8', true) ?: 'ISO-8859-1'; + $this->encoding = $encoding; $this->length = mb_strlen($line, $this->encoding); $this->isMultibyte = $this->length !== strlen($line); $this->lineContainsTabs = preg_match('/\t/', $line) > 0; @@ -134,7 +139,9 @@ class Cursor */ public function getIndent() { - $this->getNextNonSpacePosition(); + if ($this->nextNonSpaceCache === null) { + $this->getNextNonSpacePosition(); + } return $this->indent; } @@ -146,9 +153,7 @@ class Cursor */ public function isIndented() { - $this->getNextNonSpacePosition(); - - return $this->indent >= self::INDENT_LEVEL; + return $this->getIndent() >= self::INDENT_LEVEL; } /** @@ -162,12 +167,16 @@ class Cursor $index = $this->currentPosition; } + if (isset($this->charCache[$index])) { + return $this->charCache[$index]; + } + // Index out-of-bounds, or we're at the end if ($index < 0 || $index >= $this->length) { return; } - return mb_substr($this->line, $index, 1, $this->encoding); + return $this->charCache[$index] = mb_substr($this->line, $index, 1, $this->encoding); } /** @@ -189,7 +198,7 @@ class Cursor */ public function isBlank() { - return $this->getNextNonSpacePosition() === $this->length; + return $this->nextNonSpaceCache === $this->length || $this->getNextNonSpacePosition() === $this->length; } /** @@ -217,10 +226,8 @@ class Cursor $this->previousPosition = $this->currentPosition; $this->nextNonSpaceCache = null; - $nextFewChars = mb_substr($this->line, $this->currentPosition, $characters, $this->encoding); - // Optimization to avoid tab handling logic if we have no tabs - if (!$this->lineContainsTabs || preg_match('/\t/', $nextFewChars) === 0) { + if (!$this->lineContainsTabs || preg_match('/\t/', $nextFewChars = mb_substr($this->line, $this->currentPosition, $characters, $this->encoding)) === 0) { $length = min($characters, $this->length - $this->currentPosition); $this->partiallyConsumedTab = false; $this->currentPosition += $length; @@ -394,13 +401,15 @@ class Cursor if ($this->isMultibyte) { // PREG_OFFSET_CAPTURE always returns the byte offset, not the char offset, which is annoying $offset = mb_strlen(mb_strcut($subject, 0, $matches[0][1], $this->encoding), $this->encoding); + $matchLength = mb_strlen($matches[0][0], $this->encoding); } else { $offset = $matches[0][1]; + $matchLength = strlen($matches[0][0]); } // [0][0] contains the matched text // [0][1] contains the index of that match - $this->advanceBy($offset + mb_strlen($matches[0][0], $this->encoding)); + $this->advanceBy($offset + $matchLength); return $matches[0][0]; } diff --git a/vendor/league/commonmark/src/DocParser.php b/vendor/league/commonmark/src/DocParser.php index d0e0c3d7ed..9caaf69d60 100644 --- a/vendor/league/commonmark/src/DocParser.php +++ b/vendor/league/commonmark/src/DocParser.php @@ -82,6 +82,7 @@ class DocParser public function parse($input) { $context = new Context(new Document(), $this->getEnvironment()); + $context->setEncoding(mb_detect_encoding($input, 'ASCII,UTF-8', true) ?: 'ISO-8859-1'); $lines = $this->preProcessInput($input); foreach ($lines as $line) { @@ -89,8 +90,9 @@ class DocParser $this->incorporateLine($context); } + $lineCount = count($lines); while ($tip = $context->getTip()) { - $tip->finalize($context, count($lines)); + $tip->finalize($context, $lineCount); } $this->processInlines($context, $context->getDocument()->walker()); @@ -102,11 +104,11 @@ class DocParser private function incorporateLine(ContextInterface $context) { - $cursor = new Cursor($context->getLine()); $context->getBlockCloser()->resetTip(); - $context->setBlocksParsed(false); + $cursor = new Cursor($context->getLine(), $context->getEncoding()); + $this->resetContainer($context, $cursor); $context->getBlockCloser()->setLastMatchedContainer($context->getContainer()); @@ -170,8 +172,7 @@ class DocParser { $container = $context->getDocument(); - while ($container->hasChildren()) { - $lastChild = $container->lastChild(); + while ($lastChild = $container->lastChild()) { if (!$lastChild->isOpen()) { break; } @@ -218,9 +219,9 @@ class DocParser */ private function isLazyParagraphContinuation(ContextInterface $context, Cursor $cursor) { - return !$context->getBlockCloser()->areAllClosed() && + return $context->getTip() instanceof Paragraph && + !$context->getBlockCloser()->areAllClosed() && !$cursor->isBlank() && - $context->getTip() instanceof Paragraph && count($context->getTip()->getStrings()) > 0; } diff --git a/vendor/league/commonmark/src/Inline/Element/AbstractInline.php b/vendor/league/commonmark/src/Inline/Element/AbstractInline.php index ae75500314..6d6b43410e 100644 --- a/vendor/league/commonmark/src/Inline/Element/AbstractInline.php +++ b/vendor/league/commonmark/src/Inline/Element/AbstractInline.php @@ -41,6 +41,6 @@ abstract class AbstractInline extends Node */ public function getData($key, $default = null) { - return array_key_exists($key, $this->data) ? $this->data[$key] : $default; + return isset($this->data[$key]) ? $this->data[$key] : $default; } } diff --git a/vendor/league/commonmark/src/Inline/Parser/CloseBracketParser.php b/vendor/league/commonmark/src/Inline/Parser/CloseBracketParser.php index 2fa3ba1aef..70388d6e54 100644 --- a/vendor/league/commonmark/src/Inline/Parser/CloseBracketParser.php +++ b/vendor/league/commonmark/src/Inline/Parser/CloseBracketParser.php @@ -50,11 +50,6 @@ class CloseBracketParser extends AbstractInlineParser implements EnvironmentAwar */ public function parse(InlineParserContext $inlineContext) { - $cursor = $inlineContext->getCursor(); - - $startPos = $cursor->getPosition(); - $previousState = $cursor->saveState(); - // Look through stack of delimiters for a [ or ! $opener = $inlineContext->getDelimiterStack()->searchByCharacter(['[', '!']); if ($opener === null) { @@ -68,7 +63,10 @@ class CloseBracketParser extends AbstractInlineParser implements EnvironmentAwar return false; } - $isImage = $opener->getChar() === '!'; + $cursor = $inlineContext->getCursor(); + + $startPos = $cursor->getPosition(); + $previousState = $cursor->saveState(); $cursor->advance(); @@ -81,6 +79,8 @@ class CloseBracketParser extends AbstractInlineParser implements EnvironmentAwar return false; } + $isImage = $opener->getChar() === '!'; + $inline = $this->createInline($link['url'], $link['title'], $isImage); $opener->getInlineNode()->replaceWith($inline); while (($label = $inline->next()) !== null) { diff --git a/vendor/league/commonmark/src/Inline/Renderer/LinkRenderer.php b/vendor/league/commonmark/src/Inline/Renderer/LinkRenderer.php index 293710b4d3..8402a049ab 100644 --- a/vendor/league/commonmark/src/Inline/Renderer/LinkRenderer.php +++ b/vendor/league/commonmark/src/Inline/Renderer/LinkRenderer.php @@ -56,6 +56,10 @@ class LinkRenderer implements InlineRendererInterface, ConfigurationAwareInterfa $attrs['title'] = Xml::escape($inline->data['title'], true); } + if (isset($attrs['target']) && $attrs['target'] === '_blank' && !isset($attrs['rel'])) { + $attrs['rel'] = 'noopener noreferrer'; + } + return new HtmlElement('a', $attrs, $htmlRenderer->renderInlines($inline->children())); } diff --git a/vendor/league/commonmark/src/UnmatchedBlockCloser.php b/vendor/league/commonmark/src/UnmatchedBlockCloser.php index 00ab1c8606..0dcd791842 100644 --- a/vendor/league/commonmark/src/UnmatchedBlockCloser.php +++ b/vendor/league/commonmark/src/UnmatchedBlockCloser.php @@ -53,9 +53,11 @@ class UnmatchedBlockCloser public function closeUnmatchedBlocks() { + $endLine = $this->context->getLineNumber() - 1; + while ($this->oldTip !== $this->lastMatchedContainer) { $oldTip = $this->oldTip->parent(); - $this->oldTip->finalize($this->context, $this->context->getLineNumber() - 1); + $this->oldTip->finalize($this->context, $endLine); $this->oldTip = $oldTip; } } diff --git a/vendor/league/commonmark/src/Util/LinkParserHelper.php b/vendor/league/commonmark/src/Util/LinkParserHelper.php index 36f9a6bea1..8f0e5e1a3c 100644 --- a/vendor/league/commonmark/src/Util/LinkParserHelper.php +++ b/vendor/league/commonmark/src/Util/LinkParserHelper.php @@ -76,9 +76,13 @@ final class LinkParserHelper public static function parseLinkLabel(Cursor $cursor) { $match = $cursor->match('/^\[(?:[^\\\\\[\]]|' . RegexHelper::PARTIAL_ESCAPED_CHAR . '|\\\\)*\]/'); + if ($match === null || preg_match('/[^\\\\]\\\\\]$/', $match)) { + return 0; + } + $length = mb_strlen($match, 'utf-8'); - if ($match === null || $length > 1001 || preg_match('/[^\\\\]\\\\\]$/', $match)) { + if ($length > 1001) { return 0; } diff --git a/vendor/league/commonmark/src/Util/RegexHelper.php b/vendor/league/commonmark/src/Util/RegexHelper.php index 43e2a738a7..e06d8b6df0 100644 --- a/vendor/league/commonmark/src/Util/RegexHelper.php +++ b/vendor/league/commonmark/src/Util/RegexHelper.php @@ -316,7 +316,6 @@ final class RegexHelper */ public static function matchAll($pattern, $subject, $offset = 0) { - $matches = []; $subject = substr($subject, $offset); preg_match_all($pattern, $subject, $matches, PREG_PATTERN_ORDER); diff --git a/vendor/league/flysystem/src/Adapter/Local.php b/vendor/league/flysystem/src/Adapter/Local.php index 238d91fea7..1bdf51d81f 100644 --- a/vendor/league/flysystem/src/Adapter/Local.php +++ b/vendor/league/flysystem/src/Adapter/Local.php @@ -33,13 +33,13 @@ class Local extends AbstractAdapter */ protected static $permissions = [ 'file' => [ - 'public' => 0644, + 'public' => 0644, 'private' => 0600, ], - 'dir' => [ - 'public' => 0755, + 'dir' => [ + 'public' => 0755, 'private' => 0700, - ] + ], ]; /** @@ -56,6 +56,7 @@ class Local extends AbstractAdapter * @var int */ protected $writeFlags; + /** * @var int */ @@ -99,11 +100,16 @@ class Local extends AbstractAdapter { if ( ! is_dir($root)) { $umask = umask(0); - @mkdir($root, $this->permissionMap['dir']['public'], true); + + if ( ! @mkdir($root, $this->permissionMap['dir']['public'], true)) { + $mkdirError = error_get_last(); + } + umask($umask); if ( ! is_dir($root)) { - throw new Exception(sprintf('Impossible to create the root directory "%s".', $root)); + $errorMessage = isset($mkdirError['message']) ? $mkdirError['message'] : ''; + throw new Exception(sprintf('Impossible to create the root directory "%s". %s', $root, $errorMessage)); } } } diff --git a/vendor/league/flysystem/src/Util/MimeType.php b/vendor/league/flysystem/src/Util/MimeType.php index 58622a2ee6..254bc2a141 100644 --- a/vendor/league/flysystem/src/Util/MimeType.php +++ b/vendor/league/flysystem/src/Util/MimeType.php @@ -58,6 +58,7 @@ class MimeType 'z' => 'application/x-compress', 'xhtml' => 'application/xhtml+xml', 'xht' => 'application/xhtml+xml', + 'rdf' => 'application/rdf+xml', 'zip' => 'application/x-zip', 'rar' => 'application/x-rar', 'mid' => 'audio/midi', |
