From ace7f5bb5bce828fac3dc428056263e5d0839d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8=E9=83=A8=E8=90=BD?= Date: Mon, 6 Sep 2021 16:01:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E5=AE=A1=E6=A0=B8=E5=AF=BC=E8=87=B4=E7=BD=91?= =?UTF-8?q?=E7=AB=99=E8=BF=90=E8=A1=8C=E7=BC=93=E6=85=A2=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/source/admincp/admincp_remoderate.php | 38 ++++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/upload/source/admincp/admincp_remoderate.php b/upload/source/admincp/admincp_remoderate.php index afe7fe798..5aa2b0fc3 100644 --- a/upload/source/admincp/admincp_remoderate.php +++ b/upload/source/admincp/admincp_remoderate.php @@ -29,7 +29,7 @@ if(submitcheck('threadsubmit', 1)) { foreach(C::t('forum_thread')->fetch_all_by_displayorder(0, '>=', $current, $pertask) as $thread) { $processed = 1; foreach(C::t('forum_post')->fetch_all_visiblepost_by_tid($thread['posttableid'], $thread['tid']) as $post) { - if($censor->check($post['subject']) || $censor->check($post['message'])) { + if((!empty($post['subject']) && $censor->check($post['subject'])) || (!empty($post['message']) && $censor->check($post['message']))) { C::t('forum_post')->update($thread['posttableid'], $post['pid'], array('status' => 4), false, false, null, -2, null, 0); if($post['first'] == 1) { C::t('forum_thread')->update($thread['tid'], array('displayorder' => -2)); @@ -59,7 +59,7 @@ if(submitcheck('threadsubmit', 1)) { foreach(C::t('home_blog')->range($current, $pertask, 'ASC', 'dateline', null, 0) as $blog) { $processed = 1; $post = C::t('home_blogfield')->fetch($blog['blogid']); - if($censor->check($blog['subject']) || $censor->check($post['message'])) { + if((!empty($blog['subject']) && $censor->check($blog['subject'])) || (!empty($post['message']) && $censor->check($post['message']))) { C::t('home_blog')->update($blog['blogid'], array('status' => 1)); updatemoderate('blogid', $blog['blogid']); } @@ -82,7 +82,7 @@ if(submitcheck('threadsubmit', 1)) { foreach(C::t('home_pic')->fetch_all_by_sql('`status` = 0', 'picid', $current, $pertask, 0, 0) as $pic) { $processed = 1; - if($censor->check($pic['title'])) { + if(!empty($pic['title']) && $censor->check($pic['title'])) { C::t('home_pic')->update($pic['picid'], array('status' => 1)); updatemoderate('picid', $pic['picid']); } @@ -105,7 +105,7 @@ if(submitcheck('threadsubmit', 1)) { foreach(C::t('home_doing')->fetch_all_by_status(0, $current, $pertask) as $doing) { $processed = 1; - if($censor->check($doing['message'])) { + if(!empty($doing['message']) && $censor->check($doing['message'])) { C::t('home_doing')->update($doing['doid'], array('status' => 1)); updatemoderate('doid', $doing['doid']); } @@ -128,7 +128,7 @@ if(submitcheck('threadsubmit', 1)) { foreach(C::t('home_share')->fetch_all_by_status(0, $current, $pertask) as $share) { $processed = 1; - if($censor->check($share['body_general'])) { + if(!empty($share['body_general']) && $censor->check($share['body_general'])) { C::t('home_share')->update($share['sid'], array('status' => 1)); updatemoderate('sid', $share['sid']); } @@ -151,7 +151,7 @@ if(submitcheck('threadsubmit', 1)) { foreach(C::t('home_comment')->fetch_all_by_status(0, $current, $pertask) as $comment) { $processed = 1; - if($censor->check($comment['message'])) { + if(!empty($comment['message']) && $censor->check($comment['message'])) { C::t('home_comment')->update($comment['cid'], array('status' => 1)); updatemoderate($comment['idtype'].'_cid', $comment['cid']); } @@ -174,9 +174,9 @@ if(submitcheck('threadsubmit', 1)) { foreach(C::t('portal_article_title')->fetch_all_by_sql('`status` = 0', '', $current, $pertask) as $article) { $processed = 1; - if(!$censor->check($post['subject'])) { + if(empty($post['subject']) || !$censor->check($post['subject'])) { foreach(C::t('portal_article_content')->fetch_all($article['aid']) as $post) { - if($censor->check($post['content'])) { + if(!empty($post['content']) && $censor->check($post['content'])) { C::t('portal_article_title')->update($article['aid'], array('status' => 1)); updatemoderate('aid', $article['aid']); break; @@ -205,7 +205,7 @@ if(submitcheck('threadsubmit', 1)) { foreach(C::t('portal_comment')->fetch_all_by_idtype_status('aid', 0, $current, $pertask) as $comment) { $processed = 1; - if($censor->check($comment['message'])) { + if(!empty($comment['message']) && $censor->check($comment['message'])) { C::t('portal_comment')->update($comment['cid'], array('status' => 1)); updatemoderate($comment['idtype'].'_cid', $comment['cid']); } @@ -228,7 +228,7 @@ if(submitcheck('threadsubmit', 1)) { foreach(C::t('portal_comment')->fetch_all_by_idtype_status('topicid', 0, $current, $pertask) as $comment) { $processed = 1; - if($censor->check($comment['message'])) { + if(!empty($comment['message']) && $censor->check($comment['message'])) { C::t('portal_comment')->update($comment['cid'], array('status' => 1)); updatemoderate($comment['idtype'].'_cid', $comment['cid']); } @@ -255,47 +255,47 @@ if(submitcheck('threadsubmit', 1)) { // 主题/帖子标题及内容重新审核 showtablerow('', array('class="td31 bold"'), array( "{$lang['remoderate_thread']}:", - '' + '' )); // 日志标题及内容重新审核 showtablerow('', array('class="td31 bold"'), array( "{$lang['remoderate_blog']}:", - '' + '' )); // 图片标题重新审核 showtablerow('', array('class="td31 bold"'), array( "{$lang['remoderate_pic']}:", - '' + '' )); // 记录内容重新审核 showtablerow('', array('class="td31 bold"'), array( "{$lang['remoderate_doing']}:", - '' + '' )); // 分享内容重新审核 showtablerow('', array('class="td31 bold"'), array( "{$lang['remoderate_share']}:", - '' + '' )); // 家园评论内容重新审核 showtablerow('', array('class="td31 bold"'), array( "{$lang['remoderate_comment']}:", - '' + '' )); // 文章标题及内容重新审核 showtablerow('', array('class="td31 bold"'), array( "{$lang['remoderate_article']}:", - '' + '' )); // 文章评论内容重新审核 showtablerow('', array('class="td31 bold"'), array( "{$lang['remoderate_articlecomment']}:", - '' + '' )); // 专题评论内容重新审核 showtablerow('', array('class="td31 bold"'), array( "{$lang['remoderate_topiccomment']}:", - '' + '' )); showtablefooter(); -- Gitee