GetID3 used now deprecated functions like ereg and set_magic_quotes_runtime. Convert ereg to preg_match and throw an error if magic quotes are enabled on PHP >= 5.3.

git-svn-id: http://kusabax.cultnet.net/svn/repo/stable@216 73d99b7e-4f53-4972-b7b7-2ecd3c4d89ee
This commit is contained in:
Sazpaimon committed 2009-08-16 07:29:23 +00:00
1 parent 6afde4b284
commit 0bdb656e9a
4 files changed
+22 -17

No files matched your search

+4 -4
View File
@@ -429,7 +429,7 @@ class getid3_id3v2
}
}
if (!isset($thisfile_id3v2['comments']['year']) && ereg('^([0-9]{4})', trim(@$thisfile_id3v2['comments']['recording_time'][0]), $matches)) {
if (!isset($thisfile_id3v2['comments']['year']) && preg_match('/^([0-9]{4})/', trim(@$thisfile_id3v2['comments']['recording_time'][0]), $matches)) {
$thisfile_id3v2['comments']['year'] = array($matches[1]);
}
@@ -461,7 +461,7 @@ class getid3_id3v2
$unprocessed = substr($unprocessed, $endpos + 1);
}
unset($unprocessed);
} elseif (eregi('^([0-9]+|CR|RX)$', $genrestring)) {
} elseif (preg_match('/^([0-9]+|CR|RX)$/i', $genrestring)) {
// some tagging program (including some that use TagLib) fail to include null byte after numeric genre
$genrestring = '('.$genrestring.')';
}
@@ -3137,12 +3137,12 @@ class getid3_id3v2
function IsValidID3v2FrameName($framename, $id3v2majorversion) {
switch ($id3v2majorversion) {
case 2:
return ereg('[A-Z][A-Z0-9]{2}', $framename);
return preg_match('/[A-Z][A-Z0-9]{2}/i', $framename);
break;
case 3:
case 4:
return ereg('[A-Z][A-Z0-9]{3}', $framename);
return preg_match('/[A-Z][A-Z0-9]{3}/i', $framename);
break;
}
return false;