diff --git a/admin/judges_schedulerconfig_check.inc.php b/admin/judges_schedulerconfig_check.inc.php
index fca7529..a542e93 100644
--- a/admin/judges_schedulerconfig_check.inc.php
+++ b/admin/judges_schedulerconfig_check.inc.php
@@ -186,13 +186,15 @@ function judges_scheduler_check_judges()
$ok=false;
}
-
-
foreach($config['languages'] AS $lkey=>$lname) {
- $jq=mysql_query("SELECT COUNT(judges.id) AS num FROM judges,judges_years,judges_languages WHERE complete='yes' AND deleted='no' AND judges_years.year='{$config['FAIRYEAR']}' AND judges_years.judges_id=judges.id AND judges_languages.languages_lang='$lkey' AND judges_languages.judges_id=judges.id");
- echo mysql_error();
- $jr=mysql_fetch_object($jq);
- $currentjudges=$jr->num;
+ $lcount=0;
+ foreach($judges AS $j) {
+ foreach($j['languages'] AS $jlang) {
+ if($jlang==$lkey) $lcount++;
+ }
+ }
+
+ $currentjudges=$lcount;
echo " ".i18n("Current number of registered judges that can judge in %1: %2",array($lname,$currentjudges))."";
echo "
";
if($currentjudges<$minjudges[$lkey]) {
@@ -202,8 +204,6 @@ function judges_scheduler_check_judges()
}
-
-
if(!$ok) {
echo " ";
echo "".i18n("Update Scheduler Configuration")." (".i18n("or get more judges!").")";