lib.php의 글로벌 변수를 GameConst로 이동

- 계략의 게임 내 영단어를 trick에서 sabotage로 변경
This commit is contained in:
2018-04-16 02:05:46 +09:00
parent 0c9099c868
commit 1d0fb7151d
17 changed files with 148 additions and 178 deletions
+4 -4
View File
@@ -7,10 +7,10 @@ include 'func.php';
$post = WebUtil::parseJsonPost();
'@phan-var mixed[] $post';
$v = new Validator();
$v->rule('required', ['mailbox','msg']);
$v = new Validator($post);
$v->rule('required', ['mailbox','text']);
$v->rule('integer', 'mailbox');
$v->rule('lengthMin', 'msg', 1);
$v->rule('lengthMin', 'text', 1);
if(!$v->validate()){
Json::die([
@@ -21,7 +21,7 @@ if(!$v->validate()){
}
$mailbox = (int)$post['mailbox'];
$text = StringUtil::cutStringForWidth($post['msg'], 100, '');
$text = StringUtil::cutStringForWidth($post['text'], 100, '');
$session = Session::requireGameLogin([
'msgID'=>null