Description
Discuz in the post, add more pictures, and then directly post, picture order sometimes will be disorderly off
Even if the picture in the Upload window is in the correct order, it will go off after the release.
Analysis
Look at the URL, the program code can not see what
Change the picture name to the serial number upload, the order is disorderly, write down the order of the pictures in the post is: 76123458
The bbs_forum_attachment_1 table is then found in the database and the default order is found for this:
Unexpectedly also not according to the aid sort, may take the time to take directly has not ordered by
Find the php:source\class\table\table_forum_attachment_n.php that directly manipulate this table
by Writelog (' filename ', ' log ') method, it is found that every time a post is refreshed, fetch_all_by_id, this method executes once
When the original view of the post, not inserted into the post of the attachment address is every time to read from the database
Solve
To modify the incoming default parameters for the fetch_all_by_id method:order_by= ' aid '
Refresh the sequence of pictures just now, find out the order is normal
The above is about the discuz of the whole content of the amendment, I hope to be able to help.