Fix issue within attachment export in vBulletin 4
authorTim Düsterhus <timwolla@bastelstu.be>
Wed, 18 Dec 2013 15:22:30 +0000 (16:22 +0100)
committerTim Düsterhus <timwolla@bastelstu.be>
Wed, 18 Dec 2013 15:22:30 +0000 (16:22 +0100)
files/lib/system/exporter/VB3or4xExporter.class.php

index bc21c312f35715e9b85eeb87e8cd72e5f7c27cca..ca453198db51865109578efaa08731fdeb4ed5c0 100644 (file)
@@ -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;
                                }