Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
hexbee
Cloudreve
提交
b0898fca
C
Cloudreve
项目概览
hexbee
/
Cloudreve
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
Cloudreve
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
b0898fca
编写于
2月 16, 2018
作者:
H
HFO4
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
支持通过sendfile下载文件
上级
8c8561dc
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
45 addition
and
5 deletion
+45
-5
application/index/controller/Admin.php
application/index/controller/Admin.php
+1
-1
application/index/view/admin/mail_setting.html
application/index/view/admin/mail_setting.html
+2
-2
application/index/view/admin/other_setting.html
application/index/view/admin/other_setting.html
+31
-0
mysql.sql
mysql.sql
+3
-1
static/js/admin/setting.js
static/js/admin/setting.js
+8
-1
未找到文件。
application/index/controller/Admin.php
浏览文件 @
b0898fca
...
...
@@ -120,7 +120,7 @@ class Admin extends Controller{
public
function
SettingOther
(){
return
view
(
'other_setting'
,
[
'options'
=>
$this
->
siteOptions
,
'optionsForSet'
=>
Option
::
getValues
([
"file_edit"
,
"share"
,
"avatar"
,
"admin"
,
"storage_policy"
]),
'optionsForSet'
=>
Option
::
getValues
([
"file_edit"
,
"share"
,
"avatar"
,
"admin"
,
"storage_policy"
,
"download"
]),
]);
}
...
...
application/index/view/admin/mail_setting.html
浏览文件 @
b0898fca
...
...
@@ -103,7 +103,7 @@
</div>
</form>
</div>
<div
class=
"tab-pane fade"
id=
"test"
role=
"tabpanel"
aria-labelledby=
"pills-profile-tab"
>
<form
id=
"testMail"
>
<div
class=
"row form-setting"
>
...
...
@@ -145,7 +145,7 @@
<div
class=
"tab-pane fade"
id=
"template"
role=
"tabpanel"
aria-labelledby=
"pills-profile-tab"
>
<form
id=
"mailTemplate"
>
</div>
<div
class=
"row form-setting"
>
<div
class=
"col-md-1 form-label "
>
...
...
application/index/view/admin/other_setting.html
浏览文件 @
b0898fca
...
...
@@ -66,6 +66,37 @@
<div
class=
"col-md-4 option-des"
>
用于展示用户头像的Gravatar服务器地址
</div>
</div>
<div
class=
"row form-setting"
>
<div
class=
"col-md-1 form-label "
>
<label
for=
"gravatar_server"
class=
"col-form-label col-form-label-sm"
>
文件数据发送模式
</label>
</div>
<div
class=
"col-md-4"
>
<select
class=
"form-control"
name=
"sendfile"
>
<option
value=
"0"
>
传统
</option>
<option
value=
"1"
{
eq
name=
"optionsForSet.sendfile"
value=
"1"
}
selected
{/
eq
}
>
X-Sendfile
</option>
</select>
</div>
<div
class=
"col-md-4 option-des"
>
推荐使用X-Sendfile以获得高效的文件传输,启用前请确保服务器安装X-Sendfile模块并在站点配置文件中启用。
</div>
</div>
<div
class=
"row form-setting"
style=
"{eq name="
optionsForSet.sendfile
"
value=
"0"
}
display:none
{/
eq
}"
id=
"sendfile_header"
>
<div
class=
"col-md-1 form-label "
>
<label
for=
"gravatar_server"
class=
"col-form-label col-form-label-sm"
>
Sendfile Header
</label>
</div>
<div
class=
"col-md-4"
>
<select
class=
"form-control"
name=
"header"
>
<option
value=
"X-Sendfile"
{
eq
name=
"optionsForSet.header"
value=
"X-Sendfile"
}
selected
{/
eq
}
>
X-Sendfile [Apache,Lighttpd v1.5,Cherokee]
</option>
<option
value=
"X-LIGHTTPD-send-file"
{
eq
name=
"optionsForSet.header"
value=
"X-LIGHTTPD-send-file"
}
selected
{/
eq
}
>
X-LIGHTTPD-send-file [Lighttpd v1.4]
</option>
<option
value=
"X-Accel-Redirect"
{
eq
name=
"optionsForSet.header"
value=
"X-Accel-Redirect"
}
selected
{/
eq
}
>
X-Accel-Redirect [Nginx,Cherokee]
</option>
</select>
</div>
<div
class=
"col-md-4 option-des"
>
请根据你所使用的服务器软件选择合适的header
</div>
</div>
<div
class=
"row form-setting"
>
<div
class=
"col-md-1 form-label "
>
</div>
...
...
mysql.sql
浏览文件 @
b0898fca
...
...
@@ -192,7 +192,9 @@ INSERT INTO `sd_options` (`id`, `option_name`, `option_value`, `option_type`) VA
(
44
,
'gravatar_server'
,
'https://v2ex.assets.uxengine.net/gravatar/'
,
'avatar'
),
(
45
,
'admin_color_body'
,
'fixed-nav sticky-footer bg-light'
,
'admin'
),
(
46
,
'admin_color_nav'
,
'navbar navbar-expand-lg fixed-top navbar-light bg-light'
,
'admin'
),
(
47
,
'js_code'
,
'<script type=
\"
text/javascript
\"
>
\r\n\r\n
</script>'
,
'basic'
);
(
47
,
'js_code'
,
'<script type=
\"
text/javascript
\"
>
\r\n\r\n
</script>'
,
'basic'
),
(
50
,
'sendfile'
,
'0'
,
'download'
),
(
51
,
'header'
,
'X-Sendfile'
,
'download'
);
-- --------------------------------------------------------
...
...
static/js/admin/setting.js
浏览文件 @
b0898fca
...
...
@@ -127,4 +127,11 @@ $("#saveYz").click(function() {
$
(
"
#saveYz
"
).
removeAttr
(
"
disabled
"
);
}
});
})
\ No newline at end of file
})
$
(
"
[name='sendfile']
"
).
change
(
function
(){
if
(
$
(
this
).
val
()
==
"
1
"
){
$
(
"
#sendfile_header
"
).
slideDown
();
}
else
{
$
(
"
#sendfile_header
"
).
slideUp
();
}
});
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录