Diff for /db/prgsrc/updatedb.pl between versions 1.17 and 1.20

version 1.17, 2000/11/11 00:30:06 version 1.20, 2001/07/21 23:59:52
Line 70  sub getField { Line 70  sub getField {
             chomp $key;              chomp $key;
             if ($key eq 'Дата') {              if ($key eq 'Дата') {
                 $value =~ s/^(.*)-(.*)-(.*)$/$3-$2-$1/;                  $value =~ s/^(.*)-(.*)-(.*)$/$3-$2-$1/;
                 my($month) = $RevMonths{$2} || '000';                  my($month) = $RevMonths{$2} || '01';
                 $value =~ s/$2/$month/;                  $value =~ s/-(.*)-/-$month-/;
                   $value =~ s/-00*$/-01/;
             }              }
             $value = $dbh->quote($value);              $value = $dbh->quote($value);
             return ($key, $value);              return ($key, $value);
Line 201  sub GetTours { Line 202  sub GetTours {
 sub CreateTour {  sub CreateTour {
     my ($dbh,$title,$ParentId,$TourNum,$rh_defaults)=@_;      my ($dbh,$title,$ParentId,$TourNum,$rh_defaults)=@_;
     my $sth = $dbh->prepare("INSERT INTO Tournaments      my $sth = $dbh->prepare("INSERT INTO Tournaments
                              (Title, Type, ParentId, TourNum)                                (Title, Type, ParentId, Number) 
                              VALUES ($title, 'Т', $ParentId, $TourNum)");                               VALUES ($title, 'Т', $ParentId, $TourNum)");
     $sth->execute;      $sth->execute;
     my $TourId = $sth->{mysql_insertid};      my $TourId = $sth->{mysql_insertid};
Line 292  MAIN: Line 293  MAIN:
             if ($key =~ /Вопрос/) {              if ($key =~ /Вопрос/) {
                 if (!$TourId) {                  if (!$TourId) {
                     $qnum = 0;                      $qnum = 0;
                     $TourId=CreateTour($dbh,'1',$TournamentId,                      $TourNum++;
                       $TourId=CreateTour($dbh,'1',$TournamentId,$TourNum,
                                        \%TourDefaults);                                         \%TourDefaults);
                     %QuestionDefaults=%QuestionGlobalDefaults;                      %QuestionDefaults=%QuestionGlobalDefaults;
                 }                  }

Removed from v.1.17  
changed lines
  Added in v.1.20


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