Subversion Repositories VORC

Rev

Rev 115 | Rev 132 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 115 Rev 127
Line 626... Line 626...
626
		if ($department eq "CLA") {
626
		if ($department eq "CLA") {
627
  	  ($taken) = $shift_id ? 0 : 1;
627
  	  ($taken) = $shift_id ? 0 : 1;
628
  	} elsif ($game_based eq "game") {
628
  	} elsif ($game_based eq "game") {
629
  	  ($taken) = $dbh->selectrow_array ("select count(*) from assignment where Gid = ? and role = ?", undef, $shift_id, $role);
629
  	  ($taken) = $dbh->selectrow_array ("select count(*) from assignment where Gid = ? and role = ?", undef, $shift_id, $role);
630
  	} else {
630
  	} else {
631
  	  ($taken) = $dbh->selectrow_array ("select count(*) from shift where id = ? and isnull(assignee_id) = 0", undef, $shift_id);
631
  	  ($taken) = $dbh->selectrow_array ('select count(*) from shift where id = ? and (isnull(assignee_id) = 0 or assignee_id <> "")', undef, $shift_id);
632
  	}
632
  	}
633
  	if ($taken) {
633
  	if ($taken) {
634
  	    return ($department eq "CLA") ? "<br>Denied! This class is already full ($shift_id).<br>\n" : "<br>Denied! This shift is already taken ($shift_id).<br>\n";
634
  	    return ($department eq "CLA") ? "<br>Denied! This class is already full ($shift_id).<br>\n" : "<br>Denied! This shift is already taken ($shift_id).<br>\n";
635
  	}
635
  	}
636
  }
636
  }