Merge branch 'master' of github.com:zyx0814/dzzoffice

This commit is contained in:
zyx0814 2024-11-19 09:22:50 +08:00
commit ebb547ae63
3 changed files with 10 additions and 12 deletions

View File

@ -112,7 +112,7 @@
}
jQuery.getJSON('{BASESCRIPT}?mod=cloud&op=oauth&do=getBucket', { id: id, key: key,region:region,bz:bz }, function(json) {
if(json.error){
showmessage(json.error);
showmessage(json.error,'error',3000,1);
}else{
if(json.length > 0) {
var html = '';
@ -148,4 +148,4 @@
}
</script>
<script src="static/bootstrap/js/bootstrap.min.js?{VERHASH}"></script>
<!--{template common/footer_simple}-->
<!--{template common/footer_simple}-->

View File

@ -207,8 +207,12 @@ class io_Qcos extends io_api
try {
//请求成功
if ($list = $qcos->listBuckets()) {
foreach ($list['Buckets'][0] as $value) {
$re[] = $value['Name'];
if (isset($list['Buckets']) && !empty($list['Buckets'][0]['Bucket'])) {
foreach ($list['Buckets'][0]['Bucket'] as $value) {
$re[] = $value['Name'];
}
} else {
return array('error' => 'Bucket为空');
}
} else {
return array();

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));
}
}
}