version 4.40 权限细节优化

pull/336/head
warlee 2019-03-21 22:39:57 +08:00
parent a173e8afb6
commit f06808056f
27 changed files with 73 additions and 47 deletions

View File

@ -1,3 +1,19 @@
### ver4.40 `2019/3/21`
-----
#### update:
- 文件列表中文排序优化;中文、数字等组合按自然排序进行排列;
- 水印插件优化:分享文档水印显示分享者信息
- 自定义桌面目录,可以指定桌面文件夹名称
- 离线下载http header兼容不标准的头处理。中文文件名自动识别优化。
- 控制器自动路由Hook加入重定向文件方便插件整体替换某个控制器文件
#### fix bug
- 禁用预览权限,部分预览插件依然能预览问题处理;优化无权限时前端提示
- 在部门中没有列目录权限时,打开首页报错优化处理【不显示内容,点击切换该目录时提示权限】
- 用户管理部门文档权限时:不允许内部拖拽到外部;
- 分享文件夹,部分类型文件打开预览是报错处理
### ver4.39 `2019/3/1`
-----
#### update:

View File

@ -432,7 +432,13 @@ class explorer extends Controller{
if(systemMember::userAuthGroup(1) == false){
$publicPath = KOD_GROUP_SHARE.':1/';//不在公共组则只能读取公共组共享目录
}
$GLOBALS['kodPathAuthCheck'] = true;
$listPublic = $this->_path(_DIR($publicPath),$checkFile,true);
if($publicPath == KOD_GROUP_PATH.':1/'){
if(!path_group_can_read('1')){
$listPublic=array("folderList"=>array(),'fileList'=>array());
}
}
$listRoot = $this->_path(_DIR(MYHOME),$checkFile,true);
if ($checkFile) {//编辑器
$root = array_merge($listRoot['folderList'],$listRoot['fileList']);
@ -774,6 +780,7 @@ class explorer extends Controller{
if (!path_writeable($this->path)) show_json(LNG('no_permission_write'),false);
$success=0;$error=0;$data = array();
foreach ($clipboard as $val) {
path_can_copy_move($val['path'],$this->in['path']);
$pathCopy = _DIR($val['path']);
$filename = get_path_this($pathCopy);
$autoPath = get_filename_auto($pathPast.$filename,'',$this->config['user']['fileRepeat']);
@ -804,6 +811,7 @@ class explorer extends Controller{
if (!path_writeable($this->path)) show_json(LNG('no_permission_write'),false);
$success=0;$error=0;$data = array();
foreach ($clipboard as $val) {
path_can_copy_move($val['path'],$this->in['path']);
$pathCopy = _DIR($val['path']);
_DIR($this->in['path']);//重置pathType等数据
$filename = get_path_this($pathCopy);

File diff suppressed because one or more lines are too long

View File

@ -436,7 +436,7 @@ function url_request($url,$method='GET',$data=false,$headers=false,$options=fals
$http_header = substr($response, 0, $header_size);
$http_header = parse_headers($http_header);
if(is_array($http_header)){
$http_header['kod_add_request_url'] = $url;
// $http_header['kod_add_request_url'] = $url;
}
//error
if($response_info['http_code'] == 0){

View File

@ -126,7 +126,7 @@ return array(
"role_type_name_write" => "写入",
"role_type_name_write:add" => "创建文件(夹),压缩解压文件",
"role_type_name_write:edit" => "编辑保存文件",
"role_type_name_write:change" => "重命名,调整目录结构",
"role_type_name_write:change" => "重命名,粘贴到此处,内部拖拽移动或复制",
"role_type_name_write:upload" => "文件(夹)上传,远程下载",
"role_type_name_write:remove" => "文件(夹)删除,剪切",
"group_guest" => "访客",

View File

@ -1,2 +1,2 @@
<?php
define('KOD_VERSION','4.39');
define('KOD_VERSION','4.40');

File diff suppressed because one or more lines are too long

View File

@ -25,7 +25,7 @@ class yzOffice2{
if($filePath === -1) return;
if(!$filePath || !file_exists($filePath)){
show_json('path '.LNG('error'),false);
show_json('path '.LNG('not_exist'),false);
}
$config = $plugin->getConfig();
@ -119,7 +119,6 @@ class yzOffice2{
//非高清预览【返回上传后直接转换过的文件】
public function upload(){
ignore_timeout();
$post = array(
"file" => "@".$this->filePath,
"convertType" => $this->convertMode()
@ -134,13 +133,16 @@ class yzOffice2{
public function convert($tempFile=false){
$headers = array("Content-Type: application/x-www-form-urlencoded; charset=UTF-8");
$tempFile = $tempFile?$tempFile:$this->task['steps'][0]['result']['data'];
if(!$tempFile){
show_json("操作失败: ".$this->task['steps'][0]['result']['message'],false,$this->task);
}
$post = array(
"inputDir" => $tempFile,
"convertType" => $this->convertMode(),
"isAsync" => 0,
);
$post = http_build_query($post);//post默认用array发送;content-type为x-www-form-urlencoded时用key=1&key=2的形式
$result = url_request($this->api['convert'],'POST',$post,$headers,false,true,3600);
$post = http_build_query($post);//post默认用array发送;content-type为x-www-form-urlencoded时用key=1&key=2的形式
$result = url_request($this->api['convert'],'POST',$post,$headers,false,true,5);
if(is_array($result) && is_array($result['data'])){
return $result;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/* power by kodexplorer ver 4.39(2019-03-21) [build 1553149080.2695] */
/* power by kodexplorer ver 4.40(2019-03-21) [build 1553178692.5436] */
@import url('./fileIcon.css');
@import url('./common.css');
.frame-main{position:absolute;top:40px;width:100%;bottom:0px;}.frame-main .tools-left{background:#f8f8f8 url("../../../images/common/bg.gif") 0 0px;position:fixed;line-height:30px;padding-left:20px;height:28px;border-bottom:1px solid #ddd;left:0;width:100%;}.frame-main .tools-left a{font-size:1.25em;font-weight:800;text-decoration:none;color:#999;text-shadow:0 0 3px;display:inline-block;padding:2px 6px;margin-top:0;height:20px;line-height:20px;}.frame-main .tools-left a:hover{background:url("../../../images/common/buttons_40.png") 0 0px repeat-x;-webkit-box-shadow:0 2px 8px rgba(0,0,0,0.8);-moz-box-shadow:0 2px 8px rgba(0,0,0,0.8);box-shadow:0 2px 8px rgba(0,0,0,0.8);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.frame-main .frame-left{position:absolute;left:0;top:30px;bottom:0;width:200px;background:#fff;background-attachment:fixed;overflow:auto;}.frame-main .frame-left .ztree{margin-top:0;}.frame-main .frame-left .ztree li.level0{margin-bottom:5px;}.frame-main .frame-resize{width:10px;cursor:col-resize;z-index:100;position:absolute;left:195px;top:0;bottom:0;overflow:hidden;background:url("../../../images/common/resize.png") 0px 50% no-repeat;}.frame-main .frame-resize.active{background:#000;opacity:0.2;filter:alpha(opacity=20);}.frame-main .frame-right{left:200px;right:0;position:absolute;top:0;bottom:0;overflow:auto;}.frame-main .frame-right .frame-right-main .resize-mask{z-index:999;position:absolute;left:0;top:0;bottom:0;right:0;display:none;}.frame-main .frame-right .frame-right-main .frame{height:100%;border-left:1px solid #ddd;overflow:hidden;}
/* ver 4.39(2019-03-21) [build 1553149080.2696] */
/* ver 4.40(2019-03-21) [build 1553178692.5436] */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long