From 1e8f7507057aa9caed91cb901830f6d5535feabc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 18 Dec 2013 16:22:30 +0100 Subject: [PATCH] Fix issue within attachment export in vBulletin 4 --- files/lib/system/exporter/VB3or4xExporter.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/lib/system/exporter/VB3or4xExporter.class.php b/files/lib/system/exporter/VB3or4xExporter.class.php index bc21c31..ca45319 100644 --- a/files/lib/system/exporter/VB3or4xExporter.class.php +++ b/files/lib/system/exporter/VB3or4xExporter.class.php @@ -951,13 +951,13 @@ class VB3or4xExporter extends AbstractExporter { $file = $this->readOption('attachpath'); if (!StringUtil::startsWith($file, '/')) $file = realpath($this->fileSystemPath.$file); $file = FileUtil::addTrailingSlash($file); - $file .= $row['userid'].'/'.$row['attachmentid'].'.attach'; + $file .= $row['userid'].'/'.(isset($row['filedataid']) ? $row['filedataid'] : $row['attachmentid']).'.attach'; break; case self::ATTACHFILE_FILESYSTEM_SUBFOLDER: $file = $this->readOption('attachpath'); if (!StringUtil::startsWith($file, '/')) $file = realpath($this->fileSystemPath.$file); $file = FileUtil::addTrailingSlash($file); - $file .= implode('/', str_split($row['userid'])).'/'.$row['attachmentid'].'.attach'; + $file .= implode('/', str_split($row['userid'])).'/'.(isset($row['filedataid']) ? $row['filedataid'] : $row['attachmentid']).'.attach'; break; } -- 2.20.1