修复不显示文件夹大小问题 (#273)

This commit is contained in:
小胡 2024-11-08 20:22:09 +08:00 committed by GitHub
parent 4c550c8b1a
commit fe2c1ac773
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -885,16 +885,9 @@ class table_resources extends dzz_table
//文件图标信息
$fileinfo['img'] = self::get_icosinfo_by_rid($fileinfo['rid']);
if ($fileinfo['type'] == 'folder') {
$fileinfo['type'] = '文件夹';
if ($currentfolder = C::t('folder')->fetch($fileinfo['oid'])) {
$fileinfo['isgroup'] = ($currentfolder['flag'] == 'organization') ? true : false;
}
} elseif ($fileinfo['type'] == 'link') {
$fileinfo['type'] = lang('type_link');
} elseif ($fileinfo['ext']) {
$fileinfo['type'] = getFileTypeName($fileinfo['type'], $fileinfo['ext']);
} else {
$fileinfo['type'] = lang('undefined_file_type');
}
if ($contains) {
//文件大小信息
@ -911,6 +904,7 @@ class table_resources extends dzz_table
}
}
$fileinfo['type'] = getFileTypeName($fileinfo['type'], $fileinfo['ext']);
}
return $fileinfo;
@ -1058,4 +1052,4 @@ function get_resources_info_by_fid($fid)
{
return DB::fetch_first("select * from %t where oid = %d and `type` = 'folder' ", array($this->_table, $fid));
}
}
}