Browse Source

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

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

4
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 = '';
@ -148,4 +148,4 @@
}
</script>
<script src="static/bootstrap/js/bootstrap.min.js?{VERHASH}"></script>
<!--{template common/footer_simple}-->
<!--{template common/footer_simple}-->

8
core/class/io/io_QCOS.php

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

10
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;
@ -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));
}
}
}
Loading…
Cancel
Save