From 5bc20f4e0fe43dd4681bf1ebf43f4d3efd6fe5d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 31 Mar 2014 14:02:55 +0200 Subject: [PATCH] Ignore hidden files when looking up transformations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- libraries/transformations.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/transformations.lib.php b/libraries/transformations.lib.php index 27ab472af3..b9af467f77 100644 --- a/libraries/transformations.lib.php +++ b/libraries/transformations.lib.php @@ -107,7 +107,7 @@ function PMA_getAvailableMIMEtypes() sort($filestack); foreach ($filestack as $file) { - if (preg_match('|^.*_.*_.*\.class\.php$|', $file)) { + if (preg_match('|^[^.].*_.*_.*\.class\.php$|', $file)) { // File contains transformation functions. $parts = explode('_', str_replace('.class.php', '', $file)); $mimetype = $parts[0] . "/" . $parts[1]; @@ -115,7 +115,7 @@ function PMA_getAvailableMIMEtypes() $stack['transformation'][] = $mimetype . ': ' . $parts[2]; $stack['transformation_file'][] = $file; - } elseif (preg_match('|^.*\.class.php$|', $file)) { + } elseif (preg_match('|^[^.].*\.class.php$|', $file)) { // File is a plain mimetype, no functions. $base = str_replace('.class.php', '', $file);