From: naoki i. <am...@us...> - 2008-04-09 17:20:44
|
Update of /cvsroot/popfile/engine/UI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12124/UI Modified Files: HTML.pm Log Message: Change Log 1. The parameters are now automatically upgraded Classifier/Bayes.pm Parameters in the configration file (popfile.cfg) are automatically upgraded to the POPFile database as the admin's parameters exept for the password of the UI (html_password). 2. A new global option 'language' (GLOBAL_language) POPFile/Configuration.pm Classifier/Bayes.pm tests/TestBayes.tst tests/TestMailParse.tst This setting is used by POPFile to decide whether it runs some language specific codes. e.g. if GLOBAL_language is 'Nihongo', POPFile will handle Japanese texts correctly. And it is used as the default language setting for the users. TODO: In the single user mode, POPFile's 'global' language setting should be equaled to the admin's setting. 3. Localized UI strings are now cached per user (session) UI/HTML.pm tests/TestHTML.tst All of the users shared the language cache till now. If a user changed the language setting, the cache will be updated, and affect the other users' UI. The user's cache will be cleared when the session is rleased. 4. The magnet tab always show the localized magnet types UI/HTML.pm skins/default/magnet-page.thtml 5. Cookie will be deleted when closing web browsers UI/HTML.pm I think there's no need to store the cookie for two weeks. 6. Removed almost all of the hardcoded user id 1 UI/HTML.pm Classifier/Bayes.pm POPFile/History.pm 7. Login page for the single user mode UI/HTML.pm skins/default/password-page.thtml languages/English.msg languages/Nihongo.msg If admin has a password, login page will be shown even in the single user mode 8. commit_history is called before the session key is released Classifier/Bayes.pm POPFile/History.pm Avoid the 'Invalid session key' error occuring when POPFile is updating the history. 9. Messages are now ordered by their types. POPFile/MQ.pm Messages are handled in following order: 1 CREAT 2 LOGIN 3 UIREG 4 COMIT 5 TICKD 6 RELSE In some case, COMIT had been processed before the session key is created by CREAT. This caused the 'Invalid session key' errors. 10. TestPOP3 is now passed tests/TestPOP3.tst tests/TestMailParse029.msg tests/TestMailParse029.cam tests/TestMailParse029.wrd 11. Fixed some tests to output their result correctly tests/TestBayesScript.tst tests/TestConfiguration.tst tests/TestHTTP.tst tests/TestInsertScript.tst tests/TestProxy.tst Current state of the test suite: TestBayesScript PASS TestBayes PASS TestConfiguration PASS * TestHistory fail * TestHTML PASS * TestHTTP PASS TestIMAP not tested yet TestInsertScript PASS * TestLogger PASS TestMailParse PASS TestModule PASS TestMQ PASS TestMutex PASS TestPipeScript PASS TestPOP3 PASS TestProxy PASS TestWordMangle PASS TestXMLRPC PASS (but child process does not terminate) * : needs to add tests for multi user support TODO 1. multi user mode tests are needed tests/TestConfiguration.tst tests/TestHistory.tst tests/TestHTML.tst tests/TestInsertScript.tst Index: HTML.pm =================================================================== RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v retrieving revision 1.386 retrieving revision 1.387 diff -C2 -d -r1.386 -r1.387 *** HTML.pm 6 Apr 2008 08:27:08 -0000 1.386 --- HTML.pm 9 Apr 2008 17:20:47 -0000 1.387 *************** *** 186,189 **** --- 186,190 ---- $self->mq_register_( 'UIREG', $self ); $self->mq_register_( 'LOGIN', $self ); + $self->mq_register_( 'RELSE', $self ); $self->calculate_today(); *************** *** 216,234 **** # translated will still appear [...1097 lines suppressed...] *** 3970,3976 **** sub language { ! my ( $self ) = @_; ! return %{$self->{language__}}; } --- 3997,4007 ---- sub language { ! my ( $self, $session ) = @_; ! if ( defined($session) && defined($self->{language__}{$session}) ) { ! return $self->{language__}{$session}; ! } else { ! return $self->{language__}{global}; ! } } |