Ejemplo n.º 1
0
 function run_error_checks()
 {
     parent::run_error_checks();
     $es = new entity_selector();
     $es->add_relation('audience_integration.directory_service_value = "' . reason_sql_string_escape($this->get_value('directory_service_value')) . '"');
     $es->add_relation('entity.id != ' . $this->get_value('id'));
     $es->set_num(1);
     $conflicts = $es->run_one(id_of('audience_type'));
     if (!empty($conflicts)) {
         $this->set_error('directory_service_value', 'The Directory Service Value you entered ("' . $this->get_value('directory_service_value') . '") is already in use. Each audience must have a unique directory service value.');
     }
 }