当用户在版块中设置了附件扩展,且包含大小写, 如: jpg,JPG

这样当用户上传了大写扩展名之后
导致图片列表没有附件
原因是:
function_post.php
        $allowext = str_replace(' ', '', strtolower($_G['forum']['attachextensions']));
这里对所有附件扩展名进行了小写转换

后台进行调用的时候:

  1. if($pid > 0) {
  2. $query = DB::query("SELECT a.*, af.*
  3. FROM ".DB::table('forum_attachment')." a
  4. LEFT JOIN ".DB::table(getattachtablebytid($_G['tid']))." af USING(aid)
  5. WHERE a.pid='$pid' ORDER BY a.aid DESC");
  6. while($attach = DB::fetch($query)) {
  7. $attach['filenametitle'] = $attach['filename'];
  8. $attach['ext'] = fileext($attach['filename']);
  9. if($allowext && !in_array($attach['ext'], $allowext)) {
  10. continue;
  11. }
  12. getattach_row($attach, $attachs, $imgattachs);
  13. }
  14. }

应该进行转换:$attach['ext'] = strtolower(fileext($attach['filename']));