Commit f5d615aa authored by Oliver Bock's avatar Oliver Bock

DBOINCP-119: fix BOINC API calls in boincteam module (part 1)

* Also fixed a bug: $name was always uninitialized during team lookup rendering the duplicate check ineffective
parent c4387e32
......@@ -128,15 +128,16 @@ function boincteam_create_form(&$form_state) {
function boincteam_create_form_validate($form, &$form_state) {
$values = $form_state['values'];
$name = $values['name'];
if (!$values['name']) {
if (!$name) {
form_set_error('name', t('Team name is required.'));
else {
if (lookup_team_name($name)) {
if (BoincTeam::lookup_name($name)) {
form_set_error('name', t('A team named "@name" already exists.',
array('@name' => $values['name'])));
array('@name' => $name)));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment