- New "Intel module" for Citadel tracking, closed #246
- added some new tables (for SDE replacement), #628 - new "index build" functions added to `/setup`, #628 - updated "Cortex" PHP ORM lib `1.5.0` -> `1.6.0-dev`
This commit is contained in:
@@ -47,32 +47,6 @@ abstract class AbstractMapTrackingModel extends BasicModel implements LogModelIn
|
||||
return array_merge(parent::getStaticFieldConf(), $this->trackingFieldConf);
|
||||
}
|
||||
|
||||
/**
|
||||
* validates a model field to be a valid relational model
|
||||
* @param $key
|
||||
* @param $val
|
||||
* @return bool
|
||||
* @throws \Exception\ValidationException
|
||||
*/
|
||||
protected function validate_notDry($key, $val): bool {
|
||||
$valid = true;
|
||||
if($colConf = $this->fieldConf[$key]){
|
||||
if(isset($colConf['belongs-to-one'])){
|
||||
if( (is_int($val) || ctype_digit($val)) && (int)$val > 0){
|
||||
$valid = true;
|
||||
}elseif( is_a($val, $colConf['belongs-to-one']) && !$val->dry() ){
|
||||
$valid = true;
|
||||
}else{
|
||||
$valid = false;
|
||||
$msg = 'Validation failed: "' . get_class($this) . '->' . $key . '" must be a valid instance of ' . $colConf['belongs-to-one'];
|
||||
$this->throwValidationException($key, $msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $valid;
|
||||
}
|
||||
|
||||
/**
|
||||
* log character activity create/update/delete events
|
||||
* @param string $action
|
||||
|
||||
Reference in New Issue
Block a user