上传附件后,显示的附件列表的顺序是和上传时选择的顺序相反的。
此处意为将最新上传到服务器的附件放到附件列表的最前面,所以取的是倒序的方式。
如果您不喜欢这样的排序方式,可以自行修改一下显示的顺序。
找到 source/function/function_post.php 文件的 41 和 54 行附近:
41行附近- $query = DB::query("SELECT a.*, af.*
- FROM ".DB::table('forum_attachment')." a
- LEFT JOIN ".DB::table('forum_attachment_unused')." af USING(aid)
- WHERE $aids (af.uid='$_G[uid]' AND a.tid='0' $sqladd1) ORDER BY a.aid DESC");
复制代码
改为- $query = DB::query("SELECT a.*, af.*
- FROM ".DB::table('forum_attachment')." a
- LEFT JOIN ".DB::table('forum_attachment_unused')." af USING(aid)
- WHERE $aids (af.uid='$_G[uid]' AND a.tid='0' $sqladd1) ORDER BY a.aid ASC");
复制代码
54行附近- $query = DB::query("SELECT a.*, af.*
- FROM ".DB::table('forum_attachment')." a
- LEFT JOIN ".DB::table(getattachtablebytid($_G['tid']))." af USING(aid)
- WHERE a.pid='$pid' ORDER BY a.aid DESC");
复制代码
改为- $query = DB::query("SELECT a.*, af.*
- FROM ".DB::table('forum_attachment')." a
- LEFT JOIN ".DB::table(getattachtablebytid($_G['tid']))." af USING(aid)
- WHERE a.pid='$pid' ORDER BY a.aid ASC");
复制代码
|