Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22400/UI
Modified Files:
HTML.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: HTML.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v
retrieving revision 1.388
retrieving revision 1.389
diff -C2 -d -r1.388 -r1.389
*** HTML.pm 13 Apr 2008 03:08:09 -0000 1.388
--- HTML.pm 16 Apr 2008 13:08:04 -0000 1.389
***************
*** 1539,1542 ****
--- 1539,1561 ----
}
+ # Handle user rename
+
+ if ( exists( $self->{form_}{rename} ) &&
+ ( $self->{form_}{torename} ne '' ) && ( $self->{form_}{newname} ne '' ) ) {
+ my ( $result, $password ) = $self->classifier_()->rename_user(
+ $session,
+ $self->{form_}{torename},
+ $self->{form_}{newname} );
+ if ( $result == 0 ) {
+ $self->status_message__( $templ, sprintf( $self->language($session)->{Users_Renamed}, $self->{form_}{torename}, $self->{form_}{newname}, $password ) );
+ }
+ if ( $result == 1 ) {
+ $self->error_message__( $templ, sprintf( $self->language($session)->{Users_Rename_Failed_Exists}, $self->{form_}{torename}, $self->{form_}{newname} ) );
+ }
+ if ( $result == 2 ) {
+ $self->error_message__( $templ, sprintf( $self->language($session)->{Users_Rename_Failed}, $self->{form_}{torename} ) );
+ }
+ }
+
# Handle user removal
***************
*** 1648,1651 ****
--- 1667,1672 ----
$templ->param( 'Users_Loop_Remove' => \@remove_user_loop );
$templ->param( 'Users_If_Remove' => 1 );
+ $templ->param( 'Users_Loop_Rename' => \@remove_user_loop );
+ $templ->param( 'Users_If_Rename' => 1 );
}
$templ->param( 'Users_Loop_Edit' => \@user_loop );
|