function beforeInsert($q, $roo)
{
if(!empty($q['_check_name'])){
- $this->checkName($roo);
+ if($this->checkName()){
+ $roo->jok('OK');
+ }
+
+ $roo->jerr('EXIST');
}
}
function beforeUpdate($old, $q,$roo)
{
if(!empty($q['_check_name'])){
- $this->checkName($roo);
+ if($this->checkName()){
+ $roo->jok('OK');
+ }
+
+ $roo->jerr('EXIST');
}
if(!empty($q['_merge_id'])){
}
if(!$company->find(true)){
- return true
+ return true;
}
return false;