remove some PHP3 compatibility code

This commit is contained in:
Marc Delisle
2006-01-01 20:49:21 +00:00
parent 8a352989de
commit 802898b8ed
2 changed files with 7 additions and 5 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2006-01-01 Marc Delisle <lem9@users.sourceforge.net>
* libraries/transformations.lib.php: remove some PHP3 compatibility code
2005-12-31 Marc Delisle <lem9@users.sourceforge.net> 2005-12-31 Marc Delisle <lem9@users.sourceforge.net>
* libraries/common.lib.php: bug #1388167, deleting a row in a table * libraries/common.lib.php: bug #1388167, deleting a row in a table
without a primary key, handle correctly is_js_confirmed without a primary key, handle correctly is_js_confirmed

View File

@@ -50,19 +50,18 @@ function PMA_getAvailableMIMEtypes() {
@ksort($filestack); @ksort($filestack);
foreach ($filestack AS $key => $file) { foreach ($filestack AS $key => $file) {
if (preg_match('|^.*__.*\.inc\.php(3?)$|', trim($file), $match = array())) { if (preg_match('|^.*__.*\.inc\.php$|', trim($file), $match = array())) {
// File contains transformation functions. // File contains transformation functions.
$base = explode('__', str_replace('.inc.php' . $match[1], '', $file)); $base = explode('__', str_replace('.inc.php', '', $file));
$mimetype = str_replace('_', '/', $base[0]); $mimetype = str_replace('_', '/', $base[0]);
$stack['mimetype'][$mimetype] = $mimetype; $stack['mimetype'][$mimetype] = $mimetype;
$stack['transformation'][] = $mimetype . ': ' . $base[1]; $stack['transformation'][] = $mimetype . ': ' . $base[1];
$stack['transformation_file'][] = $file; $stack['transformation_file'][] = $file;
} else if (preg_match('|^.*\.inc\.php(3?)$|', trim($file), $match)) { } else if (preg_match('|^.*\.inc\.php$|', trim($file), $match)) {
// File is a plain mimetype, no functions. // File is a plain mimetype, no functions.
$base = str_replace('.inc.php' . $match[1], '', $file); $base = str_replace('.inc.php', '', $file);
if ($base != 'global') { if ($base != 'global') {
$mimetype = str_replace('_', '/', $base); $mimetype = str_replace('_', '/', $base);