diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/functions_compress.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php index 869ed21cea..80c0242517 100644 --- a/phpBB/includes/functions_compress.php +++ b/phpBB/includes/functions_compress.php @@ -138,8 +138,16 @@ class compress { if (isset($this->filelist[$name])) { + $start = $name; + $ext = ''; $this->filelist[$name]++; - return $name . '.' . $this->filelist[$name]; + + if (($pos = strrpos($name, '.')) !== false) { + $start = substr($name, 0, $pos); + $ext = substr($name, $pos); + } + + return $start . '_' . $this->filelist[$name] . $ext; } $this->filelist[$name] = 0; |