인재탐색 추가. gencount, npc_id 관련 수정
This commit is contained in:
+4
-7
@@ -309,16 +309,13 @@ class Util extends \utilphp\util
|
||||
if (is_string($key)) {
|
||||
return true;
|
||||
}
|
||||
$jmp = $key - $idx - 1;
|
||||
if(!$idx + 1 == $key){
|
||||
return false;
|
||||
}
|
||||
$idx = $key;
|
||||
}
|
||||
|
||||
if ($jmp * 5 >= count($array)) {
|
||||
//빈칸이 많으면 dictionary인걸로.
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,4 +33,24 @@ class Validator extends \Valitron\Validator
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate that a field is an integer array
|
||||
*
|
||||
* @param string $field
|
||||
* @param mixed $value
|
||||
* @return bool
|
||||
*/
|
||||
protected function validateIntegerArray($field, $value)
|
||||
{
|
||||
if(!is_array($value)){
|
||||
return false;
|
||||
}
|
||||
foreach($value as $subItem){
|
||||
if(!is_int($subItem)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user