diff --git a/application/common/lang/zh-cn/addon.php b/application/common/lang/zh-cn/addon.php index a33b83b..0491e57 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' => '父级', diff --git a/application/common/model/Attachment.php b/application/common/model/Attachment.php index 79878c6..2149aec 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; + } + }); + } }