From 7a3fa9d6c1dd53bc511977441136819bd797e51c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=81=B0=E5=A4=A7=E7=8B=BC?= Date: Sun, 3 Mar 2019 16:06:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9Attachment=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=EF=BC=8C=E9=98=B2=E6=AD=A2=E5=90=8C=E5=90=8D=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E9=87=8D=E5=A4=8D=E7=94=9F=E6=88=90=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/model/Attachment.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/application/common/model/Attachment.php b/application/common/model/Attachment.php index 79878c6d3..2149aec71 100644 --- a/application/common/model/Attachment.php +++ b/application/common/model/Attachment.php @@ -21,4 +21,13 @@ class Attachment extends Model return strtotime($value); } + protected static function init() + { + // 如果已经上传该资源,则不再记录 + self::beforeInsert(function ($model) { + if (self::where('url', '=', $model['url'])->find()) { + return false; + } + }); + } } -- Gitee From cb754d169a278d29de7fecc1ee0fb81d0aa3c934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=81=B0=E5=A4=A7=E7=8B=BC?= Date: Sun, 3 Mar 2019 18:15:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E9=94=AE=E7=9A=84=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/lang/zh-cn/addon.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/application/common/lang/zh-cn/addon.php b/application/common/lang/zh-cn/addon.php index a33b83baf..0491e5763 100755 --- a/application/common/lang/zh-cn/addon.php +++ b/application/common/lang/zh-cn/addon.php @@ -8,10 +8,8 @@ return [ 'addon can not be empty' => '插件不能为空', 'Keep login' => '保持会话', 'Forgot password' => '忘记密码?', - 'Sign in' => '登入', 'Username' => '用户名', 'User id' => '会员ID', - 'Username' => '用户名', 'Nickname' => '昵称', 'Password' => '密码', 'Sign up' => '注 册', @@ -48,7 +46,6 @@ return [ 'Next' => '下一页', 'Last' => '末页', 'None' => '无', - 'Home' => '主页', 'Online' => '在线', 'Logout' => '注销', 'Profile' => '个人资料', @@ -61,13 +58,9 @@ return [ 'Line' => '行号', 'File' => '文件', 'Menu' => '菜单', - 'Name' => '名称', - 'Weigh' => '权重', 'Type' => '类型', 'Title' => '标题', 'Content' => '内容', - 'Status' => '状态', - 'Operate' => '操作', 'Append' => '追加', 'Memo' => '备注', 'Parent' => '父级', -- Gitee