From b70a500a619192b5bf2d014193ef8d2f33f061d6 Mon Sep 17 00:00:00 2001 From: warlee <824691958@qq.com> Date: Fri, 2 Sep 2016 11:16:46 +0800 Subject: [PATCH] office share view bug. --- controller/share.class.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/controller/share.class.php b/controller/share.class.php index b02c0c7..2024343 100755 --- a/controller/share.class.php +++ b/controller/share.class.php @@ -306,6 +306,16 @@ class share extends Controller{ show_json($list); } + public function _make_file_proxy($file_path){ + if (!file_exists($file_path)) { + return ''; + } + load_class('mcrypt'); + $pass = $GLOBALS['config']['setting_system']['system_password']; + $fid = Mcrypt::encode($file_path,$pass,$GLOBALS['config']['settings']['download_url_time']); + $file_name = urlencode(get_path_this($file_path)); + return APPHOST.'index.php?user/public_link&fid='.$fid.'&file_name=/'.$file_name; + } //生成临时文件key public function officeView(){ if (!file_exists($this->path)) { @@ -498,4 +508,4 @@ class share extends Controller{ _DIR_OUT($file_parem); return $file_parem; } -} \ No newline at end of file +}