mirror of
https://github.com/zyx0814/dzzoffice.git
synced 2025-01-08 11:57:57 +08:00
修复onlyoffice保存文件失败的bug
This commit is contained in:
parent
48291fa585
commit
7bc750550a
@ -6,7 +6,7 @@
|
||||
2. github地址:https://github.com/zyx0814/dzzoffice
|
||||
3. 码云地址: https://gitee.com/zyx0814/dzzoffice
|
||||
|
||||
### DzzOffice2.01主要更新内容
|
||||
### DzzOffice2.02主要更新内容
|
||||
|
||||
1. 缓存优化,开启内存huanc(如:memcached等)会显著提高效率;
|
||||
|
||||
|
@ -484,7 +484,7 @@ class io_dzz extends io_api
|
||||
'ext' => $attach['filetype'],
|
||||
'dateline' => TIMESTAMP
|
||||
);
|
||||
$return = C::t('resources_version')->add_new_version_by_rid($icoarr['rid'], $setarr);
|
||||
$return = C::t('resources_version')->add_new_version_by_rid($icoarr['rid'], $setarr,$force);
|
||||
if($return['error']){
|
||||
return array('error'=>$return['error']);
|
||||
}
|
||||
|
@ -410,13 +410,13 @@ class table_resources extends dzz_table
|
||||
$data['url'] = DZZSCRIPT . '?mod=document&icoid=' . dzzencode('attach::' . $data['aid']);
|
||||
$data['img'] = isset($data['img']) ? $data['img'] : geticonfromext($data['ext'], $data['type']);
|
||||
} elseif ($data['type'] == 'folder') {
|
||||
$contaions = self::get_contains_by_fid($data['oid'], true);
|
||||
$data['contaions'] = $contaions;
|
||||
//$contaions = self::get_contains_by_fid($data['oid'], true);
|
||||
//$data['contaions'] = $contaions;
|
||||
$relativepath = str_replace(':', '', strrchr($data['path'], ':'));
|
||||
$data['position'] = substr($relativepath, 0, strlen($relativepath) - 1);
|
||||
$data['fsize'] = formatsize($contaions['size']);
|
||||
$data['ffsize'] = lang('property_info_size', array('fsize' => formatsize($contaions['size']), 'size' => $contaions['size']));
|
||||
$data['contain'] = lang('property_info_contain', array('filenum' => $contaions['contain'][0], 'foldernum' => $contaions['contain'][1]));
|
||||
// $data['ffsize'] = lang('property_info_size', array('fsize' => formatsize($contaions['size']), 'size' => $contaions['size']));
|
||||
// $data['contain'] = lang('property_info_contain', array('filenum' => $contaions['contain'][0], 'foldernum' => $contaions['contain'][1]));
|
||||
$data['img'] = './dzz/images/extimg/folder.png';
|
||||
} else {
|
||||
$data['img'] = isset($data['img']) ? $data['img'] : geticonfromext($data['ext'], $data['type']);
|
||||
|
@ -125,14 +125,14 @@ class table_resources_version extends dzz_table
|
||||
$this->clear_cache($cachekey);
|
||||
}
|
||||
//上传新版本
|
||||
public function add_new_version_by_rid($rid,$setarr){
|
||||
public function add_new_version_by_rid($rid,$setarr,$force=false){
|
||||
global $_G,$documentexts;
|
||||
$cachekey = 'resourcesversiondata_'.$rid;
|
||||
if(!$resources = C::t('resources')->fetch_info_by_rid($rid)){
|
||||
return array('error'=>lang('file_not_exist'));
|
||||
}
|
||||
//检测权限
|
||||
if (!perm_check::checkperm_Container($resources['pfid'], 'edit2') && !( $_G['uid'] == $resources['uid'] && perm_check::checkperm_Container($resources['pfid'], 'edit1'))) {
|
||||
if (!$force && !perm_check::checkperm_Container($resources['pfid'], 'edit2') && !( $_G['uid'] == $resources['uid'] && perm_check::checkperm_Container($resources['pfid'], 'edit1'))) {
|
||||
return array('error'=>lang('no_privilege'));
|
||||
}
|
||||
//文件类型获取
|
||||
|
Loading…
Reference in New Issue
Block a user