The bug occurs in "topic review" : the order of displayed attachments doesn't correspond anymore to that of the original post.
For example : Someone uploads multiple files at the same time when writing a post and chooses to display them like this in their post :
- 1 : File A
- 2: File B
- 3: File C
Everything is ok is viewtopic.
BUT, when you reply to this post and look at the display of inline attachments in the "topic review", then the files are displayed in a different order. They can be displayed like this for example :
- 1 : File C
- 2 : File B
- 3 : File A
It occurs only when using multiple uploads. If you upload files one by one, it doesn't seem to create this bug.
Someone (one of my forum members) advised me to check the filetime of the uploaded files, and I realised that multiple uploads result in giving the same "filetime" to all the files that are uploaded at the same time.
This person suggested that the problem was linked to this code in "includes/functions_posting.php" (around the line 1077) :
As several files have the same filetime when you use multiple uploads, then it creates the random display in topic review.
This person suggested that it should be replaced with :
This seems to work because someone tested it successfully on a test forum.
I mentioned that it affected phpBB 3.3.3 and 3.3.2 but maybe it affects more previous versions too, because it's a bug that I've been encountering for a long time on my forum (but I don't remember when exactly)
Could you please check if this is a common bug in phpBB and confirm if the fix is ok? If yes, could it be included in further versions/updates of phpBB ?
PS : sorry if my English isn't perfect, it's not my native language.