Skip to content

Commit 5515a2d

Browse files
authored
Merge pull request #254 from StudioMaX/2.0-with-1.9.20
Sync 2.0 with 1.9.20-202006061653
2 parents 8cf765e + 6d7b77b commit 5515a2d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1996
-804
lines changed

.gitattributes

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
/.editorconfig export-ignore
2525
.gitattributes export-ignore
2626
.gitignore export-ignore
27+
/.phpcs.xml export-ignore
2728
/.travis.yml export-ignore
28-
Doxyfile export-ignore
2929
/composer.json export-ignore
30-
/.phpcs.xml export-ignore
30+
Doxyfile export-ignore
31+
/phpstan.neon export-ignore
3132
/phpunit.xml.dist export-ignore
3233
/tests export-ignore
33-
/phpstan.neon export-ignore

.travis.yml

+10-11
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
11
language: php
2-
sudo: false
32

43
cache:
54
directories:
65
- $HOME/.composer/cache/files
76

8-
php:
9-
- 5.4
10-
- 5.5
11-
- 5.6
12-
- 7.0
13-
- 7.1
14-
- 7.2
15-
- 7.3
16-
177
matrix:
188
include:
9+
- php: 5.4
10+
dist: trusty
11+
- php: 5.5
12+
dist: trusty
13+
- php: 5.6
14+
- php: 7.0
1915
- php: 7.1
16+
- php: 7.2
17+
- php: 7.3
2018
env: PHPSTAN=1
19+
- php: 7.4
2120

2221
before_script:
2322
- travis_retry composer install --prefer-source --quiet --no-interaction
24-
- if [[ $PHPSTAN = 1 ]]; then composer require --dev phpstan/phpstan:^0.9; fi
23+
- if [[ $PHPSTAN = 1 ]]; then composer require --dev phpstan/phpstan:^0.12; fi
2524

2625
script:
2726
- vendor/bin/phpunit

bin/md5sum.exe

-27.5 KB
Binary file not shown.

bin/readme.helperapps.txt

+3-5
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ Taken from http://www.cygwin.com/
3232

3333
Taken from http://unxutils.sourceforge.net/
3434
* head.exe
35-
* md5sum.exe
36-
* tail.exe
37-
38-
Taken from http://ebible.org/mpj/software.htm
39-
* sha1sum.exe
4035

4136
Taken from http://www.vorbis.com/download.psp
4237
* vorbiscomment.exe
@@ -54,3 +49,6 @@ Changelog:
5449

5550
2003.12.29:
5651
* Initial release
52+
53+
2019.07.24:
54+
* Remove obsolete md5sum.exe, sha1sum.exe, tail.exe

bin/sha1sum.exe

-66.5 KB
Binary file not shown.

bin/tail.exe

-34.5 KB
Binary file not shown.

changelog.txt

+52
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,58 @@
1818
Version History
1919
===============
2020

