From: Rob H. <for...@us...> - 2001-12-04 00:44:06
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv29326/bin Modified Files: sandweb.cgi Log Message: UI.pm was getting to be a pain in the ass, so I fixed it. now there are ( only only ever should be, with the way we currently use UI.pm ) only 3 subroutines - print_screen, menu_bar and get_menu. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.81 retrieving revision 1.82 diff -U2 -r1.81 -r1.82 --- sandweb.cgi 2001/12/03 23:09:40 1.81 +++ sandweb.cgi 2001/12/04 00:43:51 1.82 @@ -186,5 +186,5 @@ my %args = @_; - my $content = $ui->get_login(); + my $content = $ui->get_menu( menu => 'login' ); print header; @@ -372,5 +372,6 @@ my %return = $repository->log( file => "$filename" ); - my $content = $ui->file_info( + my $content = $ui->get_menu( + menu => "file_info", PROGNAME => $progname, LOCATION => $location, @@ -400,5 +401,6 @@ push @tmp, $line; } - my $content = $ui->view_file( + my $content = $ui->get_menu( + menu => "view_file", PROGNAME => $progname, CONTENT => "@tmp", @@ -438,5 +440,6 @@ push @tmp, $line; } - my $content = $ui->edit_file( + my $content = $ui->get_menu( + menu => "edit_file", PROGNAME => $progname, CONTENT => "@tmp", @@ -466,5 +469,6 @@ exit 0; } - my $content = $ui->create_file( + my $content = $ui->get_menu( + menu => "create_file", PROGNAME => $progname, LOCATION => $location, @@ -493,5 +497,6 @@ } - my $content = $ui->create_folder( + my $content = $ui->get_menu( + menu => "create_folder", PROGNAME => $progname, LOCATION => $location, @@ -510,5 +515,6 @@ } elsif ( $command eq 'upload' ) { - my $content = $ui->upload_file( + my $content = $ui->get_menu( + menu => "upload_file", LOCATION => $location, PROGNAME => $progname, @@ -527,5 +533,6 @@ } elsif ( $command eq 'checkout' ) { - my $content = $ui->get_checkout( + my $content = $ui->get_menu( + menu => "checkout", LOCATION => $location, PROGNAME => $progname, @@ -602,5 +609,6 @@ message => "$message", ); - my $content = $ui->get_vcs_output( + my $content = $ui->get_menu( + menu => "vcs_output", LOCATION => $location, PROGNAME => $progname, @@ -620,5 +628,6 @@ exit 0; } - my $content = $ui->get_commit( + my $content = $ui->get_menu( + menu => "commit", LOCATION => $location, PROGNAME => $progname, @@ -643,5 +652,6 @@ %return = $repository->$command( file => "$location/$filename" ); } - my $content = $ui->get_vcs_output( + my $content = $ui->get_menu( + menu => "vcs_output", LOCATION => $location, PROGNAME => $progname, @@ -677,5 +687,6 @@ my $work_dir = $userprefs->{'personal'}->{'work_dir'}; - my $content = $ui->get_preferences( + my $content = $ui->get_menu( + menu => 'preferences', PROGNAME => $progname, FULL_NAME => $full_name, @@ -709,5 +720,7 @@ my $repo_type = $userprefs->{'repository'}->{'repo_type'}; my $connection = $userprefs->{'repository'}->{'connection'}; - my $content = $ui->get_vcs_prefs( + + my $content = $ui->get_menu( + menu => "vcs_prefs", PROGNAME => $progname, SERVER => $server, @@ -848,20 +861,3 @@ } -# assign debug message to global @debug IF it's not yet set. -#sub set_debug { -# my $msg; -# return if ($msg = 0); -# if ($_[0] eq 'dump') { -# use Data::Dumper; -# $msg = Dumper($_[1]); -# } -# else { -# $msg = $_[0]; -# } -# -# push @debug, $msg; -# return 1; -#} - &main(); - |