🍻 醉酒写代码

This commit is contained in:
WispX
2019-05-08 21:38:57 +08:00
parent beb4d7f075
commit 49569036c5
2 changed files with 17 additions and 2 deletions
+5 -2
View File
@@ -107,8 +107,11 @@ class Upload extends Base
$result = json_decode($response->getBody()->getContents());
if (0 == $result->error_code) {
if ($result->rating_index >= $this->config['audit_index']) {
/*$strategy->delete($pathname);
throw new Exception('图片[' . $image->getInfo('name') . ']涉嫌违规,禁止上传!');*/
// 是否直接拦截色情图片
if (Config::get('site.intercept_salacity')) {
$strategy->delete($pathname);
throw new Exception('图片[' . $image->getInfo('name') . ']涉嫌违规,禁止上传!');
}
$suspicious = 1;
}
} else {
+12
View File
@@ -0,0 +1,12 @@
<?php
/**
* Created by WispX.
* User: WispX
* Date: 2019/5/8
* Time: 21:33
*/
return [
// 色情图片是否直接拦截
'intercept_salacity' => false,
];