Diff for /db/prgsrc/updatedb.pl between versions 1.36 and 1.41

version 1.36, 2003/04/14 20:06:59 version 1.41, 2005/12/10 00:03:55
Line 175  sub UpdateTournament { Line 175  sub UpdateTournament {
   
 sub UpdateQuestion {  sub UpdateQuestion {
     my ($dbh, $QuestionId, $field, $value) = @_;      my ($dbh, $QuestionId, $field, $value) = @_;
       
       if (($field eq 'Type') && ($value eq "'Д'")) {
            $value = "'ЧД'";
       }
     $dbh->do("UPDATE Questions SET $field=$value       $dbh->do("UPDATE Questions SET $field=$value 
                 WHERE QuestionId=$QuestionId")                  WHERE QuestionId=$QuestionId")
         or die $dbh->errstr;          or die $dbh->errstr;
Line 277  MAIN: Line 281  MAIN:
           
     my($dbh) = DBI->connect("DBI:mysql:chgk", "piataev", "")      my($dbh) = DBI->connect("DBI:mysql:chgk", "piataev", "")
         or die "Can't connect to DB chgk\n";          or die "Can't connect to DB chgk\n";
           $dbh->do("SET NAMES 'koi8r'");
     my @sources;              my @sources;        
     open UNSORTED, ">$unsortedname";      open UNSORTED, ">$unsortedname";
     while ($source = shift) {      while ($source = shift) {
Line 372  MAIN: Line 377  MAIN:
                 next;                  next;
             }              }
   
   
               if ($key =~ /Зач[её]т/) {
                   &UpdateQuestion($dbh, $QuestionId, "PassCriteria", $value);
                   next;
               }
   
   
   
             if ($key =~ /Комментари/) {              if ($key =~ /Комментари/) {
                 &UpdateQuestion($dbh, $QuestionId, "Comments", $value);                  &UpdateQuestion($dbh, $QuestionId, "Comments", $value);
                 next;                  next;
             }              }
   
   
                           
             my @Fields = grep { $key =~ /$_/ } keys %QuestionFields;              my @Fields = grep { $key =~ /$_/ } keys %QuestionFields;
   

Removed from v.1.36  
changed lines
  Added in v.1.41


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>