21+
1.9.20: [2020-06-30] James Heinrich :: 1.9.20-202006061653
22+
» add support for DSDIFF audio
23+
» add support for TAK lossess audio
24+
» add support for IVF video
25+
» add detection support for EPUB files
26+
» add detection support for HPK archives
27+
» add demo.mysqli.php, remove demo.mysql.php
28+
¤ QuickTime.uuid now returned as an array (may contain multiple entries)
29+
¤ improved PDF support, including page count
30+
* bugfix (G:247) array_min incorrect return value
31+
* bugfix (G:242) filepointer analysis errors
32+
* bugfix (G:238) comments_html may not match comments
33+
* bugfix (G:235) prevent disclosing paths when accessing modules directly
34+
* bugfix (G:233) Quicktime duplicate attached images
35+
* bugfix (G:229) Quicktime timestamps easy access
36+
* bugfix (G:228) master.zip did not contain demos
37+
* bugfix (G:227) Quicktime check subatoms data length
38+
* bugfix (G:226) uuid parsing based on UUID
39+
* bugfix (G:225) use comments_html content already generated by modules
40+
* bugfix (G:223) ID3v2 slashed genre names
41+
* bugfix (G:222) demo.browse filesystem character encoding
42+
* bugfix (G:221) option_tags_html=false ignored
43+
* bugfix (G:219) Quicktime.UUID now parsed more discriminately for XML and other data types
44+
* bugfix (G:218) QuickTime not copying covr to comments
45+
* bugfix (G:217) mp3 array offsets of type bool
46+
* bugfix (G:216) ID3v2.write allow WMP rating in POPM
47+
* bugfix (G:210) PHP 7.4 deprecated get_magic_quotes
48+
* bugfix: Quicktime detect null-terminated strings used where Pascal strings should be
49+
* bugfix: Quicktime GPS uninitialized array keys
50+
51+
1.9.19: [2019-12-17] James Heinrich :: 1.9.19-201912131005
52+
» add placeholder support for WTV (Windows Recorded TV Show)
53+
* bugfix (G:210) PHP 7.4 deprecated get_magic_quotes
54+
* bugfix (G:207) improved LAME version string parsing
55+
* bugfix (G:206) inverted logic in CopyTagsToComments
56+
* bugfix (G:203) use getimagesizefromstring if available
57+
* Quicktime decode 'uuid' atom for 360fly cameras
58+
59+
1.9.18: [2019-07-24] James Heinrich :: 1.9.18-201907240906
60+
* bugfix (G:198) use native hash functions instead of obsolete external binaries
61+
* bugfix (G:194) PHP 7.4 compatibility: fix deprecated curly brace array access
62+
* bugfix (G:191) unsupported operand types module.audio.ac3.php:763
63+
* bugfix (G:189) false UTF-16 <BOM> and no termination strings
64+
* bugfix (G:188) add support for DS2 v8
65+
* bugfix (G:187) RIFF.WAVE.scot parsing
66+
* bugfix (G:184) invalid regex pattern (ID3v1)
67+
* bugfix (G:183) reduced information for GIF files with $option_extra_info=false
68+
* bugfix (G:175) mp4 max buffer size
69+
* bugfix (G:174) TIFF parsing improvements
70+
* bugfix (G:121) trailing nulls in ID3v2 strings
71+
* standardize "track" -> "track_number"
72+
2173
1.9.17: [2019-02-07] James Heinrich :: 1.9.17-201902071234
2274
* bugfix (G:178) HandleAllTags should skip "picture"
2375
* bugfix (G:177) error checking for reading more than PHP memory_limit

demos/demo.basic.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
metadata is all available in one location for all tag formats
3232
metainformation is always available under [tags] even if this is not called
3333
*/
34-
GetID3\Utils::CopyTagsToComments($ThisFileInfo);
34+
$getID3->CopyTagsToComments($ThisFileInfo);
3535

