"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Neos.Utility.MediaTypes/Scripts/updatemediatypes.php" between
flow-development-collection-5.2.1.tar.gz and flow-development-collection-5.2.2.tar.gz

About: TYPO3 Flow is a web application platform enabling developers creating fast, reliable and complex web solutions ("the next level of PHP programming"; old name "FLOW3").

updatemediatypes.php  (flow-development-collection-5.2.1):updatemediatypes.php  (flow-development-collection-5.2.2)
skipping to change at line 36 skipping to change at line 36
foreach (explode("\n", $rawList) as $line) { foreach (explode("\n", $rawList) as $line) {
preg_match_all('/^([a-z][^\s]+)\s+(.+)$/', $line, $matches, PREG_SET_ORDER); preg_match_all('/^([a-z][^\s]+)\s+(.+)$/', $line, $matches, PREG_SET_ORDER);
if (count($matches) === 1) { if (count($matches) === 1) {
$mediaTypesAndFileExtensions[$matches[0][1]] = preg_split('/\s+/', $matc hes[0][2]); $mediaTypesAndFileExtensions[$matches[0][1]] = preg_split('/\s+/', $matc hes[0][2]);
} }
} }
// Add non-registered mime types that we still want to support: // Add non-registered mime types that we still want to support:
$mediaTypesAndFileExtensions['application/vnd.apple.pkpass'] = ['pkpass']; $mediaTypesAndFileExtensions['application/vnd.apple.pkpass'] = ['pkpass'];
$mediaTypesAndFileExtensions['image/jp2'] = ['jp2', 'jpg2'];
ksort($mediaTypesAndFileExtensions); ksort($mediaTypesAndFileExtensions);
$mediaTypesToFileExtensionsCode = ''; $mediaTypesToFileExtensionsCode = '';
$fileExtensionsAndMediaType = array(); $fileExtensionsAndMediaType = array();
foreach ($mediaTypesAndFileExtensions as $mediaType => $fileExtensions) { foreach ($mediaTypesAndFileExtensions as $mediaType => $fileExtensions) {
$mediaTypesToFileExtensionsCode .= " '$mediaType' => ['" . implode("' , '", $fileExtensions) . "'],\n"; $mediaTypesToFileExtensionsCode .= " '$mediaType' => ['" . implode("' , '", $fileExtensions) . "'],\n";
foreach ($fileExtensions as $fileExtension) { foreach ($fileExtensions as $fileExtension) {
$fileExtensionsAndMediaType[$fileExtension] = $mediaType; $fileExtensionsAndMediaType[$fileExtension] = $mediaType;
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)