From: naoki i. <am...@us...> - 2008-04-16 13:08:01
|
Update of /cvsroot/popfile/engine/POPFile In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22400/POPFile Modified Files: API.pm History.pm Log Message: Change Log 1. Added the UI to rename user's name UI/HTML.pm Classifier/Bayes.pm POPFile/API.pm skins/default/users-page.thtml languages/English.msg languages/Nihongo.msg tests/TestBayes.tst 2. Save the current piddir and restore in the utility scripts bayes.pl insert.pl pipe.pl 3. TestXMLRPC's child process (xmlrpc server) now terminates tests/TestXMLRPC.tst 4. Use the place holders in preparing SQL statements UI/HTML.pm POPFile/History.pm 5. Copy the global language setting to the new user's default language Classifier/Bayes.pm 6. New script to import old database to new database import.pl import.pl - import user data into the new database Usage: import.pl <old_user_dir> <user> [<newuser>] <old_user_dir> The path to the user data to import <user> The name of the user to import from Use 'admin' when upgrading from v1 <newuser> The name of the user to import into (optional) If not specified, assume newuser=user 7. Added multi user support tests tests/TestHistory.tst Current state of the test suite: TestBayesScript PASS TestBayes PASS TestConfiguration PASS * TestHistory PASS TestHTML PASS * TestHTTP PASS TestIMAP PASS TestInsertScript PASS * TestLogger PASS TestMailParse PASS TestModule PASS TestMQ PASS TestMutex PASS TestPipeScript PASS TestPOP3 PASS TestProxy PASS TestWordMangle PASS TestXMLRPC PASS * : TODO : needs to add tests for multi user support Index: History.pm =================================================================== RCS file: /cvsroot/popfile/engine/POPFile/History.pm,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** History.pm 9 Apr 2008 17:20:47 -0000 1.51 --- History.pm 16 Apr 2008 13:08:04 -0000 1.52 *************** *** 1302,1311 **** my @ids; foreach my $userid ( keys %$users ) { my $old = time - $self->user_config_( $userid, 'history_days' )*$seconds_per_day; ! my $d = $self->db_()->prepare( "select id from history ! where userid = $userid and ! inserted < $old;" ); ! $d->execute; my @row; while ( @row = $d->fetchrow_array ) { --- 1302,1311 ---- my @ids; + my $d = $self->db_()->prepare( "select id from history + where userid = ? and + inserted < ?;" ); foreach my $userid ( keys %$users ) { my $old = time - $self->user_config_( $userid, 'history_days' )*$seconds_per_day; ! $d->execute( $userid, $old ); my @row; while ( @row = $d->fetchrow_array ) { *************** *** 1313,1316 **** --- 1313,1317 ---- } } + $d->finish; foreach my $id (@ids) { $self->delete_slot( $id, 1, $session, 1 ); Index: API.pm =================================================================== RCS file: /cvsroot/popfile/engine/POPFile/API.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** API.pm 6 Apr 2008 08:27:07 -0000 1.15 --- API.pm 16 Apr 2008 13:08:04 -0000 1.16 *************** *** 98,102 **** sub get_html_colored_message { shift->{c}->get_html_colored_message( @_ ); } - sub create_user { shift->{c}->create_user( @_ ); } sub remove_user { shift->{c}->remove_user( @_ ); } sub get_user_id { shift->{c}->get_user_id( @_ ); } --- 98,101 ---- *************** *** 128,131 **** --- 127,132 ---- sub get_user_parameter_list { [ shift->{c}->get_bucket_word_list( @_ ) ]; } + sub create_user { [ shift->{c}->create_user( @_ ) ]; } + sub rename_user { [ shift->{c}->rename_user( @_ ) ]; } sub initialize_users_password { [ shift->{c}->initialize_users_password( @_ ) ]; } |