3636
/*
3737
Output desired information in whatever format you want

demos/demo.browse.php

+16-11
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
define('GETID3_DEMO_BROWSE_ALLOW_MD5_LINK', false); // if enabled, shows "enable" link for MD5 hashes for file/data/source
2525

2626
$PageEncoding = 'UTF-8';
27-
27+
$FileSystemEncoding = ((GetID3\Utils::isWindows() && version_compare(PHP_VERSION, '7.1.0', '<')) ? 'Windows-1252' : 'UTF-8');
2828
$writescriptfilename = 'demo.write.php';
2929

3030
// Needed for windows only. Leave commented-out to auto-detect, only define here if auto-detection does not work properly
@@ -75,7 +75,7 @@
7575
if (isset($_REQUEST['filename'])) {
7676

7777
if (!file_exists($_REQUEST['filename']) || !is_file($_REQUEST['filename'])) {
78-
die(GetID3\Utils::iconv_fallback('ISO-8859-1', $PageEncoding, $_REQUEST['filename'].' does not exist'));
78+
die(GetID3\Utils::iconv_fallback($FileSystemEncoding, $PageEncoding, $_REQUEST['filename'].' does not exist'));
7979
}
8080
$starttime = microtime(true);
8181

@@ -92,7 +92,7 @@
9292
}
9393

9494

95-
GetID3\Utils::CopyTagsToComments($ThisFileInfo);
95+
$getID3->CopyTagsToComments($ThisFileInfo);
9696

9797
$listdirectory = dirname($_REQUEST['filename']);
9898
$listdirectory = realpath($listdirectory); // get rid of /../../ references
@@ -106,7 +106,7 @@
106106
if (preg_match('#^(ht|f)tp://#', $_REQUEST['filename'])) {
107107
echo '<i>Cannot browse remote filesystems</i><br>';
108108
} else {
109-
echo 'Browse: <a href="'.htmlentities($_SERVER['PHP_SELF'].'?listdirectory='.urlencode($listdirectory), ENT_QUOTES | ENT_SUBSTITUTE, $PageEncoding).'">' . GetID3\Utils::iconv_fallback('ISO-8859-1', $PageEncoding, $listdirectory) . '</a><br>';
109+
echo 'Browse: <a href="'.htmlentities($_SERVER['PHP_SELF'].'?listdirectory='.urlencode($listdirectory), ENT_QUOTES | ENT_SUBSTITUTE, $PageEncoding).'">' . GetID3\Utils::iconv_fallback($FileSystemEncoding, $PageEncoding, $listdirectory) . '</a><br>';
110110
}
111111

112112
GetID3\Utils::ksort_recursive($ThisFileInfo);
@@ -172,7 +172,7 @@
172172
$getID3->setOption(array('option_md5_data' => (isset($_REQUEST['ShowMD5']) && GETID3_DEMO_BROWSE_ALLOW_MD5_LINK)));
173173
$fileinformation = $getID3->analyze($currentfilename);
174174

175-
GetID3\Utils::CopyTagsToComments($fileinformation);
175+
$getID3->CopyTagsToComments($fileinformation);
176176

177177
$TotalScannedFilesize += (isset($fileinformation['filesize']) ? $fileinformation['filesize'] : 0);
178178

@@ -196,6 +196,11 @@
196196
if (isset($fileinformation['bitrate']) && ($fileinformation['bitrate'] > 0)) {
197197
$TotalScannedBitrateFiles++;
198198
}
199+
200+
} else {
201+
202+
echo '<div style="color: red;">Unknown filesystem entry: "'.htmlentities($currentfilename, ENT_QUOTES | ENT_SUBSTITUTE, $PageEncoding).'"</div>';
203+
199204
}
200205
}
201206
$endtime = microtime(true);
@@ -207,7 +212,7 @@
207212
$columnsintable = 14;
208213
echo '<table class="table" cellspacing="0" cellpadding="3">';
209214

210-
echo '<tr bgcolor="#'.$getID3checkColor_Head.'"><th colspan="'.$columnsintable.'">Files in ' . GetID3\Utils::iconv_fallback('ISO-8859-1', $PageEncoding, $currentfulldir) . '</th></tr>';
215+
echo '<tr bgcolor="#'.$getID3checkColor_Head.'"><th colspan="'.$columnsintable.'">Files in ' . GetID3\Utils::iconv_fallback($FileSystemEncoding, $PageEncoding, $currentfulldir) . '</th></tr>';
211216
$rowcounter = 0;
212217
foreach ($DirectoryContents as $dirname => $val) {
213218
if (isset($DirectoryContents[$dirname]['dir']) && is_array($DirectoryContents[$dirname]['dir'])) {
@@ -227,8 +232,7 @@
227232
echo '"> <input type="submit" value="Go">';
228233
echo '</form></td>';
229234
} else {
230-
//$escaped_filename = htmlentities($filename, ENT_SUBSTITUTE, $PageEncoding); // do filesystems always return filenames in ISO-8859-1?
231-
$escaped_filename = htmlentities($filename, ENT_SUBSTITUTE, 'ISO-8859-1'); // do filesystems always return filenames in ISO-8859-1?
235+
$escaped_filename = htmlentities($filename, ENT_SUBSTITUTE, $FileSystemEncoding); // do filesystems always return filenames in ISO-8859-1?
232236
$escaped_filename = ($escaped_filename ? $escaped_filename : rawurlencode($filename));
233237
echo '<td colspan="'.$columnsintable.'"><a href="'.htmlentities($_SERVER['PHP_SELF'].'?listdirectory='.urlencode($dirname.$filename), ENT_QUOTES | ENT_SUBSTITUTE, $PageEncoding).'"><b>'.$escaped_filename.'</b></a></td>';
234238
}
@@ -261,8 +265,7 @@
261265
uksort($DirectoryContents[$dirname]['known'], 'MoreNaturalSort');
262266
foreach ($DirectoryContents[$dirname]['known'] as $filename => $fileinfo) {
263267
echo '<tr bgcolor="#'.(($rowcounter++ % 2) ? $getID3checkColor_FileDark : $getID3checkColor_FileLight).'">';
264-
//$escaped_filename = htmlentities($filename, ENT_SUBSTITUTE, $PageEncoding); // do filesystems always return filenames in ISO-8859-1?
265-
$escaped_filename = htmlentities($filename, ENT_SUBSTITUTE, 'ISO-8859-1'); // do filesystems always return filenames in ISO-8859-1?
268+
$escaped_filename = htmlentities($filename, ENT_SUBSTITUTE, $FileSystemEncoding); // do filesystems always return filenames in ISO-8859-1?
266269
$escaped_filename = ($escaped_filename ? $escaped_filename : rawurlencode($filename));
267270
echo '<td><a href="'.htmlentities($_SERVER['PHP_SELF'].'?filename='.urlencode($dirname.$filename), ENT_QUOTES | ENT_SUBSTITUTE, $PageEncoding).'" title="View detailed analysis">'.$escaped_filename.'</a></td>';
268271
echo '<td align="right">&nbsp;'.number_format($fileinfo['filesize']).'</td>';
@@ -449,7 +452,9 @@ function string_var_dump($variable) {
449452
return $dumpedvariable;
450453
}
451454

452-
function table_var_dump($variable, $wrap_in_td=false, $encoding='ISO-8859-1') {
455+
function table_var_dump($variable, $wrap_in_td=false, $encoding='') {
456+
global $FileSystemEncoding;
457+
$encoding = ($encoding ? $encoding : $FileSystemEncoding);
453458
$returnstring = '';
454459
switch (gettype($variable)) {
455460
case 'array':

demos/demo.mp3header.php

+2-19
Original file line numberDiff line numberDiff line change
@@ -782,8 +782,8 @@ function ID3v1matchesID3v2($id3v1, $id3v2) {
782782
if (trim($id3v1['genre']) != trim($id3v2['genre'])) {
783783
return false;
784784
}
785-
if (isset($id3v1['track'])) {
786-
if (!isset($id3v1['track']) || (trim($id3v1['track']) != trim($id3v2['track']))) {
785+
if (isset($id3v1['track_number'])) {
786+
if (!isset($id3v1['track_number']) || (trim($id3v1['track_number']) != trim($id3v2['track_number']))) {
787787
return false;
788788
}
789789
if (trim($id3v1['comment']) != trim(substr($id3v2['comment'], 0, 28))) {
@@ -1080,23 +1080,6 @@ function CreateDeepArray($ArrayPath, $Separator, $Value) {
10801080
}
10811081
}
10821082

1083-
if (!function_exists('md5_file')) {
1084-
// Allan Hansen <[email protected]>
1085-
// md5_file() exists in PHP 4.2.0.
1086-
// The following works under UNIX only, but dies on windows
1087-
function md5_file($file) {
1088-
if (substr(php_uname(), 0, 7) == 'Windows') {
1089-
die('PHP 4.2.0 or newer required for md5_file()');
1090-
}
1091-
1092-
$file = str_replace('`', '\\`', $file);
1093-
if (preg_match("#^([0-9a-f]{32})[ \t\n\r]#i", `md5sum "$file"`, $r)) {
1094-
return $r[1];
1095-
}
1096-
return false;
1097-
}
1098-
}
1099-
11001083
if (!function_exists('md5_data')) {
11011084
// Allan Hansen <[email protected]>
11021085
// md5_data() - returns md5sum for a file from startuing position to absolute end position

0 commit comments

Comments
 (0)