From ecb310c6f7a2f8aa5c1f2217d7de6cb878aa85f4 Mon Sep 17 00:00:00 2001 From: Fyorl Date: Mon, 6 Aug 2012 08:32:12 +0800 Subject: [PATCH] [ticket/11044] Added comment explaining filename splitting PHPBB3-11044 --- phpBB/includes/functions_compress.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php index 80c0242517..8e07e6d1b8 100644 --- a/phpBB/includes/functions_compress.php +++ b/phpBB/includes/functions_compress.php @@ -142,7 +142,10 @@ class compress $ext = ''; $this->filelist[$name]++; - if (($pos = strrpos($name, '.')) !== false) { + // Separate the extension off the end of the filename to preserve it + $pos = strrpos($name, '.'); + if ($pos !== false) + { $start = substr($name, 0, $pos); $ext = substr($name, $pos); }