--- db/prgsrc/updatedb.pl 2000/11/11 04:05:52 1.19 +++ db/prgsrc/updatedb.pl 2002/01/12 05:01:36 1.23 @@ -22,7 +22,7 @@ The database, user and password are hard Dmitry Rubinstein -=head1 $Id: updatedb.pl,v 1.19 2000/11/11 04:05:52 boris Exp $ +=head1 $Id: updatedb.pl,v 1.23 2002/01/12 05:01:36 roma7 Exp $ =cut @@ -70,9 +70,11 @@ sub getField { chomp $key; if ($key eq 'Дата') { $value =~ s/^(.*)-(.*)-(.*)$/$3-$2-$1/; - my($month) = $RevMonths{$2} || '000'; - $value =~ s/$2/$month/; + my($month) = $RevMonths{$2} || '01'; + $value =~ s/-(.*)-/-$month-/; + $value =~ s/-00*$/-01/; } + $value =~ s/\s+$//; $value = $dbh->quote($value); return ($key, $value); } @@ -89,6 +91,7 @@ sub getField { } } if ($key && $value) { + $value=~s/\s+$//; $value = $dbh->quote($value); return ($key, $value); } @@ -228,7 +231,8 @@ MAIN: # my %QuestionFields = ('Тип'=> 'Type', 'Вид'=> 'Type', 'Автор' => 'Authors', 'Рейтинг'=>'Rating', - 'Источник' => 'Sources'); + 'Источник' => 'Sources', + 'Тема' => 'Topic'); my($source);