Browse Source

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

pull/101/merge
zyx0814 8 months ago
parent
commit
ebb547ae63
  1. 2
      admin/cloud/template/oauth_qcos.htm
  2. 6
      core/class/io/io_QCOS.php
  3. 8
      core/class/table/table_resources.php

2
admin/cloud/template/oauth_qcos.htm

@ -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 = '';

6
core/class/io/io_QCOS.php

@ -207,9 +207,13 @@ class io_Qcos extends io_api
try {
//请求成功
if ($list = $qcos->listBuckets()) {
foreach ($list['Buckets'][0] as $value) {
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();
}

8
core/class/table/table_resources.php

@ -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;

Loading…
Cancel
Save