Fixed vB4 Import: Use postid as tie-break for posts with same dateline

Steffen

Well-known member
It seems like the order of posts in vBulletin actually is non-deterministic ("random") in this case but I think the XenForo importer should try to yield a reproducible result nevertheless.

Diff:
diff --git a/src/addons/XFI/Import/Importer/vBulletin.php b/src/addons/XFI/Import/Importer/vBulletin.php
index bf2f8d5ba..edbbdfb5f 100644
--- a/src/addons/XFI/Import/Importer/vBulletin.php
+++ b/src/addons/XFI/Import/Importer/vBulletin.php
@@ -4030,7 +4030,7 @@ class vBulletin extends AbstractForumImporter
                 editlog ON (editlog.postid = post.postid)
             WHERE post.threadid = ?
             AND post.dateline > ?
-            ORDER BY post.dateline
+            ORDER BY post.dateline, post.postid
         "), [$threadId, $startDate]);
     }
 
Top Bottom