1
This commit is contained in:
@@ -796,13 +796,26 @@ class Reviewer extends Base
|
||||
//验证字数
|
||||
$content = $data['qu9contents']." ".$data['qu10contents']." ".$data['qu11contents']." ".$data['qu12contents']." ".$data['qu13contents']." ".$data['qu14contents']." ".$data['qu15contents']." ".$data['comment'];
|
||||
if(preg_match('/[\x{4e00}-\x{9fa5}]/u', $content)>0){//含有中文
|
||||
if(mb_strlen($content, 'UTF8')<60){
|
||||
return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 60 words).");
|
||||
if($journal_info['journal_id']==1){
|
||||
if(mb_strlen($content, 'UTF8')<100){
|
||||
return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 100 words).");
|
||||
}
|
||||
}else{
|
||||
if(mb_strlen($content, 'UTF8')<70){
|
||||
return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 70 words).");
|
||||
}
|
||||
}
|
||||
}else{//不含中文
|
||||
$carray = explode(" ", $content);
|
||||
if(count($carray)<60){
|
||||
return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 60 words).");
|
||||
if($journal_info['journal_id']==1){
|
||||
$carray = explode(" ", $content);
|
||||
if(count($carray)<100){
|
||||
return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 100 words).");
|
||||
}
|
||||
}else{
|
||||
$carray = explode(" ", $content);
|
||||
if(count($carray)<70){
|
||||
return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 70 words).");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user